Scanned negatives. Syncronize the 3 Date Time formats and add incremental time.

Started by Piet martyn, March 20, 2021, 12:53:23 PM

Previous topic - Next topic

Piet martyn

Hi,
I have scanned 6000 negatives in TIFF format from 1978-2003,saved them in folder's for each year and entered in all the photos the date using photo mechanic, the time are not in order due to the scanning.
I want to syncronize the three Date Time formats for each photo so they are all the same to make it easier for sorting and to find any photo by capture date.

I would like to copy the date (DateTimeOriginal) to the capture time (DateCreated) and also reset the HH:MM:SS to 00:00:00 then increment all the files in the same folder by five seconds.

I am totally new to this and have tried to find a method to do this on the forum, using copy/paste for the commands, unfortunatly I am not used to this kind of programming. I am using the exiftoolGUI interface.

Does anybody who has scanned photos done anything similar that can provide me with the command sequence.
Any help will be gratly appreciated.
Best regards, Piet Martyn

StarGeek

I can't help with regards to the ExiftoolGUI, since it doesn't work on my system and it hasn't been supported in nearly 9 years.

I'm assuming you want to reset the time on DateTimeOriginal as well as CreateDate.

On the command line, it's a two step procedure, only slightly different from this Photo StackExchange answer.

First, you would run
exiftool "-AllDates<${DateTimeOriginal;s/ .*$//} 00:00:00}" /path/to/files/

This will copy the date and set the time to 00:00:00 for CreateDate, DateTimeOriginal, and ModifyDate.

You would then run this command, which will increment the time stamps by 5 seconds per file.
exiftool "-AllDates+<0:0:${filesequence;$_*=5}" /path/to/files/

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories.  If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation.
* 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).

Piet martyn

Hi StarGeek,
That's amazing, I tried it in ExifToolGUI and it worked perfectly. Sorting works correctly in all the programs I use.
Thanks for all your help and fast reply.
Best regards
Piet Martyn

MEH_PDX

This worked great for me. But I would like to better understand the commands.

Can you direct me to correct section of Exiftool documentation that explains the syntax of these commands.


exiftool "-AllDates<${DateTimeOriginal;s/ .*$//} 00:00:00}" /path/to/files/

This will copy the date and set the time to 00:00:00 for CreateDate, DateTimeOriginal, and ModifyDate.

You would then run this command, which will increment the time stamps by 5 seconds per file.
exiftool "-AllDates+<0:0:${filesequence;$_*=5}" /path/to/files/

Thanks,
Mike

Phil Harvey

Quote from: MEH_PDX on August 09, 2022, 09:14:29 PMexiftool "-AllDates<${DateTimeOriginal;s/ .*$//} 00:00:00}" /path/to/files/

I think this has an extra unnecessary "}".  It should probably be

exiftool "-AllDates<${DateTimeOriginal;s/ .*$//} 00:00:00" /path/to/files/
The paragraph beginning with "A powerful redirection feature" in the -tagsFromFile documentation and the Advanced formatting feature section explain this syntax.

- 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 ($).

StarGeek

Also, the ;s/ .*$// part of this command falls under the "arbitrary Perl expression" part of the "Advanced formatting feature".  In this case, it's a Perl Regular Expression (RegEx) substitution.  RegEx is a complicated subject beyond the scope of this forum.  It is best learned through the many tutorials that can be found on the web.
* 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).