The quickest ways to see a file's complete location
The full path of a file is its complete address on your Mac — the folder names stacked together that tell your computer exactly where to find it. Most of the time you do not need it. But when you do — because a program asks for it, or you are troubleshooting, or you need to move a file and want to know where it came from — there are three fast ways to get it.
The easiest method is to right-click the file in Finder and select "Copy as pathname" from the menu. Your Mac copies the full path to your clipboard, ready to paste anywhere. If that option does not appear, you can use Finder's built-in path bar instead, or open Terminal and drag the file into the window. All three work; the first is fastest for most people.
Key Takeaways
- Right-click any file in Finder and select "Copy as pathname" to copy its full path to your clipboard in one step.
- The Finder path bar (View menu, then "Show Path Bar") displays the full location of any file or folder you select.
- In Terminal, type pwd after dragging a file into the window to see its exact path printed on screen.
- A file's path always starts with a forward slash and shows every folder from the root of your drive down to the file itself.
Using "Copy as pathname" in Finder
Open Finder and navigate to the file you want. Right-click it (or Control-click if you have a single-button mouse) and look for "Copy as pathname" in the menu that appears. Click it, and the full path is now in your clipboard.
Paste it anywhere you need it — into a text editor, an email, a Terminal window, or a program's file dialog. The path will look something like /Users/yourname/Documents/Projects/report.pdf. Each forward slash marks a folder boundary, starting from the root of your drive.
If "Copy as pathname" does not show up, your Mac is running an older version of macOS. Use one of the other methods instead.
Viewing the path bar in Finder
The path bar is a thin line at the bottom of every Finder window that shows you exactly where you are. To turn it on, open Finder, click the View menu at the top, and select "Show Path Bar". From then on, whenever you select a file or folder, the path bar displays its full location.
Click any folder name in the path bar to jump directly to that location. This is useful if you want to see the full path without copying it, or if you need to navigate up to a parent folder quickly. The path bar stays on until you turn it off the same way.
Using Terminal to see a file's path
Open Terminal (find it in Applications > Utilities, or search for it with Spotlight). Type pwd and a space, but do not press Enter yet. Now drag the file you want from Finder into the Terminal window. The full path appears automatically. Press Enter, and Terminal prints the path on screen.
This method is more steps than "Copy as pathname", but it is reliable on any Mac and shows the path in a way that is easy to read and copy. Terminal also shows you the path in a format that other programs and scripts can use directly.
Understanding what the path tells you
A Mac file path always starts with a forward slash, which represents the root of your hard drive. After that, each folder name is separated by another forward slash. The file name comes last.
For example, /Users/sarah/Library/Application Support/Firefox/Profiles/abc123.default/prefs.js means: start at the root, go into Users, then sarah, then Library, then Application Support, then Firefox, then Profiles, then abc123.default, and the file is prefs.js. If you remove any folder from the middle, the path no longer points to the right place.
Some paths include a tilde (~) instead of /Users/yourname. The tilde is shorthand for your home folder. ~/Documents/file.txt means the same thing as /Users/yourname/Documents/file.txt.
When you need a file's path
Programs sometimes ask you to "browse to" or "locate" a file, and they show you a dialog box instead of letting you type the path. In those cases, you do not need the full path — just navigate through the folders until you find the file and click it.
You need the actual path when a program has a text field that says "enter the path" or "file location", or when you are using Terminal to run a command. You also need it if you are troubleshooting with someone who needs to know exactly where a file lives on your drive.
Paths for files in iCloud Drive and cloud services
Files stored in iCloud Drive have paths that start with /Users/yourname/Library/Mobile Documents/com~apple~CloudDocs. Files in Dropbox, Google Drive, or OneDrive have paths that point to their local sync folders, usually in your home directory.
If a file is not yet downloaded to your Mac (it shows a cloud icon in Finder), you may not be able to see its full path until it syncs. Right-click the file and select "Save to this Mac" or wait for it to download, then try again.
Frequently Asked Questions
What if I copy the path but it does not work when I paste it?
Check that the file still exists at that location — if you moved or deleted it, the path is no longer valid. If the file is there, make sure you pasted the entire path without accidentally cutting off the beginning or end. Some programs need the path in a specific format; if you are unsure, ask the program's support or documentation.
Can I use a file's path to open it from Terminal?
Yes. Type open followed by a space, then paste the path. For example, open /Users/yourname/Documents/report.pdf opens the file in its default program. If the path has spaces in it, you may need to put quotes around the whole path: open "/Users/yourname/Documents/My Report.pdf".
Why do some paths have "Library" in them and I cannot see that folder in Finder?
The Library folder is hidden by default on Mac. To see it, open Finder, press Command-Shift-Period (the period key), and the hidden folders appear. Press the same keys again to hide them. Many important files live in Library, which is why they are hidden — to prevent accidental changes.
Is the path the same if I move a file to an external drive?
No. The path changes to reflect the new location. For example, a file on an external drive might have a path like /Volumes/ExternalDrive/Documents/file.txt. If you move the file back to your Mac, the path changes again. Always get the current path after moving a file if you need it for something.