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


Click here to return to the 'One solution for iTunes 'can't find file' problems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One solution for iTunes 'can't find file' problems
Authored by: Frederico on Dec 06, '06 08:34:32AM
I guess I didn't write very clearly while being so sleepy. The methods I describe will do what you are asking, save the prevention of launching when your external drive is offline. Before iTunes was smart about dealing with unmounted network shares, this was resolved, again, with AppleScript.

A simple script can be written as an iTunes launcher (a clickable app, or, my preference, a script invoked by keystroke through a long list of available keystroke-launchers) to detect if your standard external drive path is present, and, if not, either mount the share (if available), prompt you to find the share manually (assuming it should be available but is not), or cancel the launch of iTunes. Note: use of this type of setup all but necessitates the need to turn off auto-launching of iTunes by such things as Audio CD insertion, iPod mounting, etc.

In your case, you would want this launcher to prompt you to use a local Library, to prevent the dreaded '!' effect. This should be possible by using 'keystroke down' commands from Standard Additions; at worst, it would ask you to hold the 'Option' key after a resulting dialog.

Example (less than two minutes work):

set myExernalDrive to "MusicDriveName"
if (list disks) contains myExernalDrive then
	tell application "iTunes" to activate
else
	display dialog "The drive " & myExernalDrive & ¬
		" is not present." & return & return & ¬
		"Please hold the 'Option' key down and Press 'Continue' ¬
	to allow iTunes to choose an alternate Library."
	tell application "iTunes" to activate
end if


Once you are up and running locally, use iTunes as desired, add tracks, etc.

Before closing iTunes, transfer metadata of new tracks to comments field.

Upon launching iTunes (via special launcher), the same script should now allow you to not only reselect your external library, but also easily detect the existence of files added to your local library, and add them to your master external. You can also choose to move them (best to copy then delete, for safety sake) at your option. The script can also then automatically deal with the updating of metadata to the master.

This sounds complex, but much, if not all of it has already been written in component form, and need only be combined. Even the repair of the dreaded '!' issue is easily resolved by simply using the 'Add to Library' command, though, I seem to think that any "Missing Tracks" that are mis-reported when a drive is temporarily not available are now automatically fixed the next time it is.

[ Reply to This | # ]