Plus a bonus tip to make it even easier
When you create or copy a file to your Mac, it is assigned a path which is the actual location of the file on your Mac. Paths let you easily get to any folder or files on your machine as they represent the full address of the file saved on your machine.
Sometimes you may want to reveal the path of a file on your Mac for various reasons. Maybe you are writing a program that takes the file path as an input. Or maybe you have installed an app on your Mac and it asks you to enter the path of your file.
Regardless of why you want to reveal the path of a file, there are several ways to do so on your machine. macOS comes built with a number of options to help you view and even copy the full path of any file saved on your machine.
If that’s not easy enough for you, you can even create your own Automator service that copies the path of your selected file in a single click.
Also, feel free to check out our YouTube channel from our sister site where we go over the different methods in a short video.
Reveal File Paths Using The Info Box
If you have been using a Mac for some time, you may have likely seen the Get Info option that appears when you right-click on a file.
This option opens a box where all the information regarding your file is shown. This information includes the file name, file type, file size, and the most important one – file path.
To see it for yourself, open a Finder window, right-click on any of your files, and select Get Info.
On the following screen, look for the label that says Where and you will see the full path of your selected file on your Mac. It shows what folders and nested folders your file is located in.
While it works great to help you find your file’s path, it does not let you copy the file path as plain text if that is what you wanted 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 Paths From The Context Menu
The context menu on your Mac is a really powerful tool as it lets you do much more with your files than just letting you rename or delete your files.
One of the useful and hidden options in your context menu lets you directly copy the path of a file to your clipboard.
Since it’s hidden by default, it won’t appear when you right-click on a file on your Mac. However, unhiding the option is pretty easy and all it takes is pressing and holding down the Option key. This will make the option visible in your context menu.
To use the option, right-click on a file in the Finder, hold down the Option key on your keyboard, and you’ll see the Copy “file-name.ext” as Pathname option. Click on it to copy your file’s path.
It will have copied the path of your selected file as plain text to your clipboard.
Use Finder To View File Paths
You might think if Finder is a file management app, then why doesn’t it offer the feature to copy file paths? Unfortunately, the current version of the Finder doesn’t have an already visible option to copy file paths.
However, that doesn’t mean there really is no way to view your file paths using the Finder. There is indeed a feature – not built for revealing file paths – but helps you view your file paths on your machine.
It’s called the Go to Folder feature and it is actually built to help you go to a location on your Mac. But you can use it to reveal file paths as shown below.
While you are in a Finder window, click on Go at the top and select Go to Folder.
When the dialog box opens, drag and drop a file onto the input field and it will be filled with your file’s path. You may then copy the path to your clipboard using Command + C.
View File Paths Using Terminal
Many users may think that the Terminal app on your Mac is only for programmers or for people who love coding. Although that’s true and the app does allow you to execute various commands, it can be used for basic tasks like copying file paths as well.
The app does help reveal file paths and it is pretty easy to do it. Fire up the app on your Mac and drag and drop a file onto its window. The full path of the selected file will appear in your Terminal window.
It’s also useful when you are writing a command and you need to type the full path of a file. Instead of typing, you can drag and drop the file and it will fill in the required input for you.
Create An Automator Service To Copy File Paths
If you use a version of macOS that doesn’t offer the option to copy file paths from the context menu, you can add the option to the menu yourself using an Automator service. An Automator service is a user-defined set of tasks that are performed when the service is invoked.
That may sound too programmatic but doing so in practice isn’t that difficult. In fact, all it requires you to do is drag and drop an action from here to there and you have your service ready with Automator.
- Launch the Automator app and select Service followed by Choose. It will let you create a custom service on your machine.
- Configure the options at the top of the main panel as the following:
Service receives selected - files or folders
in - Finder
- Search for the action named Copy to Clipboard in the left panel and drag and drop it onto the main panel.
- Your service is ready and it’s time to save it. Click on File at the top and select Save. Enter a name for the service – this is what’s going to appear when you right-click on a file – and hit Save.
You’re now ready to copy file paths using the context menu on your Mac. Find the file you want to copy the path for, right-click on the file, and select Services followed by your service name.
The full file path will be copied to your clipboard in plain text formatting.
Bonus Tip: Assign a Keyboard Shortcut To The Automator Service
If you would like to make it even easier to copy file paths, you can assign a keyboard shortcut to your custom Automator service. So when you press this key combo, the path of the selected file will be automatically copied to your clipboard.
To do it, head to System Preferences > Keyboard > Shortcuts > Services, find your service in the list and give it your chosen keyboard shortcut.