Exclude certain folder names in any subfolder, by pattern, _except_ for certain specific ones, etc

Hi, I'd like sync to skip any node_modules, and Library in any subfolder it finds. I've tried node_modules, *\node_modules, (.*)\node_modules, etc, but none worked...

I've also tried to create an exclude pattern that would exclude all folders starting with a . (i.e. dot dirs), except for certain ones, like .docker, .vscode, etc, but no luck with that either.

Are these possible in the Synchronize Exclude panel?

No, not in the exclude panel.

You need to use a filter. Give this a try:

location match "^(?!.*\\\\(?:\\.(?!docker$|vscode$)|library$|node_modules$))(?:.*)" regex

Same logic, split into three conditions for easier maintenance:

location nomatch ".*\\\\\\.(?!docker|vscode)[^\\\\]*" regex
and location nomatch ".*\\\\library(\\\\|$)" regex
and location nomatch ".*\\\\node_modules(\\\\|$)" regex