NotNull wrote: ↑Wed Oct 12, 2022 8:33 pmExample with C:\Windows\notepad.exe
C:\Windows\notepad.exe
Hi NotNull; well this was a nice set of exercises to enjoy with a cuppa.
In my tests below when I say “...if I append Notepad” I assume that your statement “will find Notepad” means “it may well be a needle in a haystack”. I am appending “Notepad.exe” as a test to check that such a file(s) is found.
The following searches will find notepad.exe:
c:**exe
Because ** will match any character in the path or name portion; in this case between the colon of the drive and the rightmost three characters of the Fullname
But to easily spot Notepad in the results I would prudently tag “<space>notepad” to the right-hand end of the search string
c:\*\*.exe
Because the first * will find any characters between the two backslashes (including presumably other backslashes) , while the second asterisk will find any characters between the rightmost (why???) backslash and the extent delimiter and extent characters.
But to easily spot Notepad in the results I would prudently tag “<space>notepad” to the right-hand end of the search string
**\*.exe
Because the ** will find any characters to the left of the rightmost (or any ???) backslash, and the * will match any characters between the rightmost (why??) backslash and the extent delimiter and extent characters
But to easily spot Notepad in the results I would prudently tag “<space>notepad” to the right-hand end of the search string
**exe
Because the ** will match any characters anywhere in the Fullname excepting the rightmost three characters which must match “exe”
But to easily spot Notepad in the results I would prudently tag “<space>notepad” to the right-hand end of the search string
**win (Wildcards_02.png)
?? The double asterisk says “Folders only” and the “win” says “and only folders whose name ends in “win”. That is, has “win” as the right-hand three characters.
“**win**\notepad.exe” seems to do the trick. I suspect that you were having a long day!
\win**
?? The “\win” says “folders that start with “win”; the double asterisk says “any characters that match in the remaining right-hand part of the filename)
\win** notepad.exe
\win* (Wildcards_03.png)
?? The backslash and “win” says “any folder or file whose name begins with “win”; the single asterisk says “any characters in the name:
Since by definition if the found object is a file, then notepad.exe will never be found, because “notepad.exe” does NOT begin with “win”
The following will not:
c:\*.exe (Wildcards_04.png)
The “C:\” says “In the root folder of the boot drive” and the “*.exe” says any name with an extent delimiter and the extent characters “exe”. Since I have no “.exe” files in the root folder, the search results will never show an .exe, let alone a specific Notepad.exe. Actually, I copied Everything64.exe in there and found it, just to show that I would find Notepad, were there a copy on my root folder.
\win\** (Wildcards_05.png)
The “\win\ says that there must be a three-letter folder “win” somewhere in the path, and the double-asterisk says ‘anything else goes
fore and aft ??? What? I expected the “\win\ to match only folders in the root of any included drive. Does the “**” serve as a roving matcher, anywhere in the Fullname that is NOT specified? I thought that here ** would match only to the right of Fullnames with \win\.
This is complex stuff, and I am sure that I have not got it completely right, but thanks to your examples I think I can interpret double-asterisks now
Cheers, and many thanks,
Chris