7zip - Use powershell/7za.exe to extract multiple zip files? -


the following code

ls *.zip | % { c:\bin\7za.exe e $_ -o..\..\unzipped } ls *.zip | % { c:\bin\7za.exe e $_.name -o..\..\unzipped } 

got following error messages. powershell calling exe file convention issue?

 error: incorrect command line  error: incorrect command line  error: incorrect command line .... 

this has 7-zip command line 7za.exe tool. use relative path output directory, wrap double quotes as

ls *.zip | % { c:\bin\7za.exe e $_.fullname -o"..\..\unzipped" } 

note path relative current directory, not archive or 7za.exe.