Page 2 of 2

Re: ES 1.1.0.1 Alpha Command Line Tool for Everything 1.4.1

Posted: Mon Jan 29, 2018 12:28 am
by void
Thanks for your post.
Test 1. ES command line
es.exe -export-efu C:\es_test.efu C:\
Result: ~35 seconds 90MB output file
Results are from the Everything index.
This is slowest method, because:
1) All file information is gathered
2) WM_COPYDATA used for IPC is slow.
Test 2. Everything.exe command line
Everything.exe -create-file-list C:\ev_test.efu C:\
Results are scanned from disk. Not the Everything index.
Permissions may limit some files from scanning.
Reparse points are followed, whereas ES does not.
All file information is gathered.
Test 3: Everything GUI menu
Everything GUI: first search C:\ and then go to menu > file > export
Results are from the Everything index.
Only indexed file information or cached file information is exported.

I've modified ES 1.0.0.9 to be consistent with Everything.
That is ES -export-efu will now only export information that is indexed.
You can use -size, -date-modified, -date-created and/or -attributes to override this behavior.

ES 1.0.0.9

Changes:
  • fixed an issue with checking if the database is loaded.
  • exporting as efu only exports indexed information now, use -size, -date-modified, -date-created or -attributes to override.
  • folder size is also exported now.

Re: ES 1.1.0.10 Command Line Tool for Everything 1.4.1

Posted: Wed Jun 27, 2018 1:57 am
by void
ES-1.1.0.10.zip
  • -r and -regex now take a parameter.
  • Everything now handles regex escape sequences.

Re: ES 1.1.0.10 Command Line Tool for Everything 1.4.1

Posted: Wed Jun 27, 2018 3:06 am
by ovg
Link leads to 404 Error ...

Re: ES 1.1.0.10 Command Line Tool for Everything 1.4.1

Posted: Wed Jun 27, 2018 6:15 am
by void
Fixed link.

Re: ES 1.1.0.10 Command Line Tool for Everything 1.4.1

Posted: Wed Jun 27, 2018 7:15 pm
by ovg
Thanks!

Re: ES 1.1.0.10 Command Line Tool for Everything 1.4.1

Posted: Fri Jun 21, 2019 6:12 am
by void
ES-1.1.0.12.zip

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 22, 2020 12:25 am
by void
ES-1.1.0.13
  • added -cd -removed -cd -added -ipc1 -ipc2 -output errors to std_error
ES-1.1.0.14
  • updated help (thanks to NotNull) and fixed -? -h -help errors
ES-1.1.0.15
  • updated help (thanks to NotNull)
ES-1.1.0.16
  • added -no-header, added -double-quote, added -version, added -get-everything-version
ES-1.1.0.17
  • added -no-result-error
ES-1.1.0.18.zip
  • Added -get-total-size command line option to return the total file size of all results.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon May 04, 2020 1:10 am
by void

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Sat May 09, 2020 12:44 pm
by cmartx
Hi, Greetings from Sydney. I'm a casual user of everything (including the new 1.4.1 version) and I've recently gone to the command line to look for specific searches to capture output from. I've looked a the documentation fairly closely and I can't see any way of searching for files modified on a certain date or younger than a certain date. I can do it in the GUI (i.e. dm:1/5/2020 ) but is there a way to do it from the command line? All the best.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Sat May 09, 2020 12:53 pm
by void
es uses the same syntax as Everything.
Just remember to escape < > ^ and | with ^

For example, find files modified on the 1/5/2020, search for:
ES.exe dm:1/5/2020

For example, find files modified after 1/5/2020, search for:
ES.exe dm:^>1/5/2020

For example, find files modified between 1/5/2020 and 8/5/2020, search for:
ES.exe dm:1/5/2020..8/5/2020

