Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

7zip All Files Seperately Within Root Path Using Windows Powershell

DZone's Guide to

7zip All Files Seperately Within Root Path Using Windows Powershell

·
Free Resource
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:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}