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

General discussion related to "Everything".
Post Reply
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

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

Post 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.
Last edited by vanisk on Tue Jan 01, 2019 10:54 pm, edited 1 time in total.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

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

Post 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
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

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

Post 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.
Post Reply