[REQ] How to avoid name clashes in MRT?
Posted: 2007-05-24, 16:06 UTC
Hi,
When I am downloading the images from my camera, I use the MRT with the Exif plugin to rename them to <year>-<month>-<day>_<hour><minutes><seconds>.jpg.
Unfortunately, if I am making serial pictures (e.g. 10 shots taken one after another with the delay of a fraction of a second), this would result in some files getting the same names, as these pictures were taken within the same second.
TC then correctly detects the name clashes, and warns the user, asking whether to proceed or not. Of course, I don't want to lose my pictures, so I answer No, redo the file selection for MRT, avoiding the duplicates, and then try again, until there are no name clashes.
After doing this basic rename operation, I load the remaining files in sets consisting of pictures taken within the same second, and use MRT to rename them using the pattern <year>-<month>-<day>_<hour><minutes><seconds>_<counter>.jpg. Usually I have then about 3-4 files in each of such sets. You can imagine, how tedious it becomes, if I have really many serial pictures to process ...
I am looking for a way to let TC handle such duplicates automatically. Apart from existing options telling TC to go ahead, or to cancel the operation, TC could offer some kind of additional automatic renaming scheme. I think, that the most popular option would be to add an additional counter part to the already formed target file name with a separator. The counter in question should be an independent counter from the one already used in MRT. It should restart automatically from its starting value for each set of conflicting names. It could be coded as the lowercase [c] with all the arguments already supported by [C].
Example (file name and the exif time and date)
1.jpg - 24/05/2007 16:51:00
2.jpg - 24/05/2007 16:52:00
3.jpg - 24/05/2007 16:53:00
4.jpg - 24/05/2007 16:53:00
5.jpg - 24/05/2007 16:53:00
6.jpg - 24/05/2007 16:54:00
7.jpg - 24/05/2007 16:54:00
8.jpg - 24/05/2007 16:54:00
9.jpg - 24/05/2007 16:54:00
10.jpg - 24/05/1007 16:55:00
Then I use MRT with the renaming pattern [=exif.DateOriginal.Y-M-D]_[=exif.TimeOriginal.hms] for the name part. TC would detect the name clashes on some of the files (files 3, 4, 5 and 6, 7, 8, 9), offering an additional rename by appending a suffix to the file name. I would then choose the suffix to be e.g. _[c1+1:2] (note lowercase 'c'), and TC would produce the following names:
1.jpg - 2007-05-24_165100.jpg
2.jpg - 2007-05-24_165200.jpg
3.jpg - 2007-05-24_165300_01.jpg
4.jpg - 2007-05-24_165300_02.jpg
5.jpg - 2007-05-24_165300_03.jpg
6.jpg - 2007-05-24_165400_01.jpg
7.jpg - 2007-05-24_165400_02.jpg
8.jpg - 2007-05-24_165400_03.jpg
9.jpg - 2007-05-24_165400_04.jpg
10.jpg - 2007-05-24_165500.jpg
What do you think about it?
When I am downloading the images from my camera, I use the MRT with the Exif plugin to rename them to <year>-<month>-<day>_<hour><minutes><seconds>.jpg.
Unfortunately, if I am making serial pictures (e.g. 10 shots taken one after another with the delay of a fraction of a second), this would result in some files getting the same names, as these pictures were taken within the same second.
TC then correctly detects the name clashes, and warns the user, asking whether to proceed or not. Of course, I don't want to lose my pictures, so I answer No, redo the file selection for MRT, avoiding the duplicates, and then try again, until there are no name clashes.
After doing this basic rename operation, I load the remaining files in sets consisting of pictures taken within the same second, and use MRT to rename them using the pattern <year>-<month>-<day>_<hour><minutes><seconds>_<counter>.jpg. Usually I have then about 3-4 files in each of such sets. You can imagine, how tedious it becomes, if I have really many serial pictures to process ...
I am looking for a way to let TC handle such duplicates automatically. Apart from existing options telling TC to go ahead, or to cancel the operation, TC could offer some kind of additional automatic renaming scheme. I think, that the most popular option would be to add an additional counter part to the already formed target file name with a separator. The counter in question should be an independent counter from the one already used in MRT. It should restart automatically from its starting value for each set of conflicting names. It could be coded as the lowercase [c] with all the arguments already supported by [C].
Example (file name and the exif time and date)
1.jpg - 24/05/2007 16:51:00
2.jpg - 24/05/2007 16:52:00
3.jpg - 24/05/2007 16:53:00
4.jpg - 24/05/2007 16:53:00
5.jpg - 24/05/2007 16:53:00
6.jpg - 24/05/2007 16:54:00
7.jpg - 24/05/2007 16:54:00
8.jpg - 24/05/2007 16:54:00
9.jpg - 24/05/2007 16:54:00
10.jpg - 24/05/1007 16:55:00
Then I use MRT with the renaming pattern [=exif.DateOriginal.Y-M-D]_[=exif.TimeOriginal.hms] for the name part. TC would detect the name clashes on some of the files (files 3, 4, 5 and 6, 7, 8, 9), offering an additional rename by appending a suffix to the file name. I would then choose the suffix to be e.g. _[c1+1:2] (note lowercase 'c'), and TC would produce the following names:
1.jpg - 2007-05-24_165100.jpg
2.jpg - 2007-05-24_165200.jpg
3.jpg - 2007-05-24_165300_01.jpg
4.jpg - 2007-05-24_165300_02.jpg
5.jpg - 2007-05-24_165300_03.jpg
6.jpg - 2007-05-24_165400_01.jpg
7.jpg - 2007-05-24_165400_02.jpg
8.jpg - 2007-05-24_165400_03.jpg
9.jpg - 2007-05-24_165400_04.jpg
10.jpg - 2007-05-24_165500.jpg
What do you think about it?