Did you know you can copy the path to a file on your Mac and link to it from a document? You can do this anywhere that supports embedding a link in text or simply makes a URL clickable.

This way, you can internally reference a file and sometimes open it directly from the document any time you’re on your own computer.

Finder Copy as Pathname

Copy Path

In Are You a Finder or a Keeper?, we learned how the Finder’s Paste command can change to Move Item Here while holding the Option key. Option has many functions across macOS to enhance its capabilities.

To copy the path to a file in the Finder, select the item and click the Edit menu. Now, hold the Option key and you’ll see the Copy “[filename]” command change to Copy “[filename]” as Pathname.

You’ll also see the keyboard shortcut change from Command+C to Command+Option+C. Either way, issue the latter command.

Link to File Path

Style as URL

Having copied the file as a pathname, the path to the file will be on the Clipboard. Now, you can go to your document and paste it, either directly in the body or as part of an embedded link.

To ensure the pathname works as an address, prefix it with file://. For example, I created a Domain Diagram for a client a few years ago. It’s pathname is /Users/earthsaver/Desktop/Domain Diagram.pdf. As a link, it is file:///Users/earthsaver/Desktop/Domain Diagram.pdf.

Embed Link to File Path

Embed Link

Suppose you want to embed an address in text to make it a clickable link. In Mac Hot Tips #1, we learned that in many applications, you can select the text, press Command+K, and type or paste the URL.

Alternatively, as discussed in Help! (in Mac Apps), you can go to the Help menu and search for “link” to find a menu item containing this word.

Note that if your path contains a space, this will convert to %20. This is the way HTML normally encodes a space as URLs never contain them.

Because of security protections against application interoperability, most applications will only be able to reference the file by revealing it in a Finder window.

However, web browsers have more flexibility because they are capable of displaying many types of files directly in the browser window. Therefore, if you click the link in a web-based document, the item may just appear on the screen right where you are.