Why does robocopy display some files as modified?

8.6k Views Asked by At

I have 15+ data files I am trying to force overwrite with robocopy. I use the following command line switches:

C:\>robocopy d:\datafolder f:\backup datafile*.dat /is /fft /MT:32

15 files copy successfully as expected.

I immediately run the following command hoping to see all 15 files targeted to be overwritten but 4 show a status of "modified" to be skipped.

C:\>robocopy d:\datafolder f:\backup datafile*.dat /is /fft /MT:32 /v /l

Here is the log of both executions:

C:\>robocopy d:\datafolder f:\backup datafile*.dat /is /fft /MT:32

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : Thursday, December 22, 2016 11:35:45 AM
   Source : d:\datafolder\
     Dest = f:\backup\

    Files : datafile*.dat

  Options : /FFT /DCOPY:DA /COPY:DAT /IS /MT:32 /R:1000000 /W:30

------------------------------------------------------------------------------

100%        New File               1.0 g        d:\datafolder\datafile0.dat
100%        New File               1.0 g        d:\datafolder\datafile00.dat
100%        New File               1.4 g        d:\datafolder\datafile01.dat
100%        New File             600.0 m        d:\datafolder\datafile1.dat
100%        New File               2.0 g        d:\datafolder\datafile11.dat
100%        New File               2.0 g        d:\datafolder\datafile12.dat
100%        New File               2.0 g        d:\datafolder\datafile13.dat
100%        New File             500.0 m        d:\datafolder\datafile2.dat
100%        New File             700.0 m        d:\datafolder\datafile3.dat
100%        New File             500.0 m        d:\datafolder\datafile4.dat
100%        New File             600.0 m        d:\datafolder\datafile5.dat
100%        New File             600.0 m        d:\datafolder\datafile6.dat
100%        New File               1.0 g        d:\datafolder\datafile7.dat
100%        New File               1.0 g        d:\datafolder\datafile8.dat
100%        New File               1.0 g        d:\datafolder\datafile9.dat

------------------------------------------------------------------------------

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         1         1         0         0         0
   Files :        15        15         0         0         0         0
   Bytes :  15.882 g  15.882 g         0         0         0         0
   Times :   1:57:36   0:09:00                       0:00:00   0:00:49
   Ended : Thursday, December 22, 2016 11:45:35 AM


C:\>robocopy d:\datafolder f:\backup datafile*.dat /is /fft /MT:32 /v /l

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : Thursday, December 22, 2016 11:45:50 AM
   Source : d:\datafolder\
     Dest = f:\backup\

    Files : datafile*.dat

  Options : /FFT /V /L /DCOPY:DA /COPY:DAT /IS /MT:32 /R:1000000 /W:30

------------------------------------------------------------------------------

              modified           600.0 m        d:\datafolder\datafile1.dat
              modified           500.0 m        d:\datafolder\datafile2.dat
              modified           700.0 m        d:\datafolder\datafile3.dat
              modified           500.0 m        d:\datafolder\datafile4.dat
100%        Same                   1.0 g        d:\datafolder\datafile0.dat
100%        Same                   1.0 g        d:\datafolder\datafile00.dat
100%        Same                   1.4 g        d:\datafolder\datafile01.dat
100%        Same                   2.0 g        d:\datafolder\datafile11.dat
100%        Same                   2.0 g        d:\datafolder\datafile12.dat
100%        Same                   2.0 g        d:\datafolder\datafile13.dat
100%        Same                 600.0 m        d:\datafolder\datafile5.dat
100%        Same                 600.0 m        d:\datafolder\datafile6.dat
100%        Same                   1.0 g        d:\datafolder\datafile7.dat
100%        Same                   1.0 g        d:\datafolder\datafile8.dat
100%        Same                   1.0 g        d:\datafolder\datafile9.dat

------------------------------------------------------------------------------

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         1         1         0         0         0
   Files :        15        11         4         0         0         0
   Bytes :  15.882 g  13.636 g   2.246 g         0         0         0
   Times :   0:00:00   0:00:00                       0:00:00   0:00:00
   Ended : Thursday, December 22, 2016 11:45:50 AM

Anyone know why those 4 files are showing as modified and therefore being skipped?

1

There are 1 best solutions below

0
On

Possibly problem is that these files are identical for robocopy - if timestamp and file size are the same robocopy will not copy/move files. To move or copy such files you have to add /IT option:

/IT :: Include Tweaked files - A Tweaked file is defined to be one that exists in both the source and destination, with identical size and timestamp, but different attribute settings.

Some links to read:

How does Robocopy determine if a file is “changed”,

Robocopy Syntax, Command Line Switches and Examples,

What does Robocopy mean by tweaked