Take Command / TCC Help v. 13.03

ERRORLEVEL

Hide Navigation Pane

ERRORLEVEL

Previous topic Next topic No directory for this topic No expanding text in this topic  

ERRORLEVEL

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Comments (...)

ERRORLEVEL is an alternate name (included for compatibility with CMD) for the ? variable, and is the exit code of the last external command. Many programs return 0 to indicate success and a non-zero value to signal an error. However, not all programs return an exit code. If no explicit exit code is returned, the value of ERRORLEVEL is undefined.

 

WARNING: For compatibility with CMD, some internal commands, e.g., DIR, also set this variable to the same value as the variable _?, which destroys the code from the last external command. If you need to preserve the return value of the external command, save the value in a variable immediately upon command completion, and use the saved variable instead. We also strongly recommend that for internal commands you query the _? variable instead.

 

See also _?

Comments (...)