[Solved] Searching files with characters in specific locations
[Solved] Searching files with characters in specific locations
If I do this search in 1.4:
?ac?.jpg
I obtain correct results.
In 1268a there are other files listed, with "ac" not in the same location of the file name.
Also, in search list there are files with more than 4 characters.
?ac?.jpg
I obtain correct results.
In 1268a there are other files listed, with "ac" not in the same location of the file name.
Also, in search list there are files with more than 4 characters.
Last edited by w64bit on Fri Jan 21, 2022 3:29 pm, edited 1 time in total.
Re: Searching files with characters in specific locations
What search options are checked under the Search menu?
Could you please give an example filename where ac is not in the same location.
Could you please give an example filename where ac is not in the same location.
Re: Searching files with characters in specific locations
Nothing selected + Everything filter.
Example for: ?ac?.jpg
1ac2.jpg (OK)
anythingac4.jpg (not OK)
It seems that ? from the end it's respected. The first ?, not.
Example for: ?ac?.jpg
1ac2.jpg (OK)
anythingac4.jpg (not OK)
It seems that ? from the end it's respected. The first ?, not.
Last edited by w64bit on Wed Jul 07, 2021 8:06 am, edited 1 time in total.
Re: Searching files with characters in specific locations
There is a Tools -> Options -> Search -> Match whole filename when using wildcards option.
Please try checking this option. (it should be checked by default)
Please try checking this option. (it should be checked by default)
Re: Searching files with characters in specific locations
Yes. Thank you.
Re: Searching files with characters in specific locations
Is it possible to add a secondary checkbox to Options -> Search -> Match whole filename when using wildcards,
named "For names using only ?".
If checked can work like this:
3 letter docx in folders starting with one character + ABC + anything
\?ABC*\ ???.docx
named "For names using only ?".
If checked can work like this:
3 letter docx in folders starting with one character + ABC + anything
\?ABC*\ ???.docx
Last edited by w64bit on Thu Jul 08, 2021 8:32 am, edited 2 times in total.
Re: Searching files with characters in specific locations
I will consider an option to only match whole words when using (?)
Thank you for the suggestion.
For now, please use the wfn: (Whole File Name) search modifier:
\?ABC*\ wfn:???.docx
(works best with match whole filename when using wildcards disabled)
In Everything 1.5:
?ABC*\???.docx
-or-
?ABC**\???.docx
(works best with match whole filename when using wildcards enabled)
(Everything 1.5 will check each subpath, instead of the whole path)
In other words, Everything 1.5 will test:
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => Match
In Everything 1.4 (or 1.5):
*\?ABC*\???.docx
(prefix the search with a * to match the start of the path)
(works best with match whole filename when using wildcards enabled)
Thank you for the suggestion.
For now, please use the wfn: (Whole File Name) search modifier:
\?ABC*\ wfn:???.docx
(works best with match whole filename when using wildcards disabled)
In Everything 1.5:
?ABC*\???.docx
-or-
?ABC**\???.docx
(works best with match whole filename when using wildcards enabled)
(Everything 1.5 will check each subpath, instead of the whole path)
In other words, Everything 1.5 will test:
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => No Match
c:\docs\my docs\xABC123\foo.docx => Match
In Everything 1.4 (or 1.5):
*\?ABC*\???.docx
(prefix the search with a * to match the start of the path)
(works best with match whole filename when using wildcards enabled)
Re: Searching files with characters in specific locations
Thank you very much.
One remark. In addition to this new option, maybe "Match whole filename when using wildcards" can be moved from Options to Search menu as "Match filename".
One remark. In addition to this new option, maybe "Match whole filename when using wildcards" can be moved from Options to Search menu as "Match filename".
Re: Searching files with characters in specific locations
I will consider a Match Whole Filename option under the Search menu.
Thank you for the suggestion.
Thank you for the suggestion.
Re: Searching files with characters in specific locations
This is a great feature for special cases.
RegEx has special characters for this purpose ( anchors ).
Caret (^) matches the position before the first character in the string.
Dollar ($) matches the position right after the last character in the string.
Perhaps adding/using those two might be easier and more generic?
Just an idea, ignore if it is not a good fit.
RegEx has special characters for this purpose ( anchors ).
Caret (^) matches the position before the first character in the string.
Dollar ($) matches the position right after the last character in the string.
Perhaps adding/using those two might be easier and more generic?
Just an idea, ignore if it is not a good fit.
Re: Searching files with characters in specific locations
You can enable the special regex characters ^ and $ for use in a normal search with Everything 1.5.
To enable matching of the start of the filename with a caret:
To enable matching of the end of the filename with a dollar sign:
Match end of filename with dollar sign
Match start of filename with caret
To enable matching of the start of the filename with a caret:
- In Everything, type in the following search and press ENTER:
/match_start_of_filename_with_caret=2
where 2 is match start of basename, 1 is match start of filename (or full path when match path is enabled) and 0 is off (default).
If successful you should see match_start_of_filename_with_caret=1 in the status bar for a few seconds.
To enable matching of the end of the filename with a dollar sign:
- In Everything, type in the following search and press ENTER:
/match_end_of_filename_with_dollar_sign=1
where 1 is on and 0 is off (default).
If successful you should see match_end_of_filename_with_dollar_sign=1 in the status bar for a few seconds.
Match end of filename with dollar sign
Match start of filename with caret
Re: Searching files with characters in specific locations
@ void
Can you please tell me if this feature (automatically detect ? and *) is at the top of your list?
Can you please tell me if this feature (automatically detect ? and *) is at the top of your list?
Re: Searching files with characters in specific locations
What feature are you referring to?
Re: Searching files with characters in specific locations
Everything should automatically detect ? and * without user intervention (without wfn: or Match whole filename when using wildcards).
FOLDER1 containing:
1.pdf
12.pdf
123.pdf
Problem 1:
Match whole filename when using wildcards = OFF
\FOLDER?\ ?.pdf
all files in folder are listed
Problem 2:
Match whole filename when using wildcards = ON
\FOLDER?\ ?.pdf
\FOLDER?\ *.pdf
no files are listed
I think that:
\FOLDER?\ ?.pdf should display 1 character filenames
\FOLDER?\ *.pdf should display all filenames
FOLDER1 containing:
1.pdf
12.pdf
123.pdf
Problem 1:
Match whole filename when using wildcards = OFF
\FOLDER?\ ?.pdf
all files in folder are listed
Problem 2:
Match whole filename when using wildcards = ON
\FOLDER?\ ?.pdf
\FOLDER?\ *.pdf
no files are listed
I think that:
\FOLDER?\ ?.pdf should display 1 character filenames
\FOLDER?\ *.pdf should display all filenames
Last edited by w64bit on Tue Aug 03, 2021 10:14 am, edited 1 time in total.
Re: Searching files with characters in specific locations
The intended usage with "Match whole filename when using wildcards" = ON is:
folder?\?.pdf
folder?\*.pdf
or, if you want subfolders under folder1:
folder?\** ?.pdf
folder?\** *.pdf
folder?\**.pdf
Since a trailing backslash will never match anything with "Match whole filename when using wildcards" = ON, I will experiment with matching whole basenames anywhere in the parent path.
For example:
\window?\ would match c:\windows\Notepad.exe
This would make your following searches work as expected with "Match whole filename when using wildcards" = ON:
\FOLDER?\" ?.pdf should display 1 character filenames
\FOLDER?\" *.pdf should display all filenames
With "Match whole filename when using wildcards" = OFF, please try the following search:
\FOLDER?\" \?.pdf
folder?\?.pdf
folder?\*.pdf
or, if you want subfolders under folder1:
folder?\** ?.pdf
folder?\** *.pdf
folder?\**.pdf
Since a trailing backslash will never match anything with "Match whole filename when using wildcards" = ON, I will experiment with matching whole basenames anywhere in the parent path.
For example:
\window?\ would match c:\windows\Notepad.exe
This would make your following searches work as expected with "Match whole filename when using wildcards" = ON:
\FOLDER?\" ?.pdf should display 1 character filenames
\FOLDER?\" *.pdf should display all filenames
With "Match whole filename when using wildcards" = OFF, please try the following search:
\FOLDER?\" \?.pdf
Re: Searching files with characters in specific locations
Everything 1.5.0.1271a adds support for matching wildcards with a trailing path separator anywhere in the path.
For example:
\FOLDER?\
is treated as:
\FOLDER?\**
This works best when "Match whole filename when using wildcards" is enabled from Tools -> Options -> Search.
The leading path separator can also be omitted:
FOLDER?\
For example:
\FOLDER?\
is treated as:
\FOLDER?\**
This works best when "Match whole filename when using wildcards" is enabled from Tools -> Options -> Search.
The leading path separator can also be omitted:
FOLDER?\
Re: Searching files with characters in specific locations
Excellent. It's much, much easier now.
Thank you very much.
Thank you very much.