hasseg.org

A "Go to Parent of Current Folder" Toolbar Button for Finder

Filed under Mac, Programming, Scripts

The “go to parent folder” button in the Finder toolbar Although the updated version introduced with Leopard significantly improves upon the one in Tiger, I still think Mac OS's Finder is lacking in several departments. I Don't feel "at home" with separate file managers (Path Finder or ForkLift, for example -- even though I do own a license to the latter, I only use it as an SFTP client,) so I've taken it upon myself to improve the experience of using Finder. The first thing that annoyed me with it was the fact that even though you could use the key combo Command(or Apple key) + Up arrow to go to the parent of the current folder, there was no button in the toolbar for it (which is exactly how I would prefer to invoke this action.) Well, due to the fact that you can drag any application to Finder's toolbar, it's quite easy to add your own buttons there.

Update (feb 13, 08): Updated the app to have a much nicer icon (made by Matti Schneider -- thanks!)

It's ridiculously easy to tell Finder to go to the parent of the currently open folder with Applescript, so that's what I did - I wrote an Applescript for this and saved it as an application. Then I added a nice icon for the app (made by Matti Schneider) that would not look out of place in the Finder toolbar, and dragged it there. Voilà: Go to parent folder button for Finder’s toolbar (with nicer icon)

Download it here

Oh yeah, and here's the Applescript I used:

tell application "Finder"
	tell front window to set theFolder to target
	tell front window to set target to parent of target
	tell front window to select theFolder
end tell

7 Comments

Alcmene January 29, 2008 at 11:31 AM

Hi there, I don’t have a website hosting my scripts, but I do have written some, quite in the kind of this one (almost all of them are desgined to be Finder Toolbar extensions). If you are interested in it, just send a mail to me, I would love to have some feedback :) So far, here are my “finalised” ones :

  • DesktopAnimator (use your screensaver as your wallpaper, a very little script, just a shell command wrapped up)
  • lnCreator (GUI for the ln command, quite appreciable in the Finder :) supports drag’n’drop, multiple files…)
  • EjectAll (to eject almost immediately all mounted disk images / optionnaly every mounted media, especially useful after some software downloading session) I also made a nice icon for the Browse Full Screen lovely script from Apple (that I wanted to write, but well…).

Sorry, this isn’t advertising, I just want to let you decide if this is of any interest to you or not ;)

Regards :)

SCOTT NOW4REAL954 September 27, 2008 at 10:07 AM

OH MY GOD THIS IS GREAT…I STUMBLED UPON THIS FROM A TUAW BLOG…AND I AM IN LOVE WITH THIS…I HAVE ALWAYS HAD THE SAME ISSUE WITH THAT BACK AND FORTH THING…LOVE IT THANK YOU

Felix Ogg February 2, 2009 at 9:50 PM

I was annoyed at first too. But then I discovered that Apple UI team decided that this is typical usage for advanced, hierarchy-thinkers: the finder is designed to let you search for things using the spotlight thingamajiggy.

However, for us power-users, they were kind enough to provide CMD+UP-ARROW. Which - admittedly - works predictable as well as nicely opposite to CMD- DOWN-ARROW (drill into folder).

Mike K July 3, 2009 at 6:12 PM

Do you really not know this? There is a button for this built into the finder. If you control-click on the toolbar of a finder window, you’ll get a contextual menu with the option “Customize toolbar…” If you select this, one of the available buttons is “Path”. If you put the Path button on the toolbar, you can click it to get a drop down menu of not just the parent folder but the entire enclosing heirarchy of the current folder. Pick the parent folder from the dropdown, and away you go. No scripting needed.

Ali Rantakari July 5, 2009 at 10:49 PM

Hi Mike,

I am indeed aware of this useful feature. Nevertheless, as you know, the path dropdown button requires two clicks (and a small movement of the mouse in between) to navigate to the parent folder instead of just one click. Admittedly a small optimization but still significant enough for me to do for something that I use tens of times a day. I also prefer to access the path dropdown (whenever I happen to need it – though I use the Path bar instead much more often) by cmd-clicking on the Finder window title.

David Rogoff January 10, 2010 at 3:44 AM

Thanks much! I’m switching from XP to SL and was going crazy trying to find this.

ruslani March 1, 2015 at 3:39 PM

Thanks for this helpful article. I’m using this feature constantly. Although for OS 10.10 the icon looks kind of out of place (being the only “3D” icon among everything else that is flat). Can you update the icon for this?

Categories