Couple of gotcha's I came across with filters

Filters does not like Unicode with BOM format files. I was using Set-Content -Encoding utf8 for generating the filters file, and upon debug the first filter is corrupt (extra spurious chars at beginning)

Filtering a junction (mklink /J) is not treated as a directory

myjunction/ does not match
myjunction matches

So to include a set of descendent folders I had to


These had me stumped for a while. The duplicacy -log -d backup -dry-run command was very useful in finding out what was wrong.

1 Like

In CLI 2.3.0 if a symlink turns out to be a directory then the trailing / is added and it is matched agains the patterns again. Particularly, it is this commit:



If it’s an utf-8 file with BOM, then its an abomination which should die already (screaming at microsoft -but not only- about this). Here’s from The Unicode Standard, Version 12.0:

Use of a BOM is neither required nor recommended for UTF-8


Set-Content -Encoding utf8

Rant away :slight_smile:


So just to be clear: it still applies that symlinks will only be followed in the root folder of the repository, right?

That is correct…

1 Like