After I use Robocopy to copy a folder, I sometimes get failures in the run log summary at the bottom (please see picture), however, I don’t see how to locate them in the actual list of files in the log. How can I locate the failures in the list?
-
1if my answer was helpful please consider to accept it. otherwise some feedback would be nice. – Albin Jul 13 '21 at 18:41
2 Answers
You can search your log for the keyword ERROR:
With failed files, instead of the percentage (87%, 100% etc.) under a file entry (e.g. "New File") in the log you will find an error message with the error number e.g. ERROR 32 and a description e.g. The process cannot access the file because it is being used by another process.
For example this one:
Note that Folders can fail as well not only files.
Alternatively you can use the appropriate switches to "filter" the output of the log. The question on how to do it has already been answered several times, e.g. here: Robocopy, how to log only errors?
When it comes to individual logging requirements it's a good idea to get familiar with the logging options (source):
/L : List only.
/X : Report all extra files.
/V : Verbose output.
/TS : Include source file Time Stamps.
/FP : Include Full Pathname of files.
/BYTES : Print file sizes as bytes.
/NS : Don't log file sizes.
/NC : Don't log file classes.
/NFL : Don't log file names.
/NDL : Don't log folder names.
/NP : Don't show progress of operation.
/ETA : Show Estimated Time of Arrival of copied files.
/LOG:file : Output status to a LOG file. Overwrite existing file
/LOG+:file : Append existing output status to an existing LOG file.
/UNILOG:file : Output status to a Unicode LOG file. Overwrite existing file
/UNILOG+:file : Append existing output status to an existing Unicode LOG file.
/TEE : Output to console window and log file.
/NJH : Don't output Job Header.
/NJS : Don't output Job Summary.
- 10,559
-
Logging with /v I get 4 failed files in the summary, but no lines containing "ERROR". I suspicion that robocopy fails to log errors (but counts them up) sometimes and that this is part of why people keep asking this question. – Ron Burk Oct 26 '21 at 19:59
-
Interesting, I haven't experienced this yet, can you reproduce it, and find out which files weren't logged and why? – Albin Oct 27 '21 at 11:01
-
Catch-22: I need to know which of the gazillion files (35MB log file) failed to figure out why. :-) If I ever do, will follow up here. – Ron Burk Oct 28 '21 at 02:22
-
:-) Sorry, I'm a programmer. Before I would spend the time to log(n) 70GB of seven hundred thousand files, I would just write my own backup code. – Ron Burk Oct 30 '21 at 18:36
A regular expression can do it:
( {9}[1-9]| {1,9}[0-9][0-9]+) {1,9}[0-9]+$
I'm using it with Notepad++

