Include and exclude filters

I’d like to include only certain files in a path but exclude everything else. This is what I’m trying to do:

Folder structure:


Source C:\a\



What I’m trying to achieve is including only the text files and excluding everything else, but it doesn’t work as expected. If I do --include=*\a\f\* it works, including all the files in that folder, but it doesn’t if I only want specific files. Am I doing something wrong or is this a bug?

I think I figured out what’s the problem. Duplicati checks the folder first and if doesn’t match, it doesn’t check the files at all. Adding another filter --include=*\, as suggested in the manual, solves the problem. I read that part many times but only now I figured out it was necessary to have that filter to include empty folders.

Glad you figured it out, and thanks for posting your solution.

Welcome to the forum!

Thank you, and thanks to everyone who is making Duplicati such a reliable tool!