The command interpreter cmd.exe has a concept
known as the error level ,
which is the exit code of the program most recently run.
You can test the error level with the IF ERRORLEVEL command: IF ERRORLEVEL 1 ECHO error level is 1 or more <sidebar>
Read More...