Knowing where you are in Leopard's Finder

It's happened to me many times; I'm deep into the folder structure of one of my hard drives and I lose track of where I am. Sometimes I will double click on a folder name to make it the primary view but then I lose context.

While the Show Path Bar option in the Finder is helpful it's a little too verbose for me. It displays each of the folder icons as well as the folder names. I just want a quick path to the folder I'm looking at.

It turns out there is a Finder setting that you can use to display the full path of your current view in the title bar of the Finder window.

Open a terminal session and enter the following:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Once that command has been executed you will need to relaunch the Finder for the change to take effect. You can do this by holding down the Option key and then right-clicking the Finder in the Dock bar then selecting the Relaunch option.

Coming from the Windows world I always liked to have my complete path accessible in the Explorer window - this gives me that same effect. I really wish that the path it displays in the title bar was "copyable" to the clipboard, though it is not. On to the second short tip:

Copying the Path to the Clipboard
The second thing I needed was the ability to get access to the path so that I could copy it to the clipboard easily - usually because I'm sending a reference to the path to someone else on my network or creating a script file to manage something in a specific location.

I know there are several ways of doing this but the one that seems to work best for me is to have the file or folder selected in the Finder and then choose the menu Finder / Services / TextEdit / New Window Containing Selection. This will pop up TextEdit with the entire path to whatever you have selected in the editing area.

If you know of a better way to get access to that file path quickly just drop it into the comments below. As Ross Perot would say, I'm all ears.

Comments

Anonymous said…
Dragging a file or folder from a Finder window to an application that accepts text usually causes the full pathname to be inserted. It definitely works in Terminal and Automator. Selections of multiple files sometimes work, depending if it makes sense to the receiving app.

However, in TextWrangler, I have seen this attempt to insert a folder path result in the insertion of the entire tree structure of the contents of the folder. I don't know if other apps behave this way.
Anonymous said…
You can't necessarily copy it to the clipboard but you can always click on the icon at the top of the Finder window holding down the Apple/Command key and it will give you the path to where you are. This actually works in a ton of applications which is helpful when you don't know where that file in a program is really saved at. You can also drag the icon at the top of the window into something like Text Edit for the same effect as your second trick.
Anonymous said…
You can get Finder to display the full path in it's title bar, like this - http://i27.tinypic.com/2ef5ipu.png then it's always to hand.
David Alison said…
@Robin: Sorry, I'm missing something. Is there a way to do that other than the terminal mod I described?
Chris Howard said…
Dave, the little icon in the title bar is called a proxy icon, and they are actually quite useful. I saw a good tutorial on them once, but can't find it now (which is exactly why I've seen the light on del.icio.us).

The best though I could turn up was a little piece by TUAW. http://www.tuaw.com/2007/05/04/mac-101-dragging-and-dropping-from-the-title-bar/
Anonymous said…
To know where I am, I cmd click top of finder window, the little icon. If I need to copy the path I use a contextual menu plugin: FilePathCM 1.0.7, works perfect, but its 10$ so today I was looking for free alternatives. Have not tried them yet but came up with these two: FilePathToClipCMPlugin 2.1, FileUtilsCM 1.7.3.
Anonymous said…
"Thee second thing I needed was the ability to get access to the path so that I could copy it to the clipboard easily - usually because I'm sending a reference to the path to someone else on my network ..."

As the first commentor points out, you can drag-and-drop a file or directory into an open Terminal window, and that causes the path to be automatically completed in that Terminal window. You could then copy and paste from the Terminal window to send the message to the other person.

(Note, that second step doesn't have to be with the mouse. Even Command + C works (which underlines the wisdom in not using a traditional Unix keyboard shortcut (Control + C) for GUI purposes as well, like MS/the PC-OEMs do.)

The nice thing about doing it that way is that the spaces get escaped -- e.g.:

~/Library/Application\ Support/NetNewsWire/Scripts

They don't if you choose "New Window Containing Selection" from the TextEdit entry in the Services menu.
Chris Howard said…
BTW Dave, you need to get something like Onyx, which has all these sorts of hacks built in.
David Alison said…
@All: thanks for the great tips - very helpful!

I love the drag and drop into a terminal window. Funny thing though - If I copy (Command-C) a file in the finder and then switch to a terminal window it pastes the entire path, though if I paste it into a text editor it only pastes the file name.
Anonymous said…
@David - Yes (sorry for my lack of explanation). Onyx is a free Mac utility which will allow you to 'tweak' Finder as Chris alluded to. One such tweak is to 'Show the path in the window title'.

These tweaks are simple tick-boxes and are completely reversible.
Anonymous said…
If you hold down the Control Key, and click on the Name of the Window you are in... it will show its path and allow you to navigate from there.

os11
Anonymous said…
You can get some useful tips from MacOSXHints (read also the comments!):

http://www.macosxhints.com/article.php?story=20070416161655621

Apple Script and Automator are perfect tools to get this task done.
Pecos Bill said…
David said "...switch to a terminal window it pastes the entire path, though if I paste it into a text editor it only pastes the file name."

Yup. The default is just the filename as it has been since day one (and only the filename then). Since the terminal was added, they must have decided rightly that it was more valuable to have a full path. I like keeping my clipboard cleaner so I lean towards drag & drop.

Don't forget that command clicking on the title bar of an open/save dialog will always work, too. I'm not sure anon was clear.
As a small point of interest, dragging a file from the browser to the terminal has given this behaviour ever since the NeXTStep days.

I also used Pathfinder for a while: http://www.cocoatech.com/

It's got a lot of really nice stuff in it, actually. I'm cheap, though, so I'm waiting for it to come up in Macheist or something before I buy it again. :)
Chris Howard said…
wow! I just learnt a nifty trick in Safari! If you right-click (control-click) on its title, it shows you a drop down list progressively striped of each element of the pathname of webpage you're on, right back to just the domain.

Confused? Just try it! :)

