es.exe to find file modified in last 1 hour

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
DaveT
Posts: 4
Joined: Wed Oct 15, 2025 2:33 pm

es.exe to find file modified in last 1 hour

Post by DaveT »

Hi,

Newbie here but a long time happy user of Everything 1.4 and now E1.5 - thanks for this brilliant software.

I'm trying to use
es.exe
(which I've only started with today) to perform a silent search for files on my system that were modified in the last 1 hour. The specific "1 hour" is not important, I might decide this should be 30minutes, or 2 hours etc. But let's keep it at 1 hour for now - but the time frame is less than 1 day.

I am driving
es.exe
from AutoHotkey and include the code below. Note that I've broken the
es.exe
commands and options into 1-per-line in the AutoHotkey script so I can better comment them so I can understand each of them better (the "." at the start of each line are concatenation marks).

Code: Select all

Runwait("C:\Program Files\Everything\es.exe" 
		. " !`"D:\__Program files (writeable)`" "	; Exclude this folder.
		. " /a-d "					; Searches files only.
		. " !*.avc "					; Excludes all avc files.
		. " dm:1hour "					; Looks for files modified in the last hour.
		. " -export-txt "				; exports results to text file on line below.
		. " D:\Miscellaneous\FileVersionTesting\results.txt ")
But this is not working as expected - if fact it produces a list of files, but with modify dates that are very old.

However, if
dm:today
is used instead in the above script, then the script and
es.exe
results work perfectly - ie., all the files that have been modified today are listed in the output text file.

Also, if I use
dm:1hour
in the search box on the
Everything 1.5
UI, then this works as expected - ie.,
E1.5
lists in the search results all the files I modified in the last 1 hour.

So, I'm a little confused (easily done!) and would very much appreciate any guidance or help anyone could provide.

(ps: following on from a 2022 thread on here, I've also tried
dm:last1hour
and
dm:past1hour
but both return no results at all!)
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: es.exe to find file modified in last 1 hour

Post by void »

Thank you for your feedback DaveT,

The fact that the search works in the GUI and not from ES is odd.

Check the debug console in Everything and see what ES is actually searching:
  • In Everything, from the Tools menu, under the Debug submenu, click Console.
    ---This will show a debug console.
  • Perform your ES search.
  • The ES search is shown in the debug console in Green text.
    ---Please make sure this includes the dm: search from ES.
Do you have a dm macro in a filter or bookmark?
-macros will override functions.



Add
-dm -date-format 1
to your es search and try
-export-tsv
instead of -export-txt so the date modified is exported.
Check the dates are within the expected range.
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: es.exe to find file modified in last 1 hour

Post by therube »

it produces a list of files, but with modify dates that are very old
How old is "very old"?

(Note that something like dm:1hour will also include future dated files.)

Are you using an ES.ini? Might some setting in ES.ini be playing in?
DaveT
Posts: 4
Joined: Wed Oct 15, 2025 2:33 pm

Re: es.exe to find file modified in last 1 hour

Post by DaveT »

Many thanks for the quick reply :-). I will try to be as logi cal as I can in answering your points / suggestions. Based on what you said I modified my script so that is now looks thus:

Code: Select all

Runwait("C:\Program Files\Everything\es.exe" 
		. " !`"D:\__Program files (writeable)`" "	; Exclude this folder.
		. " /a-d "					; Searches files only.
		. " !*.avc !*.odt "				; Excludes these file types.
		. " dm:today "					; Looks for a Date Modified of today.
		. " -dm -date-format 0 "			; Add Date Modified (and set format to the system) to output.
		. " -export-tsv "				; exports results to file on line below.
		. " D:\Miscellaneous\FileVersionTesting\results.tsv ")
This correctly produced all the files on my system that were modified today (excluding the above named Dir and file types) - a total of 7 files . 1 per row, with the date-modified in the first column - as shown in the screenshot below:

image.png
image.png (20.08 KiB) Viewed 3063 times

(as an aside, as far as I can see
.tsv
files are not described anywhere in the Everything / ES help stuff. I tried using the described
.efu
files, and lots of info came out, but whilst the date-modified column had a string of numbers there, none of these numbers bore any resemblenace, as far as I could see, to any combo of YY(YY), MM(MM), dd(DD) and/or time formats).

As requested I then opened up the console in Everything1.5 and re-ran the above script. A screenshot of the resulting console output is shown below:

image.png
image.png (36.57 KiB) Viewed 3063 times

I couldn't see any green text. And there is no "dm" string in the text shown in the image above.

In Everything1.5 the filter is (the default?) of "Everything", I didn't know about Bookmarks so I don't have any of those, and I can't find Macros so I also assume I don't have any of those.

In my script when I change
dm:today
to
dm:1hour
, i get 98 photo files, a subset of which is shown below:

more result.jpg
more result.jpg (14.23 KiB) Viewed 3063 times

The found files have wildly different dates to the 'last 1hour' asked for, and why only 98 when there are literally thousands of 'similar' files in those directories?

So I re-tried
dm:last1hour
and
dm:past1hour
in my script, but these both produced absolutely no found files at all.

I must be doing something wrong here, but I can't for the life of me see what. Most, extremely grateful for any advices :-)
DaveT
Posts: 4
Joined: Wed Oct 15, 2025 2:33 pm

Re: es.exe to find file modified in last 1 hour

Post by DaveT »

Hi therube, thanks for chiming in with thoughts.
therube wrote: Thu Oct 16, 2025 3:29 pm
it produces a list of files, but with modify dates that are very old
How old is "very old"?
I was in the middle of a reply to void when you messaged and you can see in my 2nd post in this thread that I show some of the very old files - like 25 years old!
(Note that something like dm:1hour will also include future dated files.)
:shock: Err how can this be?
Are you using an ES.ini? Might some setting in ES.ini be playing in?
Not intentionally using an
es.ini
file. I checked in both
C:\Program Files\Everything 1.5a
and
C:\Program Files\Everything
for an es.ini file and there's not one there.

But I did spot that my
es.exe
file lives in the
C:\Program Files\Everything
directory. Maybe it should live in the
C:\Program Files\Everything 1.5a
directory?
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: es.exe to find file modified in last 1 hour

Post by void »

Please try including
-instance 1.5a
in your es call

You ES query is going to Everything 1.4 which doesn't handle dm:1hour

Multiple Instances
The Everything 1.5 alpha runs in a
1.5a
instance.



TSV is Tab Separated Values text file, usually .txt, not .tsv

EFU stores date modified as a FILETIME.
100-nanosecond intervals since January 1, 1601 (UTC).



Just a side note, there's no issue here, but please be aware of > and < in your ES call.
These characters should be escaped or the ES input/output might end up being redirected.
eg:
dm:>2023-10-17
=>
dm:`>2023-10-17



(Note that something like dm:1hour will also include future dated files.)
:shock: Err how can this be?
dm:1hour will search from 1 hour ago until the end of time.

You can fix file dates that are in the future from Edit -> Advanced -> Set File Time.
DaveT
Posts: 4
Joined: Wed Oct 15, 2025 2:33 pm

Re: es.exe to find file modified in last 1 hour

Post by DaveT »

Please try including
-instance 1.5a
in your es call
You ES query is going to Everything 1.4 which doesn't handle dm:1hour
Man - that's perfect and has completely nailed it (ie, it's now working as hoped for) - I knew I was doing something very daft - hope I didn't waste too much of your time!!

(flushed with success, I tried
dm:6hour
and
dm:10minute
and both produced the expected results - though 1hour is the right interval for my current needs).

TSV is Tab Separated Values text file, usually .txt, not .tsv
Ah, I've never come across tsv as an acronym. Thanks for the edu.

EFU stores date modified as a FILETIME.
100-nanosecond intervals since January 1, 1601 (UTC).
Well, that'll do it!

Just a side note, there's no issue here, but please be aware of > and < in your ES call.
These characters should be escaped or the ES input/output might end up being redirected.
eg:
dm:>2023-10-17
=>
dm:`>2023-10-17
Noted and again thanks for the learnings.

(Note that something like dm:1hour will also include future dated files.)
:shock: Err how can this be?
dm:1hour will search from 1 hour ago until the end of time.
You can fix file dates that are in the future from Edit -> Advanced -> Set File Time.
OMG!! So I don't have files dated in the future, and I couldn't see what lever to pull with
Set File Time
. But it doesn't matter, the script now seems to be working fantastically.

Thank you very much for all your help with this one - very much appreciate :D
Post Reply