How to copy file path on a mac?

22,234

Solution 1

I can do one better: Drag the file itself into the File Open dialog of your application, and the dialog will jump to that folder, with that file highlighted, ready for you to click Open. :)

You can also right-click (hold Control and left-click, or better yet, open the Mouse pane of System Preferences and enable "Secondary Click" for your right mouse button) on the file in Finder, and click Open or Open With.

Some more helpful links:

http://support.apple.com/kb/HT2512

http://support.apple.com/kb/HT2514

http://www.apple.com/support/switch101/

Solution 2

I use Default Folder extensively, and if you have the Finder window open you can simply click it and it moves to that folder.

You can also "Get Info" (Apple + I) and under "Where:" you will see the parent folder path, which you can copy and then append the folder name to it.

Solution 3

Here's a great Automator script: http://dmevolve.com/2011/11/copying-file-paths-in-mac-os-x/

Solution 4

In the finder, CMD+C usually just copies the "name" of the file..

If, however, after copying the file in the Finder normally, you switch to /Applications/Utilities/Terminal.app, and paste,_ aka_ CMD+V, it will display the full directory Path… which you can then, more substantially… copy and Paste… In this example, I am currently in the global Folder in Terminal, and then copied index.php in the Finder and then pasted, while in the Terminal…

# localadmin@dns: /Web/global >  11:42:33  :-(  
/Volumes/+10RAID2000/index.php

It's also worth noting that the über-Finder-replacement, TotalFinder adds some nice options to the Finder's contextual menus in regards to Path Copying….

total finder menus Cheers.

Edit for those of you unwilling or unlikely to use total finder, etc. there's another nice option called PathSnagger, which runs as a System service and is accessible under a contextual menu.

enter image description here

Solution 5

I've used FastScripts to assign this script to ⌃C:

activate application "SystemUIServer" -- http://www.openradar.me/9406282
activate application "Finder"
set l to {}
tell application "Finder" to repeat with f in (get selection)
    set end of l to POSIX path of (f as alias)
end repeat
set text item delimiters to linefeed
set the clipboard to (l as text)
Share:
22,234
gardenofwine
Author by

gardenofwine

Updated on September 17, 2022

Comments

  • gardenofwine
    gardenofwine over 1 year

    Windows refugee here. On Windows you can easily copy the path and paste it elsewhere to get to the directory.

    Here is the situation on the Mac. I am in the Finder 20 folders down and I see the file I want. I go to my application and want to open it, so I pick Open Document from the File menu. However, it is exceedingly difficult and time-consuming to get to the place I want.

    Is there a way to copy the path in the finder and paste it in the File Open dialog of my application?

  • Alex
    Alex about 14 years
    @fideli: Unnecessary perhaps, but it was a response to the "Windows refugee here" portion of the submitted question, so it's on-topic. :)
  • Alex
    Alex about 14 years
    @AngryHacker: If this solves your issue (or comes closest), please mark this answer as accepted. Thanks!