Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add a 'Go to Parent Folder' button to the toolbar Desktop
One detail that I'm actually missing from Windows is a Finder toolbar button to jump one folder up in the hierarchy, ie to the parent folder. So I came up with the following ugly but still functionally work-around. First create an AppleScript app with just this line of code:
tell application "Finder" to set target of window 1 to the container 
of target of window 1
Then save it as an application, and quit Script Editor. Now show the contents of the application package you just created by control-clicking on the folder and then choosing Show Package Contents from the pop-up menu. Open the Contents folder and edit the info.plist file in your editor of choice. Adding the following will make the program faceless, so that it does not appear in the Dock when launched:
<key>NSUIElement</key>
<string>1</string>
Finally create a nice icon (I made one in Photoshop that looks similar to the navigation buttons, as seen above right), paste it onto the app (in its Get Info window) and drag the app to the Finder toolbar. Done! It looks a little strange when the window is inactive (the icon gets dimmed, differently from the other buttons), but it does work.
    •    
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[35,508 views]  

Add a 'Go to Parent Folder' button to the toolbar | 38 comments | Create New Account
Click here to return to the 'Add a 'Go to Parent Folder' button to the toolbar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add a 'Go to Parent Folder' button to the toolbar
Authored by: wgscott on Mar 27, '07 07:51:06AM

You can also ascend the hierarchy by apple-left-clicking the little icon in the center.

However, I love this hint and will immediately incorporate it. I'd also love to know how to find these hidden gems.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: jelmore49 on Mar 27, '07 07:51:14AM

I find it much easier to use Command-Up Arrow to move up one folder in the Finder.

Or, if I need something to click on, I add the Path button to the Finder window; this lets you go more than one level at a time, if need be.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: nickv2002 on Mar 28, '07 01:44:29AM

Ditto... you don't even need the path button if you command-click on the window title.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: DavidRavenMoon on Mar 28, '07 11:09:53AM

I also Command-Up Arrow. Much faster than using the mouse. :)

---
G4/Digital Audio/1GHz, 1 GB, Mac OS X 10.4.9 • www.david-schwab.com • www.myspace/davidschwab • www.imanicoppola.net



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: NHN on Mar 27, '07 07:57:52AM

nice tip,
i'd love to try that one too. sadly, i'm absolute incompetent when it comes to photoshop.
would you care to share the icon you designed?
that would be fantastic.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: skigil on Mar 27, '07 07:58:50AM

Interesting. I tried your

<key>NSUIElement</key>
<string>1</string>

in another app and it didn't seem to work. Thanks for the hint though.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: makaio on Mar 27, '07 09:59:50AM

The values in the Info.plist file are cached, so if you've opened the application before it is remembering the old value. Once you change the value, try logging out and then logging back in, and it should work.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: seika7 on Mar 27, '07 10:55:45AM

Actually, it's LSUIElement

You can let the system know you've made the change by dragging the app to the Desktop then back to the Applications folder. You don't have to logout.

--Bryan



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: Malesca on Mar 27, '07 03:23:31PM
Or, you can touch TheScript.app in the terminal.

