Enhancement Request:

Advanced Renamer forum
#1 : 02/04-12 08:55
Posts: 3
How about a function to pad a filename to a specific length, with a specified character, starting from a specific point?

For instance, given a filename of "ABC_12345.xyz", you could say "pad with digit 0 (that's supposed to be a zero, but for some reason the form won't take zeros, they get converted to ohs) to length 8 starting at position 5". This can kind of be done now using the ADD function, but it gets real kludgy when the filenames aren't all the same length. A PAD function like this would work for the above filename as well as for "ABC_123.xyz", "ABC_1234.xyz", "ABC_123456.xyz", etc. This would enable all the files to be padded to the specified length in a single pass rather than requiring a separate pass for each length-group or a mind-bending combination of ADDs, REMOVEs, etc.

BTW, this should work even if there are other characters after the pad point, eg. given the above parameters, "ABC_12345_PQR.xyz" etc. would result in renaming to "ABC_12345000_PQR.xyz".

Hope I have explained this clearly enough to get the idea across. It may be possible to do this with existing functions (using regular expressions, perhaps) but if so, it's beyond my wee brain (obviously not the program's fault! What can I say? The computer ate my brain...)

BTW, thanks for a great program that eliminates a lot of hours of ugly tedious work!

02/04-12 08:55 - edited 05/04-12 00:52
#2 : 09/04-12 21:16
Kim Jensen
Kim Jensen
Posts: 756
Reply to #1:
I think you can use the renumbering method for this operation. I don't think it can be used in all cases but in many cases it will be possible.

09/04-12 21:16