Skip to content

How to make sure your media disk is mounted before starting iTunes

This is an Apple Annoyance that’s been bugging me for a while — if your iTunes library is on an external HD, and you start iTunes without it mounted, the bloody thing can seriously mangle its own library index (under Tiger at least).

So I’ve replaced my iTunes Dock icon with a little AppleScript that checks whether said disk is mounted first:

1
2
3
4
5
6
7
tell application "Finder"
	if exists (disk "LaCie") then
		tell application "iTunes" to activate
	else
		display dialog "Don't start iTunes without LaCie external disk mounted." buttons {"OK"} default button 1 with title "Cannot start iTunes" with icon stop
	end if
end tell

Compile, save as script, add to dock, bingo. (Obviously, replace LaCie with the name of your external HD, as it appears in /Volumes when mounted.)

For extra points, you can give it iTunes’ icon too. Just get Info on iTunes and select the little icon in the top left (not the big one under Preview). Then just cmd-c, select the same icon in the script’s info window, and cmd-v.

Share/save this page:
  • email
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • del.icio.us
  • Digg
  • Reddit
  • StumbleUpon
  • Technorati
  • DZone
  • Slashdot
  • Fark
  • Facebook
  • MySpace
  • LinkedIn
  • Live
  • connotea

Post a Comment

Your email is never published nor shared. Required fields are marked *