3

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.

Anonymous
  • 2,756
  • 6
  • 34
  • 41

3 Answers3

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

Alexander
  • 8,363
  • 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

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.

jtbandes
  • 11,074
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)
Lri
  • 105,117