Over a million developers have joined DZone.

7zip All Files Seperately Within Root Path Using Windows Powershell

·
It's nothing but a one-liner:


foreach ($item in getChilditem) { 7z.exe a -mx9 -ms=on $item $item}


BTW, the double $item is no error - the first one refers to the item name and the secound one to the item to be added.

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}