What is correct filter for Office temp files

I seem to be unable to produce proper filter for office temp files. What is correct filter to ignore all files starting with ~$ on any level of hiearchy?

File names are like C:\Dropbox\Business\ ~$budget.xlsx (without the space behind \ )

This regex seems to work:

--exclude='[.*\\~\$.*]'

1 Like

By the way, this is a great site for testing regex… https://regex101.com/

Here’s me testing the above regex pattern (leave off the square brackets, that’s a Duplicati convention):
1

You can also test filters using the Duplicati CommandLine tool:

1 Like

The first time I was adding filters, I looked up all Duplicati articles and manual pages to find out which particular regex standard or pseudo-standard or non-standard I should rely on, but I could not find reference to any standard or framework. The choice may be obvious to developers, but to users it is not. Microsoft uses Perl regexes instead of POSIX, and there are two POSIX regexes, the basic and the extended. How am I to know which one is the one Duplicati uses?

Yes, good point that it could be documented somewhere. I never tried looking it up because I assumed it uses the .NET regex engine (it does). But yeah regular users aren’t going to know that.

I had to remove apostrophes on windows, but it works - thank you.

I tried different non-regular versions, but didn’t knew what lang it uses - .NET makes sense, should have figured it myself, ehm…

It’s RegexBuddy for my regexps :slight_smile:

Filters (despite other confusing parts) does link to the info:

Rules can also be specified as regular expression. In this case put the regular expression (using .NET syntax) into hard brackets [] .

Thank you. It was a few years back that I searched for it, and the manual pages may have been updated since. But it’s good to know it is there now.