Learning More Windows 10 Stuff
My last post talked about using xcopy to copy a bunch of files from one server to another. I had been running this for a day, but a couple of times the command failed with the error “Insufficient Memory”. Since my new server has four times as much memory and three or four times as much disk space, I didn’t think that error was actually true. A quick google search shows that this message usually comes up when filenames are over 255 characters long, which was going to be a problem for me. Instead, robocopy (robust copy) should be used. The command I’m now trying is:
robocopy U:\ F:\data /MIR /Z /XA:H /W:10
/MIR = specifies that robocopy should mirror the source directory and the destination directory. Beware that this may delete files at the destination
/Z = ensures robocopy can resume the transfer of a large file in mid-file instead of restarting
/XA:H = makes robocopy ignore hidden files, which is usually system stuff that we don’t care about
/W:10 = reduces the wait time between failures to 10 seconds instead of the 30 second default
There’s also one very large directory with software that I’ve downloaded that I don’t want to copy. I can always just redownload it, so no sense in taking up space on my backup drive. So the command that I’m finally using is:
PS C:\> robocopy f:\data j:\edgwin\data /MIR /Z /XA:H /W:10 /XD "F:\data\installed_software"