1
I can't make robocopy to overwrite a single file, even with the /IS flag on:
C:\>robocopy.exe "\\srv1\D\SRCFOLDER" "\\srv2\D\DSTFOLDER" "test.txt" /IS
I always got:
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 1 0 1 0 0 0
Is anyone able to overwrite a single file? Or is it some kind of robocopy 'bug' ?
Note: I use robocopy to copy a single file because I need the bandwidth control option /IPG:xxx
Thanks.
UPDATE: thanks to Lenniey comment I added some info, here the complete output:
Started : Wednesday, January 18, 2017 11:42:23 AM
Source : \\srv1\D\SRCFOLDER\
Dest : \\srv2\D\DSTFOLDER\
Files : test.txt
Options : /V /TS /FP /DCOPY:DA /COPY:DAT /IS /IT /R:0 /W:30
------------------------------------------------------------------------------
1 \\srv1\D\SRCFOLDER\
modified 36.4 m 2017/01/17 09:15:21 \\srv1\D\SRCFOLDER\test.txt
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 1 0 1 0 0 0
Bytes : 36.40 m 0 36.40 m 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Wednesday, January 18, 2017 11:42:23 AM
Even if the status is modified the file is skipped!
I got crazy to reproduce this 'bug', the only way I found was to rename the destination file \\srv2\D\DSTFOLDER\test.txt to something else, then rename it back to test.txt. After the rename the file is skipped forever.
Try
/is
and/it
in combination. Also use/v
(and maybe/ts
/fp
) to display additional information. – Lenniey – 2017-01-18T10:15:16.260Thanks @Lenniey, to reproduce this 'bug' you need to rename the destination file, and then rename it back to its original name, in this way you make robocopy skip the file! – StefanoV – 2017-01-18T11:29:20.143
So...did you solve it? Can't really follow you there – Lenniey – 2017-01-18T12:42:31.257
Is not solved, but I can workaround avoiding renaming destination files. – StefanoV – 2017-01-18T13:22:24.590
Could you elaborate what you are trying to do exactly? – Lenniey – 2017-01-18T16:46:24.003
In outer synthesis: try to execute two times this command:
robocopy.exe "\\srv1\D\SRCFOLDER" "\\srv2\D\DSTFOLDER" "test.txt" /R:0 /IS /IT /NODCOPY /IPG:10
. The second time the file is not copied. – StefanoV – 2017-01-20T13:25:00.643