Hi everybody. I am using ExifTool to rename images according to their DateTimeOriginal
tag. Nevertheless, when there are more pictures shot in the same second, e.g. bursts, the pictures order is messed up.
as of right now the command I use is:
exiftool '-FileName<FileModifyDate' '-FileName<DateTimeCreated' '-FileName<GPSDateTime' '-FileName<CreateDate' '-FileName<DateTimeOriginal' -d %Y.%m.%d-%H.%M.%S%%c.%%le -r ./*
Even if %%c
adds an index to images when there are more than one shot in the same second, it nevertheless happens that files without any index appear first, together with all of the others without any index. For example, if I shot a burst of images at second :54, I will see images shot at :55, :56, :57, before viewing images :541, :542, etc...
How can I make so that the first image of a burst has index 0, but only if there is more than one image shot in the same second, so that it is sorted properly?
Is this for a specific camera? My FujiFilm camera writes a sequence number so that I can always determine image sequence without being concerned about time
You would use the -FileOrder option (https://exiftool.org/exiftool_pod.html#fileOrder-NUM---TAG) and pick a tag that will correctly show the order. If the original filenames are in the correct order, you could use -FileOrder Filename for example. If the camera records subseconds properly, you could use -FileOrder SubSecDateTimeOriginal. Or you could use the image sequence tag as greybeard says, though you would have to figure out exactly which tag. Use the command in FAQ #3 (https://exiftool.org/faq.html#Q3) to find it.
I do not use subseconds in filenames and my routine is:
exiftool -fileOrder FileName '-FileName<DateTimeOriginal' -d '%Y-%m%d-%H%M-%S%%lc.%%e' .
But I recently added some subsecond commands to my exiftool cookbook:
exiftool -d %Y-%m%d-%H%M-%S '-FileName<${DateTimeOriginal}.${SubSecTimeOriginal}.%e' .
exiftool -fileOrder FileName '-FileName<SubSecDateTimeOriginal' -d '%Y-%m%d-%H%M-%S%3f.%%e' .
exiftool -d '%Y-%m%d-%H%M-%S' '-fileName<${DateTimeOriginal}.${SubSecTimeOriginal;$_.=0 x(3-length)}%+c.%e' .
exiftool '-FileName<${DateTimeOriginal}%+2nc.%e' '-FileName<${DateTimeOriginal}.${SubSecTimeOriginal}%+2nc.%e' -dateFormat '%Y-%m%d-%H%M-%S' .
exiftool -d '%Y-%m%d-%H%M-%S' '-fileName<${DateTimeOriginal}-000%+2nc.%e' '-fileName<${DateTimeOriginal}-${SubSecTimeOriginal;$_.=0 x(3-length)}%+2nc.%e' .