Numbering of files - change number series if name is different

Advanced Renamer forum
#1 : 03/07-19 12:30
Johan
Johan
Posts: 1
Hi,

I have a bunch of files that have succeded to rename with list feature.

This is list I have:
700-31002
700-31002
700-31006
700-30006
700-31004
700-31004
700-31004
700-31004

I would like to get the files like this:

700-31002_01
700-31002_02
700-31006_01
700-30006_02
700-31004_01
700-31004_02
700-31004_03
700-31004_04

and so on....

Any suggestion on how I can do this?


03/07-19 12:30
#2 : 04/07-19 12:11
David Lee
David Lee
Posts: 1125
Firstly, I'm assuming that you intended your fourth example to be 700-31006.

If you select the default settings: Name collision rule = Append number and Separator = "_"
then Renamer will automatically append a 3-digit incrementing number to any duplicated renamed filenames. So, following your List method, Renamer will return:

700-31002_001
700-31002_002
700-31006_001
700-30006_002
700-31004_001
700-31004_002
700-31004_003
700-31004_004

The collision rule is applied after ALL methods in the batch have been applied, so to make further changes you will have to reload the renamed files into the list and run a new batch.

To reduce the padding of the suffixes to two digits use the Renumber method:
Number position = 3
Change to = Relative to existing number
Number difference = 0
Zero padding = Manual
Number length = 2

This will return the required results from your example filenames.

However the collision rule will only apply a numerical suffix to filenames that are duplicated -
eg 700-31001 would remain unchanged (in your example).

If you wish to add "_01" to all non-duplicated files then add a Replace method:
Text to be replaced = (\d*-\d*)$
Replace with = \1_01
Use regular expressions = selected


04/07-19 12:11