Copy File Path to Clipboard
While chatting with a friend recently about copy and pasting file lists, he mentioned a quick and simple way to copy the file path of a folder or file to the Clipboard within Mac OS X.
This easy method involves the Services menu within Finder.
Now, I don’t know about you, but I seldom look at the long list within the Services menu and even if I had gone searching through Services, I doubt I would have recognised the option that actually performs the task of copying a file path!
Once the required Service is pointed out, it all becomes so obvious:
First select the file or folder whose path you wish to know, then within the Finder menu click Finder > Services.
Towards the end of the long Services list choose TextEdit > New Window Containing Selection.
This opens a new TextEdit window with the file or folder path already pasted in and hyper-linked to the object.
To remove the link from the text just Ctrl-click or right click on the link and choose Edit Link.
A new window opens enabling you to delete or alter the link.
I did a little further Googling into the subject and found there were various ways to achieve a file path, including dropping the file on to an open Terminal window, using TextWrangler, AppleScripts and Automator.
There are a few free and paid utilities that provide a contextual menu option allowing you to copy the file path to the clipboard. These include FileXaminer at US$10 and the freeware utility FileUtilsCM from Abracode.com.
FileUtilsCM installs a Finder plug-in which provides the ability to set different file or folder attributes. Amongst the various options offered by a Ctrl-click or right click on the selected file is Copy Path To Clipboard.
So there you have it, a few alternative ways to get your file path copied to the clipboard and into a text document. No doubt there are a few more examples of how to achieve this, if you know of any, then please share the knowledge with us all by adding a comment below.