Advertisement
Guest User

Errorlevel Checking

a guest
Oct 21st, 2014
833
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. dir *.txt
  2. echo %errorlevel%
  3. Rem echos '0'
  4.  
  5. xcopy .\NotARealFile.txt c:\tmp
  6. echo %errorlevel%
  7. Rem Echos '4' because the file doesn't exist.
  8.  
  9. dir *.txt && xcopy .\NotARealFile.txt c:\tmp >> logfile.txt
  10. echo %errorlevel%
  11. Rem Echos '4' because the file doesn't exist.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement