How to copy a file's path on a Mac
Sooner or later you need the full path to a file as text. Maybe a command wants it, maybe you are pasting it into a config file, maybe you are telling a colleague exactly where something lives. The file is right there in front of you, but turning its location into a string you can paste is one of those small tasks the Mac makes slightly harder than it should.
There is no single button labelled “copy path”, so people invent their own routines and stick with the first one that works. Here are the reliable ways to do it, and the situations each one suits.
The right-click and Option trick
This is the fastest built-in method, and most people never find it because it hides behind a modifier key.
Select the file in Finder and right-click it to bring up the context menu. You will see “Copy” near the top. Now hold down the Option key. That “Copy” changes to “Copy as Pathname”. Click it, and the full path lands on your clipboard as plain text, ready to paste anywhere.
It works on folders too, and on more than one item at a time. Select several files, hold Option, and “Copy as Pathname” gives you every path, one per line. The only thing to remember is that the menu item is invisible until Option is down, so if you have never held the key while that menu is open, you have never seen the option exist.
Get Info and the menu bar route
If you would rather read the path before you copy it, Get Info shows you the whole thing.
Select the file and press Command-I, or right-click and choose Get Info. Near the top, under “General”, there is a “Where” line that spells out the folder path. You can select that text and copy it, though note it gives you the folder rather than the full path to the file itself, so you may need to add the file name on the end.
There is also a keyboard route worth knowing. Copy the file normally with Command-C, then the same “Copy as Pathname” behaviour is available by holding Option in the Edit menu at the top of the screen while Finder is active. It is the same result as the right-click trick, reached a different way, which is handy when your hands are already on the keyboard.
Dragging into a terminal
The terminal has its own shortcut that skips the clipboard entirely.
Open a terminal window and drag any file or folder from Finder straight onto it. The moment you drop, the terminal writes out the full path for you, correctly escaped so spaces and odd characters do not break the command. This is the quickest way to feed a path to a command you are in the middle of typing, because you never leave the terminal and never touch the copy step.
The catch is that it only helps when the terminal is already open and waiting. If you just want the path on your clipboard to paste elsewhere, dragging into a terminal is a detour. And if the Finder window and the terminal are both buried under other windows, lining them up so you can drag between them is its own small chore.
When the same file goes to several places
The methods above each solve one case. The friction shows up when the same file needs to go to different places in different forms. The terminal wants a path. A chat message wants the file uploaded. A folder wants the file moved. You end up copying the path one way, then going back for the file another way, then doing it a third way for the next destination.
This is the gap Ledge is built for. You drag a file up to the notch, or to the top centre of the screen on a Mac without one, and it waits on a shelf. When you drag it back off, each destination gets the representation it can use. Drop it on a terminal and Ledge hands over the path as text, the same string you would have copied by hand. Drop the same file on a chat app and it uploads. Drop it on a Finder window and it moves the file. You copied nothing and chose no format; the shelf worked out what each place needed.
Pasting a path into a terminal is a common enough job that Ledge can type it in for you when you drop there, using the Accessibility permission macOS asks for only the first time you need it, never at launch. For the plain “I just want the string” case, the right-click and Option trick is still the fastest thing on the Mac. For the case where one file is heading to three different apps, letting a shelf handle the format saves you from doing the same errand three ways.
Which method to reach for
Keep it simple. If you want the path on your clipboard, right-click, hold Option, and choose “Copy as Pathname”. If you are already in a terminal, drag the file onto the window and let it write the path for you. If you want to read the location first, Get Info shows you where the file lives. And if one file keeps going to several apps in several forms, a shelf that rewrites the hand-off for each one is less work than juggling the methods above by hand.