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

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

User avatar
iorx
Posts: 10
Joined: Sun Apr 24, 2022 8:31 am

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

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
iorx
Posts: 10
Joined: Sun Apr 24, 2022 8:31 am

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

Post by iorx »

Am I shadowbanned or just asking stupid questions? :D
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

It's not possible, but do you think that it will be good to a a filename field when no exif?
Pierre.
User avatar
iorx
Posts: 10
Joined: Sun Apr 24, 2022 8:31 am

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

Post 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.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

See issue for current status and some details.

I add 2 new fields which use EXIF/XMP or file date
Pierre.
User avatar
user0
XnThusiast
Posts: 1959
Joined: Sat May 09, 2015 9:37 am

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

Post by user0 »

only for 2 dates?
how about something more universal:
Metadata - tag - add functionality to conditionally show custom text within tag
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.
Pierre.