es: URL Protocol

Discussion related to "Everything" 1.5.
Post Reply
void
Developer
Posts: 19793
Joined: Fri Oct 16, 2009 11:31 pm

es: URL Protocol

Post by void »

The es: URL Protocol allows you to open Everything and set the search from a web-browser.

For example, clicking on es:abc will open Everything and set the search to: abc



Installation
Syntax
Search
Query Strings
Select Filename
Escape Character
Advanced Setup
Examples
Excel Link



Installation

The es: URL Protocol is disabled by default.

To enable the es: URL protocol:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check es: URL protocol.
  • Click OK.


To disable the es: URL protocol:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Uncheck es: URL protocol.
  • Click OK.


Syntax

es:search
es:search?query-settings
es:search?query-settings#filename-select

search sets the search box text.
query-settings enables/disables search options. (optional)
filename-select selects a file/folder by filename. (optional)

Escape special URL characters with: %



Search

The es:// or es: prefix is removed when applying your search.

The standard Everything search syntax is supported.

The search can be blank.

Escape special URL characters with: %



Query Strings

Use ? to start the query string.
Use & to separate key=value pairs.

For example:

es:mysearch?key=value&key2=value2&key3=value3&...

The following query strings are supported:
sort=<property-name> (use a dash (-) instead of a space)
ascending=x (where x can be 1=ascending or 0=descending)
case=x (where x can be 1=enable or 0=disable)
diacritics=x (where x can be 1=enable or 0=disable)
path=x (where x can be 1=enable or 0=disable)
regex=x (where x can be 1=enable or 0=disable)
wholeword=x (where x can be 1=enable or 0=disable)
whole_word=x (where x can be 1=enable or 0=disable)
suffix=x (where x can be 1=enable or 0=disable)
prefix=x (where x can be 1=enable or 0=disable)
ignorepunctuation=x (where x can be 1=enable or 0=disable)
ignore_punctuation=x (where x can be 1=enable or 0=disable)
ignorewhitespace=x (where x can be 1=enable or 0=disable)
ignore_whitespace=x (where x can be 1=enable or 0=disable)
omitresults=x (where x can be 1=enable or 0=disable)
omit_results=x (where x can be 1=enable or 0=disable)
tempomitresults=x (where x can be 1=enable or 0=disable)
temp_omit_results=x (where x can be 1=enable or 0=disable)
filter=<filter-name>
view=details
view=thumbnails
view=<thumbnail-size>
thumbnailsize=<thumbnail-size>
thumbnail_size=<thumbnail-size>
newwindow=x (where x can be 1=enable or 0=disable)
new_window=x (where x can be 1=enable or 0=disable)
newtab=x (where x can be 1=enable or 0=disable)
new_tab=x (where x can be 1=enable or 0=disable)



Select Filename

Use # to select a file/folder by filename.

For example, search for notepad and select C:\Windows\Notepad.exe:
es:notepad#c:\windows\notepad.exe

Escape special URL characters with: %



Escape Character

Use % to escape special URL characters such as: : ? & #

# %23
: %3A
% %25
? %3F
& %26
(space) %20



Advanced Setup:

The es: URL protocol is installed in the registry under:

HKEY_CURRENT_USER\Software\Classes\ES

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\ES]
@="URL:Everything Search Protocol"
"URL Protocol"=""

[HKEY_CURRENT_USER\Software\Classes\ES\shell]

[HKEY_CURRENT_USER\Software\Classes\ES\shell\open]

[HKEY_CURRENT_USER\Software\Classes\ES\shell\open\command]
@="\"C:\\Program Files\\Everything\\Everything.exe\" -url \"%1\"
The open command can be customized.
-url



Examples:

Search for ABC:
es:ABC

Search for ABC AND 123:
es:ABC%20123

Search for foo#bar:
es:foo%23bar

Enable regex and search for ^123456789:
es:^123456789?regex=1

Enable regex, set the sort to date modified descending and search for ^123456789:
es:^123456789?regex=1&sort=date-modified-descending

Clear the search and select C:\Windows\Notepad.exe
es:#c%3A%5Cwindows%5Cnotepad.exe

Search for *.jpg and show thumbnails:
es:*.jpg?view=128



Excel Link:

Use =HYPERLINK() to create a clickable link in Excel.

For example:

=HYPERLINK("es:"&A1, "Open in Everything")
4rF3tk
Posts: 17
Joined: Wed Jul 12, 2023 5:39 am

Re: es: URL Protocol

Post by 4rF3tk »

Is there a way to set up a dedicated tab for es: search, so that searches via es: are always sent to that tab? Currently, searches can only be opened in active tab or a new tab.
void
Developer
Posts: 19793
Joined: Fri Oct 16, 2009 11:31 pm

Re: es: URL Protocol

Post by void »

No.

es: URLs will either open in a new tab or the current tab, depending on your Tools -> Options -> UI -> Open search in tabs setting.
jackbox
Posts: 8
Joined: Thu Dec 30, 2021 4:41 am

Re: es: URL Protocol

Post by jackbox »

