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

Create a fully functional Volumes folder in 10.3's dock Desktop
In the old days of Mac OS X, it was possible to put an alias of your Volumes folder in the dock. You can still do that in Panther, but the aliases of the Volumes are no longer navigable, and it won't update when you add and remove CDs and drives. I know there are a lot of discussions about that, but none of the solutions (including shareware) are suitable for my needs. I have a lean system; not even the Finder is running as I use the Terminal instead. Via folders in the dock, I have quick access to all of my files, except to CDs, DMGs, Volumes, etc.

Finally I found a solution to have a folder in the dock which is both dynamically updated after mounting or ejecting a volume, and it's navigable. The solution is to use Folder Action Scripts. Read the rest for the how-to.

[robg adds: The screenshot at left (click it for the large version) is from my machine and demonstrates (a) how this works if you haven't seen it before, and (b) that this hint does work. Note that you can do something similar by just making aliases of your drives and tossing them in a folder. However, this more complex solution will dynamically update the folder's contents as you add and remove CD-ROMs and other volumes.]

  1. Create a Folder (mine is called "Drives") in a convenient place. Do not use spaces or special characters in the path to the folder, or you must know how to handle these in Unix paths.
  2. Paste an icon on it if you wish to make it visually distinct in the dock.
  3. Put the folder in the dock.
  4. Copy this AppleScript, paste it in a new Script Editor document, and edit it as noted (you must insert the correct Path twice).
  5. Save the script as a Script (not as an Application) in /Library -> Scripts -> Folder Action Scripts. Call it "Add List Drives."
  6. Duplicate the script and rename the copy to "Remove List Drives."
  7. Open the script called "Remove List Drives" in Script Editor and change the first and last line as follows. On the first line, change:
    on adding folder items to this_folder after receiving added_items
    to:
    on removing folder items from this_folder after losing these_items
    Then replace the last line, which reads:
    end adding folder items to
    with:
    end removing folder items from
  8. Save the modified script.
  9. Open Folder Actions Setup (in /Applications -> AppleScript) and enable Folder Actions in the checkbox.
    • In the lower left corner hit the "+" Button to add a folder. You will not see the Volumes Folder, because it is invisible.
    • Hit Shift-Command-G, type "/Volumes" and hit Open.
    • You will automatically be asked to add a Script to "Volumes." If not, hit "+" under the right column. Add both the "Adding" and "Removing" scripts.
    • Be sure to enable the folder and scripts by checking the checkbox.
  10. As a final step, you need to run the "Add" script once manually to populate the Drives folder. Open the Add script in Script Editor, delete the first and last lines (the on adding... and end removing... lines), then click Run. This will populate the Drives folder.
I don't know if you have to enable "Access for Assistive Devices" in Universal Access in the System Preferences (but mine is checked). Remember that your scripts are stored in the top-level Library, and after a system upgrade, they may be deleted. Back them up! I also made a copy of one of these scripts, deleted the first and last lines as above, and saved them as an Application in a convenient place, so that I can run the scripts whenever I want.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[16,702 views]  

Create a fully functional Volumes folder in 10.3's dock | 18 comments | Create New Account
Click here to return to the 'Create a fully functional Volumes folder in 10.3's dock' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a fully functional Volumes folder in 10.3's dock
Authored by: chris_on_hints on Oct 01, '04 01:41:18PM
Ive done something different, as I dont have folder actions enabled.
Go into terminal and type the following:

mkdir 'Computer'
cd Computer
ln -s /Volumes ./Volumes
ls -s /Network ./Network
Then drag the 'Computer' directory (created in your home folder) into the dock. Then you have access to both network and volume folders from the dock.

This has the disadvantage that mounted network drives will be found in both the Volumes and Network sub-menus.

[ Reply to This | # ]

Create a fully functional Volumes folder in 10.3's dock
Authored by: mproud on Oct 01, '04 02:05:12PM

I've tried this before, and I've just tried this again, but this does not work.

For my hard drive partitions, the menu simply DOES NOT SHOW ITS SUBMENUS. Creating hard-wired aliases into a folder one the dock will - the disadvantage is it will not display devices as they are mounted and unmounted).



