batch file - Errorlevels set by commands on Windows -
i have batch program calls several child batch programs , make extensive use of various windows commands. in case of error, provide logging information error details user.
how know various error codes (a number in range 0 256) these commands can return , interpretations in english?
if on dos (which highly doubt) way is
command if errorlevel 255 echo 255 if errorlevel 254 echo 254 if errorlevel 253 echo 253 ... if errorlevel 1 echo 1 if errorlevel 0 echo 0
the interpretations in natural language you, should know did try there.
note on windows can do
command echo %errorlevel%
Comments
Post a Comment