Exact: Match the whole filename or ...

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

Exact: Match the whole filename or ...

Post by ChrisGreaves »

This wiki page is the subject of this mug-of-tea-break up here.
Match the whole filename or match anywhere in the filename.

Code: Select all

wfn:
wholefilename:
nowfn:
nowholefilename:
exact:	
There are numerous threads on the lexical/syntactic meaning of terms like "filename", including Location? Really? which, of course, prompted me to sit down and write a Euclidean treatise on Drive, Path, Folder, Name and Extent. That was a lot of fun for me.

Code: Select all

exact:WhatIfIWereonRetainer
returns a Result List of zero objects whereas

Code: Select all

exact:WhatIfIWereonRetainer.doc
returns one object.
and

Code: Select all

WhatIfIWereonRetainer.doc
returns two objects.

The definition (reproduced above) states "the filename" and as well "the whole filename"
My experiments (above) suggest that by "filename" in the context of Everything is meant the name portion - the bit to the right of the path - and what DOS/Windows calls The Extent, but which is really just another part of the filename.

(Watch what happens when you copy/paste a file in Windows Explorer).

Please and thank you: Where can I find the Everything definitive terminology for Drive, Path, Folder, Name and Extent. Also FileName, FullName, PartialName, PartialPath and the entire family of terms that have been used over, say, just the past five years?

In parallel with this I am trying to explain what happens when I place a single space to the right of the colon in exact:, and why.
Cheers, Chris
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Exact: Match the whole filename or ...

Post by void »

In the help I have tried to leave filename as vague.

It can mean the full path and name or just the name part.



To make things more confusing, exact: can be used on properties (so not just filenames).

For example:

exact:album:"abc 123"
wholefilename:content:"abc 123"


Please and thank you: Where can I find the Everything definitive terminology for Drive, Path, Folder, Name and Extent. Also FileName, FullName, PartialName, PartialPath and the entire family of terms that have been used over, say, just the past five years?
Help -> Search Syntax (in Everything 1.5) lists the basic terminology:

Code: Select all

Filename parts:
	Full Path:	C:\folder\file.txt
	Name:		file.txt
	Path:		C:\folder
	Stem:		file
	Extension:	txt
Some additional terminology:
Location == Path
Path Part == Path
Basename == Name

In parallel with this I am trying to explain what happens when I place a single space to the right of the colon in exact:, and why.
My explanation:
A space is treated as AND
exact: is treated as a search term.
since the search term is empty, exact: will look for a filename with no name.
Generally, files must have a name so this search will match no files.
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Exact: Match the whole filename or ...

Post by ChrisGreaves »

void wrote: Mon Feb 20, 2023 7:26 am In the help I have tried to leave filename as vague. It can mean the full path and name or just the name part.
With respect, I feel that this is a bad decision, especially in Everything which has an almost insurmountable heap of terminology and which depends so much on precision in constructing a Filter. (Please see "Exact:" below)
Help -> Search Syntax (in Everything 1.5) lists the basic terminology:
Thank you for this confirmation. I had previously read this a month or so ago, and yet, I suspect because the definitions are vague, we users continue to use terminology gleaned from various learned sources. And this leads to hurdles of disappointment in "getting Everything to work".

Code: Select all

Filename parts:
	Full Path:	C:\folder\file.txt
	Name:		file.txt
	Path:		C:\folder
	Stem:		file
	Extension:	txt
Some additional terminology:
Location == Path
Path Part == Path
Basename == Name
I don't want to debate this here, but I suspect that synonyms (included in file/files; folder/folders, and even wfn/whole-filename and the rest) create confusion in the mind of a newcomer.
For example: If you are going to use "Path" to represent the root Drive and a series of one or more Folders, why introduce "Location" and "Path Part"?
Please sign me up for the next "International Symposium on The Terminology of Everything" (grin)
In parallel with this I am trying to explain what happens when I place a single space to the right of the colon in exact:, and why.
My explanation:
A space is treated as AND
exact: is treated as a search term.
This is what I found - my Result List was empty.
That said, I wasn't ready to learn that while "exact:" is a Modifier, "exact: " is a search term.
Take my word for it: This is another Trap For Young Players!
Cheers and thanks again
Chris
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Exact: Match the whole filename or ...

