Formatting numbers under 10 with a leading zero

I am creating a macro to rename a number of files which in the file name have a number, and as each file is renamed the number will increase.

The only part of the macro I cannot work out how to do is to have numbers below 10 appear with a leading zero.

I will

  • set a variable to text to 1:
  • set up Repeat to include a counter to increase the number for each file and type the new file name including the number.

Is there a calculation, function, token etc which I can include within the Repeat action which allows for numbers below 10 to be formatted with a leading zero?

1 Like

Probably you mean this:

_[demo] Padding Numbers.kmmacros (3.1 KB)

The Formatting option is in the gear menu.

See also Wiki.