2

I have this test dir structure:

├───dir1
│       New Text Document.txt
│       thumbcache_123.db
│
└───dir2
        New Text Document.txt
        thumbcache_123.db

If I run this command:

ROBOCOPY "C:\Users\John Doe\Desktop\test\dir1" "C:\Users\John Doe\Desktop\test\dir2" /MIR /XJD /R:1 /W:1 /UNICODE /XF thumbcache_*.db

Then I get this result:

├───dir1
│       New Text Document.txt
│       thumbcache_123.db
│
└───dir2
        New Text Document.txt
        thumbcache_123.db

But I expected:

├───dir1
│       New Text Document.txt
│       thumbcache_123.db
│
└───dir2
        New Text Document.txt

Why? Because /MIR is supposed to do /PURGE since the whole point is to "mirror" two directories with the first being the "master" which decides what the second looks like.

It seems as if it only respects my request to not include thumbcache_*.db files if there is not already such a file in the second dir. If there is, it doesn't delete it.

I found this out the annoying way because the storage space is used up on my memory stick, so I investigated which further dirs and files I could add to my list of what to exclude from C:. I eventually realized that none of my earlier attempts to save storage space had done anything, because ROBOCOPY /MIR doesn't delete any files if they are included in the source dir but are "excluded" using the flags.

This is a very frustrating situation, and the manual clearly states that /MIR does /PURGE. So what gives? Do I really have to delete the entire dir on the memory stick now and have it re-sync? Or sit and manually delete the dirs? It seems like such a waste of both time and energy, and it's annoying that ROBOCOPY doesn't work as advertised, or at least as I understood it. Am I missing something? Is there some further flag I can include to make it work as I wish?

Please help.

0

You must log in to answer this question.

Browse other questions tagged .