Fixing conflicting names (EXIF fragments of seconds)
Added by Clint Barton over 3 years ago
Hi,
I'm trying to rename about 10000 photos with the date and time (this is format I need - 2011 10 01 04 12 30.JPG), the trouble being that about 1500 of them have the same time to the second. I need the file names to be in a specific format (for subsequent analysis) so adding (2) to the end isn't an option and manual renaming is impractical. Ideally I'd like to add 1 second to the conflicting files to preserve the file name format. Does anyone know if and how I can do this with ReNamer?
Please help.
I didn't find the right solution from the Internet.
References:-
http://www.den4b.com/forum/viewtopic.php?id=1374
[url=https://jobs.vidzzy.com/hire-3d-product-animation-studio/]3D Product animation studio[/url]
Thanks!
Replies (2)
RE: Fixing conflicting names (EXIF fragments of seconds) - Added by Clint Barton over 3 years ago
Clint Barton wrote:
Hi,
I'm trying to rename about 10000 photos with the date and time (this is format I need - 2011 10 01 04 12 30.JPG), the trouble being that about 1500 of them have the same time to the second. I need the file names to be in a specific format (for subsequent analysis) so adding (2) to the end isn't an option and manual renaming is impractical. Ideally I'd like to add 1 second to the conflicting files to preserve the file name format. Does anyone know if and how I can do this with ReNamer?
Please help.
I didn't find the right solution from the Internet.
References:-
http://www.den4b.com/forum/viewtopic.php?id=1374
[[https://jobs.vidzzy.com/hire-3d-product-animation-studio/ 3D Product animation studio]]
Thanks!
RE: Fixing conflicting names (EXIF fragments of seconds) - Added by Robin Mills over 3 years ago
Clint
The Exif Specification concerning DateTime is inept. It stores neither sub-seconds nor time-zone information. Many manufactures choose to put that additional information into their MakerNotes. For example, with my Nikon D5300:
506 rmills@rmillsmbp:~ $ exiv2 -pa --grep date/i --grep sec/i --grep zone/i http://clanmills.com/Stonehenge.jpg Exif.Image.DateTime Ascii 20 2015:07:16 20:25:28 Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54 Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54 Exif.NikonWt.Timezone SShort 1 UTC +00:00 Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D Exif.Photo.SubSecTime Ascii 3 00 Exif.Photo.SubSecTimeOriginal Ascii 3 00 Exif.Photo.SubSecTimeDigitized Ascii 3 00 Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16 Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 507 rmills@rmillsmbp:~ $As you can see, Nikon have added this additional information. Curiously, SubSec are all 0. So we're close to being in trouble. For sure, we have to "manufacture" data that isn't stored in the metadata.
I've renamed this file Stonehenge.jpg from DSC_1234.JPG. If you haven't renamed your files, it's highly likely that the order of the filenames is the order in which the photos were taken.
I've been working on Exiv2 (almost daily) for 10 years and I don't recall anybody mention the rename feature in the past, so I'm not inclined to change that code.
I suggest that you write a script to perform the action you require. By sorting the files by name, you can extract the date-time, determine the filename, then add a sequence number (1,2,3....) to make the filename unique. All of this is quite easy in bash or powershell.