If you've ever tried to copy a file path on Mac, you've probably discovered that macOS doesn't make it obvious. There's no big button labeled "Copy Path", and the right-click menu doesn't show it by default. That said, there are several ways to do it — some quick, some clunky — and the best method depends on what you actually need.
In this guide, I'll walk through every method available in 2026, from the built-in macOS option to third-party tools, so you can find the one that fits your workflow.
Hold Option, right-click any file in Finder, and choose "Copy [filename] as Pathname". That's the native way. If you need more formats (filename, directory, git path) or don't want to remember the Option key, Pathly adds all five to a standard right-click.
Method 1: Option + Right-Click in Finder (Native macOS)
This is the built-in macOS method for copying a file's absolute path. It works on every Mac running macOS 10.14 or later — no extra software needed.
Open Finder and navigate to the file or folder you want the path for.
Hold the Option (⌥) key on your keyboard.
While holding Option, right-click (or Control-click) the file.
Look for the "Copy [filename] as Pathname" option in the context menu. It only appears when you hold Option before right-clicking.
Click it. The full path (e.g., /Users/alex/Documents/report.pdf) is now on your clipboard.
If you right-click first and then press Option, the menu won't transform — you'll see the normal options without "Copy as Pathname". You must hold Option before the right-click.
Limitations of the native method
- You must remember to hold Option before clicking — easy to forget
- Only copies the full absolute path — no filename-only, no directory, no file:// URL
- No way to get a git-relative path — useful for developers referencing files in PRs or commit messages
- Doesn't work if you right-click the Desktop (you have to navigate into the folder)
Best for: Occasional use when you just need a full path and don't want to install anything extra.
Method 2: Drag a File into Terminal
If you already have a Terminal window open, this is the fastest way to get a file's path into the terminal without copying it separately.
Open Terminal (or iTerm2, Warp, Ghostty, etc.).
Type a command that takes a file path — for example: cd or open (with a trailing space).
Drag a file or folder from Finder directly into the Terminal window. The path is inserted automatically, with spaces escaped.
This method doesn't put the path on your clipboard — it inserts it directly into the command line. That's great for terminal use but useless if you need to paste the path somewhere else (Slack, a config file, a PR description).
Best for: Terminal power users who want to cd into a folder or use a file in a command without leaving the keyboard.
Method 3: Get Info Window
The Get Info window shows a file's location (its directory path), though not the full path including the filename. It's mostly useful for seeing where a file lives rather than copying its path.
Select the file in Finder and press ⌘ + I (or right-click → Get Info).
Look at the "Where:" field. This shows the folder path.
You can't directly click to copy it — you'd need to select the text manually or use the Option + right-click method described above.
Best for: Visually confirming where a file lives. Not practical for actually copying the path.
Method 4: Finder's Path Bar
Finder has a built-in path bar that shows your current location. You can right-click any folder in this bar to copy its path.
In Finder, go to View → Show Path Bar (or press ⌥ + ⌘ + P). The path bar appears at the bottom of the Finder window.
Right-click any folder in the path bar — you'll see options including "Copy [folder name] as Pathname" (no Option key needed here).
The path bar right-click is one of the few native macOS places where you can copy a path without holding Option. It only gives you folder paths though — not the path to the selected file.
Best for: Quickly copying a directory path when you already have the Finder path bar visible.
Method 5: Terminal — Print Working Directory
If you're already in Terminal and want to copy the current directory path to your clipboard, you can combine pwd with pbcopy:
After running these commands, the path is on your clipboard ready to paste anywhere. The pbcopy command is macOS-specific and works in bash, zsh, and fish.
Best for: Developers who spend a lot of time in Terminal and want to script or automate path copying.
Method 6: Copy Git-Relative Path (for developers)
If you're working with a Git repository and need the path relative to the repo root — like src/components/Button.tsx instead of /Users/alex/projects/app/src/components/Button.tsx — the native macOS methods don't help you.
You'd typically do this in Terminal:
That's a lot of steps. Pathly's "Copy Git Path" does all of this automatically — right-click the file in Finder, choose "Copy Git Path", and you're done in one click.
Method 7: Pathly — One Right-Click, Five Formats
Pathly is a macOS Finder Extension that adds five copy path actions directly to Finder's right-click menu — no modifier key, no Terminal, no extra steps.
After installing from the Mac App Store and enabling the Finder Extension in System Settings, you'll see these options when you right-click any file or folder:
- Copy Path — the full absolute POSIX path:
/Users/alex/Documents/report.pdf - Copy Filename — just the filename with extension:
report.pdf - Copy Directory — the parent folder:
/Users/alex/Documents - Copy as URL — a
file://URL:file:///Users/alex/Documents/report.pdf - Copy Git Path — the path relative to your Git repo root:
src/utils/report.pdf
You can enable or disable any of these from the Pathly preferences window, so only the formats you actually use appear in your menu.
Try Pathly free — then get all five path formats in one right-click, forever.
Get Pathly — $4.99Method Comparison: Which is Fastest?
Here's a side-by-side comparison of all methods for the most common tasks:
| Method | Full Path | Filename Only | Directory | Git-Relative | Speed |
|---|---|---|---|---|---|
| Option + right-click (native) | ⚠ With modifier | ✕ | ✕ | ✕ | Medium |
| Drag into Terminal | ⚠ Terminal only | ✕ | ✓ | ✕ | Medium |
| Finder path bar right-click | ✕ | ✕ | ✓ | ✕ | Slow |
Terminal pwd | pbcopy |
✓ | ⚠ With script | ✓ | ⚠ With script | Medium |
| Pathly (right-click) | ✓ | ✓ | ✓ | ✓ | Fastest |
Which Method Should You Use?
Here's a quick decision guide based on your situation:
- You need a full path occasionally, no extra software: Option + right-click (native). Fast enough for occasional use.
- You're already in Terminal: Drag the file from Finder into the terminal window, or use
realpath filename | pbcopy. - You're a developer who needs paths daily — full path, git-relative path, filenames — from Finder without touching Terminal: Pathly is the most efficient option.
- You need just the directory path from the path bar: Enable Finder's path bar (⌥ + ⌘ + P) and right-click there.
For most developers and power Mac users, the combination of needing different path formats many times a day makes Pathly's $4.99 one-time cost pay off within the first hour of use.
Setting Up Pathly: Step-by-Step
If you want to try Pathly, here's how to get it running in under two minutes:
Download Pathly from the Mac App Store ($4.99 one-time, no subscription).
Open System Settings → Privacy & Security → Extensions → Finder Extensions.
Toggle Pathly on. You may need to relaunch Finder (hold Option and right-click the Finder icon in the Dock → Relaunch).
Right-click any file in Finder. You'll see the Pathly copy options in the context menu.
(Optional) Open the Pathly app to enable or disable specific copy actions. Keep only what you need.
Frequently Asked Questions
What is the quickest way to copy a file path on Mac?
The quickest native method is to hold Option, right-click the file in Finder, and choose "Copy [filename] as Pathname". If you have Pathly installed, it's even faster: just right-click the file and choose "Copy Path" — no modifier key needed.
How do I copy a file path in Terminal on Mac?
Use pwd to print the current directory, or realpath [filename] | pbcopy to copy a specific file's full path to the clipboard. You can also drag a file from Finder into the Terminal window to insert its path directly into the command line.
How do I copy a folder path on Mac?
Hold Option, right-click the folder in Finder, and choose "Copy [folder name] as Pathname". Or with Pathly, right-click the folder and choose "Copy Path" for the folder's full path, or "Copy Directory" to get the path of the folder containing the selected item.
Can I copy just the filename without the full path on Mac?
Not with native macOS tools — the built-in "Copy as Pathname" always includes the full path. Pathly adds a "Copy Filename" option that copies only the filename (with extension), no path prefix.
How do I get the git-relative path of a file on Mac?
In Terminal: git ls-files --full-name [filename] from inside the repo. With Pathly, right-click the file in Finder and choose "Copy Git Path" — it automatically detects the nearest .git folder and returns the relative path.