Sorry, I know this is probably a Chrome issue rather than an Everything issue.
Whenever I use Chrome to open an es: URL, a confirmation window pops up asking “Please confirm whether you want to open this.”
How do you all solve this problem?
void
Developer
Posts: 19793
Joined: Fri Oct 16, 2009 11:31 pm

Re: es: URL Protocol

Post by void »

There's no way to disable the prompt when you open an es: URL directly in the Chrome address bar.

A work around:
Put the es:url in a html file inside an
a
tag.
Open the html file.
Click the link in the html file.
Check Always allow this file to open es links.
You'll still need to click the link each time, but there's no prompt.
jackbox
Posts: 8
Joined: Thu Dec 30, 2021 4:41 am

Re: es: URL Protocol

Post by jackbox »

Sorry, I don’t quite understand what you meant…
I may not have described the situation correctly, so let me explain it again.

I’m using a browser extension called "Context Menu Search".
The extension allows me to highlight a keyword on a webpage and then search it using the right-click menu.

After I added the es: protocol as one of the search engines,
it does correctly call Everything to perform the search, and it works very well.

The only problem is that a confirmation window pops up every time, which is very inconvenient.
Is there any way to skip or bypass this confirmation?
2026-04-10_230831.jpg
2026-04-10_230831.jpg (19.04 KiB) Viewed 2738 times
horst.epp
Posts: 1640
Joined: Fri Apr 04, 2014 3:24 pm

Re: es: URL Protocol

Post by horst.epp »

2jackbox
This dialog is not coming from Everything, it's your browser extension.
Using Firefox such a dialog is only ask onces and the remembered.
Everything itself dos not ask anything.
therube
Posts: 5693
Joined: Thu Sep 03, 2009 6:48 pm

Re: es: URL Protocol

Post by therube »

I believe he's say something like, the extension, bookmarklet, or whatever you're using, would write the search to a .html file.
You would open that file, click the link therein, & that would bypass the prompt.

In the below case, the "search" is for
everything
(es://everything).

So when you highlight something on a web page, your extension (bookmarklet...) would update Everything_Search.html to reflect what you've highlighted.

Everything_Search.html:

Code: Select all

<HTML>
<a href="es://everything">Everything Search!</a>
</HTML>
So if you highlight 'one cat two cat', Everything_Search.html would be changed to:

Code: Select all

<HTML>
<a href="es://one cat two cat">Everything Search!</a>
</HTML>
You would then open Everything_Search.html "web page", which contains the link, "Everything Search!" (or it could be changed to read the same as the search itself), & clicking that link would bypass the Chrome prompt.

(Mighty round-about way to do something, but maybe it could be automated?)
therube
Posts: 5693
Joined: Thu Sep 03, 2009 6:48 pm

Re: es: URL Protocol

Post by therube »

In Firefox (at least through 115 ESR), you can add a Preference, type Boolean, & set it to True:

network.protocol-handler.external.es


and that will bypass Firefox's prompt.


(There is another [Firefox] Preference setting,
security.external_protocol_requires_permission
, that can be set to False, that also works, but that is a broader, totally open, setting.)


Maybe ? something like the above can be done with Chrome?
void
Developer
Posts: 19793
Joined: Fri Oct 16, 2009 11:31 pm

Re: es: URL Protocol

Post by void »

I’m using a browser extension called "Context Menu Search".
I cannot find a way to stop chrome always asking "A website wants to open this application."...



Please consider the following:

Run a local web server to launch Everything queries:
Paste this in a powershell:

Code: Select all

$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add("http://127.0.0.1:8765/")
$listener.Start()

Write-Host "Everything bridge running on http://127.0.0.1:8765"

while ($listener.IsListening) {
    $context = $listener.GetContext()
    $request = $context.Request
    $response = $context.Response

    $query = $request.QueryString["q"]

    if ($query) {
        # Proper URL decode without System.Web
        $decoded = [System.Uri]::UnescapeDataString($query)

        $everythingPath = "C:\Program Files\Everything\Everything.exe"

        Start-Process $everythingPath -ArgumentList "-search `"$decoded`""
    }

    $response.StatusCode = 200
    $buffer = [System.Text.Encoding]::UTF8.GetBytes("OK")
    $response.OutputStream.Write($buffer, 0, $buffer.Length)
    $response.OutputStream.Close()
}
(script generated by chat-gpt)
Adjust "C:\Program Files\Everything\Everything.exe" to your Everything location.

Change your Context Menu Search Everything URL to:
http://127.0.0.1:8765/search?q=%s


If this works for you, save the above script to a ps1 file and run it on startup.



Alternatively, run an Everything HTTP Server and change your Context Menu Search URL to:
http://127.0.0.1/?search=%s
horst.epp
Posts: 1640
Joined: Fri Apr 04, 2014 3:24 pm

Re: es: URL Protocol

Post by horst.epp »

If you don't want to use Firefox try MS Edge.
It's the better Chrome and remembers the answer on request.
brandySnake
Posts: 37
Joined: Fri Sep 24, 2021 3:00 pm

Re: es: URL Protocol

Post by brandySnake »

Create a string value named AutoLaunchProtocolsFromOrigins under the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome`.
This will cause a checkbox to appear in the prompt. If you check it, you can skip the prompt pop-up in the future.
Post Reply