Generate number starting from 01

Hello there. I recently started using keyboard maestro, mostly for use in video editing.
I’m doing some renaming of clips, by using keyboard maestro. It works flawlessly, but i need to add a number, for each time the macro is repeated. So basicly add text with a counter starting from 01.

Example:

I have the following clips:

movieclip37
movieclip41
movieclip55
movieclip56

and want to rename them to

movieclip1
movieclip2
movieclip3
movieclip4

Set a variable “Index” to 1 initially (in the Keyboard Maestro Variables preferences).

Then in your macro, use the Set_Variable_to_Calculation action like this:

  • Set Variable “Index” to calculation “Index+1”

And in the text you are using in your macro, use %Variable%Index%.

Thanks for your response. Cant seem to make it work, could you elaborate further?
Whenever i (try) folloew your steps, my macro will simply paste “%Variable%Index%”

Hey Anton,

In calculation fields you don’t use the text-token variable notation – you can just use the bare variable name.

-Chris

Here is a complete, example macro I just published that should show you how to do the complete workflow. Please let us know if this solves your question.

##Macro Library Rename Finder Selected Files With Sequential Number