Use Modified date in file name

Post Reply
Doug Pardee
Posts: 50
Joined: 15 Mar 06 18:19
Location: North Carolina, USA

Use Modified date in file name

Post by Doug Pardee »

I need to put the "file modified" date into the file name during an import. It seems I can either use the EXIF dates, which are garbage on the photos I'm having trouble with, or the system date/time when I'm doing the import. I've tried "%ImageFileStamp{dateformat=yymmdd}" but alas, that apparently looks at the "modified" time of the copy, which isn't reset to match the original during the copy. Therefore, that variable comes out as being essentially the same as the system date: the time the import was done.

Anyone have any suggestions?

Oh... I'm still on Photo Supreme V1. If this has been addressed in V2, do let me know. I'm not a pioneer type, so I generally don't jump on major updates like V2 until they've had some time to get sorted.
Hert
Posts: 7870
Joined: 13 Sep 03 6:24

Re: Use Modified date in file name

Post by Hert »

This should be doable with a small inline script. I'm not behind the computer right now so I'll have to get back on this one tomorrow
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Hert
Posts: 7870
Joined: 13 Sep 03 6:24

Re: Use Modified date in file name

Post by Hert »

Doug,

In your rename rule, change

Code: Select all

%ImageFileStamp{dateformat=yymmdd}
with

Code: Select all

%code result := FormattedDateTime('yymmdd', FileStamp(ImageItem.FileName));%/code
Hope that helps
Hert
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Doug Pardee
Posts: 50
Joined: 15 Mar 06 18:19
Location: North Carolina, USA

Re: Use Modified date in file name

Post by Doug Pardee »

Thanks, Hert. I'll give that a try, but it'll be a day or so before I get the chance. I'll let you know how it goes.

FYI: this is because of a stupid bug in the libcamera.so file in my inexpensive Android phone. It puts EXIF dates of December 8, 2002 into every photo. Consequently, I have to rely on the "file modified" date for the actual time the photo was taken. I suspect I might have another problem getting the EXIF dates straightened out, but first I want to get the photos imported into my catalog with the desired folder/filename.

I'm having no trouble with my DSLR photos. Just the ones from my not-so-smart-phone.

Added: I've learned that this bad EXIF date isn't just because I've got an inexpensive phone. It's apparently a widespread problem with LG phone models that have a 5-megapixel rear camera, including the Nexus 4. I know this new information doesn't help any, but I wanted to correct what I'd written above.
Doug Pardee
Posts: 50
Joined: 15 Mar 06 18:19
Location: North Carolina, USA

Re: Use Modified date in file name

Post by Doug Pardee »

Okay, that did what I asked. Thanks, Hert.

Alas, I'm still in a pickle. The imported file now has the folder and filename I wanted, but it no longer has any date/time information that I can use to set the correct EXIF times. The imported copy has a modified date of the time that it was imported.

I'm really regretting having gotten an LG 5-megapixel phone. But how was I to know it put bad EXIF data into photos? Thank heavens that in a few months I'm eligible for an upgrade.
Post Reply