2

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.

marked as duplicate by Lri, nohillside, 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 – Alexander Jul 28 '12 at 19:56
  • @XAleXOwnZX Yes, I would like to hear it then :) – Anonymous Jul 28 '12 at 19:59
  • 1
    Try Go2Shell to open the current Finder window in Terminal :) – Caesium Jul 28 '12 at 20:21
  • 2
    Also check out DTerm. – jtbandes Jul 28 '12 at 20:22
  • 1
    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
0

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.

3

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

  • 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 – Alexander Jul 28 '12 at 20:39
0

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)

Not the answer you're looking for? Browse other questions tagged .