Exclude all while including a subdirectory?

Hi there,

Is it possible to exclude a complete directory, but then whitelist a certain subdirectory?

E.g in filters:

  • doc/

Does not seem to work - do I always have to specify this explicitly?

The filter list is traversed in order, so put the most specific ones first. That should help.

Ah, I thought it will get overridden if I add a - * rule at the end.
Maybe this could be mentioned in the docs as it was not clear to me and is very helpful to know.

Thanks for your help!

I’m always interested in making the docs clearer. Can you suggest an edit (or even better send a pull request?)

I think the relevant section is: http://rclone.org/filtering/#how-the-rules-are-used

Maybe it should say something like - new words in italic

Each file is matched in order, starting from the top, against the list until it finds a match.

Thanks @ncw! The quoted addition would be sufficient from my point of view! Thanks a lot for your clarification, my backups are working as expected now, really great!

Ok I’ve stuck that in the docs.

:smile: