Powershell and sending a quoted path to everything search bar

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Powershell and sending a quoted path to everything search bar

Post by hellen_dorandt89 »

I have been stuck on this for quite sometime today, I am wondering what could I be doing wrong.
I have tried a number of things, none have worked.

The docs state:
Use """ to escape a literal "
For example, set the search to: "foo bar"
Everything64.exe -s """"foo bar""""
(Remember to also escape spaces with double quotes)
Earlier today I asked for help on Stack overflow, HERE , please read that page to see what I have tried.

I got an answer there that suggested I try these:

Code: Select all

Everything64.exe -s '"""C:\Program Files"""'
It inserts: C:\Users\hellen\Files\\\" \\\C:\Program

Code: Select all

Everything64.exe -s "`"`"`"C:\Program Files`"`"`""
It inserts: C:\Users\hellen\Files\\\" \\\C:\Program

Code: Select all

Everything64.exe -s --% """C:\Program Files"""
it inserts: \\\C:\Program Files\\\


It seems everything is enterpreting the double quotes as back slashes:
I thought maybe this is a bug so I backed up and then deleted
  • Appdata entries
  • Program files
  • insall of 1.4
The issue persists, even on 1.4

I cant use command prompt, I am working on a everything "Extension" and powershell is a must for its devolopment and my general everyday use.

PSVersion 7.3.0-preview.7
Windows Terminal Preview 1.15.2003.0
Any help would be greatly appreciated!
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Powershell and sending a quoted path to everything search bar

Post by void »

Please try the following search:

Code: Select all

Everything64.exe -s `"`"`"`"c:\program files`"`"`"`"
`" = a single literal double quote (Powershell only).
Everything will treat """ as a single literal quote.
An extra double quote is needed to escape white spaces.



An easier method for Everything 1.5 is:

Code: Select all

Everything64.exe -s* "c:\program files"
-s* will treat the rest of the command line as a literal search term.
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Re: Powershell and sending a quoted path to everything search bar

Post by hellen_dorandt89 »

Thanks for helping me void.
I tried your first suggestion:

Code: Select all

Everything64.exe -s `"`"`"`"c:\program files`"`"`"`"
It inserts: "C:\Users\hellen\files\\\\" \\\\c:\program

Code: Select all

Everything64.exe -s* "c:\program files"
It inserts: "C:\Program Files"
While this works for the path, it does not seem to allow for search functions for example. I tried:

Code: Select all

Everything64.exe -s* "Parent:"C:\Program Files""
It inserts: Parent: C:\Program Files

Code: Select all

Everything64.exe -s* "Parent:`"C:\Program Files`""
It inserts: "Parent:\"C:\Program Files\""
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Powershell and sending a quoted path to everything search bar

Post by void »

Please try the following:

Code: Select all

.\everything64.exe -s --% """"c:\program files""""

-or-


With Everything 1.5:

Code: Select all

.\everything64.exe -s "#quot:c:\program files#quot:"


For functions, simply leave them unquoted:

Code: Select all

Everything64.exe -s* Parent:"C:\Program Files"
The quotes are treated as literal after -s*
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Re: Powershell and sending a quoted path to everything search bar

Post by hellen_dorandt89 »

Code: Select all

.\everything64.exe -s --% """"c:\program files""""
it inserts: "C:\Users\hellen\files\\\\" \\\\c:\program
I was hoping to avoid this one anyways as it nullifies powershell expressions.

Code: Select all

.\everything64.exe -s "#quot:c:\program files#quot:"
This one works: "c:\program files"

Code: Select all

everything64.exe -s "Parent:#quot:c:\program files#quot:"
insersts: everything64.exe -s "Parent:#quot:c:\program files#quot:"
powershell expressions work too.

Code: Select all

"Parent:C:\Program Files"
it inserts: "Parent:C:\Program Files"


All in all I am happy with

Code: Select all

everything64.exe -s "Parent:#quot:c:\program files#quot:"
Thansk so much
Post Reply