This is going to become my new favorite timesaver.
Julian said…
I just use ctrl-option-p to copy the path of any selected folder or file straight to the clipboard.

Ok, to set that up you need to install 2 free utilities:

OMCEdit and Shortcuts.

http://www.abracode.com/free/cmworkshop/

This combination lets you hook up any unix command (or applescript, or just about anything else) to a keyboard shortcut.

J
Anonymous said…
Great tip. Your blog has been a great source of tips for me recently. And one related wish list item for this post - I wish I could also display the full path inside the save/save as/open dialogue boxes for all applications. I figure that it's an application-specific thing, but wouldn't it be great to have that universally available? I wouldn't mistakenly save files in the wrong locations as often as I do.
Anonymous said…
For those of you who don't mind spending a few bucks for piece of mind. The program MacPilot lets you do modifications to programs like the one in this post without having to use Terminal.

It's a new feature of MacPilot and they took a page from the preferences pane "Secrets".

In fact, I was able to turn on the posix change via MacPilot. So, if you are looking for a "safer" way to make adjustments to your OS X and applications, check out MacPilot.
Anonymous said…
Thank you David for the recommendation above, an additional useful method I've come across is to use an Applescript that can be invoked in various ways (directly run it, access it through a key combination, etc)

See this link below for further information: http://macdevelopertips.com/applescript/copy-finder-path-to-clipboard-tip-2.html
Cyrille said…
maybe my comment is irrelevant here but I am looking for a good tutorial on the finder which is the app that drives me crazy one mac (Im a recent switcher too).

I think managing files is really a pain ... I miss the explorer view of windows, where you can quickly switch from one folder to the other.

I also dont like the fact that when overwriting a folder it just replaces the whole content (and not merging it).

Thanks for this blog anyways :)
Paul Thompson said…
@sylphide

I agree that Finder is rubbish. I found this to be a major annoyance when I switched a year ago.

I now use Pathfinder. There's a free trial that I highly recommend trying. It's better than Explorer in Windows in many respects: eg tabbed browsing!, Quick Look integration, etc.

http://www.cocoatech.com/pf4/
Cyrille said…
@Paul

ah yes that's right I installed it again yesterday (aparently when the teial period is over you can reinstall it?).

Looks definitely better than the finder.

Something I find strange, the copy function did not appear in the contextual menu when right clicking on a folder...
Paul Thompson said…
This comment has been removed by the author.
Paul Thompson said…
@Sylphide

Check out Path Finder preferences, and you can add almost anything to the context menu.

Also, check out the functionality of the drop stack. If you are mouse-orientated, it might come in handy (you can use it for copy and paste, but also burn, compress, etc.)
Cyrille said…
@Paul

wow that sounds great!

Yes I am definitely mouse oriented (except for the cut and paste functionality), I am very often bothered when I have to drop my coffe cup in order to use a keyboard shortcut ;)
Marion said…
Great blog - I just switched after many many years with DOS and Windows.

I followed your entry which showed me how to have the full path of m current view in the title bar of the Finder window. But.... how do I get back to the default setting?!!!

You wrote: Open a terminal session and enter the following:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Can you help me get back to the default?
Thank you!
Marion in NY
David Alison said…
@Marion: With most terminal commands where you are changing settings to True or False, Yes or No, you simply change that last value. In this case just enter the following command in a Terminal window:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO

Then hold down the Option key, right click on the finder icon in the Dock and select Relaunch.
Marion said…
@David -Thank you!
Marion
Anonymous said…
http://secrets.blacktree.com/
I'm using this to on/off

found it from http://osx.iusethis.com/

Popular posts from this blog

Keyboard vs. Mouse

Some cool Firefox add-ons

A hardcore Windows guy gets a Mac