Put a file's path on the clipboard via AppleScript

Apr 18, '07 07:30:00AM

Contributed by: michelle_eris

If you need a quick way to get the full path to a file or folder, save the following Applescript as an application:

on open {dropped_item}
  tell application "Finder" to set the clipboard to the ¬
   dropped_item as text
end open
Copy and paste the text into Script Editor, then choose File » Save As, and set the File Format pop-up to application. Then whenever you need to get the path to an item, simply drag that item onto your script's application icon, and the path to the dropped item will be placed on the clipboard.

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070416161655621