Copy UNIX path to Finder selection
UPDATE 2009-08-14: Or just use CopyPath, which looks like a much better implementation of exactly the same thing. Thanks to David Keegan, its author, for suggesting it in the comments.
The original post content follows.
This is a script application, which apparently you can drag into your Finder toolbar. (If it doesn’t let you, you didn’t drop it in the right spot. Finder is finicky about this. Keep trying.)
Once you’ve added it to your toolbar, you can just click on it to run it. The script will copy the UNIX path of whatever you have selected in Finder to the clipboard.
Inspired by a conversation with Alan Boyd.
August 13th, 2009 at 09:21:54
Note that to some extent, this is already done automatically. For example, if you command-c a file in Finder and then command-v in Terminal, you get the unix path. You can see using “/Developer/Applications/Utilities/Built Examples/Clipboard Viewer.app” that the clipboard contains the unix path for a couple of pb types. Of course, it all depends on which app you’re pasting in; the unix path won’t get pasted in Safari or TextEdit.
By the way, for another kind of Finder/Unix interaction, there’s an app called Open Terminal that you can also put in the Finder toolbar to open the selected or dragged folders in Terminal:
http://homepage.mac.com/thomasw/OpenTerminal/
August 13th, 2009 at 09:40:38
http://inscopeapps.com/apps/copypath/
http://bitbucket.org/keegan3d/copypath
I’ve been working on an app for this that’s written in objective-c, so it does not popup in the dock, and has options for formating the paths into a python array, objective-c array, html image block or whatever you want.
August 27th, 2009 at 03:14:30
Hi,
I kind of like the idea of this script though it’s not working with multiple files.
Here’s the same script for copying multiple UNIX path’s:
August 27th, 2009 at 03:16:26
Erm…that was not what I intended to do…the code or pre seem to screw my example.
Make changes as you like to make this blog beautful again. ;)