Use Robocopy for bulk file copy
Windows Explorer is probably the slowest option to copy files.
A faster choice is to use robocopy (Robust File Copy). This guide is provided, "as is", please, use this at your own risk.
Note the following:
- You need to start PowerShell (or CMD) in Administrator mode because you need that to copy all the file attributes. (If it still gives you an error, remove the Copyall and the zb parameters, they can cause such issues.)
- You need to create the Temp folder (or specify a folder that exists) for the log file.
- This is where robocopy is: "C:\Windows\system32\robocopy.exe" if cmd doesn’t find it
- You can use a drive path (C:\...) or a network share (\\...\..) )for both source and target
robocopy \\networkcomputer\source C:\target /S /COPYALL /DCOPY:T /ZB /E /TEE /R:5 /MT:32 /LOG+:”C:\Temp\robolog.txt”
/S Preserve folder structure
/COPYALL copying all NTFS ACLs, file owners, and all file attributes.
/DCOPY:T preserve timestamps on folders
/ZB: restart mode if you hit a warning or error during the copy (slower copy)
/E copy empty directories
/TEE Output to console window, as well as the log file.
/R:n Number of retries on failed copies
/MT:n Multi-threaded
/LOG+:file Output status to LOG file (append to existing log).
If you copy from the root level of a drive (e.g. Z:\) the destination folder might be created with special system attributes which makes Windows hide these files. To unhide them, use the below command in an elevated PowerShell:
attrib -h -s C:\D_backup
No Comments