by jlturner · 6y ago · 0 comments
Dragging and dropping files from the finder into an file selector window (ie. Open File in most programs) will navigate to that file and select it. As others mentioned this works in terminal as well to give you a path, but actually this generally works in any text box (unless it specifically handles paths being drag ‘n dropped). This also works with multiple files / multi file selection, and in the case of inserting the path as text, they are space delimited and auto quoted (convenient for shell use).
Edit: This icon can include the one at the top of a finder window (the window title). That’s actually interactable and can be dragged and dropped for the directory itself.
I'll add that if you want the path of a file and the destination application doesn't support drag 'n' drop, right click on a file in finder, then hold the Option key and you'll see the copy command changes from "Copy" to "Copy as Pathname".
You can also drag a file or folder's icon from a Finder window title bar.
When it doesn't work, that's a good indication of a program that's using Electron, Carbon, some old framework, or poorly maintained.
Adobe and Audacity are both guilty of this.
Hit it once, start dragging, then hit it again to bring back your apps to drop into.