I wrote the following script to select copied/pasted Finder items in the target folder I pasted them into.
tell application "Finder" set thePath to POSIX path of (insertion location as alias) set theFiles to paragraphs of (the clipboard) set theOutput to {} set theFile to {} repeat with i from 1 to count of theFiles set theFile to POSIX file (thePath & item i of theFiles) as text set end of theOutput to theFile as text end repeat reveal theOutput activate end tell --return theOutput It works great on most files and folders alike, even those that might have " somewhere in the name.
However, when the copied/pasted files are a symbolic link, Finder resolves them to the original files instead of selecting/revealing the link files (which is what I am aiming to achieve).
Is there some way to change the script to make it not follow/resolve link files to their target and reveal the link files themselves in Finder instead?
revealdoes — it is basically the applescript equivalent of the finder'sshow original(which I think even used to be called 'reveal'). Try using theselectcommand. Also, while looking through your script, I don't really see the advantage of all the coercing that's being done.