SyntaxFix
Write A Post
Hire A Developer
Questions
Use the built-in ERRORLEVEL Variable:
echo %ERRORLEVEL%
But beware if an application has defined an environment variable named ERRORLEVEL!