I'm newbie in using batch on Windows and have a question about the use of errorlevel.
I referenced TechNet(Exit) and many examples on google.
Most of them used /b with %errorlevel% like this
if errorlevel 1 exit /b %errorlevel%
I wonder the difference between
if errorlevel 1 exit /b
and
if errorlevel 1 exit /b %errorlevel%
I think there are no difference because %errorlevel% is not changed. Am I wrong?
copy j:\not_existing q:\not_existing & echo !errorlevel!
… – Swept