Return Codes, Exit Codes, and %errorlevel%

General News

Gah! The one thing that always gets me with working with so many different programming langauges (C#, T-SQL, Perl, VB, DOS) is that they each tend to refer to the same thing with a slightly different name. (If you read Perl: same foo, different bar).

Today when stepping out of T-SQL land and into DOS, I had a little trouble trying to track down the return codes exit codes for the windows XCOPY tool. In case you've had the same problem here are the:

Exit codes for xcopy, Return codes for xcopy, and %errorlevel% for xcopy

The following table lists each exit code for xcopy and a description.

Exit codeDescription
0Files were copied without error.
1No files were found to copy.
2The user pressed CTRL+C to terminate xcopy.
4Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.
5Disk write error occurred.

See the MSDN Documentation.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Trackback

Trackback URL for this entry: http://www.julian-kuiters.id.au/trackback.php/xcopy-exit-return-codes

No trackback comments for this entry.
Return Codes, Exit Codes, and %errorlevel% | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.


Gold Coast Aquarium Maintenance | Gold Coast Marine Fish | Gold Coast Tropical Fish
Jewel Jones - Counselling Service - Penrith, Richmond
 
     
 Copyright © 2012 Julian Kuiters
 All trademarks and copyrights on this page are owned by their respective owners.