I want to sync the content of all subdirectories of a given root but only a few files in the root itself. To do so I would like to ignore all files using the ignore directive (keeping all subdirectories) and re-adding the few files I want to keep with the ignorenot directive.
To do so I tried the following two things:
Adding a regex to exclude any entry in the root that contains a slash by adding
ignore = Regex ^(?!.*\/).*$to my profile. But this results in an error message as follows with no further explanation:Malformed pattern "Regex ^(?!.*\/).*$"."First ignoring everything with
ignore = Name ?*and then re-adding every path that contains a slash withignorenot = Path */*, which didn't work as expected since not ignoring directories doesn't work this way.
It seems to be a very simple issue, but I can't get my head around it.