Current filter is FILTER=“e:^(.*/)?(@eaDir|#recycle)/$” below and covers directories fine.
I want to include files such as .DS_Store, but not sure how to do that all in one expression.
Current filter is FILTER=“e:^(.*/)?(@eaDir|#recycle)/$” below and covers directories fine.
I want to include files such as .DS_Store, but not sure how to do that all in one expression.
Why do you want to do it in one expression?
Also, stuff that is not excluded by rules is included, so nothing to do here.
I thought I had to use a single regular expression…
I want to exclude .DS_Store and .tmp files.
No, you can have multiple filters and you don’t have to use regular expressions.
Where are you specify in the FILTER=? This is not a standard duplicacy mechanism. Duplicacy reads filters from a filters
file. That file can contain references to other files (starting with @) if whatever wrapper you use has this silly limitation of just one filter string.
-*@eaDir/
-*#recycle/
-*.tmp
.DS_Store files contain metadata, including things like finder comments, and shall not be excluded.
In the filters file. I’ll add extra items in addition to my existing content. I’m OK with excluding .DS_Store for several reasons and content sources.
Then you can just add it to the list:
-*.DS_Store
Or, to be very pedantic,
-.DS_Store
-*/.DS_Store
Few key ideas:
/
it matches directors, else – files.*
and ?
match everything, including /
.A common approach (to not lose filters file, because .duplicacy folder is not backed up) is to keep filters file elsewhere, and include path to it in the filters file:
@/Users/user/.config/duplicacy/filters
And put actual filters in there.
Appreciate the guidance and information.
I recreate my backup config on each run via a source-specific config file. I just need to adapt my script to include multi-line filters, and I’m off to the races.