How to not backup files that start with a "~"

usually they are temporary files, locked files etc.

Windows machine.

Thanks!

Hello, yes you can add an exclusion filter to skip files that start with “~”. Edit your backup job and on Page 3 expand the Filters section. Click the three dot menu on the side and click “Edit as text” and add this line:

-[.*\\~[^\\]*]

This is a regular expression that matches files (not folders) that start with a tilde character.
Click Save on Page 5 to save the changes to your backup job.

Hope this helps.

1 Like

It helps me a lot!

But I would like to not backup files starting with “~$”. And I can’t figure out the regex code.

-[.*\\~$[^\\]*] is not working. Also editors like https://regexr.com/ could not help me, as I could not reproduce the result of your regex-code.

I would be very happy about any help!

Btw:
The aim is to exclude locked files in Windows. So the user and I as an Admin will not get an Warning Message/E-Mail, if a document is opened.

PS: I am a real beginner in regex. Sorry for that. And for several hours I have not been able to solve this problem.

Try putting a single backslash in front of the $. That character has special meaning in regex so if you want it to match literally you have to escape it with a backslash.

Hope this helps!

1 Like

Thank you! This works perfectly!

-[.*\\~\$[^\\]*]

1 Like