An AppleScript to emulate an up button

Jan 12, '02 02:47:00PM

Contributed by: mbclark

One of the features I think is missing in the Finder is an "Up" button in the toolbar to go to the parent folder. I made some minor modifications to Apple's "Open Parent Folder" script to create a button in the toolbar that does just that. (Apple's script opens a new window with the parent folder; I just modified it to change the contents of the current finder window to the parent folder.)

Here's the script:

on run
tell application "Finder"
try
activate
set this_folder to (the target of the front window) as alias
set the target of the front window to (container of this_folder)
on error error_message
beep
display dialog error_message buttons {"Cancel"} default button 1
end try
end tell
end run
I saved it as an Application from Script Editor. I then grabbed an image of the "Back" button in the Finder toolbar and rotated it 90 degrees clockwise so the arrow points up. Paste the rotated image as the icon for the "Up" script, then drag the "Up" script to the Finder toolbar. I now have a working "Up" button in the toolbar.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020112144700377