batch file that checks the return code of executables it runs
Posted on 2011-04-20
i want to write a DOS batch file that does the following in pseudocode:
1) runs executable 1,
2) depending on exe 1's exit code, either exit the batch file with a exit code that tells the scheduler that runs the bat file something went wrong, or execute the 2nd executable (exe 2 must not execute until exe 1 is done)
3) if exe 2's exit code is an error, exit the batch file with an error exit code.