Saturday, October 11, 2008

Copy paths from the Finder

Need to copy a path to give someone instructions or tell them where to put something? Here are some ways to do it.

Macworld | Mac OS X Hints | Copy paths from Finder selections:

First, you can use the Services menu. In both 10.4 and 10.5, the Services menu works in the Finder. With the object whose path you’d like to capture selected in the Finder, choose Finder -> Services -> TextEdit -> New Window from Selection. A new TextEdit window will appear containing the full path to the selected item. Press Command-A to select it all, then Command-C to place it on the clipboard.

Another option is dragging the object from the Finder and dropping it into a TextEdit window (or a Terminal window). This will only work if your TextEdit document is in plain text mode—if you use rich text mode and drag in something TextEdit can open, such as a JPEG image file, the file will be opened. But with TextEdit set to plain text mode, you’ll instead see the path to the file or folder. Again, just select it and copy it to the clipboard, and you’re done. (Some third-party text editors support this feature as well; it works with Smultron on my machine, for instance.)

You can also copy any item (file or folder) in the Finder and paste it into Terminal. You’ll see the path on the command line; you can then select it with the mouse and copy it. You can also press Command-Space, then drag-and-drop the file into the Spotlight search box. Finally, you can drag a Finder window’s proxy icon—the small icon in the title bar of the window—into TextEdit (again, in plain text mode) to see the path to that folder. Select the path and copy it to your clipboard.

No comments: