In a C program if we want to give some input from terminal then we can give it by:
int main(int argc, char *argv[])
In the same way, if we
In DOS/Windows you can use errorlevel
within a batch file
executable optional arguments
if errorlevel 4 goto LABEL4
if errorlevel 3 goto LABEL3
if errorlevel 2 goto LABEL2
if errorlevel 1 goto LABEL1
:SUCCESS
echo SUCCESS; errorlevel 0
goto :eof
:LABEL1
echo FAILURE; errorlevel 1
goto :eof
:LABEL2
echo FAILURE; errorlevel 2
goto :eof
REM ...
Just remember to check from the greatest to the lowest because if errorlevel 42
really means "if errorlevel is 42 or greater"