Rookie to scripting

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Rookie to scripting

Post by texdawg3110 »

I need help in writing a simple script to search for "Datetaken" for a specific date.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Rookie to scripting

Post 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...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Rookie to scripting

Post 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.:
To see the attached files, you need to log into the forum.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Rookie to scripting

Post 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
One of my scripts helped you out? Please donate via Paypal

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post 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
To see the attached files, you need to log into the forum.

jupe
Posts: 3577
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Rookie to scripting

Post by jupe »

You're in Find Files mode, press the magnifying glass in the lower left of the dialog and rerun the search.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Rookie to scripting

Post 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.

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post 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.

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post by texdawg3110 »

prop:#image.datetaken: 5/26/2013 *

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

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Rookie to scripting

Post by highend »

With beta v23.50.0303?
One of my scripts helped you out? Please donate via Paypal

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post by texdawg3110 »

I'm running 23.50.0300

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Rookie to scripting

Post 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

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post 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.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Rookie to scripting

Post 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

texdawg3110
Posts: 21
Joined: 22 Jul 2019 05:01

Re: Rookie to scripting

Post by texdawg3110 »

prop:#image.datetaken: >= 4/9/2007 AND prop:#image.datetaken: < 4/9/2012

Love it, nice feature.

Post Reply