Syntax to exclude multiple file names

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
everyduck
Posts: 4
Joined: Mon Dec 21, 2020 6:54 pm

Syntax to exclude multiple file names

Post by everyduck »

For example, I want to exclude both *.lnk and *.tmp files from the index.

I can do it for one or the other but can't figure out the syntax in the Exclude files box of Exclude options in order to exclude both.
NotNull
Posts: 5244
Joined: Wed May 24, 2017 9:22 pm

Re: Syntax to exclude multiple file names

Post by NotNull »

Try it with:

Code: Select all

!ext:lnk;tmp
See https://www.voidtools.com/support/everything/searching for details
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Syntax to exclude multiple file names

Post by raccoon »

Edit: Sorry, I missed that the request was for the Options > Exclude preferences dialog.

The other way is

!*.lnk !*.tmp (edited)

and

!<*.lnk|*.tmp>

use <> for grouping, | for OR, and ! for NOT.
Last edited by raccoon on Tue Dec 22, 2020 4:07 am, edited 2 times in total.
NotNull
Posts: 5244
Joined: Wed May 24, 2017 9:22 pm

Re: Syntax to exclude multiple file names

Post by NotNull »

raccoon wrote: Mon Dec 21, 2020 8:03 pm <!*.lnk|!*.tmp>
That would give you all files ..
Sorry, I missed that the request was for the Options > Exclude preferences dialog.
I missed that too! Will check if answer is still correct ...

EDIT: Answer should be:

Code: Select all

*.lnk;*.tmp
(When you hoover above the Exclude files: box, a tooltip will be shown with explanation)
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Syntax to exclude multiple file names

Post by raccoon »

Edited my above flub.

Ooh, I didn't even notice the hover tooltip. I did use this dialog once before and had to look it up in the help file. Which is still frightfully inconsistent with how Filters, Bookmarks and searches behave. Was there some point where semicolon could be used as a naked OR (|) symbol without any func: prefix?
Help File wrote:To include only certain types of files in the "Everything" index:
In "Everything", from the Tools menu, click Options.
Click the Exclude tab
Type in the semicolon delimited list of wildcard filters for include only files, for example, include only mp3 and jpg files:
*.mp3;*.jpg
Click OK.

To exclude certain types of files from the "Everything" index:
In "Everything", from the Tools menu, click Options.
Click the Exclude tab
Type in the semicolon delimited list of wildcard filters for exclude files, for example, exclude thumbs.db, desktop.ini and tmp files:
thumbs.db;desktop.ini;*.tmp
Click OK.

To use regex in your exclude filters, prefix the exclude filter with regex:, for example, to exclude folders starting with A-N, set the exclude filter to:
regex:^[A-N]
Seeing as regex: works, I'd estimate that ext: probably also works, or doesn't. :)
everyduck
Posts: 4
Joined: Mon Dec 21, 2020 6:54 pm

Re: Syntax to exclude multiple file names

Post by everyduck »

Well now. After I posted this I noticed a tool tip box that pops up to inform the user that a semicolon is the delimiter.

This is now working for me:

*.lnk;*.tmp

Now I don't see the "junk" files that Windows and Office create when you open a file.

Thanks to all for your help.
Post Reply