Use DateTimeOriginal + 1 sec from previous image

Started by binnisb, September 23, 2017, 07:15:31 AM

Previous topic - Next topic

binnisb

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

StarGeek

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.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

binnisb

@StarGeek: Yes you are correct. I guess I'll write a script then to handle this :) Thanks .

toobs

hi. did you ever write the script? i have the same kind of need

ericconn

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.