| Magic File Renamer 6.1

Index > Reference > Formatting Parameters > General Group > Counter

Description:
Extracts item's position in Rename List. This parameter is mostly used for setting serial numbers to file names.
The order of items in Rename List can be changed by sorting it.
You can also use the Counter Filter to easily add serial numbers to file names.
Signature:
`<counter:initial-value,increment-by,leading-zeroes-mode,leading-zeroes-total-length,reset-on-folder-change>`
or
`<counter>`
The simple (second) signtaure is same as `<counter:1,1,0,2,0>`
Parameters:

Parameter | Description
`initial-value` | Counter start value. Will be used for the first item. Default is 1.
`increment-by` | Counter step value. Can be negative. Default is 1.
`leading-zeroes-mode` | Leading 0's style. 0: None. No leading zeros (default) 1: Automatic. All counter values will have a unified total length (determined by the total number of items in Rename List). 2: Custom. Total length of counter values will is defined by the 4th parameter.
`leading-zeroes-total-length` | Total length for counter values when converted to string. This parameter is relevant only if leading-zeroes-mode is set to "Custom". Default is 2.
`reset-on-folder-change` | When set to 1 (ON), reset counter to the initial value every time that current item's parent folder is different than that of the previous item. Default is 0 (OFF).