Using the asterisk?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
terrypin
Posts: 202
Joined: Mon Mar 18, 2013 2:41 pm

Using the asterisk?

Post by terrypin »

I've always thought an asterisk would identify any characters - including NONE - but it seems I'm wrong? This
The Hunter.mp3
delivers several hits, but this delivers none
The Hunter*.mp3
void
Developer
Posts: 15806
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using the asterisk?

Post by void »

Using a * or ? in Everything enables whole filename matching.

In your case, that would mean files starting with exactly "Hunter"

If you would like to disable this functionality:
  • In Everything, from the Tools menu, click Options.
  • Click the Search tab on the left.
  • Uncheck Match whole filename when using wildcards.
  • Click OK.


Alternatively, search for:

*The*Hunter*.mp3
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Using the asterisk?

Post by Stamimail »

The question is what should be the default?
What is the common way?
meteorquake
Posts: 410
Joined: Thu Dec 15, 2016 9:44 pm

Re: Using the asterisk?

Post by meteorquake »

I think that is probably the common way as it's how DOS dir command does it, and also how the VB Like operator does it.
(RegExp in my experience by contrast assumes part match unless indicated otherwise.)
I think it's complicated by the usual assumption in Everything of part matching.
Perhaps it could take it from whatever the "whole word" search setting is for normal searches.
David
meteorquake
Posts: 410
Joined: Thu Dec 15, 2016 9:44 pm

Re: Using the asterisk?

Post by meteorquake »

Now that I think about it there needs to be an explicit partword: or part: match (at least I can't see it) because something launching Everything with a search needs to be able to override any WholeWord setting.
Also I think using the WholeWord setting for WholeName isn't exactly ideal. Perhaps Match Whole Name needs to be exposed on the Search menu with the two existing ones and could apply to non-pattern and pattern searches equally (wfn: would switch it on transiently).
David
void
Developer
Posts: 15806
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using the asterisk?

Post by void »

Thank you for the feedback.

Somethings to consider:

The OS file open/save dialog uses whole filename wildcards.

The Windows Explorer search in Vista+ uses whole word wildcards.
The Windows Explorer search in XP and earlier used whole filename wildcards.

Everything uses whole filename wildcards for include only filters and exclude filters.


Some functionality and control is lost when matching wildcards anywhere in the filename:
* at the start and end of the pattern become meaningless.
You can no longer find files starting with xxx.
You can no longer find files ending with xxx.
Searching for extensions becomes difficult, eg: *.c matches .c anywhere in the filename.

Searching for whole filename wildcards is very fast.
There is a considerable performance loss when searching wildcards anywhere in the filename.
Post Reply