Powershell – unzip file using 7z in powershell

7zippowershell

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?

Best Answer

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