Overriding the EXCLUDE file mask (in Options)

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
burgundy
Posts: 273
Joined: Fri Oct 16, 2009 9:50 am

Overriding the EXCLUDE file mask (in Options)

Post by burgundy »

On my PC I have gathered together many shortcuts and put them in one folder. Can I set up Everything to hide shortcuts in the results in general, but to show them just for this particular folder?

In "Options > Indexes > Exclude", I have this entry "*.lnk" (without quotes).

However this excludes .lnk files everywhere, which is not what I want. Is it possible to achieve what I want to do?
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Overriding the EXCLUDE file mask (in Options)

Post by horst.epp »

The Exclude files syntax allows paths
so try to make an entry like this
c:\mypath\*.lnk
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Overriding the EXCLUDE file mask (in Options)

Post by NotNull »

burgundy wrote: Sun Apr 16, 2023 12:52 pm Is it possible to achieve what I want to do?
It is possible, although not completely straightforward.

Example:
For a path like C:\Tools\ specify the following in the Exclude files field

Code: Select all

regex:^(?!C:\\Tools\\).*\.lnk
For best results, please specify the exact path where the .lnk files are located that you want to exclude from being excluded ( :? )
burgundy
Posts: 273
Joined: Fri Oct 16, 2009 9:50 am

Re: Overriding the EXCLUDE file mask (in Options)

Post by burgundy »

NotNull wrote: Sun Apr 16, 2023 7:54 pm For best results, please specify the exact path where the .lnk files are located that you want to exclude from being excluded ( :? )
That sounds interesting. Can you help me with the Regex. How do I specify the following correctly in Regex?

Code: Select all

C:\Documents and Settings\Nemo\#NEMO-TASKBAR MENUS\NG\*.lnk
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Overriding the EXCLUDE file mask (in Options)

Post by NotNull »

Try the following:
  • Go to menu:Tools => Options => Indexes => Exclude
  • In the Exclude files: filed, paste the following:

    Code: Select all

    regex:^(?!C:\\Documents and Settings\\Nemo\\#NEMO-TASKBAR MENUS\\NG\\).*\.lnk$
    
  • Press the OK button
  • Wait until Everything finished updating its database
  • In the search bar, type the following:

    Code: Select all

    ext:lnk
If all went OK (and I didn't make too many errors ;) ), only lnk files from the C:\Documents and Settings\Nemo\#NEMO-TASKBAR MENUS\NG
folder will be shown.




( Note to self: Don't use "" here; regex:"..." fails.)
burgundy
Posts: 273
Joined: Fri Oct 16, 2009 9:50 am

Re: Overriding the EXCLUDE file mask (in Options)

Post by burgundy »

Yes, that Regex works. Thank you!
Post Reply