Sign in with
Sign up | Sign in

Batch File Error Trapping

Last response: in Windows XP
Share


Most executables will report 0 as ERRORLEVEL if everything went good and some higher numbers for different errors. Perhaps in your case you could try with some line like this after each COPY for example:

IF NOT "%ERRORLEVEL%"=="0" ECHO Copy error. >> C:\your-log-file.txt

Ask the community
!