How to restrict search pattern to file names?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

How to restrict search pattern to file names?

Post by pstein »

How to restrict search pattern to file names?

If I disable menu

Search--->Match Path

does that mean that folders/folder names are not considered?

Peter
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to restrict search pattern to file names?

Post by void »

To search for files only, include the following in your search:
file:

Search -> Match Path refers to matching the full path and filename or just the filename

For example:

With match path disabled, Everything will test against the filename part only:
foo bar.txt

With match path enabled, Everything will test against the full path and filename:
c:\folder\subfolder\foo bar.txt

The above might be useful if you want to search for subfolder and have foo bar.txt show in the results.
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

Re: How to restrict search pattern to file names?

Post by pstein »

Ok thank you, BUT this does not work:

file:regex:" -[^ ]"

Still some matchings of folders are listed.

How do I have to concatenate

file:

and

regexp:

otherwise?

Peter
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to restrict search pattern to file names?

Post by void »

file:regex:" -[^ ]" should not be displaying any folders, please make sure match regex is disabled from the Search menu.
Is file:regex:" -[^ ]" your only search?

Are the folders from a file list index?
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

Re: How to restrict search pattern to file names?

Post by pstein »

Have a look at the attached sample snapshot resp. here:

http://www.picfront.org/d/9AIL

Why is e.g. the marked file lsited as result?
I can only be because of the folder name

Yes, menu Search-->Enable RegEx is disabled

Peter
sample mismatch folder matched.png
sample mismatch folder matched.png (148.73 KiB) Viewed 4663 times
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to restrict search pattern to file names?

Post by void »

Thanks for the screenshot.

Disable match path from the Search menu if you don't want file:regex:" -[^ ]" to match the full path and filename.

Alternatively search for:
nopath:file:regex:" -[^ ]"
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

Re: How to restrict search pattern to file names?

Post by pstein »

Ok, it seems to work now.

However having to specify "nopath:" AND "file:" is somehow from my point of view doubled.

If users specify "file:" then the path with all the folders should automatically NOT be inspected.
"file:" should automatically internally enable "nopath" attribute.

May I ask to to implement this in Everything?

Thank you
Peter
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to restrict search pattern to file names?

Post by void »

I'll consider an option to disable path matching the file: modifier, is there any reason you have match path enabled from the Search menu?
Post Reply