Adjusting DateTimeOriginal Incrementally

Started by MrLewGin, March 17, 2024, 07:09:13 AM

Previous topic - Next topic

MrLewGin

Good morning, I have finally begun learning this amazing tool. I have read through various documentation and posts on this forum and I still have a couple of queries. I have several folders with hundreds of images in, I have been adding incremented DateTimeOriginal data using the following commands:

1. Adding the DateTimeOriginal data:
exiftool "-datetimeoriginal=2024:03:17 12:00:00" -overwrite_original

2. Incrementing them by minutes or seconds by using:
exiftool -fileorder filename "-datetimeoriginal+<0:$filesequence" -overwrite_original
or
exiftool -fileorder filename "-datetimeoriginal+<0:0:$filesequence" -overwrite_original

Question 1. If I wanted to increment the minutes AND seconds at the same time, can this be done?

Question 2. I couldn't workout how to adjust the above command to increment days. I looked on these forums and found the following command which seems to work, but I wanted to understand why it looks different and says alldates instead of datetimeoriginal.

exiftool -fileorder filename "-alldates+<$filesequence 0" -overwrite_original

Thank you so much in advance to anyone who is able to shed some light on this as I work through understanding this amazing tool.


Phil Harvey

Quote from: MrLewGin on March 17, 2024, 07:09:13 AMQuestion 1. If I wanted to increment the minutes AND seconds at the same time, can this be done?

exiftool -fileorder filename "-datetimeoriginal+<0:${filesequence}:$filesequence" -overwrite_original

QuoteQuestion 2. I couldn't workout how to adjust the above command to increment days. I looked on these forums and found the following command which seems to work, but I wanted to understand why it looks different and says alldates instead of datetimeoriginal.

exiftool -fileorder filename "-alldates+<$filesequence 0" -overwrite_original

Read here for the full details about the format of the date/time shift string.  Basically, for date/time tags the time is shifted by default, and the date is only shifted if a time shift is also specified (ie. the shift value contains two values separated by a space).  AllDates is a Shortcut tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

MrLewGin

Thank you endlessly for taking the time to respond. I spent 4 years not being brave enough to tackle this tool and ended up jumping through the most ridiculous hoops to achieve what I wanted. While I still have no idea what I'm doing, through searching google, searching this forum and even using ChatGPT, I am pretty much been able to use this tool exclusively for my needs. I can't say thank you enough.

Oh and the command you gave worked perfectly and was exactly what I needed. I will read up on the links you provided. Thanks again.

Phil Harvey

Great.

BTW, ChatGPT really doesn't understand ExifTool, and I think that using it would cause more confusion.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).