Include -dm to show the date modified in your ES results.
Include -sort dm to sort your results by date modified.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 04, 2020 12:58 pm
by nspp
I have made a try with version 1.1.0.19 ant it seams that single [ctrl]+C signal is not effective and does not stop the process immediately. Could it be possible to not list all folder if no parameter are provided.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 04, 2020 3:05 pm
by NotNull
nspp wrote: Wed Nov 04, 2020 12:58 pm Could it be possible to not list all folder if no parameter are provided.
Yes. You can specify what ES should do if there are no parameters.
Those settings will be stored in ES.ini, in the folder where your ES.exe is.

Option 1: Do nothing

Code: Select all

ES.exe  -hide-empty-search-results -save-settings

Option 1: Show Help text

Code: Select all

ES.exe -empty-search-help -save-settings

(Not very relevant - and not a recommended solution - but I configured it as ES.exe -n 10 -save-settings , so that I also have a quick check to see if Everything is running/ reachable. )

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Thu Nov 05, 2020 12:14 am
by NotNull
From the opening post:
Saving and clearing settings

-save-settings

Save all switches to the registry under HKEY_CURRENT_USER\Software\ES

-clear-settings

Clear all saved settings in the registry under HKEY_CURRENT_USER\Software\ES

Is that still Everything 1.3 related? 1.4 saves it's settings in ES.ini

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Jul 27, 2021 8:47 pm
by NotNull
Is there a way to not show the filename?

In a recent forum thread I wanted to list all file extensions, but could not get it done without the filename.
No big deal of course, as there are many ways to iron that out.

