robocopy : Moving to new computers

 I used robocopy to move data from old computers (multiple) to my new computer. Learning it was painful. Here is what you need to know:

Instructions

  1. Copy into notepad and edit:

    robocopy D:\Source\ C:\Destination\ /log:C:\log_01.txt /xj /r:0 /w:0 /mir /np /b /L

  2. Substitute your source directory, destination directory, and logfile path.
  3. Open a CMD prompt with Run as Administrator.
  4. Run once with /L. This will fill the log with what would have copied, but not actually copy anything.
  5. Review the log. Search for ERROR.
  6. Remove the /L and run it.
  7. Examine the logfile.
  8. If necessary, run it again to get anything you corrected from the log.

Notes

/log: - The logfile is desirable because it is much (orders of magnitude) faster than having all the output go to the CMD prompt.

/xj - Exclude junction points. These are usually links to other directories, this will prevent an infinite loop of subfolders.

/r:0 - no retries.

/w:0 - no waiting.

/mir - Mirror the directory.

/np - Don't fill up the log file with progress percentages.

/b - Uses backup mode, overrides permissions.


Deleting a big, bad directory

  1. Create an empty directory
  2. robocopy EmptyDirectory\ DirectoryToDelete\ /mir /R:0 /W:0 > nul




Comments