Page 1 of 3

Rookie to scripting

Posted: 30 Aug 2022 20:21
by texdawg3110
I need help in writing a simple script to search for "Datetaken" for a specific date.

Re: Rookie to scripting

Posted: 30 Aug 2022 20:33
by highend
Why do you need a script for that?

You can do this via the gui: prop:#image.datetaken:"20.07.2007"
Ofc you need to use your local time representation...

Re: Rookie to scripting

Posted: 30 Aug 2022 20:55
by admin
ISO 8601 format should work everywhere: prop:#image.datetaken:"2007-07-20"

Or rather like this: prop:#image.datetaken:2007-07-20 * to ignore the time part.

So you can just press F3 and enter your search term, e.g.:

Re: Rookie to scripting

Posted: 30 Aug 2022 21:30
by highend
It doesn't work here.

Neither prop:#image.datetaken:"2007-07-20"
nor prop:#image.datetaken:2007-07-20 *

while prop:#image.datetaken:"20.07.2007"
works fine

Windows Server 2022, english language, german date, time and number formats

Re: Rookie to scripting

Posted: 31 Aug 2022 05:15
by texdawg3110
This is the script I'm trying to run but to no avail:
Screenshot 2022-08-30 230749.jpg
It doesn't find anything in this small sample file:

Screenshot 2022-08-30 230840.jpg

Re: Rookie to scripting

Posted: 31 Aug 2022 05:33
by jupe
You're in Find Files mode, press the magnifying glass in the lower left of the dialog and rerun the search.

Re: Rookie to scripting

Posted: 31 Aug 2022 08:50
by admin
There was a weird anomaly: on AM/PM date systems, dates with a PM time stamp were auto-converted to ISO format and matched an ISO search pattern, whereas dates with an AM time stamp kept their original format (e.g. 08/31/2022) and did not match.

Working on it... the goal is to always match the regional format and the ISO format.

Re: Rookie to scripting

Posted: 31 Aug 2022 15:12
by texdawg3110
I agree, the date format is the fly in the ointment. If I enter an * only the script runs and dumps out all the records in my folder regardless of the value of datetaken.

Re: Rookie to scripting

Posted: 31 Aug 2022 15:43
by texdawg3110
prop:#image.datetaken: 5/26/2013 *

This script works but I only get records where the time is AM

Re: Rookie to scripting

Posted: 31 Aug 2022 15:56
by highend
With beta v23.50.0303?

Re: Rookie to scripting

Posted: 31 Aug 2022 16:22
by texdawg3110
I'm running 23.50.0300

Re: Rookie to scripting

Posted: 31 Aug 2022 16:26
by admin
I should have mentioned in this thread that I fixed a bug here. It should work better now: viewtopic.php?p=202585#p202585

Re: Rookie to scripting

Posted: 31 Aug 2022 16:58
by texdawg3110
prop:#image.datetaken: 5/26/2013

I installed v23.50.0303 and it works. It does need a space between the : and the month.

What would be the syntax for consecutive or multiple dates?

Thank for your help.

Re: Rookie to scripting

Posted: 31 Aug 2022 18:13
by admin
Strange that you need a space between the : and the month. :?

In the next beta version you can define a range like this:
prop:#image.datetaken: >= 4/9/2007 AND prop:#image.datetaken: < 4/9/2012

Re: Rookie to scripting

Posted: 31 Aug 2022 19:25
by texdawg3110
prop:#image.datetaken: >= 4/9/2007 AND prop:#image.datetaken: < 4/9/2012

Love it, nice feature.