Please Correct my interpretation of the back-slash in search strings

Discussion related to "Everything" 1.5.
Post Reply
ChrisGreaves
Posts: 821
Joined: Wed Jan 05, 2022 9:29 pm

Please Correct my interpretation of the back-slash in search strings

Post by ChrisGreaves »

I believe that I have not fully understood the concept of "part of a path name as a search string".

I have almost 300 MSWord documents named "WhatFAQ"
I want the WhatFAQ associated with my application for spell-checking.
I type in the search box "whatfaq ext:doc" which shows 296 items, and then append the string SPELL "whatfaq ext:doc spell" thinking that since the string "spell" is part of the path, this must narrow down the number of items reported.

This shows 0 items.
I scratch my head and preface the new string with a back-slash "whatfaq ext:doc \spell", knowing that the application will be found in the folder T:\Greaves\Products\USER\Spell\.

So far so good.
But how would I go about locating all WhatFAQ documents in all my applications that deal with spell-checking. For example, a second application is "T:\Greaves\Products\USER\PhoneSpell", but neither the naked "spell" nor the back-slashed "\spell" will locate this second folder.

Thanks, Chris
therube
Posts: 5723
Joined: Thu Sep 03, 2009 6:48 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by therube »

It's not the slashes.
It is file name vs. path.

whatfaq ext:doc path:spell


I didn't even realize (particularly) that what you said happens happens,
cause I typically always have
Search | Match Path
enabled.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by void »

Including a
\
in your search term enables full path matching.

When Search -> Match Path is enabled, searches will always match against the full path.

When Search -> Match Path is disabled:

Searching for
foo
will match against only the name part.
Searching for
\foo
will match against the full path.



But how would I go about locating all WhatFAQ documents in all my applications that deal with spell-checking. For example, a second application is "T:\Greaves\Products\USER\PhoneSpell", but neither the naked "spell" nor the back-slashed "\spell" will locate this second folder.
Use the path: search modifier.

For example:
whatfaq ext:doc path:spell
ChrisGreaves
Posts: 821
Joined: Wed Jan 05, 2022 9:29 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by ChrisGreaves »

therube wrote: Fri Nov 21, 2025 3:57 pm...cause I typically always have
Search | Match Path
enabled.
The Rube, thanks for getting my loco-motion back on the rails (grin)
My lack of knowledge of the Match Path switch in the Search menu corroborates my standard disclaimer that I don't really know much about Everything ...
001.jpg
001.jpg (96.36 KiB) Viewed 2333 times
Hooray! My simple search string "whatfaq spell" now locates my file(s), specifically the WhatFAQ.docs in the folder for my SPELL application.
002.jpg
002.jpg (91.52 KiB) Viewed 2333 times
Now my half-baked search techniques sent me off looking for other occurrences of "SPELL", because Everything can find everything, right? And by that interim operation I found the folder for another spelling application "PhoneSpell". For the next twenty minutes NOTHING I tried could report the WhatFAQ,DOC in each folder. Very Strange.
Until I discovered that I did not have a WhatFAQ.DOC for that PhoneSpell application; it turns out that for once in my life I had not started that project with the creation of my change-log tool WhatFAQ.

That is why in the second image I finally managed to show common files in each of the two folders: I changed the extent search to be for a DOT template.
Now I can find common file names in several folders-with-similar-names.

I need more work on my scientific technique ...

Thanks again, Chris
ChrisGreaves
Posts: 821
Joined: Wed Jan 05, 2022 9:29 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by ChrisGreaves »

void wrote: Fri Nov 21, 2025 11:26 pm Including a
\
in your search term enables full path matching.
Thank you Void.
If I've understood this, that leading backslash is rather like a temporary "MatchPath" switch.
If the next search string does NOT contain a leading backslash, then MatchPath is not in force (unless the switch is ON in the Search menu)
Thanks, Chris
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by void »

It's important to note that the
\
in your search, in addition to temporarily enabling match full path, it still matches the
\
in the full path.

\spell
will match
\Spell


\spell
will not match
\PhoneSpell
ChrisGreaves
Posts: 821
Joined: Wed Jan 05, 2022 9:29 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by ChrisGreaves »

void wrote: Sat Nov 22, 2025 9:38 pm It's important to note that the
\
in your search, in addition to temporarily enabling match full path, it still matches the
\
in the full path.
Thank you Void. I have elected to explore a bit more, still thinking of my "Spell" and "PhoneSpell" projects, but without confusion of files.
Untitled.jpg
Untitled.jpg (130.82 KiB) Viewed 2279 times
folder: *spell
now shows me all folders that might have some relevance to work with spelling.
Cheers, Chris
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Please Correct my interpretation of the back-slash in search strings

Post by void »

*spell
will match files/folders ending with spell.

*spell
will not match files/folders called: Spell2 or PhoneSpell2

If you want to match spell anywhere in the filename, use
*Spell*
or just
spell
Post Reply