Questions

Answer for:

RoboCopy or XXCopy...whatever, I need syntax!?

Message 10 of 14

View entire thread
+
0 Votes
donr484

I think you'd want to use this command line:

ROBOCOPY \\sourcepc\sourceshare \\destinationpc\destinationshare /COPYALL /B /E /XN /R:10 /W:2 /LOG:\\loggingpc\logfileshare\logfile.txt /NFL /NDL

Options:

/COPYALL copies all file attributes from source
/B uses backup mode
/E copy subdirectories including empty ones
/XN skips newer files already in the detination
/R:10 /W:2 will attempt with 10 retries and 2 seconds between each
/NFL don't include every file name in log (for a summary count)
/NDL don't include every folder name in log (for a summary count)

Note:

If you want to list all the folders and files affected in the log, remove /NFL /NDL

---

I usually build a summary log file, overwriting the last one. Then I use a vbscript to email the text of log file when it completes.

ROBOCOPY is very robust and flexible. On a WAN where manually copying and pasting 2GB+ files causes older WatchGuard Fireboxes to crash, ROBOCOPY will copy dozens of GBs of huge SQL BAK files over the internet without fail.

You can also specify complex scenarios like only copy the newest source file that starts with a certain name to the destination from specific sub folders in the source, which is great for folders containing timestamped filenames.

Hope it helps!