Exclusion support for Globs

Can we get full Glob pattern support, specifically the exclusion wildcard?
This is the explanation mark ( ! ) value.

For my use case, I would like to set my Insync base path to be the root of my harddrive. Then exclude everything from being synced with the exception of two folders; ‘Projects’ and ‘Archive’.

So my glob would look like this: *!(Projects|Archive)

Currently, I have to exclude everything manually. This means if I add or rename new folders to my harddrive, I have to amend the “Ignore Rules” settings every time.

2 Likes

Thanks for you recommendation. We’ll take a look and see if we can consider it as a possible improvement.

@Mark_Notton That use case is already possible using the current syntax of our Ignore Rules (gitignore). It’d just look a bit different - requiring multiple lines (the order is important here):

# Ignore all files at root
*
# Ignore all folders at root
*/
# Un-ignore specific folders
!Projects/
!Archive/

Could you try this out and let us know if it works for you? Thanks.

1 Like

Thanks @jimperio, this does work! :+1:

I was making two mistakes. The syntax wasn’t quite right and order of the rules wasn’t correct.

I guess this feature request can now be closed. Thanks again!

No problem, happy to help!