DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

7zip All Files Seperately Within Root Path Using Windows Powershell

  • submit to reddit
        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.