Problem/Solution

How to Copy File Paths to Clipboard on Mac

Need to copy a file path on Mac? Here are four ways to do it — from Option+right-click to Terminal — plus how to keep file paths in your clipboard history.

How to Copy File Paths to Clipboard on Mac
Problem/Solution | | 3 min read

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:

Step by step

Copy file path with Option + right-click

  1. Find the file or folder in Finder
  2. Hold the Option (⌥) key
  3. Right-click (or Control-click) the file
  4. Select “Copy as Pathname” from the context menu
  5. 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.

Solution

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.

Next step

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.

Download QuietClip Free

Frequently asked questions

What is the shortcut to copy a file path on Mac?
Select a file in Finder, hold Option, right-click, and choose 'Copy as Pathname.' This copies the full file path (e.g., /Users/name/Documents/file.txt) to your clipboard.
How do I copy the current folder path in Terminal?
Type 'pwd' and press Enter to display the current directory. Then select the path text and copy with ⌘C. Or use 'pwd | pbcopy' to copy it directly to the clipboard.
Can I keep a history of file paths I've copied?
Yes, with a clipboard manager like QuietClip. Every file path you copy is saved in your history and searchable later. QuietClip is free for 25 items, $8.99 once for Pro.

Try QuietClip free

A privacy-first clipboard manager for macOS. Your data stays on your device, always.

Download for macOS

Related reads