PDA

View Full Version : Add %r7 token in BB Pro?



Carl Bickers
October 8th, 2006, 02:50 PM
I'm using the %r7 token in DL Pro to generate file names that have image numbers greater than 10,000. I would like to do this in BB Pro in the batch rename function to renumber some older files. Could this be added, or is there another way? My file naming is %T_%f_%r7 in DL Pro resulting in filenames like 10D_IMG_11213.jpg or 10D_CRW_11307.crw.

DavidB
October 8th, 2006, 05:29 PM
I'm using the %r7 token in DL Pro to generate file names that have image numbers greater than 10,000. I would like to do this in BB Pro in the batch rename function to renumber some older files. Could this be added, or is there another way? My file naming is %T_%f_%r7 in DL Pro resulting in filenames like 10D_IMG_11213.jpg or 10D_CRW_11307.crw.

This is tricky. Even if Chris were to add the functionality in BB Pro, it would not work for cameras like the 5D, which do not record the folder number in the EXIF maker note.

A generic solution which would be useful in this and other contexts would be the extension of the facility for substring extraction, at present only applicable to file names, to the whole token set. Of course, if your existing file names already include the folder number, that provides your answer. If, for example, your existing file names are Zoombrowser style (%q-%r_%f, giving something like 127-4589_IMG.jpg), you could rename to your preferred scheme using %T_%f_%[1]%r. To make sense of that, look at the description of the %[...] token in the BB Pro help page on Batch Renaming.

If the folder number is not in your current filename, I think that you will have to enter the first digit of the sequence in your new filename explicitly, particularly as the relationship between folder and image numbers (in Canon cameras at least) is potentially quite complex. The basic schema would then be %T_%f_0%r, %T_%f_1%r and so on. Even for the maximum of 99,999 images, this requires only 10 variations, which is (I suggest) not a huge issue.

The big problem comes of course, when you have files needing different first digits in the same folder. In that case, I suggest that you order the files by date/time (Shift+Ctrl+4), if they are not already so arranged; this should help you to sort out which first digit belongs with which image. Do beware: depending on the way in which your folders and images were actually numbered over time (for example, did you ever switch off continuous numbering?), and the number of images in each folder, there is at least a theoretical possibility of duplicate file names if you want to stick rigidly to the numbering system of the DL Pro %r7 token.

Later...

It also occurs to me that, if your camera does record the folder number (as I believe the 10D does, if that is the camera in question), then you could also use a more automated two stage process than my second option above.

Stage 1 would use the tokens %T_%f_%q%r, giving filenames of the form 10D_IMG_1451213.jpg. Stage 2 would then use %[1-9]%[-4] to remove the unwanted digits. You could save these as custom styles. There is still the issue of possible name conflicts, but that is in the nature of your preferred scheme. I think, subject to correction, that the risk is very low if you have used continuous file numbering (the default) throughout.

Hope this helps.

Carl Bickers
October 8th, 2006, 08:42 PM
Thanks for your help. I went back and figured out a two step process that would work fine, except for the fact that folder numbers start with a digit that's too large by one. So I wind up with names having numbers like 21015 for the 11015th image file. There seems to be no way to do math with the BB Pro tokens to subtract one (like %r7 does), so I may have to do it explicitly for each folder. Not too bad though.

DavidB
October 8th, 2006, 08:54 PM
It seems your update crossed with mine, and that we hit on something like the same two stage process. I'd forgotten about the arithmetical problem, I fear. Is the the explicit specification of the first digit out of the question? I know that it seems like a bit of a cop-out, but if it gets the result ....

Carl Bickers
October 8th, 2006, 10:09 PM
No, it's not that bad to expicitly specify the first digit. It looks like that's the only way to do in BBPro at present. I'll just have to go back through a few folders to pick up the images greater than 10,000 - new images will automatically be OK using the DL Pro tokens. Thanks!