rajeshkumar created the topic: check the exit code of the last command in batch file?
Test for a return code greater than or equal to 1:
if ERRORLEVEL 1 echo Error
or
if %ERRORLEVEL% GEQ 1 echo Error
or test for a return code equal to 0:
if %ERRORLEVEL% EQU 0 echo OK
You can use other commands such as GOTO where I show echo
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
Latest posts by Rajesh Kumar (see all)
- What Popular Apps Were Built With C/C++. Why Other Programming Languages Would Not Suit? - January 9, 2025
- Top 11 DevOps consulting companies in 2024. - January 8, 2025
- Atlassian Jira Demo - January 4, 2025