1921 shaares
10 private links
10 private links
6 results
tagged
ERRORLEVEL
The differences between .CMD and .BAT as far as CMD.EXE is concerned are: With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD files will set ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL only on errors.
Don't forget that reading the errorlevel clears it.
We are causing the ErrorLevel variable to be reset by just performing a command that we know will succeed