Dock Folder Launcher

Download Dock Icon

I’ve been using a stack on the Dock for my Downloads folder for a while now and sure, it’s pretty, but not terribly functional. You can open and drag files but that’s about it. What I want and I’m used to (in Windows) is an icon that opens the Downloads folder in Finder. I could use the Finder icon on the left of the dock, but there are two problems with that. First I would have to change the default location for new Finder windows, and I like having that as Applications. Second is that if you already have a Finder window open, clicking the icon just focuses that window instead of opening one in the default location.

Of course, I tried just dragging the folder onto the main dock area but it only accepts folders on that magical area to the right of the pedestrian crossing. And they show up as stacks. So I’ve come up with a quick and dirty workaround using AppleScript. Read on for the details.

Open Script Editor and paste the following code into a new script window. Note: you can type the command line break character using Option+Enter.

tell application "Finder"
	activate
	make new Finder window to folder ("Users:" & ¬
		(system attribute "USER") & ¬
		":Downloads") of startup disk
end tell

Compile the script, then run it to make sure it works.

Save the script as an Application Bundle called Downloads.app. You could save it as a standalone .app but it will have the crappy AppleScript icon and this is going on our dock so we want the icon to be something meaningful.

Save as Application Bundle

Locate the Application Bundle in Finder. These packages are really just folders, disguised as single files but you can easily crack them open. Right click Downloads.app and choose Show Package Contents which opens a new window.

In another Finder window, locate the icon file you want. In this example, we’re going to steal one of the Mac OS X system icons, which are found in /System/Library/CoreServices/CoreTypes.bundle. This is also a package, so go ahead and crack it open. Browse to the package’s Contents/Resources folder and locate the DownloadsFolder.icns file. Copy this (be sure not to move) into your Downloads.app/Contents/Resources folder. Delete the default applet.icns and rename DownloadsFolder.icns to applet.icns. Browse up a few levels and your application should now have the new icon.

Drag Downloads.app onto the dock and voila! A dock icon that opens Downloads in Finder! You can easily modify the script to open any folder, but AppleScript uses colons for the path separator instead of slashes for some bizarre reason. And “&” is the concatenation operator.

One behaviour I should implement in the future is: if there’s already a Finder window with the Downloads folder open, just focus it instead of opening a new one. But it’s good enough for now so I can wave goodbye to stacks.

2 Responses to “Dock Folder Launcher”


  1. 1 Josh

    Or you could just right-click on the Downloads folder in the dock, and select “Open Downloads”?

  2. 2 Si

    *Gasp* and waste valuable milliseconds?

Leave a Reply