5 ways to reveal the path of a file on MacOS

When you create or copy a file to your Mac, it is assigned a path that is the actual location of the file on your Mac. Paths allow you to easily access any folder or file on your machine because they represent the full address of the file stored on your machine.

Sometimes you may want to reveal the path of a file on your Mac for various reasons. Maybe you’re writing a program that takes a file path as input. Or maybe you installed an app on your Mac and it asks you to enter the path of the file.

Copy File Path menu” class=”lazy lazy-hidden wp-image-7186″ data-lazy- data-lazy-/>

Reveal file path with infobox

If you’ve been using a Mac for a while, you’ve probably seen Receive information options appear when you right click on the file.

This option opens a box where all the information related to your file is displayed. This information includes file name, file type, file size and one of the most important – file path.

Info screen for Autumn.heic

To see for yourself, open a Finder window, right-click any of your files, and select Receive information.

On the following screen, look for a label that says Where and you will see the full path of the selected file on your Mac. It shows what folders and nested folders your files are in.

While it works great to help you find your file path, it doesn’t let you copy the file path as plain text if that’s what you want to do. You may want to check out some of the other methods mentioned below if you want to copy the path of a file to your clipboard.

Copy file path from context menu

The context menu on your Mac is a really powerful tool because it lets you do more with your files than just letting you rename or delete your files.

One of the useful and hidden options in the context menu allows you to copy the path of the file directly to the clipboard.

Right clicking on the menu holding the Option key will bring up the option Copy as Pathname

Since it’s hidden by default, it won’t appear when you right-click a file on your Mac. However, showing the option is pretty easy, and all you need to do is press and hold the Option key. This will make the option visible in your context menu.

To use the option, right-click the file in Finder, hold
Right to buy on your keyboard and you will see Copy “file-name.ext” as PathName right to buy. Click on it to copy your file path.

It will copy the path of the file you selected as plain text to the clipboard.

Use Finder to view file paths

You might be thinking if Finder is a file manager, why doesn’t it offer file path copying? Unfortunately, the current version of Finder does not have a visible option to copy the file path.

However, that doesn’t mean there isn’t really a way to see your file path using Finder. There is actually a feature – not built to reveal the file path – but helps you to see the file path on your machine.

It is called Go to Folder and it’s really built to get you to a location on your Mac. But you can use it to reveal the file path as shown below.

Go to folder window

When you’re in a Finder window, click To go at the top and select Go to Folder.

When the dialog opens, drag and drop the file into the input field and it will be filled with your file path. You can then copy the path to your clipboard using Command +.

View file path using terminal

Many users may think that the Terminal app on your Mac is just for programmers or people who love to code. While that’s true and the app allows you to perform various commands, it can also be used for basic tasks like copying file paths.

Terminal window on Mac computer

This app helps to show the file path and it’s pretty easy to do it. Start the app on your Mac and drag and drop the file onto its window. The full path of the selected file will appear in your Terminal window.

It is also useful when you are writing a command and you need to enter the full path of the file. Instead of typing, you can drag and drop the file and it will fill in the necessary input for you.

Create an automation service to copy file paths

If you use a version of macOS that doesn’t provide the option to copy the file path from the context menu, you can manually add the option to the menu using the Automator service. An Automator service is a collection of user-defined actions that are performed when the service is invoked.

That may sound too programmatic but doing so in practice is not so difficult. In fact, all you need to do is drag and drop an action from here to there, and you’ve got your service ready with Automator.

  • Launch Automation application and select Service Followed by Choose. It will allow you to create a custom service on your machine.
Select the Services window in the Automator application
  • Configure the options at the top of the main panel as follows:
Service receives selected - files or folders
in - Finder
Automator configuration window main panel
  • Search for action named Copy to clipboard in the left panel and drag and drop it to the main panel.
The action of copying to clipboard is dropped to the main Automator panel
  • Your service is ready and it’s time to save it. Click File at the top and select Save. Enter a name for the service – this is what will appear when you right click on the file – and press Save.
Save a service as a window in Automator

You are now ready to copy the file path using the context menu on your Mac. Find the file you want to copy path, right click on it and select Service followed by your service name.

The full file path will be copied to your clipboard in plain text format.

Extra Tip: Assign a Shortcut to the Automator Service

If you want to make copying file paths even easier, you can assign a keyboard shortcut to your custom Automator service. So when you press this key combination, the path of the selected file will be automatically copied to your clipboard.

To do that, go to System Preferences > Keyboard > Shortcuts > Servicesfind your service in the list and give it the shortcut of your choice.

Leave a Reply

Your email address will not be published.