Number images

Advanced Renamer forum
#1 : 17/12-16 12:46
David
David
Posts: 2
Hello,
I need some help:
I want to renumber a series of images like this:
Image 1: 2412300000101
Image 2: 2412300000102
Image 3: 2412300000103
Image 4: 2412300000204
Image 5: 2412300000205
Image 6: 2412300000206
Image 7: 2412300000307
Image 8: 2412300000308
Image 9: 2412300000309
Image 10: 2412300000410

If anyone could help me, I've already been here and there's nothing I can do.


17/12-16 12:46
#2 : 17/12-16 17:07
Tester123
Tester123
Posts: 92
Can you please be a little more specific about what the numbers mean?

E.g. using the fourth file as an example: 24123-0000-02-04
(I've added the dashes to help break up the number to help with descriptions)

1) is '24123' a fixed string?
2) is the next four '0's also fixed?
3) I'm also assuming that '02' is the second batch or group of three files. This looks like it's a two digit number (Assuming point 2 above). What happens on the 100-th batch/group, does it expand to 3 digits? Or is the preceding four zeros supposed to be padding characters for the batch/group count?
4) It looks like '04' at the end is the file count position. Does this mean there are only a maximum of 99 files? If not, what happens, does it expand to three digits when it gets to 100?

If you can provide the details, a script is definitely possible. For example, assuming the above is correct then this script works for up to 99 files.

// Start of script
var prefix = '241230000'
var batchSize = 3
var currIndex = app.currentIndex + 1
var batchCount = parseInt((currIndex - 1) / batchSize) + 1

var filename = prefix + (batchCount <= 9 ? '0' : '') + batchCount + (currIndex <= 9 ? '0' : '') + (currIndex)
return filename;
// End of script


17/12-16 17:07 - edited 17/12-16 22:32
#3 : 17/12-16 17:50
David
David
Posts: 2
Reply to #2:
Thank you thank you very much!
That's what I needed.


17/12-16 17:50
#4 : 17/12-16 22:33
Tester123
Tester123
Posts: 92
Reply to #3:
Glad to be of assistance.


17/12-16 22:33