Rename with sequential number anywhere in the file name

First and foremost, I apologize if this is redundant, but I've been reading in this forum, and I can't find a solution for my specific scenario, or at least, the one suggestion that comes close is not working for me.

I have a group of files which I need to insert a specific range of sequential numbers in the middle of the file name (in other words, only the specific sequential number should be inserted ant the rest of the existing file name should be left alone), but this is to happen only to the selected group of files and not to all the files in the folder.

I've tried the * and the [#] with "Standard Rename" and it only does it to the first file but ignores the rest of the selected files. This is what I need, and it almost worked. What am I doing wrong? I've read in this forum that this is the way to go, but it stops with the first file.

NOTE: The selected files already contain a sequential number at the end, but that needs to be ignored. I need a new sequential number someplace else in the file name for a different purpose.

Perhaps the solution is so simple that I don't see it.

I don't know scripting, but I think the folder content rename script will not work with only the files that I manually select. For what I understand, it will automatically rename sequentially all the files in the folder, but I only need to work on a handful of them.

Can someone please point me in the right direction? If there is a script for what I specifically need? Hopefully I won't have to modify the script since I don't know much about that.

Your Old Name pattern specifies that the filename has to end in (00), so it's only going to match the first file and skip all the others.

Are those the real filenames you need to rename, or are the real ones different? The exact solution may depend on the names, but this will work for the examples you've given:

Old Name: New Text Document - - Copy *
New Name: New Text Document - [#] - Copy *
(And the rest as you already have it.)

Thanks for replying Leo.

That is the actual file name structure, meaning, they end up in: (00) or (01) or (02), etc. BUT, this last part of the file names must be ignored, not taken into consideration at all. Those numbers already in place at the end of the file name are needed for a different purpose in our database.

I simply need to insert a sequential numbering someplace else in the file name (not at the beginning, not at the end... somewhere in the middle).

I tried your suggestion, but it did not work:

The one way that seems to do the first file as I need it is shown in the screenshot below, but it stops on the first file. I need the sequential new numbers inserted where is being pointed in the following screenshot:

I hope there is a way to do this, some expression syntax, or a script.

You have to delete (00) from both Old Name and New Name fields.

Old Name: New Text Document - - Copy *
New Name: New Text Document - [#] - Copy *

Leo,

I think there must be something wrong with my Dopus 12.33 x64 settings.

I did exactly as you said (see screenshot, I removed the zero) and I don't get your results. No number sequence is inserted.

However, I removed the asterisk from the "old name" field and now I get what I need BUT it duplicates the file name onto itself, and I did remove the zeroes:

It actually works when the zeroes are present, and still duplicates the file name, I mean, when I do not set the asterisk in the "Old name" field:

Further more, I even clicked the "Reset" button next to "Mode" just to make sure, before entering the * and the [#], and same result.

I wonder what's going on with my Dopus settings.

Your screenshots show you still aren't doing what I said (and Hardkorn reiterated).

The first screenshot has no zero. I did as you said. I compared it to your screenshot.

The second screenshot has no zero (just as you said to remove it), and it shows that it works if I don't type the * in the "Old name" field BUT it duplicates the file name onto itself. I know you did not suggest this option, but I discovered that it inserts the numbers where I need them but with another glitch (the duplication of the name)

The third screenshot is the same as the second one but with zero. It is to show that not putting the asterisk in the "old name" field still works, but still repeats the file name glitch.

Aside from the second and third example screenshots (let's ignore them since that is only what I noticed), where am I failing to do as you said based on the first screenshot? I mean, if we only look at screenshot 1, which is doing exactly as you said?

What am I missing here?

Oh, I just noticed the suggestion to remove the zero was from Hardkorn. I apologize for not noticing it.

You still using the numbers between parenthesis in your pattern. That's why it doesn't work. You also can try using this config:


In Find: - -
In Replace: - [#] -
Check Numbering from and put the number you wish and that's it.

errante,

I see the mistake now.

Your solution works in one go.

Also, since now I see MY huge oversite, now what Leo and Hardkom were saying also works. I was removing the zero from the actual file name before activating the Rename feature. Now I see (I somehow did not see it in Hardkom screenshot, but it's there) that you have to remove the (01) or (02) from the "Old name" and "New name" fields.

I apologize for those oversights.

Both methods work flawlessly.

Thank you to all three of you. I think is time to have lunch or some tea, that will help me. I apologize again and thank you for your patience.

3 Likes