Everything, ES.BAT, Efficiency

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Everything, ES.BAT, Efficiency

Post by therube »

Everything, ES.BAT, Efficiency


i do something like this (& where es.ex2 is es.exe), ES.BAT:

Code: Select all

@es.ex2 -instance 15  %*   -match-path  -sort path
@es.ex2 -instance 15                                        %*  -p -s  -double-quote -n 1  > c:\out\sssGO.TXT
@es.ex2 -instance 15                                        %*  -p -s  -export-efu  c:\out\sssGO.efu  !\Windows\Recent  file:
@es.ex2 -instance 15                                        %*  -p     -export-m3u8 c:\out\sssGO.m3u8 !\Windows\Recent  file: distinct:name
(& from there, i may use various other batch files on said output files.
like my m3u.bat: simply, START "" C:\out\sssGO.m3u8, which opens the .m3u8 in my media player)

is there a way to make something like that more efficient ?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Everything, ES.BAT, Efficiency

Post by NotNull »

I might be able to help, but "de-crypt" your message first, please.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, ES.BAT, Efficiency

Post by therube »

Well, I'm initiating 4 separate instances of ES (sequentially) - all using the same (basic) <search> (%*), rather then being able to run 1 instance & send my ouputs 4 different ways.

1 goes to stdout
1 goes to .txt
1 goes to .efu
1 goes to .m3u8

(& as it is, each <search> output is "refined", slightly.)
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Everything, ES.BAT, Efficiency

Post by NotNull »

The "refine" part makes this tricky. This will create different outputs.

First suggestion:
the -n 1 will output a single result. Filtering is done at ES.exe-side, so ES has to handle all results first.
count:1 will do the same, but "serversided": let Everything.exe do the filtering.

An anology for better understanding:
If you are interested in yellow flowers (exactly 1 in this example), you can:
- call the garden centre
- order all their yellow flowers
- let them send all these flowers to your home
- pick a random one
- ignore the rest
-done

Or:
- call the garden centre
- order exactly 1 random yellow flower
- let them send this flower to your home
- done

The first option corresponds with -n 1, the second with count:1


Without the "refinements", you can possibly (untested) combine a couple:

Code: Select all

@es.ex2 -instance 15  !\Windows\Recent  %*   -match-path  -sort path | (tee c:\out\sssGO.m3u8  c:\out\sssGO.TXT) 
(I know you are familiar with TEE as part of cygwin/gnuwin, so no need to go into detail :-) )
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, ES.BAT, Efficiency

Post by therube »

Well one thing you can do, is if no results are returned, simply end at that point ;-).


@es.ex2 -instance 15 %* -match-path -sort path -no-result-error

:: if no results found, no need to do anything more, duh!
@if NOT %errorlevel% EQU 0 goto end:

@es.ex2 -instance 15 %* -p -s -double-quote -n 1 > c:\out\sssGO.TXT
@es.ex2 -instance 15 %* -p -s -export-efu c:\out\sssGO.efu !\Windows\Recent file:
@es.ex2 -instance 15 %* -p -export-m3u8 c:\out\sssGO.m3u8 !\Windows\Recent file: distinct:name


:end
Post Reply