Copy a file path to the clipboard on a MacPosted on May 7th, 2008 No comments
The Mac does not support copying a file or folder’s path to the clipboard; weird. Get Info separates the path from the filename and doesn’t allow you to select either. There are various workarounds. This thread discusses some. I went with this solution which offered a "workflow" file download which I opened in Automater and saved it as a context menu for Finder.
It was suggested that you can drag and drop into a terminal window and then copy paste the path that displays. You can do this with any program that offers an editbox control. For example open TextEdit, do File…Save As and drag and drop to the filename EditBox which you can then copy to clipboard from.
BTW, if you ever need to drag & drop into a widget, start dragging then hit F12 to switch to the widgets screen.
Update: Today an article came out in MacWorld on this subject. Their first suggestion using Finder Services didn’t work for me. I just get an icon of a folder or file and when I put TextEdit into plain text mode I get nothing. Also, the workflow solution I linked to above gives a HFS (colon separated) path, whereas the article has an example of a script generating a "POSIX" path. You can download the POSIX version here (thanks Scott) and copy it to ~/Library/Workflows/Applications/Finder/.
Leave a reply