Only include folders which contain "foo" from a downloads folder

Hi!

I have a few download folders on different drives and theres loads of stuff in it.

Within this downloads folder there are several folders containing “foo” in their name.

I’d like to exclude everything but only include those folders containing “foo”.
Those folders containing “foo” in their name can include subfolders, which should be included aswell.

Sometimes “foo” is written as “Foo”, so I want to include those aswell. (So the final regexp should ignore case, if thats already doing that, then this step is unneeded of course)

How can I achieve that?

Running Windows 10 and 2.0.5.1_beta_2020-01-18.

Thanks!

Filters and The TEST-FILTERS command are worth reading even though the web UI has a filter builder that’s somewhat broken in 2.0.5.1 (fixed in newer Canary). Use the three-dot menu Edit as text to fix.

If you don’t get foo in filenames, you can use wildcards, however making sure foo is in a folder may be

--include="[.*\\[^\\]*foo[^\\]*\\.*]"

in test-filters syntax. In web UI text syntax the include is a plus sign. Outer square braces make it an RE rather than a wildcard, and it asks for a backslash, zero or more non-backslash, foo, zero or more non-backslash, a backslash, then maybe more, which should account for files in that folder, plus subfolders.

One unusual thing about Duplicati filter syntax compared to usual shell globbing is it treats slashes in a path as nothing special. Typically an OS wildcard * would not cross the slash, but Duplicati will cross it.

Although documentation implies it shouldn’t be necessary, I had to add an --exclude=*" after the include.

One unusual thing about Windows Command Prompt is that in a double quoted string, a backslash that appears before the closing quote must be doubled or it escapes the quote. I didn’t do that, but you might.

Possibly you will need to play with this. I’m not a filters expert, and so find them difficult to get just right…

If you wind up needing comments on an attempt, put text within triple backquotes to display it as written.

Yea I gave up on the filters - they are way to complicated for this wanted behaviour.
I created new folders and moved those folders containing “foo” manually now. It was a time consuming task but I guess a needed one aswell. ^^