**Function:** Gets the file path of the selected file and copies it to the clipboard.
**Author**: Automator World
**Notes**: There are countless freeware utilities that do this faster (not to mention that Tiger will automatically paste the path of a file dragged into a text field), but it's a good example of a Workflow with an embedded Applescript. It works best as a Contextual Menu Plug-in: Copy into ~/Library/Workflows/Applications/Finder/
Scirpt works well with a single file, but needs a loop around the number of files in the selection to make the workflow a bit more robust. (Or to throw an error if more than one file has been selected.)
Comment by The Plaid Cow — April 30, 2005 @ 3:53 pm
I might alter this to automatically paste it into a text file, so that I get immediate information. Thank you.
Comment by Wedge — May 31, 2005 @ 12:39 pm
Yep, only works for one file at a time. Wedge, have you done that?
Comment by Rob — July 16, 2005 @ 1:55 am
does anyone know of a way to just copy the file name to the clipboard instead of the path?
Comment by omega777 — September 16, 2005 @ 2:05 pm
To copy the file name only, select the file and hit cmd-c. Depending on context when paste, the entire file will be pasted or if you are in an email or text app the filename will be pasted. To eliminate the possibility of the file being pasted do this:
Select file
hit return key to highlight name
hit Cmd-C
The file name is now on the keyboard.
Comment by switchblog — January 16, 2007 @ 2:51 pm
… I mean on the clipboard. D’oh!
Comment by switchblog — January 16, 2007 @ 2:52 pm
informative post, keep it up.,
Comment by Jerome — November 4, 2008 @ 2:33 pm