Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Copying the current directory's path to the clipboard

Is there a way to copy to clipboard the current directory I'm at? (I'm running ML).

EDIT: There is an option to simply drag the file/folder from Finder to the Terminal and it will automatically enter the path name.

share|improve this question

marked as duplicate by user495470, patrix, daviesgeek, CajunLuke, bmike Aug 16 '12 at 15:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Is this in order to open the path in terminal? I have a more elegant solution if that is the case – AMomchilov Jul 28 '12 at 19:56
@XAleXOwnZX Yes, I would like to hear it then :) – Anonymous Jul 28 '12 at 19:59
Try Go2Shell to open the current Finder window in Terminal :) – Caesium Jul 28 '12 at 20:21
Also check out DTerm. – jtbandes Jul 28 '12 at 20:22
It automatically detects the current folder. You can just type a command and either press enter to run it, or command+enter to run it in Terminal. If you just press cmd+enter without typing a command it will open Terminal there. – jtbandes Jul 28 '12 at 21:55
up vote 0 down vote accepted

I recommend DTerm, which gives you a hovering command prompt. It can automatically detect the current folder you're in (in Finder, or any document-based app). You can press return to run a command in the DTerm window, or +return to open a Terminal window.

share|improve this answer

There is a service to open a selected folder in terminal, which can be enabled from System preferences > Keyboard > Keyboard Shortcuts > Services.enter image description here It can either be assigned a keyboard shortcut, or be launched from the services menu: enter image description here

share|improve this answer
That looks good however, after applying the change this option doesn't appear in Finder->Services->New Terminal At Folder – Anonymous Jul 28 '12 at 20:34
It opens the folder you have SELECTED. There are third party services people made with automator that open at the current location – AMomchilov Jul 28 '12 at 20:39
Oh, that's cool! now it works. Thanks! :-) – Anonymous Jul 28 '12 at 20:46

Copy the path of the folder shown on the title bar:

tell application "Finder"
    set the clipboard to POSIX path of (insertion location as alias)
end tell

Copy the paths of selected items:

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|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.