ExifTool Forum

General => Metadata => Topic started by: binnisb on September 23, 2017, 07:15:31 AM

Title: Use DateTimeOriginal + 1 sec from previous image
Post by: binnisb on September 23, 2017, 07:15:31 AM
Hey.

I tried to search for this but I am not finding anything that could work, so I decided to ask.

It happens on regular basis that I receive images from external person. Most of the images have correct DateTimeOriginal set, but some of them have the date correct but the time as 00:00:00. The images are named by sequence so I receive them in correct order.

Is there some way ExifTool, or some other tool, can update the DateTimeOriginal with the previous image DateTimeOrignal if the time is 00:00:00 and add a second to it to keep the order correct?

I know that ExifTool can update the DateTimeOriginal, so I can always set it for the first image.

Best
Brynjar
Title: Re: Use DateTimeOriginal + 1 sec from previous image
Post by: StarGeek on September 23, 2017, 11:37:35 AM
Just to clarify things, IMG_0001.Jpg might have a DateTimeOriginal of 2017:09:23 07:50:12 and then IMG_0002.Jpg would have a DateTimeOriginal of 2017:09:23 00:00:00?  And the object would be to change IMG_0002.Jpg to 2017:09:23 07:50:13?

If so, not directly, as exiftool only reads one file at a time and doesn't keep track of the data from previous files. 

It might be possible to create a user-defined tag to deal with this.  But when I tried this once it failed badly.  Unfortunately, I can't find the post.
Title: Re: Use DateTimeOriginal + 1 sec from previous image
Post by: binnisb on September 23, 2017, 11:56:40 AM
@StarGeek: Yes you are correct. I guess I'll write a script then to handle this :) Thanks .
Title: Re: Use DateTimeOriginal + 1 sec from previous image
Post by: toobs on February 04, 2022, 10:49:01 AM
hi. did you ever write the script? i have the same kind of need
Title: Re: Use DateTimeOriginal + 1 sec from previous image
Post by: ericconn on February 24, 2022, 01:25:25 PM
I have had to do something similar, and I ended up using Excel to concatenate the new time/date and spit out the command for a DOS BAT file.

I can post an example if you'd like. This thread is a few weeks old, not sure if you've solved your problem yet.