Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Copy File Path Finder El Capitan: How-To

· 6 min read · Home Tech

In this article
  1. Why Copying a File Path Matters in El Capitan
  2. Method 1: Use “Copy as Pathname” (Quickest)
  3. Method 2: Use Get Info
  4. Method 3: Use Terminal (pwd and echo)
  5. How to Enable the Path Bar in Finder (El Capitan)
  6. Common Problems and Fixes
  7. What About Third-Party Tools?
  8. Frequently Asked Questions

If you are using OS X El Capitan (10.11) and want to copy a file’s full path, the quickest built-in way is to open the file’s Get Info window (Cmd+I) and copy the path from the “Where” field. For a more direct method, you can use the Finder’s context menu with the Option key held down, which changes “Copy” to “Copy as Pathname.” This article explains both methods, how to use Terminal, and what to do if the path is too long or hidden.

Why Copying a File Path Matters in El Capitan

Copying a file path is useful when you need to reference a file in a script, a terminal command, an application’s “open file” dialog, or when sharing a location with someone else. In El Capitan, the Finder does not show a file’s full path in the title bar by default (that feature was removed in earlier versions), so many users are unsure how to get it. The path is the string that starts with /Users/ or /Applications/ and lists every folder from the root of the drive down to the file itself.

Method 1: Use “Copy as Pathname” (Quickest)

This method uses the Finder’s built-in context menu, but the option is hidden unless you hold the Option key.

  1. Open Finder and navigate to the file or folder.
  2. Right-click (or Control-click) the item.
  3. Press and hold the Option key on your keyboard. The menu item “Copy” changes to Copy as Pathname.
  4. Click “Copy as Pathname.” The full path is now on your clipboard.
  5. Paste it anywhere (Cmd+V). It will appear as a plain text string like /Users/yourname/Documents/report.pdf.

This works in El Capitan and later versions. If you do not hold Option, you only get the file name, not the path.

Method 2: Use Get Info

If you prefer a visual method, the Get Info window shows the path in a copyable form.

  1. Select the file in Finder.
  2. Press Cmd+I to open the Get Info window.
  3. Look at the Where field under “General.” It shows the folder path (not including the file name).
  4. Select the text in the Where field, copy it (Cmd+C), then paste it and manually add the file name at the end.

For example, if the Where field shows /Users/yourname/Documents and the file is report.pdf, the full path is /Users/yourname/Documents/report.pdf. This method is accurate but requires adding the file name yourself.

Method 3: Use Terminal (pwd and echo)

If you are comfortable with the command line, Terminal gives you the exact path in one step.

  1. Open Terminal (in /Applications/Utilities/).
  2. Type cd followed by a space, then drag the file or folder into the Terminal window. This pastes the path automatically.
  3. Press Return. Now you are in that folder.
  4. Type pwd and press Return. Terminal prints the full path of the current folder.
  5. If you dragged a file, the path shown by pwd is the folder, not the file. To get the file’s path, type echo "$(pwd)/filename" (replace filename with the actual name).

A faster one-liner: in Terminal, type echo "$(cd "$(dirname "file")" && pwd)/$(basename "file")" but that requires typing the file name manually. The drag-and-drop method is simpler for most users.

How to Enable the Path Bar in Finder (El Capitan)

If you want to see the path at the bottom of every Finder window, you can turn on the Path Bar.

  1. Open a Finder window.
  2. Go to the View menu at the top of the screen.
  3. Select Show Path Bar. A thin bar appears at the bottom of the window showing the path of the current folder.
  4. Each folder name in the path bar is clickable—click one to jump to that folder.
  5. To copy the path from the Path Bar, right-click a folder name and choose “Copy as Pathname” (this also works in El Capitan).

This does not give you the file’s path directly, but it helps you navigate and copy folder paths quickly.

Common Problems and Fixes

Here are a few issues you might run into and how to solve them.

  • “Copy as Pathname” is grayed out or missing: Make sure you are holding the Option key before you right-click. If you right-click first and then press Option, the menu may not update.
  • The path contains spaces: When you paste the path into a terminal command, spaces will break the command. Wrap the path in quotes: cd "/Users/your name/Documents" or escape each space with a backslash.
  • You cannot see hidden files: By default, Finder hides files that start with a dot (like .bash_profile). Use Terminal to copy those paths, or use the shortcut Cmd+Shift+. (period) in El Capitan to toggle hidden files in Finder.
  • Path is too long to read: In Get Info, the Where field may truncate long paths. Click the small triangle next to “Where” to expand it, or use Terminal’s pwd which shows the full path without truncation.

What About Third-Party Tools?

Some users install utilities that add a “Copy Path” button to the Finder toolbar or context menu. These tools can be convenient, but they are not necessary because the built-in methods work well. If you prefer a graphical button, you can create a Finder toolbar shortcut using Automator (a built-in app) that runs a small shell script to copy the selected file’s path. This is a free, no-install solution.

To create an Automator service:

  1. Open Automator and choose “Service.”
  2. Set “Service receives selected” to “files or folders” in “Finder.”
  3. Add a “Run Shell Script” action.
  4. Set “Shell” to /bin/bash and “Pass input” to “as arguments.”
  5. Use this script: for f in "$@"; do echo "$f"; done | pbcopy
  6. Save it with a name like “Copy Path.” Now you can right-click any file and choose Services > Copy Path.

This is an advanced option, but it shows how you can customize El Capitan without third-party software.

Frequently Asked Questions

Does “Copy as Pathname” include the file name?

Yes. When you use “Copy as Pathname” on a file, the copied text includes the full path plus the file name. For a folder, it includes the folder’s path. It is a plain text string, not a file reference.

Why does the Finder not show the full path in the title bar?

Apple removed the ability to show the full path in the title bar starting with OS X Lion (10.7). El Capitan continues that design. The Path Bar (View > Show Path Bar) is the closest built-in alternative, or you can use the Option+right-click trick.

Can I copy a path for a file on an external drive?

Yes. The same methods work for files on external drives. The path will start with /Volumes/DriveName/ instead of /Users/. For example, /Volumes/Backup/Photos/img.jpg.

Is there a keyboard shortcut to copy the path?

There is no default keyboard shortcut that copies the path directly. You can create one using System Preferences > Keyboard > Shortcuts > App Shortcuts, and assign a shortcut to the menu item “Copy as Pathname” (but you still need to hold Option to make that menu item appear). Alternatively, use the Automator service method described above and assign a shortcut to the service.

What is the difference between a POSIX path and a Finder path?

In El Capitan, a POSIX path uses forward slashes and starts at the root: /Users/name/File.txt. A Finder path uses colons and starts with the drive name: Macintosh HD:Users:name:File.txt. The methods in this article give you the POSIX path, which is what most applications and Terminal expect.

Why would I need the path instead of just dragging the file into an app?

Dragging a file into a Terminal window pastes the path automatically, which is handy. But if you need to write a script, a configuration file, or a command that references the file multiple times, having the path as text is essential. Copying the path also lets you share it in an email or chat message.