Should this error actually appear somewhere? Because when the script
runs (as a Folder Action, of course, since running it in the Script
Editor does nothing), I never get an error of any kind. To be
certain the script was running at all, I inserted a display dialog
command at the beginning of the script, which did pop up. But once
it gets to the tell application "Finder" handler, nothing.
As per your advice, I modified the core of the repeat structure to
the following, without success:
set theInfo to (get info for alias eachFile)
display dialog theInfo buttons {"OK"} default button 1
theInfo is a record and display dialog wants a text value. Maybe "theInfo as text" will do it.
I will take a closer look at Apple's code. I based my original
script (without reference to "alias") on one found online, which may
have been an error, I suppose.