How to query files with dm within 20min of some extracted date? (here extracted by `get-date-created`)

Discussion related to "Everything" 1.5.
Post Reply
TenTickles
Posts: 15
Joined: Thu Aug 01, 2024 10:03 pm

How to query files with dm within 20min of some extracted date? (here extracted by `get-date-created`)

Post by TenTickles »

First I'll give related useful query that already works. It finds files modified after my currently-copied-file:

Code: Select all

`dm:>=[get-date-created:clipboard:] fi: sort:dm`

Now I tried to create a different query:
I'm trying to create a query that finds files modified within 20minute of the dm of my "currently-copied-file". I tried using [datedif:...] and to subtract dates. I failed.

I would really appreciate some help, this query seems great.
Thank you!
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: How to query files with dm within 20min of some extracted date? (here extracted by `get-date-created`)

Post by NotNull »

Everything supports various time formats.
Using arithmetic works best if all use the same format.

Internally, Everything uses FILETIME, the amount of "ticks" since 1601. A tick is 100 nanoseconds.
With 20 minutes = 20 * 60 * 10 million ticks, your seraach query becomes:

Code: Select all

dm:[get-date-created:clipboard:]..[eval:[get-date-created:clipboard:]+20*60*10000000]
TenTickles
Posts: 15
Joined: Thu Aug 01, 2024 10:03 pm

Re: How to query files with dm within 20min of some extracted date? (here extracted by `get-date-created`)

Post by TenTickles »

Great, thank you! : )

What I want then is this:

Code: Select all

dc:[eval:[get-date-created:clipboard:]-20*60*10000000]..[eval:[get-date-created:clipboard:]+20*100000000]  
dm:[eval:[get-date-modified:clipboard:]-20*60*10000000]..[eval:[get-date-modified:clipboard:]+20*100000000] 
I actually mixed up dm and dc accidentally, so I'll just offer both.
Post Reply