Synchronisation: Delete files from destination does not work when Filter is applied

First of all, as a long time user of Directory Opus, I have to say that its Synchronize feature is first class and something that has helped me time and time again.

However, I think I have come upon an issue with file deletion and partial synchronisation that's probably best illustrated by extracting the attached file and directory structure into some directory (such as C:\tmp\Dopus\):
Dopus.zip (2.7 KB)

If, after having extracted the content above, you attempt a partial synchronisation of the A... to C... directories using the A folder as source and the B folder as destination, by defining a filter such as Full Path Match C:\tmp\Dopus\A\[A-L]* and select Delete files from destination that don't exist in the source, and then press compare, you will find that the A to delete\ directory as well as the B to sync\file to delete.txt file are not being marked for deletion per the screenshot below:

This runs contrary to one's expectation that the Filter should apply to both the content to synchronise as well as the content to delete and is something that is proving quite problematic when one is trying to synchronise a large amount of content unto multiple disk volumes for instance (thereby requiring the use of a filter to split the data), as any file that was renamed or deleted is never freed from the target...

I am therefore hoping that file and directory deletion can be fixed so that it does work in the manner one would expect even when a Filter is being applied.

Tested with: Directory Opus 12.33 on Windows 11 Pro x64

C:\tmp\Dopus\A\[A-L]*

I think it's because that filter excludes the ...\B\A to delete folder, so it won't be deleted or touched generally.

At least in Opus 13, it seems to do what you want if you change the filter to this, so it matches things under both A and B:

C:\tmp\[A-B]\[A-L]*

(C:\tmp\(A|B)\[A-L]* should also work, but wasn't what I tested with.)

1 Like

Aha, that makes a lot of sense!

I can confirm that, indeed, when you set the filter to include both source and target, deletion works as expected.

I can also confirm that parenthesis + pipe works even when mixing of local and network drives as if, say, you want to do a partial sync from something like \\nas\A\ to E:\B\ you can use (\\nas\A|E:\B)\[A-L]* as the filter.

I'm very happy to now be able to use all of the awesomeness of Directory Opus sync, even for partial with deletion. :smile:

Thanks a lot for the quick reply!

1 Like