Search File with match Extension

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
zeenmakr
Posts: 5
Joined: Mon Nov 25, 2019 1:12 pm

Search File with match Extension

Post by zeenmakr »

Hi,

I'm looking at this but can't figure out to apply for my need
viewtopic.php?f=2&t=8600

Search this text files but it also return *.bak file like "foo bar.txt.bak" which is not one of the ext listed below

Code: Select all

file:"foo bar" ext:.doc|.txt|.rtf
Also I need to search "foo bar" but it could also return "foo_bar.txt" or "foo-bar.txt" ect... Notice whole word match used - in double quote

Thanks
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search File with match Extension

Post by NotNull »

foo bar ext:doc;txt;rtf;bak
?

See Search Syntax help page fore details
zeenmakr
Posts: 5
Joined: Mon Nov 25, 2019 1:12 pm

Re: Search File with match Extension

Post by zeenmakr »

Simple enough, Thanks

How about to return:
"foo bar.txt"
"foo_bar.doc"
"foo_bar.rft"

Using this

Code: Select all

everything.exe file:"foo bar" ext:doc;txt;rtf
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search File with match Extension

Post by NotNull »

zeenmakr wrote: Tue Nov 26, 2019 6:21 am Simple enough, Thanks

How about to return:
"foo bar.txt"
"foo_bar.doc"
"foo_bar.rft"

Using this

Code: Select all

everything.exe file:"foo bar" ext:doc;txt;rtf
Does that give you the correct results?

I would use one of the next queries for that:

Code: Select all

file:  "foo?bar" ext:doc;txt;rtf

Code: Select all

file:  "foo*bar" ext:doc;txt;rtf
Note that Match whole filename when using wildcards has to be disabled for this to work.
That setting can be found under Menu:Tools > Options > Search.


You could use regular expressions too, if you are familiar with that:

Code: Select all

file:  regex:"foo.bar" ext:doc;txt;rtf

Code: Select all

regex:"foo.bar\.(doc|txt|rtf)"
Details can be found on the page I linked earlier.
zeenmakr
Posts: 5
Joined: Mon Nov 25, 2019 1:12 pm

Re: Search File with match Extension

Post by zeenmakr »

regex does it, thanks again
Post Reply