@echo off setlocal EnableExtensions if "%~1"=="" ( echo Usage: %~nx0 archive.zip exit /b 2 ) if not exist "%~1" ( echo Archive not found: %~1 exit /b 1 ) where 7z >nul 2>&1 if errorlevel 1 ( echo 7-Zip not found. Add 7z.exe to PATH. exit /b 1 ) 7z l "%~1" if errorlevel 1 ( echo Could not read archive. exit /b 1 ) exit /b 0