How would you translate this xcopy command into Robocopy:
xcopy *.* "C:\DestinationFolder\"
Keeping in mind that the current folder where the command is run changes dynamically (and hence the source folder is unknown in advance).
Thanks.
The easiest way to copy a folder with all files and subfolders is to run this command: robocopy c:\temp\source c:\temp\destination /E /DCOPY:DAT /R:10 /W:3. The /E switch tells Robocopy to copy all subfolders, including empty ones. If you don't want to copy empty subfolders, use the /S switch.
Excludes existing files with the same timestamp, but different file sizes. Source directory files newer than the destination are excluded from the copy. Source directory files older than the destination are excluded from the copy. Excludes extra files and directories present in the destination but not the source.
Source Options /S - Copy subfolders. /E - Copy subfolders including empty folders (useful for recreating a folder structure) /COPYALL - Copy all file info, such as attributes and timestamps. /MAXAGE & /MINAGE - Use these to filter the file ages, either maximums or minimums.
The average Disk Read Transfer is better for XCopy (76.15 MB/Sec vs. 75.28 MB/Sec), the minimum Disk Read Transfer is better for Robocopy (4.74 MB/Sec vs. 0.00 MB/Sec) and the maximum Disk Read Transfer is better for XCopy (218.24 MB/Sec vs. 213.22 MB/Sec).
robocopy . "c:\dest"
Note you don't need to specify a wildcard in robocopy, by default it copies everything unless you use the /xf /xd flags to exclude certain files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With