Help with button... Copy Here with Increment

I'm trying to make a button that will duplicate and increment if the file already exists.

My.txt => My-01.txt

My.txt => My-02.txt (if My-01.txt already exists in the target folder)

My.txt => My-03.txt (if My-01.txt and My-02.txt already exist in the target folder)

etc.

(Second attempt at adding a reply to this)

Here's the button code I use to do something pretty similar.

Copy DUPLICATE AS * WHENEXISTS=rename HERE

It doesn't append -01 to the file, rather it appends (1) to the file. Off the top of my head I don't remember a way to do exactly what you want unless you wrote a script to do it.

Thanks!