What does it do?
If you use David Carpenter's excellent Everything search utility then you are already familiar with the speed and flexibility of finding things anywhere on your fixed drives. It features a rich set of search terms and results are returned almost instantaneously. It also supports regex searches.
This script acts as a front end to Everything using its command line interface module <es.exe> to pass supplied search criteria. Results are imported to a Directory Opus collection and displayed in a new lister by default.
- If you don't already have Everything and es.exe installed download and install Everything 1.4 (see links below) and unzip es.exe to the same folder. (e.g. C:\Program Files (x86)\Everything\Everything.exe)
- Download the attached $es.js.txt and drag it to Preferences / Toolbars / Scripts then configure preferences under Settings / Preferences /Scripts along the lines shown in the screen grab.
$es.js.v1.7.txt (18.9 KB)
v1.0 February 29th, 2016
v1.1 March 1st, 2016 - Fix switchesonly routine loop to start from 0, not 1.
v1.2 March 2nd, 2016 - Fix resolution of tmp_cmd and tmp_out.
v1.2 March 2nd, 2016 - Replace switchesonly with generic allinset routine.
v1.3 March 8th, 2016 - Use /appdata instead of /homeroot for tmp_cmd and tmp_out.
v1.3 March 8th, 2016 - Add __promptuser and __viewnewest switches and associated code.
v1.4 March 10th, 2016 - Add __update switch.
v1.4 March 10th, 2016 - Allow layout of collection columns via script configuration.
v1.4 March 10th, 2016 - Make temp file location configurable. Default to /temp if not configured.
v1.4 March 10th, 2016 - Extend placement default to disable all panels - e.g. tree, viewer, etc.
v1.4 March 10th, 2016 - Add default post DOpusRT delay and ability to adjust via script configuration.
v1.5 March 11th, 2016 - Fix missing comma before "norm" in def_placement.
v1.6 March 14th, 2016 - Use codepage 1252 to handle non-ASCII characters in file names.
v1.7 February 15th, 2017 - Repair invalid d.func.command.results.newtabs(0).tabs(0) statement
v1.7 February 15th, 2017 - Add Code Page configuration option
I am aware that in many ways this script duplicates @apocalypse's SearchEverything command. (see SearchEverything: Getting Opus to work with Everything v4.0) However a large part of my motivation for writing it was as a learning exercise and in that context it has succeeded for me at least.
Sample button commands:
- $es "/profile\dropbox" file: dm:thismonth
- $es "/mydocuments" file: dm:thisweek <*.jpg|*.png>
- $es file: dm:thisyear monthly ext:xls;doc
- $es file: dm:thisyear monthly ext:xls;doc -p
- $es file: dm:thisyear monthly ext:xls;doc -w
- $es -r v.[0-9].+xls __promptuser
- $es "/appdata" ext:log __viewnewest
(1) Will prompt the user to modify a default set of search arguments. Default search arguments are set in Preferences.
(2) For normal (non-regex) searches, aliases are resolved. This example will list all dropbox files modified this month.
(3) Search keys can be grouped using <> brackets. This will list all JPG and PNG files in My Documents modified this week.
(4) This will list all files modified this year which include the string "monthly" and an extension of XLS or DOC in the name.
(5) This will list all files modified this year which include the string "monthly" and an extension of XLS or DOC anywhere in the filepath.
(6) This will list all files modified this year which include the word "monthly" and an extension of XLS or DOC in the name.
(7) Use the -r keyword to enable regex. This example will list files like C:\Projects\Myproj v2.3.xls. The __promptuser switch will prompt the user to modify the supplied regex.
(8) This will list all LOG files in %APPDATA% and show the most recent log file in the viewer pane.
- When fired from a button, use the shift modifier to force a prompt.
- By default every successful search ovewrites an existing collection. Use the ctrl modifier to force append.
Demo $es command menu
$es Demo Menu.dcf (1.47 KB)
In Customize mode drag this dcf file to a toolbar to add several sample $es buttons.
- See https://www.voidtools.com/downloads/ for Everything and es.exe downloads.
- See https://www.voidtools.com/support/everything/searching/ for all Everything search options.