17 Comments

Summary:

Yeah, sorry, I don’t really know how to title this little trick. Let me see if I can set this up so it’s clear what you’ll be looking at, before you actually look. (Or you can skip me stumbling over myself and just watch it anyway…) […]

Yeah, sorry, I don’t really know how to title this little trick. Let me see if I can set this up so it’s clear what you’ll be looking at, before you actually look. (Or you can skip me stumbling over myself and just watch it anyway…)

When you’ve got a window open – be it Firefox, TextMate, etc, etc – there’s a title to that window at the top, and if it’s a file, there’s an icon positioned to the left of it. A nice trick in OS X is that you can drag that icon to the Finder to create an alias, or by holding down the OPTION key, you can make a copy of that file someplace as well.

Also, if you hold the COMMAND key (Apple key if you’re new ’round here) when clicking on that icon (or any part of the title in that bar) it’ll show you the path in which that file resides. So for instance, lately I’ve been going through some Ruby tutorials. The folder structures are many and a few levels deep. As I’m a relative n00b to this, the folder structures lose me quickly, so being able to CMD click on the title/icon at the top of the window and quickly see where I’m at is a huge help.

Ok so you’ve basically got it now. Below is a quickie screencast I recorded so you visual folks can get the idea. There’s no sound – it’s not broken, I just didn’t record any.

CMD Windowbar Trick (no sound!) – 5mb

  1. You can even do it within Safari :)

    Share
  2. Similarly, command-clicking on the title in Safari will show you paths all the way to the root directory of the website you are currently viewing.

    Share
  3. Didn’t know about the safari thing. This has been one of those cool, untrumpeted little features of Mac OS going all the way back to what, OS 7? 8?

    Makes you marvel at just how clever Apple is.

    Share
  4. Is there a way to do the same thing when you just clic on a folder?

    Share
  5. Niclet
    from a folder, no. This trick is just about the window’s menu bar.
    However, you can check out a contextual menu plugin (think, right click) called FolderGlance. it functions to let you right click a folder and show you the nested files/folders within it…

    Thanks for the Safari tip guys – being a Camino user, I missed that little tidbit.

    Share
  6. It goes back to Mac OS 8.5.

    Share
  7. You can drag those menu bar document/folder icons to a Terminal window, too, which will drop the document’s full path into your command line. If you mix your Finder with your Terminal a lot, this feature is pretty handy.

    (It also works for any Finder document/folder icon, for that matter.)

    Share
  8. Thanks Nick,

    BTW, speaking of paths, is there any way to easily get the (unix) path of a file?
    (like ~/Documents/MyText.txt or ~/Library/AFolder/AnotherFolder/ThisFolder)
    By clicking on it with a certain key combination, or by a kind of rapid action, and get it in the clipboard for example?
    -

    I know I’m a bit out of topic but it’s still related.

    Share
  9. Well, I think Schaller had just answer my question.

    Share
  10. To follow up on Niclet’s question: Select the file in the Finder, Command-C copy it, then Command-V paste in the Terminal. It’s all the same thing.

    Share

Comments have been disabled for this post