Post by NotNull »

ChrisGreaves wrote: Mon Feb 20, 2023 1:24 pm With respect, I feel that this is a bad decision, especially in Everything which has an almost insurmountable heap of terminology and which depends so much on precision in constructing a Filter. (Please see "Exact:" below)
In this case, I can understand the vague approach.
exact:notepad.exe will match files where the name is exact notepad.exe.

With Match Path enabled, this search does not match anything as it searches for the full path.
In this case, the search should be exact:c:\windows\notepad.exe

That said, I wasn't ready to learn that while "exact:" is a Modifier, "exact: " is a search term.
You can search for a filename consisting of a single space with exact:" "
(it's not trivial to create such a filename, but definitely possible)
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Exact: Match the whole filename or ...

Post by ChrisGreaves »

NotNull wrote: Mon Feb 20, 2023 5:45 pm
That said, I wasn't ready to learn that while "exact:" is a Modifier, "exact: " is a search term.
You can search for a filename consisting of a single space with exact:" " (it's not trivial to create such a filename, but definitely possible)
Maybe today was a day I should have stayed in bed(grin)
I understand exact: as a modifer; it modifies the behaviour of the function which follows it.
So I am happy with Exact:Name:WhatFAQ.doc (a poor example I admit). In this case a six-character string whose rightmost character is the colon, is a Modifier.
But exact:" " to my mind is still just a six-character string whose rightmost character is the colon, i.e. a Modifier, followed by a three-character search term describing a single space character enclosed in double-quotes.

In Void's explanation:
A space is treated as AND
exact: is treated as a search term.
since the search term is empty, exact: will look for a filename with no name.
Generally, files must have a name so this search will match no files.
he says "exact: is treated as a search term." which is what I don't understand.
I think that even in this case, exact: still operates as a Modifier, but this time it modifies an empty string, a null string. The Modifier says "look for a file whose name is exactly zero-lenth.

I think I might be struggling to swim here when all I should do is relax and float along until it all clicks into place.
Thanks, Chris
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Exact: Match the whole filename or ...

Post by NotNull »

I like your approach. It's like asking "What is a cat?"
Most people would answer this with: 4 legs, a tail, a head and it says Meow.

You are questioning the fundamentals. What if it has only 2 legs? Can't meow?
It really made me think and I don't have an anwer that is 100% accurate as there are some exceptions in Everything ...

So my "4 legs, a tail, a head and it says Meow" answer for now:
A modifier has to be followed with something.
If not, Everything will try to make the most "sensical" choice on how to handle it (like file: and folder:)
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Exact: Match the whole filename or ...

Post by ChrisGreaves »

NotNull wrote: Mon Feb 20, 2023 7:04 pm I like your approach. It's like asking "What is a cat?"
Most people would answer this with: 4 legs, a tail, a head and it says Meow.
If we call a tail a leg, how ,many legs does a dog have? (answer below)
You are questioning the fundamentals.
A modifier has to be followed with something.
And you are being too kind. It's like Feynman's answer about "why?".
I am insatiably curious, and every day have to stop myself drilling down past the Bosons and Muons of Everything to find out why.

But thank you for the confirmation that A modifier has to be followed with something. I am really looking for something like that at a very high level that a beginner can retain. In programming terms I would say that a Modifier is a function that takes an Everything Function as an argument.
Much simpler is "A modifier better be followed by something, otherwise it ain't a Modifier"

All I need to do now is to Stop. Right. There!

Thanks
Chris
Answer: Four! Calling a tail a leg doesn't make it a leg. C
Post Reply