iTunes: How to Fix the Error for Multiple Missing Music Files (External Hard Drive)

After changing the location of the itunes library (about 54GB) and putting it on an external hard drive, itunes cannot find about 500 music files out of 54000 and more in total.

If I search and find the missing file, it becomes usable again

The question is how to do a multiple operation without having to search and activate song by song 500 times


itunes media folder location: correct (ext. drive)

library> consolidate files: done

keep itunes media folder organized: ok

copy files to itunes media folder when adding to library: ok


imac 21 late 2012, mac os mojave 10.14.6

itunes 12.9.5.5


any idea why this anomaly occurs and how to fix it?

iMac Line (2012 and Later)

Posted on Mar 9, 2021 9:33 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 9, 2021 9:36 AM

The "missing file" issue with exclamation marks happens if the file is no longer where iTunes or Music expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, the drive it lives on has had a name change, or you've moved a non-portable library to a different path (see Make a split library portable for details). It is also possible that iTunes or Music have changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place, or that you've been too aggressive when deleting duplicates at some point.


Select a track with an exclamation mark, use Cmd-I to get Song Info, then click No when asked to try to locate the track. Look on the file tab for the location the library thinks the file should be. Now take a look around your hard drives. Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive label has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case. If everything is where it is supposed to be try Repair security permissions for iTunes for Mac - Apple Community.


In some cases the library may be able to repair itself if you go through the same steps with Get Info, or when playing a track, but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links. Although it says something like "use the same location" I think it expects to find the tracks in the same artist & album layout they were in previously, with one systematic change to the path.


If you want me to try to provide specific advice please post back the following details:

  1. The location of the media folder under iTunes|Music > Preferences > Advanced
  2. The location of a sample missing track shown under Song Info > File > Location that begins file://
  3. The true path to the file whose details you gave in 2



See also FixLinks - an AppleScript to repair broken links in Music - Apple Community.



tt2

Similar questions

6 replies
Question marked as Top-ranking reply

Mar 9, 2021 9:36 AM in response to Fabio0911

The "missing file" issue with exclamation marks happens if the file is no longer where iTunes or Music expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, the drive it lives on has had a name change, or you've moved a non-portable library to a different path (see Make a split library portable for details). It is also possible that iTunes or Music have changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place, or that you've been too aggressive when deleting duplicates at some point.


Select a track with an exclamation mark, use Cmd-I to get Song Info, then click No when asked to try to locate the track. Look on the file tab for the location the library thinks the file should be. Now take a look around your hard drives. Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive label has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case. If everything is where it is supposed to be try Repair security permissions for iTunes for Mac - Apple Community.


In some cases the library may be able to repair itself if you go through the same steps with Get Info, or when playing a track, but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links. Although it says something like "use the same location" I think it expects to find the tracks in the same artist & album layout they were in previously, with one systematic change to the path.


If you want me to try to provide specific advice please post back the following details:

  1. The location of the media folder under iTunes|Music > Preferences > Advanced
  2. The location of a sample missing track shown under Song Info > File > Location that begins file://
  3. The true path to the file whose details you gave in 2



See also FixLinks - an AppleScript to repair broken links in Music - Apple Community.



tt2

Mar 9, 2021 11:57 PM in response to Fabio0911

The filing system on a Mac does a good job of retaining links to files moved around on the same volume, but it cannot automatically repair links when content is moved from one drive to another. Likewise iTunes doesn't automatically repair such links. It will continue to look for media on the old path until the path is updated. Changing the media folder in preferences does not in and of itself do that. The repair mechanism of Get Info > Locate can sometimes work to repair broken links after the fact. I notice your example feature a trailing 1 before the file extension. This is typical of a duplicate file. Perhaps iTunes is less able to repair these. I note too that your external media folder is given as /Volumes/TOSHIBA EXT 4TB/iTunes/iTunes Media. This is good as there is an iTunes folder immediately above iTunes Media. I recommend the following approach


With iTunes closed copy the following from ~/Music/iTunes into /Volumes/TOSHIBA EXT 4TB/iTunes:

  • Album Artwork
  • iTunes Library.itl
  • iTunes Library Extras.itdb
  • iTunes Library Genius.itdb
  • sentinel {hidden - use shift+cmd+. to reveal}

overwriting any of these files or folders that already exist in the destination.


Press and hold down option as you launch iTunes and keep holding until asked to choose or create a library. Click choose, then browse to and open /Volumes/TOSHIBA EXT 4TB/iTunes/iTunes Library.itl.


This should repair broken links of the type above as you're replicating a type of move that iTunes is designed to cope with, the movement of a library in a portable shape (iTunes folder containing iTunes Media) to a new location. You can try using my FixLinks script to repair any broken links that should remain.


As to why some files have gone completely missing from your media folder I have no explanation. Backups are key here.


tt2





Mar 9, 2021 11:34 AM in response to turingtest2

Hi TT2,

  1. the media folder in iTunes media preference is: / Volumes / TOSHIBA EXT 4TB / iTunes / iTunes Media... which is the one I use today
  2. The location of a sample missing track shown under Song Info:

file: /// Users / fabio / Music / iTunes / iTunes Media / Music / ...... which was the one previously used but the song is no longer there

  1. the true path should be the one mentioned in 1.

there are also cases in which an entire album is not present in either of the two paths

Mar 9, 2021 1:25 PM in response to Fabio0911

It can help me identify issues if you include the full exact path for 2 and 3, but that's enough for me to understand the background. It would seem that you've manually moved the content from one drive to the other rather than using the iTunes consolidate command to it over and then deleting the originals. One approach is to move everything back where it came from, close iTunes and reopen which should repair the broken links, then consolidate properly. Or you can try using the iTunes repair mechanism I've described above. Or you can try my repair tool.


As for the album you don't have at either path you can see if Spotlight can find one its files anywhere on your system, otherwise you'll have to look to any backups that you have. Is this album on any device?


tt2

Mar 9, 2021 10:59 PM in response to turingtest2

This is an example of the location of a missing file (right click on the song name> song info>file)

file: /// Users / fabio / Music / iTunes / iTunes Media / Music / Avett Brothers / Live Vol. 3/09 Murder In the City 1.m4a -

which is the location where it was previously.

The "disappearance" of the files is random, that is to say, for example, of an entire album only some pieces have disappeared, or, better to say, their path, for itunes, has remained that of the old location, while they are in the new location but are not "hooked".

Beyond the possible resolution of the problem, I would like to understand why this happens, also to prevent it from happening again.

I repeat, this happened when I moved the entire music library (approx. 420GB) that was previously inside the iMac, to an external hard drive, an operation done to lighten the iMac itself, old and obsolete.

Now, bringing everything back to the previous situation is too long a process and I think it is better to repair the location of the files individually: after all, 500 files out of 55000 are only 1% at the end.

As for the album which is neither in the new nor in the old location, this is even more strange but, yes, I can retrieve it from elsewhere.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iTunes: How to Fix the Error for Multiple Missing Music Files (External Hard Drive)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.