Hi,

The osascript example in a recent thread gave me an idea - I'd like a shell command that would tell the Finder to reveal the item with a certain path, something like this:

% osascript -e 'tell application "Finder" to reveal file "/Users/ken/Perl.tar"'

This would be useful (if it worked) for initiating drag-n-drop operations, getting finder info, looking at the preview icon, etc.

I've tried several variations on the above theme, but none of them work. My Applescript-Fu is not strong. For instance, the above gives me the error:

execution error: Finder got an error: Can't get file "/Users/ken/Perl.tar". (-1728)

If I dig around in the applescript dictionary for the Finder, I find a 'name' property, but that doesn't seem to get me much farther:

% osascript -e 'tell application "Finder" to reveal file name "/Users/ken/Perl.tar"'
syntax error: Invalid key form. (-10002)


Anyone?

-Ken

Reply via email to