Can I check the return code of my command line?

Home  Previous  Next

Unfortunately, it is not possible to retrieve and verify the code that is returned at the end of the execution of a command line. A possible work-around to this is to modify your command line to make it write the return code:

Under Windows: MYCOMMAND.EXE && echo %ERRORLEVEL%
Under UNIX/Linux: mycommand; echo $?

Then setup a new string search or a numeric value extraction to interpret this return code.