macOS Finder – Easy Way to Copy Paste File Paths on Macs

automationfilesystemfindermacos

I am working on some long procedures that will need to reference a lot of file paths of documents located locally and on various external drives and servers. In all cases we are using Apple Macs with either El Capitan or Sierra installed.

My problem – it is taking me a long time to manually type and double-check the file paths are correct.

Preferred solution – I would love it if there was just a way to copy and paste the file paths into these procedures.

I did try using the Get Info option, but couldn’t see a file path listed anywhere that I could copy and paste.

I also read this question: Get components (path and filename) of POSIX filepath and did have a go of using the script. This was promising, but it doesn’t quite do what I need.

Is there an easy way for me to just copy and paste file paths as I need them?

For example, if I have an image called “Serial Number.jpg” located on an external drive called Server1 the file path would be: /Volumes/Server1/Serial Number.jpg.

Best Answer

I think this is an option that will do exactly what you want. Using your Serial Number.jpg example, do as follows:

  1. In the Finder browse to the image called “Serial Number.jpg” located on Server1
  2. Right-click on the file to display the context menu
  3. Now press and hold the option key down
  4. Select the Copy “Serial Number.jpg” as Pathname option
  5. Now go to the procedure you’re editing and paste the pathname you just copied

This should result in your document having the /Volumes/Server1/Serial Number.jpg path pasted into it.

Just use the same steps for any file, regardless of whether it’s stored locally, on an external drive, or on a server. This also works to get the file path of folders.

Keyboard shortcut

Thanks to Mateusz Szlosek for pointing out you can also use a keyboard shortcut. Instead of Steps 2 to 4 above, once you've selected the file you can use the option+command+C shortcut to copy the file path. Then you can paste it as usual.

Windows etc files

There are custom built utilities to format shares for other operating systems and sub/afp as well: