System alert (default sound) on search change

Have a suggestion for "Everything"? Please post it here.
taurolyon
Posts: 1
Joined: Fri Dec 05, 2025 5:19 pm

System alert (default sound) on search change

Post by taurolyon »

I would love a function that would create a system alert sound or customizable sound that will alert me when the search changes (new files added/renamed, etc.).
void
Developer
Posts: 19899
Joined: Fri Oct 16, 2009 11:31 pm

Re: System alert (default sound) on search change

Post by void »

This can be done with ES and Everything 1.5.

Create the following BAT file:

alert.bat

Code: Select all

@echo off
setlocal enabledelayedexpansion

rem --- Get initial journal position ---
for /f "tokens=1,2" %%a in ('es.exe -instance 1.5a -get-journal-pos') do (
    set journal_id=%%a
    set change_id=%%b
)

echo Starting with Journal ID: !journal_id! Change ID: !change_id!

:loop
echo Running es.exe -after-journal-pos !journal_id! !change_id!

rem --- Run es.exe with current journal position ---
for /f "tokens=1,2" %%a in ('es.exe -instance 1.5a -watch *new* -after-journal-pos !journal_id! !change_id!') do (
    set journal_id=%%a
    set change_id=%%b
)

echo Next Journal ID: !journal_id! Change ID: !change_id!

powershell -c (New-Object Media.SoundPlayer "C:\My Sound Folder\My Alert.wav").PlaySync();

goto loop
Adjust
*new*
to your filename. Wildcards are supported.
Use -action-filter to limit which actions trigger the sound. (for example:
-action-filter file-create
)
Adjust
C:\My Sound Folder\My Alert.wav
to your sound file.