Add counter to files based on creation date from Finder

So, I'm trying to use this as the basis for a macro that lets me take a group of files selected in Finder and rename them with a counter in order of file creation date.

I can get the counter working, but I'm wondering if you had advice for for

  1. Getting the %Local__FilePath% to appear on the renamed file. For some reason it won't and I can't figure out why.

  2. Using Finder selection as an input. Finder selection on the For Each doesn't include sorting by creation or modification date, so I'm a little stumped.


Moderators note – macro based on input from this thread:
Rename Every File Inside a Folder with a Name Having 10 Digits - #2 by JMichaelTX