Hi void,
First of all, thank you very much for your quick reply. Sorry for not responding earlier — I spent a few days carefully trying to understand your explanation.
I’ve only been using Everything for about two weeks. At first, I was very confused about its matching logic. Then I discovered two options:
Match Whole Words and
Match whole filename when using wildcards. After disabling both, I felt that Everything started to behave in a more “normal” way for me.
Later, I read a post by NotNull on the forum, and suddenly things made sense.
NotNull wrote: Wed Oct 12, 2022 8:33 pm
Example with C:\Windows\notepad.exe
Usually, Everything checks only the part after the last backslash for matches.
This is the part you see in the Name column in Everything:
notepad.exe.
So n* will find notepad.exe, whereas w* will not.
Everything can also search through the full filename (including path) for matches. In this case:
C:\Windows\notepad.exe
This mode can be activated in a couple of ways:
- Enabling
Match Path
- Specifying a \ in the search query
- Using ** wildcards
I tested many queries based on that explanation, and almost everything worked exactly as expected — until I ran into the issue I asked about the other day. Based on NotNull’s explanation (and my own understanding), I still cannot explain the results I am seeing.
So I’d like to confirm: is Everything’s matching process really as described in that post?
________________________________________
Regarding your comment about
“Match whole filename when using wildcards”: I had already unticked this option before testing, so the first part of your explanation doesn’t really apply to my case. Still, I really appreciate you explaining it — this will be very helpful for my future learning.
After studying your reply carefully, I still find several points I cannot reconcile with my test results:
1. Trailing \
Normally, the trailing \ will not match anything.
No filenames end with \
So, instead of showing no results, Everything automatically adds
**
Maybe internally you are indeed appending ** after the trailing \. However, from a theoretical point of view, a trailing \ should already be able to match any files whose full name contains this search fragment.
In practice, a trailing \ does match something. For example, \Desktop\ correctly matches all files and folders whose full path contains \Desktop\.
2. \ prefix
The \ prefix is also ignored.
\Desktop\*Level" "Fir*\
=>
Desktop\*Level" "Fir*\**
This will only look directly in desktop folders (not subfolders), for
*level" "fir*
But my tests show that the leading \ is not ignored. For example:
- \Desktop\ only matches paths containing a directory named Desktop.
- Desktop\ (without the leading slash) can match names like “My Desktop”.
Also, in the result list, the \ part is shown in bold, which suggests it is being taken into account.
3. Without the trailing \
This will only look directly in desktop folders (not subfolders), for
*level" "fir*
But my tests show that even without the trailing \, Everything will still list subdirectories and files under “First Level First”.
________________________________________
After running many different tests, I found that all of my questions eventually come down to one specific pattern that consistently produces results I cannot explain:
\Desktop\First*Level" "firs*
If I remove the first *, changing it to:
\Desktop\First" "Level" "firs*
then everything behaves as expected.
So my main question is: why does having two * in the query, with the second one at the very end, change the behavior so dramatically? Of course, in real usage, it’s rare that we would actually need two * like this.
Would you be able to clarify this behavior?
Thanks once again!