Topic: How to prevent duplicate file names (add serialize numbering unique)

Q:

After my renaming:

FROM:
BorHtml.vbs
HutHtml.vbs
NewHtml.vbs
OldHtml.vbs


TO:
Html.vbs
Html.vbs
Html.vbs
Html.vbs

by Expression %f(4)

how can I prevent duplicate file names?



A:

To prevent duplicate file names, you can add an counter,
and to insert that number before the extension,
use %b(4).%e instead of %f(4):


So

%b(4)_%n.%e

gives you:

Html_001.vbs
Html_002.vbs
Html_003.vbs
Html_004.vbs




EXPLANATION:

Your expression:
The whole file name:      %f
Start at '4th' sign, dropping the first three: %f(4)

My expression:
The base file name:               %b
Start at '4th' sign, dropping the first three: %b(4)
The selection number:           %n
An dot and the origin ext:     .%e


More:

   %n   : the selection number

   %np  : the selection number relative to the file path

   %nc  : the selection number relative to a name "collision" (same beginnings)

   %ncs : same principle as "%nc" except that it is empty for
          the first element of the "collision group" and prefixed by a "_" for the others.

   %ncf : Same as "%nc" except that the path is not taken into
          account. Only the file name parts are compared

   %ncfs: Same as "%ncs" but on the file name parts

   %ns  : the number of selected files



Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html