Relink missing files location script

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

dbetanc

New member
Joined
Aug 3, 2003
Messages
4
Points
0
Hello,

Is there a script that relinks all files that have the exclamation mark? knowing the file is still in your iTunes Music Folder?

I have about 100 songs missing, and I know the file do exist in my iTunes folder, but I 'd like to avoid spending an hour relinking one by one.

Thanks,

Daniel
 
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
This is rather difficult to script. See, the reason that those "dead tracks" are believed to be dead is that iTunes doesn't know where they are; if Tunes doesn't know where they are, then it will be difficult for a script to track them down.

However, for users who let iTunes keep their Music folder organized, it may be possible to create a script that looks in the Music folder : Artist name folder : Album name folder for files that have the same names as the track. (I recently posted some work in this area which tried to locate the Music folder via the iTunes Music Library.xml file -- see the post entitled "Lab Rats Wanted") I know on my system this would probably fail more than half the time, since I do a lot of editing of track info, and do not let iTunes organize things.

ANYway, its on the list and has been for a long time. It might be easier just to double-click on the tracks and let iTunes help you locate them, which is pretty much what a script would do.
 
Last edited:

DeltaTee

New member
Joined
Jul 2, 2003
Messages
119
Points
0
Age
43
Location
Indianapolis, IN
Website
applescript.plaidcow.net
At current it would also be less effective because a script cannot write to the location property, so the new file would have to be added to the library (and all playlists that it is a part of) and then the old track removed.
 
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
At current it would also be less effective because a script cannot write to the location property, so the new file would have to be added to the library (and all playlists that it is a part of) and then the old track removed.
Yes, of course. A script that did as I described would probably work on a selected track in a playlist; when the correct file was found -- by whatever means -- it would be added; the selected track would be deleted, and the newly added track copied into that playlist. Other occurrences of dead track in other playlists could be located by database id and replaced.

Even so, there is still the problem of actually locating the file. You could put up a choose file box, but this is what iTunes already does; you could use a shell script to find a file (eustacescrubb demonstrates this in the "Lab Rats" thread), but the results are not always cut-and-dried.

By the way, if you re-write the location to the appropriate node cluster in the "iTunes Music Library.xml" file, iTunes will over-write it with its "correct" missing value.

Also, the script List MIAs will search for missing tracks and create a text file listing whatever info it can find about the track, except the location, of course.
 
Top