Tuesday, March 22, 2011

Robocopy error codes

If you want a tool for copying or moving big folders containing many files through different filers, Robocopy is the best (in terms of security and reliability) solution that I have seen. The only problems is the number of different possible error codes which can show up in your logfiles. That's why I have decided to sum them up here in a post for easier troubleshooting:
  • ERROR 2 (0x00000002) The system cannot find the file specified.
  • ERROR 3 (0x00000003) The system cannot find the path specified.
  • ERROR 5 (0x00000005) Access is denied.
  • ERROR 6 (0x00000006) The handle is invalid.
  • ERROR 32 (0x00000020) The process cannot access the file because it is being used by another process.
  • ERROR 51 (0x00000033) Scanning Destination Directory: Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
  • ERROR 53 (0x00000035) The network path was not found.
  • ERROR 58 (0x0000003A) Copying NTFS Security to Destination File:  The specified server cannot perform the requested operation
  • ERROR 64 (0x00000040) The specified network name is no longer available.
  • ERROR 112 (0x00000070) There is not enough space on the disk.
  • ERROR 121 (0x00000079) The semaphore timeout period has expired.
  • ERROR 1359 (0x0000054F) Scanning Source Directory:  An internal error occurred.
You could then use 
type *.log | find /i "0x00000005"
to retrieve all the access denied errors.

type *.log | find /i "0x00000070"
to retrieve all the errors due to insufficient disk space on the destination.

I hope you will find this resource useful!


  1. Thanks for your info,
    but how to user these exit code in script.

    please help.

  2. In batch files each command has an errorlevel, so you could make a batch file like this:

    @echo off
    type *.log | find /i "0x00000035"
    REM In case of network not found:
    ECHO Network path was not found!

    You can add as many IF statements as you like.

    Hope this helps!

  3. Nice post.Another software alternative that works is "LongPathTool" for error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.


Related Posts Plugin for WordPress, Blogger...