KB ID 0000810
If I’m migrating client data, I use Xcopy a lot, especially if I want to preserve the permissions. One of the questions I usually ask is “Do any of your users have file names that are very long, i.e. longer than 256 characters?” Because if you are moving a lot of data and it’s been running for a few hours, then suddenly fails saying ‘Insufficient Memory‘, then that’s probably what the problem is.
1. At the point of failure, you will have successfully moved some data, so you want a solution that just moves the remaining data, Robocopy will do that for you.
Syntax robocopy "source" "destination" "options" robocopy S: D:Shared /MIR /SECFIX /SEC Note:Robocopy by default will retry 1000000 times, and wait 30 seconds each time (if it has a problem). You might want to add /R:3 /W:1 as switches to stop that.
/MIR – Mirror the two locations, this will copy the difference IN BOTH DIRECTIONS! (Simply use /E if you don’t want this).
/SECFIX – Checks the Permissions on ALL FILES as it goes through (to make sure)
/SEC – Copies the data with its security ACL’s intact.
Use Robocopy to copy only newer files/folders
Thankfully this is the default behaviour, simply run the same command again.
Related Articles, References, Credits, or External Links