Everything with Launchy to search file content

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Everything with Launchy to search file content

Post by TheOtherLad »

Hi,

I normally open Everything and use the following "C:\Users\Mehdi\Desktop\texts\" dale | content:dale to look for example for the word dale and obtain results of a filename or files content that contain that, until here it's working fine. Now I'm trying to achieve the same thing but using Launchy's Runner plugin and Everything works great using this argument -p "C:\Users\Mehdi\Desktop\texts" -search $$

Image

Image

The issue: whenever I try to add | content:$$ in Launchy's Runner argument so the final result looks like this

Code: Select all

-p "C:\Users\Mehdi\Desktop\texts" -search $$ | content:$$
it just doesn't work and gives me this error:

Image

So is there a command line option for content search (if not please consider adding it)? cause I think this is most prolly due to "content" not being a command line option but I might be wrong and you know best, so do enlighten me.
Also, is there any way to achieve what I'm trying to achieve?
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Everything with Launchy to search file content

Post by horst.epp »

Why not using the Everything command line tool es.exe ?
The command line is for example:
chcp 65001 & es.exe content:your_search_term
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Re: Everything with Launchy to search file content

Post by TheOtherLad »

horst.epp wrote: Sat Aug 27, 2022 2:29 pm Why not using the Everything command line tool es.exe ?
The command line is for example:
chcp 65001 & es.exe content:your_search_term
Cause I prefer the GUI and I'm not that familiar with es.exe
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Everything with Launchy to search file content

Post by horst.epp »

TheOtherLad wrote: Sat Aug 27, 2022 2:52 pm
horst.epp wrote: Sat Aug 27, 2022 2:29 pm Why not using the Everything command line tool es.exe ?
The command line is for example:
chcp 65001 & es.exe content:your_search_term
Cause I prefer the GUI and I'm not that familiar with es.exe
But the GUI doesn't support the full set of Everything functions
if used from a command line.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Everything with Launchy to search file content

Post by NotNull »

You should post on the Launchy forums or contact it's developer. (S)he should know how to specify this command (Help file is not very helpful in this case).
Everything is the 'victim' of the way Launchy handles the Runner arguments.


The following command should - in theory - do what you want:

Code: Select all

Name=whateveryoulike
Program=c:\path to\everything.exe
Arguments=-s " """c:\your path\"""    """$$""" | content:"""$$""" "

However ...
Only the first $$ gets expanded., The second one gets 'lost':
whateveryoulike <TAB> 123 gets expanded in Everything to
"c:\your path" "123" | content:""

With arguments=-s " """c:\your path\""" """abc""" | content:"""$$""" " this gets expanded to: "c:\your path" "abc" | content:"123"


So to me this looks like a shortcoming in Launchy (version 2.5 here, if that matters).
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Re: Everything with Launchy to search file content

Post by TheOtherLad »

NotNull wrote: Sat Aug 27, 2022 4:29 pm You should post on the Launchy forums or contact it's developer. (S)he should know how to specify this command (Help file is not very helpful in this case).
Everything is the 'victim' of the way Launchy handles the Runner arguments.


The following command should - in theory - do what you want:

Code: Select all

Name=whateveryoulike
Program=c:\path to\everything.exe
Arguments=-s " """c:\your path\"""    """$$""" | content:"""$$""" "

However ...
Only the first $$ gets expanded., The second one gets 'lost':
whateveryoulike <TAB> 123 gets expanded in Everything to
"c:\your path" "123" | content:""

With arguments=-s " """c:\your path\""" """abc""" | content:"""$$""" " this gets expanded to: "c:\your path" "abc" | content:"123"


So to me this looks like a shortcoming in Launchy (version 2.5 here, if that matters).
After some testing I found that it's exactly as you said, a shortcoming in Launchy's Runner plugin unfortunately but thanks anyway, I appreciate it.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Everything with Launchy to search file content

Post by NotNull »

Thank you.

BTW: There are workarounds for this issue, but that doesn't solve the root-cause (Runner parameter handling) so next time you might be out of luck. Did you contact the developer?

Anyway, a workaround:
  • Create a new filter (Menu:Search > Organize Filters) with the following settings:

    Code: Select all

    Name = Name or content
    Search = search: | content:search:
    Macro = anywhere<search>
    
    Name is arbitrary. The macro name will be used in Launchy. So if you change it, change it in the Launchy settings too.

    In Launchy:

    Code: Select all

    Name = es
    Program=c:\path to\everything.exe
    Arguments=-s " """c:\your path\"""    anywhere:"""$$""" "
    
    Typing the following in launchy: es <TAB> everything is cool
    will find all files in "c:\your folder" with the phrase "everything is cool" in either the name or the content of these files.
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Re: Everything with Launchy to search file content

Post by TheOtherLad »

NotNull wrote: Sun Aug 28, 2022 8:50 pm Thank you.

BTW: There are workarounds for this issue, but that doesn't solve the root-cause (Runner parameter handling) so next time you might be out of luck. Did you contact the developer?

Anyway, a workaround:
  • Create a new filter (Menu:Search > Organize Filters) with the following settings:

    Code: Select all

    Name = Name or content
    Search = search: | content:search:
    Macro = anywhere<search>
    
    Name is arbitrary. The macro name will be used in Launchy. So if you change it, change it in the Launchy settings too.

    In Launchy:

    Code: Select all

    Name = es
    Program=c:\path to\everything.exe
    Arguments=-s " """c:\your path\"""    anywhere:"""$$""" "
    
    Typing the following in launchy: es <TAB> everything is cool
    will find all files in "c:\your folder" with the phrase "everything is cool" in either the name or the content of these files.
Amazing workaround I really didn't know such thing exists but now I do thanks to you!

And yes I tried to contact the developer lately but got no reply so far, launchy hasn't received an update since 2010 so I might just switch to another launcher... again thank you so much.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Everything with Launchy to search file content

Post by NotNull »

You're welcome!

BTW: There are quite a few launchers that can make use of Everything to find files.
Here is a list of what we know (there might be more out there; if you/anyone encounter one, please add it to the list)
Post Reply