REM Usage: .\unpack.bat filename.zip REM Usage: .\unpack.bat filename.zip c:\ @echo off set FILENAME=%1 if NOT "%~2" == "" ( set DESTPATH=%2 powershell -command "Expand-Archive -Force -Path '%FILENAME%' -DestinationPath '%DESTPATH%'" ) else ( powershell -command "Expand-Archive -Force -Path '%FILENAME%' -DestinationPath '%~dp0'" )