Windows Command-Line

Scripting

Exit code

The most recent exit code can be retrieved with %ERRORLEVEL%.