robocopy doesn't copy "same" files

D

danil.kopytov

Hi,

I found some unexpected behaviour of robocopy on Windows Server 2016.
When i try to overwrite file with the same timestamp, but different content, robocopy does nothing. (yes, i use /IS option)


Details below.

OS Version: Microsoft Windows Server 2016 Standard Build 14393
Robocopy Version: 10.0.14393.0


Two config files for different environments. Configs are automaticaly genereted so they have the same timestamp:

PS C:\wrk> (Get-Item .\Settings\front.api.csf).LastWriteTime
Friday, January 25, 2019 1:24:23 PM
PS C:\wrk> (Get-Item .\Settings.m101\front.api.csf).LastWriteTime
Friday, January 25, 2019 1:24:23 PM


Content is different:

PS C:\wrk> Compare-Object (Get-Content .\Settings\front.api.csf) (Get-Content .\Settings.m101\front.api.csf)
InputObject SideIndicator
----------- -------------
ListeningPort = 4444 =>
ListeningPort = 3333 <=


Try to merge directory content and overwrite the same files:

PS C:\wrk> robocopy Settings.m101 Settings /copyall /e /b /np /is

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

Started : Friday, January 25, 2019 1:27:34 PM
Source : C:\wrk\Settings.m101\
Dest : C:\wrk\Settings\

Files : *.*

Options : *.* /S /E /COPYALL /B /NP /IS /R:1000000 /W:30

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

1 C:\wrk\Settings.m101\
Same 1962 front.api.csf

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

Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 1 1 0 0 0 0
Bytes : 1.9 k 1.9 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Friday, January 25, 2019 1:27:34 PM


But nothing happend, files still have different content:

PS C:\wrk> Compare-Object (Get-Content .\Settings\front.api.csf) (Get-Content .\Settings.m101\front.api.csf)
InputObject SideIndicator
----------- -------------
ListeningPort = 4444 =>
ListeningPort = 3333 <=

* On Windows 2008 R2 and robocopy version 5.1.10.1027 this case works just fine.

Any ideas?


Danil

Continue reading...
 
Back
Top Bottom