Ah, Robocopy, great program. Every two years or so I need it. But now I can't find the batch file I kept all my robocopy commands in. Sigh.
I need to copy a folder from one drive to another. Keep everything, include empty directories. 5 retries. Results to go into a text file. I think it should be
Robocopy C:\Relay d:\Relay /MIR /R:5 /log+:r_copy.log
This works. But just want to make sure - aAm I missing anything here?
RELATED:
4 Replies
Looks perfect. Mirror, 5 retries, append log.
here's this if you haven't seen it.
http:/
The GUI robocopy job builder is also useful for the command line adverse:
http:/
Hmm, I remember one more thing. How do I get it to only list the files that failed to copy?
Here's the relevant section from the help doc, looks like you want /NFL This "turns off logging of file names. File names are still shown, however, if file copy error occurs".
· Control what is written to the output log.
Use the /TS (Time Stamps) switch to include source file timestamps in the output.
Use the /FP (Full Paths) switch to include full file pathnames in the output.
Use the /NC (No Classes) switch to remove Robocopy file classes from the output.
Use the /NS (No Sizes) switch to remove file and directory sizes from the output.
Use the /NFL (No File List) switch to suppress logging of file names.
Use the /NDL (No Directory List) switch to suppress logging of directory names.
Use the /NJH (No Job Header) switch to suppress output of the job header.
Use the /NJS (No Job Summary) switch to suppress output of the job summary.
Note:
File copy failures will still be logged even if /NFL is used.
Note
If /NDL is used on its own, log files will contain fewer lines, but may use more disk space, as full pathnames of files will be logged instead of simple names.
· Log output to both the console window and a log file on disk, simultaneously.
Use /TEE to request simultaneous output to both the screen and also a log file specified by /LOG or /LOG+. This enables you visually monitor progress in a small console window on screen, while the full log is also written to disk.