: Easy way to retrieve path to file?


TroutMaskReplica
May 9th, 2005, 02:13 PM
Let's say I wanted to copy/paste a file's path to a docket form in Excel or a word processor, for example. How would I do that?

If there is no easy way, would it be possible to write an actionscript and then put that into a contextual menu ie., right clicking on a file and then choosing the 'get path' script will copy the file's path to the clipboard?

TroutMaskReplica
May 9th, 2005, 02:33 PM
perhaps a mod could move this to help and troubleshooting? i posted here unintentionally.

elmer
May 9th, 2005, 02:53 PM
Check this out (both the article, and the comments for alternative methods)
http://www.macosxhints.com/article.php?story=20050209074043288

Or ... some programs print the file's path if you drag the file onto the program. Terminal, for example, and others.

TroutMaskReplica
May 9th, 2005, 03:01 PM
thanks!

just found this automator thingy too (unfortunately i don't yet have Tiger):

Get Path
April 28th, 2005 | Posted in Finder, Workflows |

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/

URL: http://www.automatorworld.com/2005/04/28/get-path/

rneale
May 9th, 2005, 04:28 PM
Try CopyPath

http://www.macupdate.com/info.php/id/13623

gordguide
May 10th, 2005, 02:09 PM
All the other methods work, but why re-invent the wheel? Elmer had it right.

Launch the Terminal.
Drag your application/file/whatever into the open Terminal window.
The exact path to the file will be displayed. Copy and Paste.