
robocopy, fac simile
Some experiments to test what “extra” means using ROBOCOPY with or without filespec, using or not using the /MIR switchor /S switch.
experiment 1
dir1 content
file_a.txt
file_b.txt
file_c.sux
dir2 content
file_a.txt
file_b.txt
file_c.sux
file_d.sux
robocopy dir1 dir2 /MIR
result : –> file_d.sux is an EXTRA; it was DELETED.
experiment 2
robocopy dir1 dir2 *.txt /MIR
(is it possible? yes, it is : MIRROR isn’t a command, is a switch mode meaning the sum of some other switches)
it works.
it doesn’t consider those two .SUX files, it matches only the two .TXT files, which have already been copied, so it skips them. Nothing has been deleted.
experiment 3
(dir1 without file_a.txt )
robocopy dir1 dir2 *.txt /S
Result: file_a.txt in dir2 is an EXTRA file but it has NOT been deleted, because I used “/S” instead of “/MIR” (that implies “/purge” ).
experiment 4
(dir 1 as in the previous situation, without file_a.txt)
robocopy dir1 dir2 *.txt /mir
result: file_a.txt in dir2 has been considered “extra” and because of that “/MIR” switch, it has been also deleted.