#1 2012-03-05 02:12

mb_ari
Member
Registered: 2012-03-05
Posts: 1

Fixing conflicting names (EXIF fragments of seconds)

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?

Cheers

Offline

#2 2012-03-05 09:01

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Fixing conflicting names (EXIF fragments of seconds)

Hi and welcome.


That is tricky i think. (i never use this, so i am not 100% sure if there is no other possibility)


This could be done by an script:

ForEach File in File Do
    if found "("
        vSec =  RegEx last two digits before the "("
        vColl = RegEx value between "(" and ")"
        vNewSec = vSec + vColl

But then it would be some work if
    vSec = 57
    vColl = 6
because then you have to adjust the minutes (hours,...) too.



Better would be to add the taken date & time incl. the fragments of the seconds in first place to all files.

If ":EXIF_Date:" didn't provide that information (fragments of the seconds) take an look at an command line tool like "Exiv2"

You can use Exiv2 tool to extract the meta data and incorporate it into ReNamer:
http://www.den4b.com/wiki/ReNamer:Scripts
http://www.den4b.com/wiki/ReNamer:Scripts:Exiv2


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2012-03-05 15:02

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Fixing conflicting names (EXIF fragments of seconds)

I'm not sure that Exiv2 extracts milliseconds...

if it would be possible what i would do is just add another number to all files, maybe as fake milliseconds (just with the serialize rule)
2011 10 01 04 12 29 001.JPG
2011 10 01 04 12 30 001.JPG
2011 10 01 04 12 30 002.JPG
2011 10 01 04 12 30 003.JPG
2011 10 01 04 12 31 001.JPG
2011 10 01 04 12 31 002.JPG
...

Because it gets complicated to make an script that changes the date not only from an image, but maybe from the following images.
that would be on the same second as that was added to the previous one

for example, photos (in seconds) in a row as:
30, 30, 30, 30, 30, 32, 32, 32, 32, 32, 44
should then be changed into:
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 44

But we can try if there's no other way

Last edited by SafetyCar (2012-03-05 15:03)


If this software has helped you, consider getting your pro version. :)

Offline

Board footer

Powered by FluxBB