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.

Quick answer

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.

1

Open Finder and navigate to the file or folder you want the path for.

2

Hold the Option (⌥) key on your keyboard.

3

While holding Option, right-click (or Control-click) the file.

4

Look for the "Copy [filename] as Pathname" option in the context menu. It only appears when you hold Option before right-clicking.

5

Click it. The full path (e.g., /Users/alex/Documents/report.pdf) is now on your clipboard.

Common mistake

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

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.

1

Open Terminal (or iTerm2, Warp, Ghostty, etc.).

2

Type a command that takes a file path — for example: cd or open (with a trailing space).

3

Drag a file or folder from Finder directly into the Terminal window. The path is inserted automatically, with spaces escaped.

# Example: drag a folder into Terminal after typing "cd "
$ cd /Users/alex/Projects/my\ app/src

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.

1

Select the file in Finder and press ⌘ + I (or right-click → Get Info).

2

Look at the "Where:" field. This shows the folder path.

3

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.

1

In Finder, go to View → Show Path Bar (or press ⌥ + ⌘ + P). The path bar appears at the bottom of the Finder window.

2

Right-click any folder in the path bar — you'll see options including "Copy [folder name] as Pathname" (no Option key needed here).

Tip

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:

# Copy current directory to clipboard
$ pwd | pbcopy

# Copy a specific file's path to clipboard
$ echo "$(pwd)/filename.txt" | pbcopy

# Get the absolute path of any file
$ realpath ~/Documents/report.pdf | 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:

# Navigate to your file's directory first
$ cd /Users/alex/projects/app/src/components

# Get the repo root
$ git rev-parse --show-toplevel
/Users/alex/projects/app

# Manually compute the relative path...
# Or use git ls-files with a grep
$ git ls-files --full-name Button.tsx
src/components/Button.tsx

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.

Pathly showing Copy Path options in Finder's right-click context menu

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:

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.99

Method 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:

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:

1

Download Pathly from the Mac App Store ($4.99 one-time, no subscription).

2

Open System Settings → Privacy & Security → Extensions → Finder Extensions.

3

Toggle Pathly on. You may need to relaunch Finder (hold Option and right-click the Finder icon in the Dock → Relaunch).

4

Right-click any file in Finder. You'll see the Pathly copy options in the context menu.

5

(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.