How to copy a file path as text on macOS
You can do this with Paste My. Copying a file records the plain text of its path alongside the file itself, so the version you need is already there.
Copying a file in the Finder gives you a file. Paste it into another folder and you get a copy of the file, which is usually what you wanted.
Sometimes it is not. Sometimes you want the path — the text of where the file lives — to drop into a terminal, a note, a message to a colleague, or a config file. And the file on your clipboard is no help at all, because pasting it produces a file.
The fix is that both are recorded. When you copy files, the plain text of their paths is kept alongside them, so you can take whichever one the situation needs.
Get the path as text
Copy the file in the Finder
Select it and press ⌘C. Nothing unusual — this is the ordinary Finder copy you have always done.
Two things are recorded from it: the file, and the plain text of its path.
Press ⇧⌘V
The clipping is at the top of your history, carrying the file badge and the app you copied it in.
Select it to see what it holds.
Your history, newest at the top. The sources list is on the left; each entry carries a badge for the kind of thing it is. Copy the path as text
The clipping's details include the list of file paths, ready to copy as text.
Take that and paste it wherever text was what you needed — a terminal, a note, a message. It arrives as characters, not as a file.
Copy several files at once and you get several paths, which is the quickest way to produce a list of locations without typing any of them.
Turn paths back into files
The reverse works too. If somebody sends you path text, ⌥⇧⌘F turns it into real file objects on the clipboard — the kind the Finder accepts.
So a list of locations pasted into a message can become the files themselves, without you navigating to each one.
Which one do you actually want?
The distinction matters more than it first appears, because the two behave completely differently at the far end.
- The file is the thing itself. Paste it into a folder and you get a copy. Attach it to an email and the email carries it. It is stored with a saved copy you can export back out to disk later.
- The path is text describing where the file is. Paste it into a terminal and you get a location. Send it to somebody on another Mac and it is only useful if they have the same file in the same place.
A useful habit: if it is going to a person, send the file. If it is going to a command line or a configuration, send the path.
Files that need your permission before they can be kept go through a short grant-access step, so a copied file is genuinely available later rather than a reference that has gone stale.
The clipboard conversions
Two of the four clipboard shortcuts are directly relevant here.
| Shortcut | What it does |
|---|---|
| ⇧⌘C | Re-copy whatever is on the clipboard as plain text |
| ⌥⇧⌘F | Turn copied path text into real files |
The first turns path text into files. The second strips styling, which is worth knowing because a path copied out of a styled document often arrives wearing that document's font.
Finding a file clipping again later
File clippings are the ones most likely to be wanted weeks after the fact, and there are three ways to get back to one.
- Filter to files. Search
type:file, or set the kind filter to Files, and everything else drops out. - Filter by the app. The source-app filter lists every app you have ever copied from, so you can narrow to what came out of the Finder.
- Filter by when. Today, yesterday, the last 7 days, the last 30, or a range you pick — usually the fastest cut when you remember the day but not the name.
If it is a file you go back to repeatedly, ⌘P pins it to the top of every view, where nothing can bury it.
If the path is not what you need
You pasted and got a file, not text
You took the file rather than the path. Both are in the clipping — open it and copy the path from its list of paths instead.
The path arrived with formatting on it
That happens when a path has been through a styled document on the way. ⇧⌘C re-copies whatever is on the clipboard as plain text, which makes it safe to paste into a terminal.
The path no longer points anywhere
A path is a description of a location, so moving or renaming the file makes it stale. The file copy stored with the clipping is the durable half — it can be exported back out to disk even if the original has moved.
Questions people ask
Do I have to do anything to get the path recorded?
No. Copying files records the plain text of their paths automatically, so both are already there when you go looking.
Can I copy the paths of several files at once?
Yes. Copy them together in the Finder and you get the list of paths, which saves typing out a set of locations by hand.
Can I turn a list of paths back into files?
Yes — ⌥⇧⌘F turns path text on the clipboard into real file objects the Finder will accept.
Is the file itself kept, or just a reference?
A copy is saved with the clipping, and you can export it back out to disk later. Files that need your permission first go through a short grant-access step.
Does this work for folders?
Copying in the Finder is copying in the Finder — what you copy is what is recorded, along with the plain text of where it lives.
Will a very large file be kept in full?
There is a per-item size limit you can set. Anything larger is still listed so you know it happened, with its full content left out.
Can I export the file back out to disk?
Yes. A copy is saved with the clipping and can be exported back out later, which is what makes a file clipping useful long after the original moved.
Get Paste My
Free on the Mac App Store. Everything you copy, kept on your Mac and ready the instant you need it again.