How to Copy a File Path on Mac (Every Method)
How to Copy a File Path on Mac (Every Method)
Copying a file path on Mac is one of those tasks that sounds simple until you actually need it. macOS buries the option slightly, and the method you need depends on where you are — Finder, Terminal, or an Open/Save dialog. This guide covers all of them.
Method 1: Right-Click in Finder (with the Option Key)
This is the fastest method most users never discover.
- Select the file or folder in Finder.
- Hold Option and right-click (or Control-click) on the item.
- In the contextual menu, you will see Copy "[filename]" as Pathname.
- Click it. The full POSIX path (e.g.
/Users/yourname/Documents/report.pdf) is now on your clipboard.
Without the Option key, the menu shows "Copy" — which copies the file itself, not its path. The Option key is the trick.
Method 2: Finder's "Get Info" Window
- Select the file in Finder.
- Press Cmd+I to open Get Info.
- Find the Where field — it shows the containing folder path.
- You can select and copy the text there, but note this gives you the folder path, not the full path to the file itself.
This is useful when you need to know where something lives, not necessarily its exact path string.
Method 3: The Path Bar at the Bottom of Finder
- In Finder, go to View → Show Path Bar (or press Option+Cmd+P).
- The path bar appears at the bottom of every Finder window, showing the hierarchy from root to the current folder.
- Right-click any segment in the path bar to copy that location to your clipboard.
Once you have the path bar visible, it stays visible permanently — a genuinely useful setting to keep on.
Method 4: Drag a File into Terminal
If you are typing a Terminal command and need to insert a file path:
- Type your command up to where the path goes (e.g.
open). - Drag the file from Finder directly into the Terminal window.
- macOS automatically inserts the full escaped path, spaces and all.
This is not a clipboard operation per se, but it is often faster than copying and pasting separately.
Method 5: Copy the Path from Terminal Itself
If the file is already referenced in Terminal, you can select any path text and copy it normally with Cmd+C.
To get a path for any file on the command line:
realpath ~/Documents/report.pdf
This prints the absolute path, which you can then select and copy.
Method 6: Automator Quick Action (for Power Users)
If you copy file paths frequently, you can create a Finder Quick Action using Automator:
- Open Automator and create a new Quick Action.
- Set "Workflow receives current" to files or folders in Finder.
- Add a Run Shell Script action with:
echo "$@" | pbcopy - Set "Pass input" to as arguments.
- Save it with a name like "Copy Path".
It will appear in the right-click menu for any file, no Option key required.
Why You Keep Losing File Paths
Here is the real problem: you copy a file path, switch windows to paste it, and before you get there you copy something else. The path is gone.
macOS stores exactly one item on the clipboard at a time. The moment you copy anything — a URL, a snippet of text, an image — your file path is overwritten. For a full explanation of why this happens, see The Mac Clipboard Limit, Explained.
Keep Every Path You Copy with ClipHistory
ClipHistory is a macOS clipboard manager that solves this automatically. Every time you copy a file path — or anything else — it is saved to a searchable history. Nothing gets lost.
- Press Cmd+Shift+V to open the history panel.
- Search by filename or path fragment to find any previous copy.
- Pin paths you use repeatedly so they survive automatic cleanup.
- ClipHistory auto-detects clip types, so file paths are easy to scan at a glance.
The history holds the last 150 unpinned clips, plus unlimited pinned clips. Everything stays entirely on your Mac — no cloud, no account, no network requests.
If you find yourself copying and pasting paths repeatedly across projects, this alone makes it worth trying. Get ClipHistory — $19.99
Quick Reference: All Methods
| Method | Best for | Gives you |
|---|---|---|
| Option + right-click in Finder | Fast, everyday use | Full file path |
| Path Bar right-click | Folder navigation | Folder path |
| Get Info | Checking location | Folder path |
| Drag into Terminal | Terminal commands | Inline escaped path |
realpath in Terminal |
Scripting/automation | Absolute path |
| Automator Quick Action | Frequent use, no Option key | Full file path |
A Note on Path Formats
macOS paths use forward slashes and start from /. If you are copying a path to use in a Windows environment or a cross-platform tool, you may need to convert it. The POSIX paths macOS produces (e.g. /Users/yourname/Desktop/file.pdf) are the standard Unix format and work in Terminal, Python, shell scripts, and most developer tools without modification.
Spaces in paths are valid but can cause issues in Terminal if not quoted or escaped. When you drag a file into Terminal, macOS handles the escaping automatically. When you copy a path via Option+right-click and paste it into a Terminal command, wrap it in quotes to be safe.