You need to paste a file path — into Terminal, into a config file, into a Slack message. You know the file is somewhere in Documents, but typing out the full path from memory is error-prone and slow. macOS hides file paths behind a visual interface, but there are several quick ways to copy them.
Option + right-click method
The fastest way to copy a file path in Finder:
Copy file path with Option + right-click
- Find the file or folder in Finder
- Hold the Option (⌥) key
- Right-click (or Control-click) the file
- Select “Copy as Pathname” from the context menu
- The full path is now on your clipboard — paste with ⌘V
Without holding Option, this menu item doesn’t appear. It’s one of macOS’s best-hidden features. The resulting path looks like /Users/yourname/Documents/Projects/file.txt.
Terminal methods
If you’re already working in Terminal, there are several ways to get file paths:
Print working directory. Type pwd to see the current directory. Select the output and copy with ⌘C, or pipe it directly to the clipboard:
pwd | pbcopy
Get the path of any file. Use realpath or construct the path manually:
realpath ~/Documents/myfile.txt | pbcopy
Get Info shortcut. Select a file in Finder and press ⌘I to open Get Info. The “Where” field shows the file’s directory. You can select and copy this text, though it uses a display format rather than a raw path.
Drag to Terminal
You can drag any file or folder from Finder directly into a Terminal window. macOS automatically inserts the full, properly-escaped file path at the cursor position.
This is especially useful for paths with spaces or special characters, since macOS handles the escaping for you. After the path appears in Terminal, you can select it and copy with ⌘C, or use it directly in a command.
Dragging a file from Finder to Terminal is the most reliable way to get a perfectly-escaped file path — no manual typing, no guessing at special characters.
Keeping file paths in clipboard history
File paths are one of those things you copy once and need again later — the same project directory, the same config file, the same log location. Without clipboard history, you have to navigate to the file and copy the path again each time.
QuietClip saves every file path you copy to your clipboard history. Need that project directory you navigated to yesterday? Press ⌘⇧V, search for part of the path, and paste. No re-navigating, no retyping. Free for 25 items, $8.99 once for Pro.
For developers and system administrators who work with file paths constantly, pinning your most-used paths in QuietClip is especially valuable. Pin your project root, your config directory, your log file location — and they’re always one shortcut away.
QuietClip runs on macOS 14+, uses under 5 MB, and stores everything locally with zero network access.
Keep every file path you copy.
QuietClip saves file paths, commands, and text to a searchable clipboard history. Pin your most-used paths for instant access. Free to start, $8.99 once for Pro.