Include double quotes in filters

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Include double quotes in filters

Post by harryray2 »

Is it possible to create a filter to Include double quotes around the entry in the search box or does it have to be done manually each time?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

Use a filter macro and search to insert a leading and trailing double quote:

For example:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to: My Filter
  • Change the Search to: "search:"
  • Change the Macro to: myfilter<search>
--the search: text is replaced with the parameters passed to the filter.

When the filter is active, your search will now be double quoted.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Include double quotes in filters

Post by harryray2 »

Thanks, I also tried creating a match path filter rather than using the match path in search but it doesn't seem to work.
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

There's a bug here.
Everything is ignoring the filter's search options when activating a filter with a macro.

Please try the following filter search:

path:"search:"
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Include double quotes in filters

Post by harryray2 »

That doesn't seem to work...

Also, can the enclose in quotes you just told me how to do be done without a macro?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

That doesn't seem to work...
What happens?
Also, can the enclose in quotes you just told me how to do be done without a macro?
A macro is required to modify your search input.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Include double quotes in filters

Post by harryray2 »

Nothing happened, just got zero search results. I also tried checking the match path in filters
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

What search and macro name did you use in your filter?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

Everything 1.5.0.1271a will now use the filter's search options when the filter with a macro is active.

Please try the following filter:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to: My Path Filter
  • Check Match Path.
  • Change the Search to: "search:"
  • Change the Macro to: mypathfilter<search>
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Include double quotes in filters

Post by harryray2 »

Thanks...I'm possibly being really stupid here, but I can't seem to get this to work. I've enclosed a screenshot, is it correct?

Could you talk me through, step by step, how to implement this in search?
Attachments
filter.jpg
filter.jpg (51.17 KiB) Viewed 17016 times
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

Everything is most likely being stupid here.

Your filter looks good and matches mine that appears to be working..

Do you have another filter using the mypathfilter<search> for the macro?


If you activate this filter from the Search menu and search for:
program files

Does Everything find all files in C:\Program Files and C:\Program Files (x86) ?
horst.epp
Posts: 1444
Joined: Fri Apr 04, 2014 3:24 pm

Re: Include double quotes in filters

Post by horst.epp »

Something doesn't work here with this filter.
If I disable Match Path under search and enter "program files"
it works as expected showing C:\Program Files, C:\Program Files (x86)
and a few others starting with C:\Program Files\WindowsApps.
With the decribed filter it doesn't work and the results are showing more than 58000 entries starting with Program files.
If I remove the Match Path from the filter it works if I enter program files without quotes.
______________________________________________________
Windows 10 Home x64 Version 21H2 (OS Build 19044.1151)
Everything 1.5.0.1271a (x64)
Last edited by horst.epp on Thu Aug 05, 2021 11:48 am, edited 1 time in total.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Include double quotes in filters

Post by harryray2 »

Haha, no definitely me being thick...

Got it..I'm not used to using macros.

I tried, as an experiment, mypathfilter:program files. It looks like that finds in the name and the path. Is that correct?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

If I remove the Match Path from the filter it works if I enter program files without quotes.
What happens for you when Match Path is enabled?
If I disable Match Path under search and enter "program files"
The double quotes in the search will negate the double quotes in the filter search.
This would match C:\ProgramData\a file.txt

The goal is to match
program files
including the space anywhere in the path.
The goal is to type the search
program files
with out quotes and have the filter add quotes for you.
Maybe I am misunderstanding the request..
With the decribed filter it doesn't work and the results are showing more than 58000 entries starting with Program files.
The goal is to show all files and folders containing
program files
anywhere in the path.
I'm curious, what results are you expecting?


mypathfilter:program files
This will not work as intended.
The space after program will break the search into two terms: mypathfilter:program AND files
Only the text program is passed to your filter.

mypathfilter:"program files" is the recommendation to pass all text to your filter, except that will negate the double quotes in your filter's search.
horst.epp
Posts: 1444
Joined: Fri Apr 04, 2014 3:24 pm

Re: Include double quotes in filters

Post by horst.epp »

With the decribed filter it doesn't work and the results are showing more than 58000 entries starting with Program files.

starting with or containing?

All starting with c:\program files.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Include double quotes in filters

Post by tuska »

void wrote: Thu Aug 05, 2021 11:47 am The goal is to match
program files
including the space anywhere in the path.
The goal is to type the search
program files
without quotes and have the filter add quotes for you.
The goal is to show all files and folders containing
program files
anywhere in the path.

Code: Select all

program files   | My Path Filter ... with [✓] Match path
is the same as

Code: Select all

"program files" | Everything | PATH (Match Path)
for me, i.e. the same number of files (folders, files) is displayed in the status bar.

Program Files is only displayed in bold in the Path column.
Everything looks fine to me here.
horst.epp
Posts: 1444
Joined: Fri Apr 04, 2014 3:24 pm

Re: Include double quotes in filters

Post by horst.epp »

Thats the results with and without Match Path
Screenshot - 06.08.2021 , 08_34_45.png
Screenshot - 06.08.2021 , 08_34_45.png (31.59 KiB) Viewed 16892 times
Screenshot - 06.08.2021 , 08_35_08.png
Screenshot - 06.08.2021 , 08_35_08.png (97.36 KiB) Viewed 16892 times
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Include double quotes in filters

Post by void »

Thank you for the screenshots horst.epp,

The second screen shot with Match Path enabled in the filter has the expected results.
With the decribed filter it doesn't work and the results are showing more than 58000 entries starting with Program files.

starting with or containing?

All starting with c:\program files.
These are the expected results.

Sorry if I am misunderstanding.
were you expecting different results?
Are any of your existing filters with macros not working as expected?


What we are trying to do here is match a whole phrase anywhere in the path without the need to type double quotes (") in your search.

With the active filter mentioned above, you would only need to type:
Program Files
(without double quotes) to match the exact phrase "Program Files" anywhere in the path.
horst.epp
Posts: 1444
Joined: Fri Apr 04, 2014 3:24 pm

Re: Include double quotes in filters

Post by horst.epp »

I never have Match Path enabled by default.
Personaly I don't need this macro ,
I only made it to test the original posters questions and problems.
To search for program files its enough to start it with one " to get what I want.

I think the original poster expects the result which I get with Match Path disabled,
so not anywhere in the path.
If I want to avoid using " around a search term I would only accept a filter or macro
which works independend of other settings.
Post Reply