[ Reply to This | # ]
CMD-Shift-G
Authored by: foamy on Oct 01, '04 02:17:39PM

Why not just use CMD-SHIFT-G and goto /Volumes/

then drag that hidden icon to the dock?

I now have a fully functional /Volumes folder in my dock that adds and removes network drives on the fly.

What am I missing here?



[ Reply to This | # ]
CMD-Shift-G
Authored by: googoo on Oct 01, '04 02:54:34PM

I tried adding the /Volumes folder to the Dock as you suggested. I am able to see a newly mounted hard drive or CD in the popup menu but cannot navigate to any folders or files on it!

-Mark



[ Reply to This | # ]
DOH
Authored by: foamy on Oct 01, '04 04:12:33PM

You're right. I forgot to check it after seeing that it was mounted!



[ Reply to This | # ]
CMD-Shift-G
Authored by: acalado on Oct 01, '04 03:00:31PM

I was thinking the exact same thing. I used CMD+SHIFT+G to go to the /Volumes folder and then CMD+OPTION dragged it to my Favorites folder to make an alias. Pasted a custom icon on it an then dragged it to my Dock. Sometimes people like to do things the hard way I guess...



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: rhowell on Oct 01, '04 03:23:44PM
Folks,

Please confirm that all of your "simpler" methods will allow you to browse into the mounted volumes from the dock menus. I don't believe you can. The original hint allows you to do this.

[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: acalado on Oct 01, '04 04:03:05PM

Confirmed. Mac OS X v10.3.5
1. CMD+SHIFT+G - go to /Volumes
2. CMD+OPT drag the "/Volumes" folder anywhere you want (I put it in my "~/Library/Favorites" folder.
3. Give it a custom icon.
4. Drag it to the dock.
5. Navigate.

Did the same with the /Network folder to duplicate the functionality of the original hint.

Can we get confirmations from people running earlier versions of 10.3 and 10.2? Post here.

Andy



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: Graff on Oct 01, '04 05:05:00PM

That method half works under 10.3.5 for me.

I get a menu with all mounted volumes but the removable volumes are not hierarchal. They do appear and disappear as they are mounted and unmounted.



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: Barney-15 on Oct 02, '04 08:54:59AM

I have 10.3.5 and cannot make the items navigable. They are dynamic, but no ability to get within the folders of the removable items (cds, ext FW HD).

Jim

---
Jim



[ Reply to This | # ]
CORRECTION: Create a fully functional Volumes folder in 10.3's dock
Authored by: acalado on Oct 02, '04 11:42:06AM

CORRECTION: Only the boot volume is navigable. I tried putting an alias of /Volumes on my Dock on my Powerbook and the boot volume is navigable, but when I got home and plugged my iPod in, it was not Navigable. Thought it was only removable drives that didn't work, but tried it on my PowerMac G4 which has 3 internal hard drives and only the boot drive is navigable.

So there you have it. Guess the posted hint has value after all.

Andy



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: Graff on Oct 01, '04 05:22:40PM

A few more things about this hint:

Finder aliases work just as well as symlinks.

You can combine this all into one script, including the run part by doing something like this:


-- in the next line add the path to your "Drives" folder
property script_folder : (path to documents as string) & "Drives"

on run
	Update()
end run

on adding folder items to this_folder after receiving added_items
	Update()
end adding folder items to

on removing folder items from this_folder after losing these_items
	Update()
end removing folder items from

on Update()
	tell application "Finder"
		set theFolder to folder script_folder
		
		delete every item of theFolder
		
		set theDisks to disks
		repeat with i in theDisks
			make new alias at theFolder to i
		end repeat
	end tell
end Update


This works just fine without needing two script files.



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: JJCortes on Oct 01, '04 06:27:27PM

I have another solution allowing me to navigate inside my volumes : a little shareware named Launch Items X. With this shareware you will find a menu extra named Launch Items Menu. This menu extra adds an icon on your bar menu, and clicking on it gives you an access to the content of all your mounted volumes and network volumes. Launch Items X costs US$15 and can be downloaded at this URL :
http://www.naratt.com/LaunchItems.html



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: mnb on Oct 01, '04 08:48:17PM

I didn't need a script at all for an auto updating dock icon on 10.3.5.

Find needs to be launched to make this...

Make an alias of a folder
do a get info on that alias
select new original
shift-command-G type in /Volumes
click Choose.

You can paste a custom icon on it (unlike with a symbolic link)

It allows browsing and updates when volumes are added or removed.

You can drag the network icon from / to the dock for the same functionality, but you need to open one sub folder first before it will populate. It MAY have problems updating dynamically (just like Finder does with those elements), but I haven't used it long enough to know for sure.




[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: PCheese on Oct 02, '04 07:03:27PM

But again, only the root volume can be browsed from the Dock using your solution...



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: macondo on Oct 02, '04 06:37:57PM

The simplest of all solutions is to get A-Dock and install it and use it as a both an application switcher PLUS the added benefit that it will allow just about any amount of folders added to it.

I keep the Dock as the launch pad in it's normal position lower part of the screen , and keep A-dock in OS9-like Application Switcher size, to the right of the screen, as I used to have the App Switcher in OS9, so I can rapidly check all open applications plus the access to as many folders from my HD as I want to, do Home, Applications Folder,Documents, and any other Folder I am using in some particular project, are kept in the A-Dock for as long as I need, to thenbe removed as my need declines.

No terminal, no scripts, just use it.

Best



[ Reply to This | # ]
Create a fully functional Volumes folder in 10.3's dock
Authored by: Lunatic Prods on Oct 05, '04 06:35:36AM

A cool hint, and a great nag to learn more Applescripting ... for which many thanks!

Just a note that this browsable volumes listing feature is built into Default Folder X from http://www.stclairsoft.com/ ... (I wouldn't buy it for that alone, but find it indispensable anyway).

It doesn't match the satisfaction for little me of having scripted it myself ...err, I mean, having followed the original hint ;o) ... but it's another option.



[ Reply to This | # ]
Scripts folder
Authored by: Gin on Oct 04, '04 12:05:25PM
The scripts can also be saved inside your Home folder:

~/Library/Scripts/Folder Action Scripts/

You just need to create these folders if they don't exist yet.


[ Reply to This | # ]