Hi there,
I've been very satisfied with BRU, after http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=689, in which I was able to add a fifth initial digit to the "IMGP1234.jpg" filename of my photos.
A complication of this is that I have to be very careful not to let old photos onto the card, because it will start counting from the old photo's number, if the last four digits are higher than the actual most recent photo I've taken. (It actually doesn't recognize renamed photos, so when I rename them I have to remember not to rename the newest photo and to leave that on the card).
This happened on a recent photo shoot. I ran out of space on my main memory card, and the backup card had some old photos, so my filenames jumped from IMPG21715 to 25406.
Double unfortunately, I only noticed this now (at 25684) and I've already filed a bunch of the photos, so I can't simply select all the new photos on the memory card and renumber them starting at 21716.
Is it possible to use regular expressions to subtract? I.e. to look for photos starting with 25xxx and subtract 3690 from the number? I believe this isn't possible. If it is please let me know, as it will save me a ton of work!
Since it's only a couple hundred photos, I think I can use formulae to scan my hard drive for these photos and renumber them 'manually' (I.e. replace digits individually). Luckily it skipped by 3690, which ends in a zero, so I should be able to renumber them by simply changing the digit. I know that only the badly-numbered photos are the only ones starting with IMGP25xxx, so filtering them isn't a problem.
Instead of making 28 separate searches (i.e. change 2540x to 2171x, change 2541x to 2172x, etc.), I can do the tens first (i.e. change 25x0x to 25x1x, change 25x1x to 25x2x), then the hundreds (i.e. change 254xx to 217xx, etc.). This will reduce it to 13 searches.
Except as far as I can tell I have to do them individually, which will leave me with two sets of any particular tens values.
The solution to this is to first change the 90's, and change them to the final new number (i.e. 2549x becomes 2180x instead of 2540x or 2550x), which will be unique. Then I can go about the other 9 searches for the tens and the other 3 searches for the 100s. So 14 total renames.
So the list of searches to conduct would be (in this order):
Rollover tens:
Change 2559x to 2190x
Change 2549x to 2180x
Other tens:
Change 25x8x to 25x9x
Change 25x7x to 25x8x
Change 25x6x to 25x7x
Change 25x5x to 25x6x
Change 25x4x to 25x5x
Change 25x3x to 25x4x
Change 25x2x to 25x3x
Change 25x1x to 25x2x
Change 25x0x to 25x1x
Hundreds:
Change 254xx to 217xx
Change 255xx to 218xx
Change 256xx to 219xx
This makes sense, right?
To implement this, I use the following code GMA provided in my previous thread, which preserves any text that may have been added before or after the filename.
NINETIES
(.*)(IMGP)(2559)([0-9]{1}(?![0-9]))(.*)
\1\22190\4\5
(.*)(IMGP)(2549)([0-9]{1}(?![0-9]))(.*)
\1\22180\4\5
OTHER TENS
(.*)(IMGP25)([0-9]{1})(8)([0-9]{1}(?![0-9]))(.*)
\1\2\39\5\6
(.*)(IMGP25)([0-9]{1})(7)([0-9]{1}(?![0-9]))(.*)
\1\2\38\5\6
(.*)(IMGP25)([0-9]{1})(6)([0-9]{1}(?![0-9]))(.*)
\1\2\37\5\6
(.*)(IMGP25)([0-9]{1})(5)([0-9]{1}(?![0-9]))(.*)
\1\2\36\5\6
(.*)(IMGP25)([0-9]{1})(4)([0-9]{1}(?![0-9]))(.*)
\1\2\35\5\6
(.*)(IMGP25)([0-9]{1})(3)([0-9]{1}(?![0-9]))(.*)
\1\2\34\5\6
(.*)(IMGP25)([0-9]{1})(2)([0-9]{1}(?![0-9]))(.*)
\1\2\33\5\6
(.*)(IMGP25)([0-9]{1})(1)([0-9]{1}(?![0-9]))(.*)
\1\2\32\5\6
(.*)(IMGP25)([0-9]{1})(0)([0-9]{1}(?![0-9]))(.*)
\1\2\31\5\6
HUNDREDS
(.*)(IMGP)(254)([0-9]{2}(?![0-9]))(.*)
\1\2217\4\5
(.*)(IMGP)(255)([0-9]{2}(?![0-9]))(.*)
\1\2218\4\5
(.*)(IMGP)(256)([0-9]{2}(?![0-9]))(.*)
\1\2219\4\5
It'd be nice if someone can look over my logic and tell me my plan makes sense. I think it does, but I'd hate to find out I've screwed it up irrevocably.
Cheers,
- RG>