Ignore Files with Regex

I’ve been a developer for years… the irony of it all, I’ve never been able to wrap my head around Regex. I can work at it for hours, and I don’t quite get the syntax.

However, OneDrive creates a temp file which duplicati throws a warning at due to the file currently being accessed.

Is their a possible way with regex to block that file? The issue which concerns me is that the only factor to the file is that it starts with a period, however, I have other files & folders that start with a period as well.

The temp file takes on the following name:


And it appears to change each time you reboot and sign back in.

I assume maybe with regex you’d have to look for the dashes as well as the period at the beginning? But I also have no idea which option I’d select, such as Exclude Expression, Exclude Regular Expression, etc. I don’t quite get the difference between the two.

Sorry for such a noob question. I’ve really tried to learn Regex. It’s just one of those things…

I’ve been messing with the online regex editors, and I came up with:
[A-Za-z0-9]+(-[A-Za-z0-9]+)+ and ([A-Za-z0-9]+(-[A-Za-z0-9]+)+)

However, I still get the error. I’ve tried “Exclude Expression” and “Exclude Regular Expression”. But every time I go back to re-edit the expression again in the settings, it keeps auto defaulting to “Exclude File”.

I’ve also tried Edit Line as Text

Welcome to the forum @Aetherinox

It depends on how loose you want to be. Looser raises the risk of an unintentional exclude. For tighter, you can look at their other characters, which look like uppercase hexadecimal 01234567890ABCDEF. Looking at repetition counts helps too, and BTW name looks an awful lot like it’s using Windows GUID. That has variations, but the form used here looks like uppercase hexits in 8-4-4-4-12 repeating groups.

One way to proceed is to start with your exact example, such as in original post, then generalize more.
Backslash escapes special characters such as dot and backslash. Hex digits can be a character class.
Test as you go, and progressively refine. Use some online tester or run The TEST-FILTERS command.

. becomes \.
\ becomes \\
hex digits become [0-9A-F]
repetition spec is between {}

\OneDrive\.46A26367-A756-1E56-2B6E-72412F2A707B becomes

Above is standard regex stuff. Duplicati wants a regex inside [] to distinguish from wildcard.
An exclude gets a - in front. This is described in Filters. Use three-dot menu in GUI to see it.
Dropdowns are less clear on effects, and reverse-engineer from raw values, so may change.
If you prefer, just type your filter in under Edit as text, because that’s the real string used.

It’s not explained on-screen, but from what I described, you can expect to see a - for exclude.
Regular expression acts like it adds square braces, or notices on the reverse trip to a list view.
It’s not auto defaulting, but taking a guess based on text view, how to describe that in list view.

Here’s a complete example of what sort of text view you might use to get what you’re seeking:


which in list view gets converted back to

I haven’t tested this beyond the test-filters level with --exclude=, but I think it’s the recipe.