How to perform this search in ES Cli?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Ralf_Reddings
Posts: 84
Joined: Fri Mar 24, 2023 4:53 pm

How to perform this search in ES Cli?

Post by Ralf_Reddings »

Searching
"C:\dog run"|"C:\cat run"
on a Everything 1.5 window correctly finds all of the items in directories
dog run
and
cat run
:

Code: Select all

C:\cat run\
C:\dog run\
C:\cat run\cats 1.png
C:\cat run\cats 2.png
C:\cat run\cats 3.png
C:\dog run\dogs 1.png
C:\dog run\dogs 2.png
C:\dog run\dogs 3.png
I am attempting to perform the same search on ES cli. Due to how the search string must not be quoted in ES cli, its very difficult to figure out a working method.

Code: Select all

ES '<"C:\dog run"|"C:\cat run">'       #Nothing gets returned for this search
ES "<"C:\dog run"|"C:\cat run">"       #This search returns just the parent folders. No child items
#C:\cat run
#C:\dog run
ES ""C:\dog run""`|""C:\cat run""      #Same as above, returns only parent folders, no children

ES "C:\dog run""`|""C:\cat run"        #Returns only the child items for "dog run" but not the "dog run" directory. "Cat run" is entirely ignored
#C:\dog run\dogs 1.png
#:\dog run\dogs 2.png
#:\dog run\dogs 3.png
I have tried alot of other variations but nothing works. If anyone has a working method particularly for PowerShell, I would appreciate it.
void
Developer
Posts: 15354
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to perform this search in ES Cli?

Post by void »

Please try the following Powershell call:

es "C:\dog run" `| "C:\cat run"
Ralf_Reddings
Posts: 84
Joined: Fri Mar 24, 2023 4:53 pm

Re: How to perform this search in ES Cli?

Post by Ralf_Reddings »

It works!
Cheers!
therube
Posts: 4610
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to perform this search in ES Cli?

Post by therube »

Is that backtick (`) meant to be there?
void
Developer
Posts: 15354
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to perform this search in ES Cli?

Post by void »

Yes.
Otherwise, | is treated as a pipe.

Spaces around `| are also required.
Otherwise, "1"`|"2" is treated as: 1 |2
(| and 2 are combined)
Post Reply