How to find the path of a file on Mac
Over time, your Mac likely accumulates heaps and heaps of files. As you create, download, and save documents, your entire filesystem can become cluttered and fussy.
Even those who carefully manicure a deep file tree system need help locating files from time to time. For files buried in sub-folders, knowing the file path can be a critical shortcut to finding the document you need quickly.
We’ll show you how to get path of a file in Mac, how to navigate a file directory Mac has built-in, and why a standalone app may be more useful than your Mac’s Finder.
Method 1: Info window
If you know which file you want to reference later, knowing how to find the path of a file in Mac is actually pretty simple. Here’s how:
- Locate the file you’re looking for on your Mac
- Right-click the file
- Choose “Get Info.”
The file path on Mac will be listed under “Where” in the “Get Info” window that appears.
There’s an even simpler method — an app that lets you find a file path without opening any windows. Path Finder is a dual-pane Finder replacement that has a series of modules you can drag onto its side menu to automate your file management.
Path Finder’s “Info” module surfaces all the same data from the three steps above:
- Choose the file in Path Finder
- Check Info in the sidebar
- Check Path.
What’s more, the file path changes dynamically but always stays visible as you’re navigating through file destinations.
PathFinder comes with a range of other useful tools such as showing and hiding files, saving tab groups, uploading files to external servers, etc. Try using it as a Finder alternative and you’ll likely never go back!
How to copy the file path
Path Finder makes the job of copying a file path effortless:
- Right-click any file in Path Finder
- Choose Copy Path
- Choose the method of copying the file path.
Without Path Finder, the process of copying a file path is trickier but doable. One of the options is to get it via the context menu.
Method 2: How to get a file path from Mac context menu
Here’s how to surface and copy the file path for any file or folder in your Mac’s Finder app:
- Open Finder on your Mac
- In the menu, choose View
- Choose Show Path Bar (This surfaces the path for any file selected at the bottom of the Finder window. If you try to copy the text at the bottom of the window, nothing happens. So how can you actually copy the file path name?)
- While holding down the Control button, click on the file you want to copy the path of in Finder
- Press the Option key (In the menu that appears after step one, you’ll see Copy turn into Copy [file path name] as Pathname)
- Click Copy [file path name] as Pathname.
Now you know how to get the path of a file in Mac via the context menu! This copies the file path of the selected file to your clipboard, which you can then paste anywhere you like.
Method 3: Find file path via Terminal
Terminal (or Mac directory path) allows deep access to the inner workings of your computer, down to the root level. You can perform just about any function in Terminal, including finding, moving, and deleting files. It’s also great for finding file path names.
Here’s how to get directory path in Mac to show a file’s path name:
- Open Terminal on your Mac
- Type this command: sudo su
- Press the return key on your Mac
- Enter the password for you Mac
- Press return again
- Enter the following command: find / -name [filename] (Note: You must know the name of the file you’re looking for. In the step above, substitute the file name for [filename])
- Press enter (Note: It can take Terminal several minutes for Finder to complete this task. Be patient. Additionally, much of what Finder returns will say “operation not permitted”. You can safely ignore those lines)
- Find the file path of the file you’re searching for, then select its file path
- Right-click the selected text and copy it.
There’s a simpler way, though. If you have the file available on your Mac, simply drag and drop it onto your Terminal window, and the full file path will be displayed.
Method 4: Copy file path using Go to Folder
Another drag-and-drop method is to reveal a file path via Finder’s Go to Folder command:
- Open Finder
- In the menu, choose Go > Go to Folder
- Drop your file onto the path field to reveal its path.
Method 5: Create ‘Copy Path’ Service in Automator
Power users and shortcut aficionados will love this little hack! Your Mac’s Automator allows you to create a host of microservices to perform tons of functions, including getting the file path of any file with ease. Here’s how to create your own shortcut:
- Open Automator on your Mac
- Select Quick Action (Note: In macOS Catalina or earlier, this will be known as Service)
- At the top right of the Automator window, choose Files or Folders from the drop-down menu next to “Workflow receives current:”
- Next to “in,” select “Finder”
- From the Actions library, drag the “copy to clipboard” module onto the right side of the Automator window
- From the Mac menu bar, select File
- Choose Save from the drop down menu and name your new automation
- Click Save.
Now that you’ve created your fancy new automation, here’s how to use it:
- Open Finder on your Mac
- Right click on any file or folder
- Click Finder in the menu bar and choose Services
- Select the Automator shortcut you just created (ours is saved as “FindFilePath”)
- Paste the copied file path anywhere you like.
How to find large and old files
What if the specific file or folder you’re looking for is massive – but that’s all you really know about it? For this, CleanMyMac X is the perfect app!
While it focuses on keeping your Mac’s file system spotless and your computer operating at peak performance, CleanMyMac X also has a handy module named (appropriately) “Large & Old Files.” Its aim is to discover big, bulky documents or files, which it distills to lists. You can choose to view all of your big, bulky files, or check out CleanMyMac X’s “kind” and “size” lists to help you find exactly what you’re looking for. It even creates lists by size, so you don’t mistake that 11GB file for the 1.1GB file!
Make your Mac easy to navigate
Your Mac doesn’t think you need to know all the details of a file or folder; it would rather you hunt and peck around to discover what you need.
For many users, this is fine. Finding a file is relatively simple for many – but an increasing number of users want more from their Mac, including the Finder app. Those with tons of files and folders are looking for amsarter, better way to manage their digital footprint.
This is why PathFinder and CleanMyMac X are so useful. Each plays a unique role in keeping your Mac performant, helping you discover files with ease, and allowing more customization of your Mac than ever before.
Best of all, both apps are available for free with a 7-day trial of Setapp, an app platform that powers up your workflow with handy apps for Mac and iOS — all under a single monthly subscription. When your 7-day trial period ends, continued access to Setapp starts at only $9.99/month!