Robocopy
Use robocopy to copy files when performance and security are required.
- robocopy <source> <destination>
use /e for all directories recursively
use /mir if you want all the files to match from source to destination (will delete any files not the same)
Clone Disk
If you need to clone a disk make sure to copy all permissions and attributes of the files with all folders from the root directory:
- robocopy <source> <destination> /copyall /e /xd "System Volume Information" /log:<log_file_path> /mt
- robocopy F:\ G:\ /copyall /e /xd "System Volume Information" /log:C:\temp\logfile.log /mt
Large Data Transfer
When transferring large amounts of files make sure to use the /mt switch to enable multi threaded performance. The default is for 8 threads but you can specify more with a number after the switch: /mt:16 for 16 threads etc.