Advanced Mac users who need frequent access to a files complete path in macOS and Mac OS X may find themselves turning to the drag & drop Terminal trick or performing a variety of other tricks to copy an items path, but with OS X 10.11 and later, there’s a new native Copy Pathname option built directly into the Finder. Just as it sounds, it will copy the complete pathname of a file or folder directly to the clipboard.

Copying File Paths from the Mac Finder

Using Copy Item as Pathname in Mac OS X Finder is really easy, here’s all you need to do to copy any items path name directly to the clipboard from anywhere in the file system:

Navigate to the file or folder you wish to copy the path for Right-click (or Control+Click, or a Two-Finger click on trackpads) on the file or folder in the Mac Finder While in the right-click menu, hold down the OPTION key to reveal the “Copy (item name) as Pathname” option, it replaces the standard Copy option Once selected, the file or folders path is now in the clipboard, ready to be pasted anywhere

The copied pathname is always the complete path, it’s not relative.

As an example, choosing “Copy (file) as Pathname)” in the screen shot example on a file called com.apple.Boot.plist copies in the /Library/Preferences/SystemConfiguration/ folder (where OS X network settings are stored) will copy the following file path into the clipboard, which can then be pasted anywhere as so:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist

This is demonstrated in the video below:

Though this right-click Copy Pathname option is only available in the latest versions of OS X, there are other ways to copy a file path in all versions of Mac OS X, including with an Automator script, so if you’re not on the latest and greatest you can still get the same feature through the Service menu and the Automator trick..

If you find yourself frequently needing path information on the Mac, two other handy tricks are enabling the Path Bar, which is interactive or showing the complete path in the Finder window titlebars too, which will display the full path to the active folder where ever you are in the Finder within the titlebar.