Songs blockec with exclamation point - localhost issue

I use iTunes on a Windows 11 platform, with libraries stored on external drives. They have worked until recently, but now on one of the drives, no songs are accessible because /localhost/ has been inserted in all of the song locations. I've looked around and found that others have had similar problems, but the fix is hard to find. This affects tens of thousands of songs!

Windows, Windows 10

Posted on Feb 7, 2024 7:04 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 8, 2024 3:28 AM

The "missing file" issue with exclamation marks happens if the file is no longer where iTunes 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, or the drive it lives on has had a change of drive letter, 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 has 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. See Getting iTunes & Windows Media Player to play nicely if you're trying to access your media with any other media players.


Select a track with an exclamation mark, use Ctrl-I to Get Info, then click No when asked to try to locate the track. Look on the file tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive letter 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 Windows.


In some cases iTunes 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 another application like Windows Media Player has moved/renamed the files, or the library has been moved from OS X to Windows, then the chances are that subtle differences in naming strategies will make it hard to restore the media to the precise path that iTunes is expecting. In such cases, as long as the missing files can be found somewhere, you should be able to use my FindTracks script to reconnect them to iTunes. See this post for an explanation of how it works. It might need some tweaking if your media is in a non-standard layout.


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

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


Note the addition of file://localhost/ (and the flipped direction of slashes in Windows) is normal for a file that isn't quite where iTunes is expecting to find it.


tt2

Similar questions

6 replies
Question marked as Top-ranking reply

Feb 8, 2024 3:28 AM in response to Jonathan Powell

The "missing file" issue with exclamation marks happens if the file is no longer where iTunes 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, or the drive it lives on has had a change of drive letter, 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 has 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. See Getting iTunes & Windows Media Player to play nicely if you're trying to access your media with any other media players.


Select a track with an exclamation mark, use Ctrl-I to Get Info, then click No when asked to try to locate the track. Look on the file tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive letter 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 Windows.


In some cases iTunes 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 another application like Windows Media Player has moved/renamed the files, or the library has been moved from OS X to Windows, then the chances are that subtle differences in naming strategies will make it hard to restore the media to the precise path that iTunes is expecting. In such cases, as long as the missing files can be found somewhere, you should be able to use my FindTracks script to reconnect them to iTunes. See this post for an explanation of how it works. It might need some tweaking if your media is in a non-standard layout.


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

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


Note the addition of file://localhost/ (and the flipped direction of slashes in Windows) is normal for a file that isn't quite where iTunes is expecting to find it.


tt2

Feb 8, 2024 10:57 AM in response to Jonathan Powell

Close iTunes. Copy the .itl file that you're using from the Previous iTunes Libraries folder up to the iTunes folder above it. Rename the .itl file as iTunes Library.itl if it still contains date information. If you don't see the .itl file extension don't add one, it will just be hidden, which is OK. Now hold down shift as you launch iTunes, wait for the prompt to choose or create a library, click choose, and select the library at G:\80s to now\iTunes\iTunes Library.itl. With luck everything should work again as you expect it to. If not you might need to use the FindTracks script to effect repairs.


A couple of clarifying notes:

  • Consolidation copies tracks that are outside of the designated media folder into it, but only if they can be found. It won't repair a broken library.
  • The Export Library function does indeed generate an XML file. It should be possible to choose any name and/or location for it. While such an XML may be useful for rebuild a corrupted library, potentially after using search and replace to amend paths, doing so resets all Date Added details. Better if possible to keep backups of the .itl files so one can be restored if needed following an issue.
  • The .itl file is the key component of the library, if you delete it you're throwing away the record of what has been added to the library, all ratings, play counts, playlists, and any other data not captured in tags.


tt2

Feb 8, 2024 8:01 AM in response to Jonathan Powell

Read item 1 directly from Edit > Preferences > Advanced.


The first clipping suggests that the library database that you have open is stored inside G:\80s to now\iTunes\Previous iTunes Libraries, and iTunes is expecting that to contain an iTunes Media folder, then Music, Artist, Album, etc.


Where is your copy of that track really? Without knowing more my guess would be G:\80s to now\iTunes\iTunes Media\Music\Michael Jacckson\Bad\02 The Way You Make Me Feel.m4a. Am I right?


tt2

Feb 8, 2024 7:41 AM in response to turingtest2

Glad to see you're still in the game - the last post I saw was dated 6 years ago, and you are the only one who seems to know anything. Drive G is an external drive. I tried to Consolidate from the iTunes file menu, but after that it was clear that everything in the library was affected.

I think the original path should look like file://G:/80s to now/iTunes/iTunes Media/Music/song info



Feb 8, 2024 8:59 AM in response to turingtest2

(I wrote this before but I think it got deleted before I sent it) -

Things got a little more complicated in the process. I tried exporting the library and I'm not sure where it ended up (unless it's an XML file in the Previous Itunes Library folder) and deleting itl files. When I opened up iTunes I got and empty folder, which saved as the current itl. So I loaded a previous itl from the Previous folder, and the extra step was inserted at that point.

The real location of the track is the one you said.


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.

Songs blockec with exclamation point - localhost issue

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