[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: 3mors on Mar 27, '07 07:59:58AM
few months ago i made a button for a "force refresh" of the current finder window. the icon is the original safari reload icon. try it: http://www.omnidea.it/finder_refresh.zip

---
3mors

[ Reply to This | # ]

Add a 'Go to Parent Folder' button to the toolbar
Authored by: FOOOD on Mar 27, '07 08:57:44AM

This sounds handy 3mors.
What do we do with the download?



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: 3mors on Mar 27, '07 11:04:45AM

put it in your Applications folder and then drag it to the finder toolbar. the only problem is that 'cause to an icon autoresize problem of the finder window, you have to keep the toolbar view in "large icons" mode

---
3mors



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: FOOOD on Mar 27, '07 11:49:56AM

Excellent, thanks a lot.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: DavidRavenMoon on Mar 30, '07 08:11:59AM

<blockquote> the only problem is that 'cause to an icon autoresize problem of the finder window, you have to keep the toolbar view in "large icons" mode</blockquote>

You have to create an "icon family" to get the different sizes. I use Iconographer X.

---
G4/Digital Audio/1GHz, 1 GB, Mac OS X 10.4.9 • www.david-schwab.com • www.myspace/davidschwab • www.imanicoppola.net



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: mantrid on Mar 27, '07 08:17:55AM
I also have been using a toolbar button for this function for a while. I started out scripting "Finder" as described in this hint, but ultimately switched to scripting a keystroke:
tell application "System Events" to keystroke (ASCII character 30) using command down

It is ugly in that it is possible to switch windows before the keystroke takes effect so that it doesn't go to the intended window, but you almost have to try to do it on purpose. Some of its ugliness is mitigated by the fact that, as a toolbar button, the keystroke implicitly would go to the front window (Finder toolbar buttons don't support Cocoa Cmd-click through behaviour).

Despite these drawbacks, the reason why I prefer the keystroke way is the behaviour in "Icon" and "List" view. Both methods will "go to parent", but unlike the container of window approach, a keystroke also leaves the previous folder selected so you can see where you came from.

[ Reply to This | # ]

Add a 'Go to Parent Folder' button to the toolbar
Authored by: osxfan57 on Mar 27, '07 08:30:12AM

This hardly seems necessary. Just add the Path button to the Finder using "Customize Toolbar." Click and hold on the resulting new Path button in the Finder toolbar and all parent folders appear, from which you can then simply pick any of these in a snap.

---
G5 2.5GHz 1.5Gb RAM, OS 10.4.8



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: dsjkvf on Mar 27, '07 09:05:10AM

i think that it is useful mostly for switchers, who have get used for windows explorer, which have similar button.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: DEMON on Mar 27, '07 10:16:18AM

Or press the command key and click the titlebar. Does the same as adding the show path button. I use it allot.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: ridogi on Mar 27, '07 05:47:10PM

This also works in Safari. I find it's the best way to get back to the start of a site.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: phoomp on Mar 28, '07 07:48:39AM

Why are so many Apple users unwilling to accept that MacOX usability can be improved? Why use 2 or 3 actions to do something that can be done with one?



[ Reply to This | # ]
Custom Finder features
Authored by: jecwobble on Mar 27, '07 10:50:54AM

I think the real hint hear is the slick way to extend features into Finder. I don't particularly need the 'up one folder' feature due to the nature of how I work. But I can see how it would be cool to add an Automator app as a "button" that would, say, upload selected files to a server. Right now, I do that via an Automator workflow in a context menu. This would save at least one click.



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: eti on Mar 27, '07 11:29:35AM
Nice tip! It got me thinking, and that's a good thing :)

By the way, this avoids the error when you get to the top of the hierarchy:

tell application "Finder" to set p to target of window 1 as string

set x to POSIX path of file p
set z to do shell script "cd " & x & "; cd .. ; pwd"

tell application "Finder" to set target of window 1 to POSIX file z
There's probably better ways to do the Applescript and shell side of it, but that's what I came up with.

[ Reply to This | # ]
Made a "Open Terminal here" button
Authored by: eti on Mar 27, '07 01:03:46PM
Using the principles put forth in this tip, I made a folder toolbar button that opens a terminal widow and sets it's path to the folder you were at.
tell application "Finder" to set p to target of window 1 as string

set x to POSIX path of file p

tell application "Terminal"
	activate
	do script "cd " & x
end tell


[ Reply to This | # ]
What is that Interface?
Authored by: Hauberg on Mar 27, '07 12:00:24PM

How can I get that "iTunes 7"-like interface in the Finder?



[ Reply to This | # ]
What is that Interface?
Authored by: eti on Mar 27, '07 01:24:15PM

control-click in the folder's toolbar area.

if you don't see it, try clicking the lozenge-shaped button in the upper right corner first.

if that still doesn't give you what you want, click and drag on that little dot in the middle of the left edge of the window.



[ Reply to This | # ]
Also Show Toolbar
Authored by: avramd on Mar 28, '07 01:08:10AM

try cmd-opt-T or View->Show Toolbar



[ Reply to This | # ]
Also Show Toolbar
Authored by: Hauberg on Mar 28, '07 06:38:18AM

I am sorry that I didn't make myself clear.

What I actually meant to ask about was how to get the "smooth" grey interface (as in iTunes) as oposed to the default with the "Brushed Metal"-texture. It was not about how to show the sidebar and toolbar.



[ Reply to This | # ]
Also Show Toolbar
Authored by: lipids on Mar 28, '07 10:02:31AM
Uno does it for you.

http://gui.interacto.net/

[ Reply to This | # ]
Also Show Toolbar
Authored by: Hauberg on Mar 28, '07 01:54:50PM

Very Cool. I am definitely going to try that :-)



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: jaguarcy on Mar 27, '07 01:20:27PM
To avoid the error you could also simply insert the command within a 'try' block

try
    tell application "Finder" to set target of window 1 to the container
    of target of window 1
end try


[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: callefjant on Mar 27, '07 01:36:28PM
Hauberg: UNO (http://gui.interacto.net/). Highly recommended.

eti: Putting a 'try' before the code and an 'end try' at the end also avoids that error - I should have thought about that before posting the hint.

[ Reply to This | # ]
Download it here
Authored by: tice on Mar 27, '07 02:56:22PM
if you don't want to make it by yourself:

http://blog.tice.de/beitrag.php?file=2007_03_27_2339
just klick the link "Up (36 kB)"

[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: Malesca on Mar 27, '07 03:22:14PM
Or, you can touch TheScript.app in the terminal.

[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: Malesca on Mar 27, '07 03:28:24PM

Oops, that comment was in reply to another comment above. Re-posted it in the proper subthread.



[ Reply to This | # ]
Move files to parent directory
Authored by: Malesca on Mar 27, '07 03:26:37PM
I've been doing something similar. My toolbar button also allows dropping files on it, to move them to the parent directory, though.

Didn't write this myself, got it from someone else: http://pastie.textmate.org/49903

[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: deck2 on Mar 28, '07 05:19:58AM

i always use key kombinations, its far more faster way for me, so one level up its cmd + arrow up



[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: UberFu on Mar 28, '07 12:16:23PM
Press Command+Up Arrow on the keyboard it's faster_

[ Reply to This | # ]
Add a 'Go to Parent Folder' button to the toolbar
Authored by: AntWhite on Jul 29, '07 05:10:40AM

This emulates the command up without sending keys in applescript

try
tell application "Finder" to set the source_folder to target of window 1 as alias
tell application "Finder" to set target of window 1 to the container of target of window 1
tell application "Finder" to select source_folder
end try


it selects the source folder after its navigated to its parent



[ Reply to This | # ]