Page 1 of 1

[Solved] regex to exclude folder (& include a child folder)

Posted: Tue Jan 01, 2019 4:25 pm
by vanisk
My issue is similar to this.
viewtopic.php?f=5&t=6905&p=22142&hilit=exclude#p22142

What i'm trying to accomplish is to exclude all files & folders under C:\Windows
but want to include C:\Windows\Fonts

Can someone guide me to / create a regex filter for this (to use in Exclude->Filter)?

Thanks.

Re: regex to exclude folder (& include a child folder)

Posted: Tue Jan 01, 2019 8:02 pm
by NotNull
try it with this exclusion:

Add filter:
regex:^c:\\windows\\(?!Fonts?$)
to exclude all folders under c:\Windows except \Fonts

Exclude files:
regex:^c:\\windows\\[^\\]*$
to exclude all files that have C:\Windows as a parent

Re: regex to exclude folder (& include a child folder)

Posted: Tue Jan 01, 2019 9:08 pm
by vanisk
NotNull wrote: Tue Jan 01, 2019 8:02 pm try it with this exclusion:

Add filter:
regex:^c:\\windows\\(?!Fonts?$)
to exclude all folders under c:\Windows except \Fonts

Exclude files:
regex:^c:\\windows\\[^\\]*$
to exclude all files that have C:\Windows as a parent
Thank you.