I went with the variable method to get the unix path correct, so I don't have to mess around in the original action.
Macro is running great now! (it works much faster than a similar action for automator btw)
Any idea how I can control the order of the files? If possible, I would like them to be in order of date modified. I tried adding a For Each Path in folder but couldn't get it to work.
How are you getting the files "into" your macro? Both AppleScript's and KM's "selected items" honour the Finder's current sort mode, so you could select your files and sort by "Date Modified" before triggering the macro.
Nice idea. The problem is that the macro -- or maybe pdtkf when called with wildcards -- sorts into alphabetical order and then combines the files. At least, I think that is what is going on.
I did have an Automator workflow that did what I needed, but it seems to be broken with changes to the combine PDFs command.
Possibly I could use A Better Finder Renamer to rename the files adding a prefix in order of modification date. That's one I need to investigate to see how it might work with KM.
I tried, but got an error I am not yet capable of figuring out. I have reverted to my original plan of renaming with ABFR and then using the original version 1 of this macro.
Two steps, for now, but still better than what I was doing before, so I will take it.
Thanks for all your help. KM is clearly very powerful, and will need more study.