terrypin Posted November 5, 2014 Report Share Posted November 5, 2014 I'm probably making heavy weather of this... I'm working with filenames like FrankSinatra06.jpg, always with two numbers before the extension. I want to change that to FrankSinatra07.jpg, Similarly I'd change EltonJohn09.bmp to EltonJohn10.bmp and so on, increasing the number by one. So my macro must extract those two as text, convert them to integers, add 1, and convert that back to text, finally re-assembling the new filename as FrankSinatra07.jpg Except that 07 text converts to 7 as an integer. I've been trying in vain to find a command that will pad out the integer 7 to 07. Is there one I've missed? Or must I resort to replacing a space in the resulting text by '0' to achieve this? And only at that position, as there could also be spaces in the main name. Seems messy for such a relatively trivial bit of fomatting. --Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.