Chris @ccstone, my apologies. I had the Bash find command on my brain since I had just finished working with a macro that used it. So my reply was about the find command. My reply to you was inappropriate.
Thanks for pointing this out. I have devised a simple solution, and have updated my above Macro.
Since the user is presented with a list of files, I don't think that would have been an issue, but it is still best to exclude them.
You don't post the elapsed time for your script, so I don't know how long it takes.
But my script returns 872 files in 0.33 sec -- seems fast enough to me.
In most cases I would think the user would have much fewer than 500 files, probably less than 100.
Chris, I can confirm the much better performance of the shellscript. I have to admit it was hard to believe at first.
ShellScript in KM
It would seem that most of the performance advantage of the shellscript comes from the way the KM executes an AppleScript. When I run my Get Files script in Script Geek app, it takes only 0.093 sec, whereas it takes 0.33 sec when run from KM, an increase of 0.237 sec:
Script Geek
As we have seen in previous tests, KM adds ~0.20 to 0.25 sec to the execution of an AppleScript.
@peternlewis, I'm sure this will not change your mind about changing how KM executes AppleScripts, but you should be aware of this performance hit.