Just curious if I missed something (there is no command-line switch -no-name, which was my first guess)

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Jul 27, 2021 8:49 pm
by therube
(When I looked, I also didn't find a way to omit the name.)

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jul 28, 2021 7:41 am
by void
ES will always show the name column or full path and name column.

There is currently no option to disable this column.


Pressing Ctrl + C will break the ES request and terminate the current search query. (if you run ES with out any parameters and don't want all results)

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jul 28, 2021 4:20 pm
by NotNull
OK. Thanks!

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Oct 12, 2021 4:33 am
by void

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Nov 29, 2021 11:05 pm
by void

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 12, 2022 12:39 am
by void

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 12, 2022 9:01 am
by klim
void wrote: Wed Jan 12, 2022 12:39 am ES-1.1.0.22.zip
Thanks for fast fix, but there is a problem with that version.

es.exe
Error 8: Everything IPC window not found. Please make sure Everything is running
.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 12, 2022 9:03 am
by horst.epp
klim wrote: Wed Jan 12, 2022 9:01 am
void wrote: Wed Jan 12, 2022 12:39 am ES-1.1.0.22.zip
Thanks for fast fix, but there is a problem with that version.

es.exe
Error 8: Everything IPC window not found. Please make sure Everything is running
.
Confimed

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 12, 2022 9:11 am
by void
Thank you for the bug report.

ES-1.1.0.23.zip
  • fixed an issue with ES-1.1.0.22 using the wrong instance name.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Mar 14, 2022 10:49 am
by horst.epp
I would like to have an option for the -txt switch in es
similar to the GUI option /txt_folder_append_path_separator=1

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Mar 15, 2022 6:14 am
by void
I have put on my TODO list to add a -folder-append-path-separator command line option.

Thank you for the suggestion.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Aug 01, 2022 4:47 am
by void
ES-1.1.0.24.zip
  • fixed a crash when reading es.ini.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Aug 02, 2022 5:12 am
by Kennor
Hi! Is there a option to get the hash value? such as MD5, SHA-256? thank.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Aug 02, 2022 6:21 am
by void
Not yet, sorry.

This is on my TODO list for Everything 1.5.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Aug 02, 2022 6:50 am
by Kennor
OK, thanks for the tool!

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Aug 10, 2022 7:00 pm
by shawnkhall
1.1.0.24 doesn't have the correct version assigned in the file properties. It does in the about information, but the version at the file properties is still 1.1.0.23.

Code: Select all

###>es /?
ES 1.1.0.24
ES is a command line interface to search Everything from a command prompt.
ES uses the Everything search syntax.
...

Code: Select all

###>filever es.exe
--a-- W32i   APP ENU        1.1.0.23 shp    125,576 08-01-2022 es.exe

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Aug 10, 2022 7:20 pm
by therube
(Confirmed.)

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Thu Aug 11, 2022 1:58 am
by void
Thanks for the bug report.

ES-1.1.0.24.zip
  • fixed the version number in the exe details.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Thu Aug 11, 2022 2:15 am
by shawnkhall
thank you!

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Sep 26, 2022 6:19 am
by void
ES-1.1.0.25.zip
  • added -exit option to exit the main Everything UI process.
  • added -reindex option rebuild the index.
  • added -utf8-bom option to write a UTF-8 byte order mark at the start of the export file.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Sep 26, 2022 7:30 am
by void
ES-1.1.0.26.zip
  • fixed an issue with exporting Unicode characters outside plane 0.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Nov 07, 2022 6:50 pm
by therube
es.exe -n 1 -gettotalsize

Is it expected that -gettotalsize gives the total size results of the -n 1 items only, or globally on all returned results (exclusive of -n 1)?
es.exe distinct:

Would it be expected to be able to negate a Function?
Was looking to create a batch file with distinct:, but wanting to also allow myself to !distinct: by manually including !distinct: on the command line.

So my batch, SSS.bat, file reads
es.exe distinct: %*
so I would like to type something like:
C:\> SSS.bat !distinct: Halloween
(or -no-distinct:).

And while we're at that, just what is
!distinct:
doing?
(And I'm now wonder if my unexpected results are not just - me?!)
(I think I'll need to look a bit closer at what I'm actually seeing...)

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Tue Nov 08, 2022 2:31 am
by void
es.exe -n 1 -gettotalsize

Is it expected that -gettotalsize gives the total size results of the -n 1 items only, or globally on all returned results (exclusive of -n 1)?
Everything will still perform the full search and return all the results to the IPC server.
The IPC server will only send 1 result to the IPC client (ES)

Currently, -gettotalsize will ignore -n <n>



Include count:<n> in your search to limit your search to n results.
This parameter is passed to the Everything Search engine, where as -n is not.

es.exe count:1 -gettotalsize


es.exe distinct:

Would it be expected to be able to negate a Function?
Was looking to create a batch file with distinct:, but wanting to also allow myself to !distinct: by manually including !distinct: on the command line.
Everything appears to be returning the expected results for me.
What results are you seeing? expecting?

distinct: will remove any additional duplicate items. (first duplicate remains in the results)
!distinct: will show only duplicate items (without showing the first duplicate)

!distinct: is not very useful.

Maybe you want dupe: instead of distinct: ?
dupe: will show only duplicate items (including the first duplicate)

Also consider unique:
unique: shows files/folders where there are no duplicates at all.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 30, 2022 7:57 pm
by therube
Is there a benefit to be able to save ES results to an Environment Variable?

ES -EVE Thick as a brick

-EVE: store results in the Environment Variable, EVE

C:\> ECHO %EVE%
Jethro Tull - Thick as a brick.m4a


---

Where I think I'm wanting to go is to be able to pipe ES results to a program.
So something like
ES "thick as a brick" | ffplay.exe -


But...

Windows is brain-dead with pipes.
And places where pipes do work, like ffplay.exe, would be looking for a file stream rather then a file name.

So, if you set an environment variable you could "batch" that to a program.
ES -EVE "thick as a brick"
ffplay.exe %EVE%
(or even START %EVE, in this case)

Likewise, you could fire up some "distant" program from the command line.
ES -EVE freefilesync.exe
START %EVE% ...

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 30, 2022 9:16 pm
by void
The option to save to an environment variable would be useful.
In some cases it's difficult to call es and pipe the data to an environment variable.

How would you like Everything to store multiple results?
Most other environment variables are semicolon delimited (;)

or, do I force count:1 / -n 1

Environment variable have a size limit of 32KB.



BAT file to store the ES output to the EVE1 environment variable:

Code: Select all

SETLOCAL ENABLEDELAYEDEXPANSION
SET count=1
FOR /F "tokens=* USEBACKQ" %%F IN (`ES.exe %*`) DO (
  SET EVE!count!=%%F
  SET /a count=!count!+1
)
ECHO %EVE1%
ECHO %EVE2%
ECHO %EVE3%
ENDLOCAL
The problem here is the environment variables are lost after the BAT call returns.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 30, 2022 9:28 pm
by horst.epp
I don't see any benefit to store es results in environment variables.
Its easy to pipe the results into an output file
and add the necessary chcp.
Then there is no limit in the amount of results and they are available after the bat is finished.

Code: Select all

chcp 65001
set file=C:\Tools\wincmd\scripts\results\Everything.txt
C:\Tools\Everything\es.exe %* >"%file%"

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Nov 30, 2022 9:31 pm
by therube
Yes, that was also one of my thoughts.
And yes, I'd have to either be somewhat specific in my search, or limit the results returned (to even 1), or to throw in a "picker" (to pick the desired results, from a GUI [not Everything] window).

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Thu Dec 01, 2022 10:31 am
by NotNull
therube wrote: Wed Nov 30, 2022 7:57 pm Is there a benefit to be able to save ES results to an Environment Variable?
ES is started as a child-process of CMD.exe (or similar) and can not change the envoironment of it's parent (CMD), so changed/new/removed environment will be lost when ES.exe exits.

void wrote: Wed Nov 30, 2022 9:16 pm The problem here is the environment variables are lost after the BAT call returns.
Typically these are not lost. The Setlocal/Endlocal put them in a "sandbox" and that is gone after the batchfile exits.
Without Setlocal, the environment variable will still be 'alive'
The way to handle this *with* Setlocal:

Code: Select all

Setlocal
  set __test1=something
  set __test2=whatever
Endlocal & set __test2=%__test2%
__test2 is available afterwards in CMD (untested)

That works because CMD is a line interpreter, meaning an eentire line gets parsed before executing.
Things get ugly when "exporting" many environment vriables, btw.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Apr 12, 2023 12:24 pm
by kur
Hello void,

"-inc-run-count" for files its OK,
"-inc-run-count" for folder doesn't work for me,

es version 1.1.0.26
everything version 1.5.0.1340a (x64)

Thank you for everything.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Apr 12, 2023 3:32 pm
by NotNull
Pleas show the commands you were using.
Don't put a \ at the end of the foldernmae.

This works here:

Code: Select all


T:\>es -version
1.1.0.19

T:\>es -geteverythingversion
1.5.0.1342

T:\>es -get-run-count "c:\Program Files (x86)"
3
T:\>es -inc-run-count "c:\Program Files (x86)"

T:\>es -get-run-count "c:\Program Files (x86)"
4
T:\>


Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Apr 12, 2023 3:52 pm
by kur
Work, Thanks!

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Wed Jan 10, 2024 5:26 am
by void
ES-1.1.0.27.x86.zip
ES-1.1.0.27.x64.zip
  • improved redirected output performance.
  • added x64 build
  • added -cp 65001 to specify redirect code page.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Sun Feb 11, 2024 7:36 pm
by shawnkhall
When do you anticipate this version will be promoted to stable and distributed from the Downloads page?

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Mon Feb 12, 2024 2:20 am
by void
Updated /downloads/, thank you.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Fri Mar 15, 2024 10:39 pm
by void
ES-1.1.0.28.x86.zip
ES-1.1.0.28.x64.zip
  • Treat a single - as literal instead of as an invalid switch.

Re: ES 1.1 Command Line Tool for Everything 1.4.1

Posted: Sat Mar 30, 2024 4:42 am
by void
ES-1.1.0.29.x86.zip
ES-1.1.0.29.x64.zip
  • -double-quote will now work with TSV/CSV.
  • TSV will avoid quoting by default.
  • CSV will continue to quote by default.
  • TSV/CSV will ignore -double-quote and use quotes if required (string value contains a separator, newline or double quote)