How To Renumber Existing Files?

I often run into this problem and cannot find a solution other than manually renaming files in dopus. I have a set of numbered files:

file01.test file02.test file02a.test file03.test file04.test file05.test

I want to insert file 02a between 02 and 03 and re-number the files with file 02a becoming 03, file 03 becoming 04 and so on.

When I attempt to do this using the Dopus rename command I get the following error:

[quote]An error occured renaming 'file02a.test':
Cannot create a file when that file already exists. (183)

Dopus doesn't know to start with renaming file05 to file06 and work backwards. If the order of operations is to rename from the top down, then file name conflicts will occur. The result is that I have to do the above process manually for over 40 files at a time. Please save me from the busy work!


I'd work around the problem by renaming to something else (_file##) and then renaming back to the original (file##).

Rename to a temporary, different name, and then rename back again.

Okay, Here's an "unconventional way" around this issue.

Do the renumbering in two passes.

In the first pass do not renumber each file sequentially. Instead renumber each file by the total number of files in the folder (not just the files you have selected). Thus if the folder contains a 1000 files, renumber all selected files by 1000.

On the second pass renumber the files sequentially.

The first pass just inflates the numbering such that you will never have a duplicate file name when the second pass executes.

Here's a screen grab of the above technique.

In the first screen grab I have padded the numbering by 10--the total number for files in the folder. (I also added a "-" between the File Name and the number suffix.)

In the second pass I renumber sequentially, which gets you the desired result.

Here's an example that more closely resembles the files you listed above.
The regular expression is different from the screengrabs in my above post, but the concept is the same. This example handles the File-8a.txt. In my earlier example, none of the files had a letter as part of the number suffix.

Thanks for all of reccomendations! I know that temporarily renaming to a different filename is a workaround. However, it would be a nice feature if dopus could rename starting with the last file (check box option). This is what I do manually, and I don't have to use any temporary file names. Any ways to do the rename that way?

Even renaming from the last file can result in conflicts. I think a proper solution would have to be a bit more complex, but it's not impossible for this to be fixed.

I definately agree. It is nice to see Directory Opus developing into an application that welcomes feature requets such as this.