You are not logged in.
Hey, I just wanted to clarify the behaviour of the /XX argument provided by Robocopy.
The documentation on ss64.org currently reads:
An "extra" file is present in destination but not source,
excluding extras will delete from destination.
SRC: http://ss64.com/nt/robocopy.html
The documentation on TechNet reads:
Excludes extra files and directories.
SRC: http://technet.microsoft.com/en-us/libr … S.10).aspx
My reading of the ss64 page suggests that Robocopy will delete any extra files in the destination (that aren't in the source). However, the TechNet page doesn't mention that. Can anyone clarify if /XX will ever delete files in the destination?
If it does sometimes delete files, what's the difference between that and /Purge?
Many Thanks
Offline
I think you are right, it looks to me like the wording should be
An "extra" file is present in destination but not source,
excluding extras will NOT delete from destination.
But I just ran a couple of tests which is the only way to prove these things:
robocopy source dest /XL
works as you would expect, any new files in the source don't get copied
robocopy source dest /XX
Does not delete any "extra" files from the destination
but then neither does a simple
robocopy source dest
Perhaps the /XX switch only takes effect when mixed with other switches:
robocopy source dest /purge
Will delete "extra" files from the destination
robocopy source dest /purge /XX
Will NOT delete "extra" files from the destination, in other words the /XX switch just turns off the effect of /Purge and returns us to the default behaviour.
In a similar vein
robocopy source dest /S /mir /XX
Will copy new files and folders and will not delete "extra" files from the destination.
Which I think is just the same as
robocopy source dest /E
So based on all that I think the correct help text should be:
An "extra" file is present in destination but not source,
excluding extras will not delete files from the destination (this is the default).
Offline
Thanks for the quick reply Simon. Excellent Website!
Offline
I was just wondering about /xx too, and I found a difference:
/xx will SUPPRESS showing extra destination files in the log
example
source:
aa
bb
destinationdir
aa
bb
cc
then without /xx you log will look something like below
Optionen: *.* /FFT /NDL /TEE /S /DCOPY:DA /COPY:DAT /NP /XO /R:1 /W:0
------------------------------------------------------------------------------
*EXTRA Datei 834 e:\cc <--- file cc
Offline
Nice find rLap, I just added a line to the SS64 robocopy page about that.
Offline
If /XX says to ignore extra files, then it makes sense that extra files won't show up in the log
Offline