About spkane
Location
Portland, OR, USA
Home page/site
http://homepage.mac.com/spkane/
Author Biography
Sean Kane is currently a Macintosh Engineer working for Affiliated Computer Services (ACS) on the Nike World Headquarters contract. In this position, with a team of two other engineers, he helps design, test, and implement solutions for the Macintosh user community at Nike HQ, and their locations worldwide.



I think that if you just copy an item, and then paste it into a text field it will paste in the path. Your solution is more reliable though, because just copying an item might paste (a) the item, (b) the file name, or© the full path, depending on where you paste it (like a rich text document). I’ve not figured out the rules yet.
JP
If you copy an item and paste it as text you’ll get the filename only, not the path. It’s mimicking the classic Mac behavior there.
Thanks for the plugin, Sean! I’ve been looking for something like that. I’ve always just dragged it into a Terminal window and then copied that out and pasted it elsewhere. A bit of a pain, but I’m nothing if not a sucker for the tedious solutions that just work.
Hi Sean,
Thanks for posting your modified CopyPath project.
One minor note: it seems that FSRefMakePath() will return a path with unescaped whitespaces, which means that paths that contain spaces in their names will confuse cmd-line apps when one attempts to C&P them for use in a terminal/shell session.
One option is to enclose the entire path in double-quotes before sending it to the clipboard — I’ve made a minor tweak to handleSelection() in CopyPathPlugin.c that does this. (Again, it’s a fairly trivial change and somewhat klugey but I can send it to you or post the changes here if you like)
I’m not a Mac developer, so I have no idea what to do with the attached files. Would it be possible for you to provide the plugin in a compiled format?
Ditto. I’d like to know how to implement this, as I’m not a developer. I arrived here from Google, searching for a way to send a file location to a buddy on the same network. Does it also work for sending Windows file paths? (They’re formatted differently).
My C skillz have pretty much gone AWOL over the last few years so my attempts to modify the code for my case have failed …appreciate a hand if anyones got the time. I’m wanting to trim “/private/var/automount” from anything copied that has it at the start of the path. Reason is so that copied paths can work on platforms other than mac – as mac is the only one that uses /private/var/automount.
TIA.