Hello,
I'm using exiftool for renaming my photos according to the create date.
For exemple: exiftool -d %Y_%m_%d_%Hh_%Mm_%Ss%%+c.%%e DIR
The problem occurs when the burst mode is used: I may have 3 photos with the same create date. The option "+c" manage this by appending an incremental number.
BUT it seems that exiftool doens't take account the Initial order of the photo. Let's say I have initially photo_01.DNG photo_02.DNG photo_03.DNG, I may have for output dateX(photo2)_01.DNG dateX(photo3)_02.DNG dateX(photo1).DNG
So when viewing image afterwards, the "photo movement" is not respected.
Am i missing something ?
Best regards and have a nice day ;)
Alain
Hi Alain,
Try adding -fileorder filename to the command to sort them in order of file name.
On most systems, directory listings are already in order of file name, but this is not necessarily true in Windows. However you can use the -fileOrder option to force whatever processing order you want.
- Phil
Hi Phil,
Thanks for your advice, I'll try it.
Just for my understanding, what do you mean when you said "directory listings are already in order of file name". Exiftool use system default ordering?
As i am using linux system (archlinux), does this mean that exiftool compute files in the same order as 'ls' for example?
Thanks.
Alain
Hi Alain,
Yes. ExifTool processes a directory in the system ordering, which I thought was alphabetical on Linux. It should be the same order as "ls". So in this case, -fileorder filename should have no effect, and you need to find some other way to determine the file processing order. (You can use any other tag(s) with the -fileorder option.)
- Phil
Hi Phil,
Thank you, it's interresting.... and i'm astonished that alphabetical order is not the linux default one.....
I will check when i will be at home and keep you informed.
Thanks
Alain
Hi Phil,
Thanks for an incredible program. Exiftool is an amazing tool.
I had the exact same issue as Alain and I'm using Exiftool 9.99 on Ubuntu.
I have 3 files named:
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
Running ls on the folder shows:
-rwxrw-rw- 1 someone somegroup 1577852 Aug 3 22:08 1.jpg*
-rwxrw-rw- 1 someone somegroup 1619956 Aug 3 22:08 2.jpg*
-rwxrw-rw- 1 someone somegroup 1645652 Aug 3 22:08 3.jpg*
-rwxrw-rw- 1 someone somegroup 1671969 Aug 3 22:08 4.jpg*
-rwxrw-rw- 1 someone somegroup 1688827 Aug 3 22:08 5.jpg*
-rwxrw-rw- 1 someone somegroup 1702037 Aug 3 22:08 6.jpg*
-rwxrw-rw- 1 someone somegroup 1717269 Aug 3 22:08 7.jpg*
-rwxrw-rw- 1 someone somegroup 1737283 Aug 3 22:08 8.jpg*
Running exiftool -time:dateTimeOriginal . gives this result:
exiftool -time:dateTimeOriginal .
======== ./7.jpg
Date/Time Original : 2015:07:11 17:26:15
======== ./8.jpg
Date/Time Original : 2015:07:11 17:26:15
======== ./6.jpg
Date/Time Original : 2015:07:11 17:26:15
======== ./1.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./2.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./5.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./4.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./3.jpg
Date/Time Original : 2015:07:11 17:26:14
1 directories scanned
8 image files read
While running exiftool -time:dateTimeOriginal -fileorder filename . gives the correct expected result:
exiftool -time:dateTimeOriginal -fileorder filename .
======== ./1.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./2.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./3.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./4.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./5.jpg
Date/Time Original : 2015:07:11 17:26:14
======== ./6.jpg
Date/Time Original : 2015:07:11 17:26:15
======== ./7.jpg
Date/Time Original : 2015:07:11 17:26:15
======== ./8.jpg
Date/Time Original : 2015:07:11 17:26:15
1 directories scanned
8 image files read
Not sure if this is a bug in exiftool or expected behaviour, but it has resulted in my photo collection being messed up as all burst sequences are ordered incorrectly.
do you know of any smart way of getting them ordered correctly now that they have been renamed like this"-d %Y%m%d_%H%M%S%%-c.%%e
Assuming that these are camera images, you might want to check the metadata for something that will help out. For example, Nikon images may have a FileNumber, ShutterCount, or SubSecTime tag. Looking at a Canon image from a friend I see SubSecTime and FileIndex.
You'll probably have to rename them completely once to get them in the proper order, then again to get the final filenames including the -fileorder filename option.
For example,
ExifTool -d '%Y%m%d_%H%M%S' '-filename<${dateTimeOriginal}_$SubSecTime.%e' DIR
Followed by
ExifTool -d '%Y%m%d_%H%M%S%%-c.%%e' -fileorder filename '-filename<Datetimeoriginal' DIR
Quote from: StarGeek on August 03, 2015, 07:41:10 PM
Assuming that these are camera images, you might want to check the metadata for something that will help out. For example, Nikon images may have a FileNumber, ShutterCount, or SubSecTime tag. Looking at a Canon image from a friend I see SubSecTime and FileIndex.
You'll probably have to rename them completely once to get them in the proper order, then again to get the final filenames including the -fileorder filename option.
For example,
ExifTool -d '%Y%m%d_%H%M%S' '-filename<${dateTimeOriginal}_$SubSecTime.%e' DIR
Followed by
ExifTool -d '%Y%m%d_%H%M%S%%-c.%%e' -fileorder filename '-filename<Datetimeoriginal' DIR
Thanks StarGeek,
I found that my Sony camera has a "Sony:ImageCount" tag that I could use to rename the files to get the correct sequence order and then rename them back to my preferred date format afterwards.
I'm now struggling with my Iphone photos, do you know of any tags I could use on photos from an Iphone? I cannot seem to find and filenumber, sequence, count or any other unique tag to help me.
Do the iPhone pictures have gps data in them? Check GPSTimeStamp maybe? One iphone picture example I found had subseconds in the GPSTimeStamp.
Otherwise, you might have to reorder manually.
Quote from: StarGeek on August 04, 2015, 04:25:24 PM
Do the iPhone pictures have gps data in them? Check GPSTimeStamp maybe? One iphone picture example I found had subseconds in the GPSTimeStamp.
Otherwise, you might have to reorder manually.
Hi StarGeek,
Thanks for the help. I was able to use the subseconds from the GPS data, all set, thanks.