Page 1 of 1

Import and sort do an "if" on EXIF-data not available?

Posted: Sun Jun 04, 2023 6:48 am
by iorx
Hi,

Just found this function Import and Sort. Awesome!
I've used a self fabricated script with EXIFTOOL before to sort images, but this looks like XnViewMP can perform the task.

In the script I've made it "escaped" when not finding EXIT-date and uses the file create date instead and continue with renaming the file to my liking which is:

Code: Select all

(({EXIF:Date Taken [Ymd_HMS]}_)){Filename}((Model: _{EXIF:Model}))
The above field hides Date Taken and Model if they aren't present.
Regarding date here. Can't figure out if it's possible to do some condition here to make it fall back to file date when EXIF-information is not found.
Possible?

Or/and should I use Date Taken / Creation Date from another field?
"Date format variable" looks like it goes for file date.

Attached screenshots.

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Sun Jun 11, 2023 9:12 am
by iorx
Am I shadowbanned or just asking stupid questions? :D

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Mon Jun 12, 2023 1:08 pm
by xnview
It's not possible, but do you think that it will be good to a a filename field when no exif?

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Sun Jun 18, 2023 12:00 pm
by iorx
Hi,

Yeah, as an option to escape and pick the create or last modified date would be usefull if the exif info isn't there. I've got an cmd where I run exiftool now, it first picks and moves all images which it find exif date and then in a second run through the same source it grabs what's left and sort them in based on the create date. Works rather OK.
The reason to this solution is that some video-files and obscure image formats don't have exif or exif data is not found.

This is just an idea. And I understand the complexity and I got no clue how to get some logical syntax for it... maybe:

(({EXIF:Date Taken [Ymd_HMS]} | (({Creation Date [Ymd_HMS]}))_)){Filename}((Model: _{EXIF:Model}))

If exif not found check next argument for a date.

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Wed Sep 25, 2024 7:51 am
by xnview
See issue for current status and some details.

I add 2 new fields which use EXIF/XMP or file date

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Wed Sep 25, 2024 8:59 am
by user0
only for 2 dates?
how about something more universal:
Metadata - tag - add functionality to conditionally show custom text within tag

Re: Import and sort do an "if" on EXIF-data not available?

Posted: Thu Oct 10, 2024 2:42 pm
by xnview
This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.