Search code examples
powershell7zip

unzip file using 7z in powershell


What is the command to unzip a file using 7z in powershell?

set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
sz x  $zipfilePath $destinationUnzipPath -aoa -r;

The command works fine but it says no files to process, everything is Ok rather than unzipping the file?


Solution

  • This finally worked for me sz x -o$destinationUnzipPath $zipfilePath -r ;