robocopy extra files that are not extra

4.3k views Asked by At

I use a simple robocopy command, meaning

robocopy source dest "*.xml"

I expect it to copy all XML files that are new or were modified (different time stamp or size) to dest. And it is exactly what robocopy does, however, robocopy recognize all the existing XML files in dest as extra files (even if they have corresponding files in source), then copies all XML files from source and replaces existing XML files in dest with the new ones (which in most cases are exactly the same, they have identical name, time stamp and size). See the log:

*EXTRA File            14552 2015/06/11 14:02:49    AA33362_2015-06-11T16_02_49_t521493.xml
  New File             14552 2015/06/11 14:02:49    AA33362_2015-06-11T16_02_49_t521493.xml
0%  
100%

Since in dest there are many files and only few of them are new or were modified, it's far from an optimal solution.

Do you have any idea how to force robocopy to recognize files in source and dest as the same files? Or what is the reason why robocopy behaves this way?

0

There are 0 answers