Rename to 'file' of 'total files'

I once did a very specific rename prototype of script to pick up on the numbering a set of files already has (and if not start at 1) and use the first selected file to fetch the filename for all other selected files. It is a bit difficult to explain and I also wasn't very creative finding a name for the script command. That thing and some background info, usage descriptions can be found here.

Now I had a quick look at it again and by tweaking two lines it seems this modded version below, get's quite close. But you cannot really customize the pattern used for the final names without editing the code. I thought, maybe you can live with that or let's have that for further discussion.

Just select a bunch of files and run "RenameBaseNameContinueNumbering" from button or command field.

Here it goes:
Command.File_RenameBaseNameContinueNumbering.js.txt (3.97 KB)

ps: You need to enable the script command first and also try with no number in your filenames, could end up in better result.