I have a folder with a ton of sub folders, within those subfolders are zipped files.
I was wondering how to unzip those files into a folder named after the zip file So for example:
C:\Archives\Photos\A.zip
C:\Archives\Videos\B.zip
C:\Archives\Documents\C.zip
would turn into
C:\Archives\Photos\A\
C:\Archives\Videos\B\
C:\Archives\Documents\C\
I can do this currently but only if i do it one folder at at time, i was wondering if there was a way to do it all at once, I was thinking a .bat file.
gci C:\Archives\*.zip -r|%{&'7z.exe' x $_.FullName -o$_.Directory+$_.BaseName }would do also. – LotPings Aug 24 '17 at 21:05I've tried running the script and i keep getting the following error:
Get-ChildItem : A positional parameter cannot be found that accepts argument '%'. At line:1 char:1
- Get-ChildItem -Filter *.zip -Recurse H:\Literature\To-Sort % { $_.Fu ...
-
– Chris Jackson Sep 01 '17 at 20:04Get-ChildItem -Filter *.zip -Recurse C:\Archiveson its own? – FosseWay Oct 02 '17 at 15:46