search multiple files with es.exe

General discussion related to "Everything".
Post Reply
Miaousse
Posts: 3
Joined: Mon Apr 29, 2024 6:58 am

search multiple files with es.exe

Post by Miaousse »

Hello
How can i search multiple file at once using es.exe ?
i tried
es.exe -s -ext PDF -a-d -path "\\my\network\path" "file1|file2" also with single quote
es.exe -s -ext PDF -a-d -path "\\my\network\path" file1|file2 | returns an error

i think -filelist-filename could be a solution but i don't understand how it should be formatted
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: search multiple files with es.exe

Post by therube »

(Ah, the 'ol -s, & -s* for that matter. I've got to think about that a bit more... myself ;-)).

-ext should be, ext:, so
ext:pdf
- otherwise, you are looking for "-ext" AND "file1"
your UNC path should be fine (so long as that is something that is actually indexed)
"file1|file2", the quotes say to look for that, literally (which is not likely to find anything)

your second try, says to look for file1 on \\my\network\path
OR (|) file2, anywhere at all.

What you need is grouping < >, <file1 | file2>
But with the command-line, you need to ESCAPE things like \ & | > < ^
^ acts as an ESC character. (As does double quotes, ", but that won't work in this instance.)

So you'll need something like:
es.exe -s -ext:PDF -a-d -path "\\my\network\path" ^< file1 ^| file2 ^>


(where ^ ESCAPES the < > and |
& again, that assumes that \\my\network\path is actually indexed)
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: search multiple files with es.exe

Post by void »

-ext pdf is fine.
This shows the extension column and searches for pdf

To find only *.pdf files, include the following in your es search:
ext:pdf

-or-
*.pdf




While " can escape |, ES passes the command line as is to Everything, so " are treated literally.

Use -search to specify a single parameter, eg:

es.exe -s -ext PDF -a-d -path "\\my\network\path" -search "file1|file2"


The quotes are removed and the | is escaped.

or, as the therube mentions, use ^ to escape ^| eg:
es.exe -s -ext PDF -a-d -path "\\my\network\path" file1^|file2
Post Reply