You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

📰 Newsroom Update

Billie Eilish is Apple Music’s Artist of the Year for 2024. Learn more >

Migrating library to new PC, issue with library .itl file?

I am migrating my iTunes library to a new PC. All music files have been moved to the new PC in the same directory they were in the old one, E:\Users\...\Music\Artist\Album\File. I copied my .itl file and supporting files from the old PC to the new one. When I open iTunes using the copied .itl, it's looking for all the .mp3 files in file://localhost/E:\Users... I checked the old PC and the file locations in the library do not have file://localhost/ in front of the file location. I did not do an import/export, I just copied the files from one PC to another. How do I get rid of the file://localhost/ for 45,000 .mp3 files?

Windows, Windows 10

Posted on Oct 28, 2024 12:02 PM

Reply
7 replies

Oct 28, 2024 12:07 PM in response to blackpool9

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

Oct 30, 2024 4:03 AM in response to blackpool9

If you're exporting and importing the library then you're not taking the right approach. At minimum you will lose the original Date Added data. Did the text file version of the library include all of your playlists and playlist folders? Should you decide you want to revisit the migration take a look at Move your iTunes library to a new computer - Apple Community.


tt2

Oct 28, 2024 12:17 PM in response to turingtest2

  1. The location of the media folder is E:\Users\UserName\Music\iTunes\iTunes Media. But that won't help you, as I don't store anything there, I keep it all in the main E:\Users\UserName\Music folder.
  2. Selecting the first file in the library, file location iTunes is looking for is file://localhost/E:/Users/UserName/Music/ABBA/ABBA/01-Mamma Mia.mp3
  3. Actual location is E:/Users/UserName/Music/ABBA/ABBA/01-Mamma Mia.mp3


On the old PC, 1. and 3. above are the same as the new PC. On the old PC, checking Get Info > File > Location gets you E:/Users/UserName/Music/ABBA/ABBA/01-Mamma Mia.mp3. It's the exact same .itl file, and both PCs were running the latest version of iTunes.

Oct 28, 2024 5:49 PM in response to blackpool9

Have you used exactly the same user name on the new computer as the old? Your answers to 2 and 3 would suggest that the track is where it is expected to be, but the presence of file://localhost/ in 2 says that iTunes cannot access the file on that path. Did you copy part of the text from response 2 to make 3? The slashes are the wrong way around. I'd expect to see some kind of discrepancy in addition to the file://localhost/ part and different slash directions. Having the library in the standard layout where the media is inside the iTunes Media folder, which in turn is inside the iTunes folder with the library generally reduces any issues when copying the library from one computer to another. My FindTracks script can potentially repair what you have now, but you might consider putting the library in the standard layout first. The dash after the track number is not the way iTunes would do it, do you have a particular desire to organize your media folder differently?


tt2

Oct 28, 2024 8:55 PM in response to turingtest2

User name is the same.


I did not copy 2 to make 3.


The files are in the exact same location on both machines, I copied the Users folder from one computer to the other over a network connection.


The only thing different in the iTunes library between the old and new machines is the presence of the file://localhost/ in front of every track *except for tracks which I purchased through iTunes*. Tracks I purchased through iTunes are not corrupted.


I have no desire to move my entire library into the iTunes Media folder. My music is organized the way I like it. This is not the first time I've migrated my entire iTunes music library to a new computer. It is the first time iTunes has spit the bit. I'm honestly baffled how I could copy the contents of the iTunes folder (including the .itl and .itdb files) from the old PC to the new over the internal network and iTunes could seemingly arbitrarily decide to add text to nearly every file location in the library. I'm going to try exporting the library to xml and then importing to see if that fixes the issue.

Oct 28, 2024 9:52 PM in response to blackpool9

Okay, this is solved. I tried exporting the original library as .xml and then importing on the new PC. But for some strange reason, iTunes doesn't translate URL encoding on import. So all those spaces in file addresses were exported as %20 (Music/The Beatles becomes Music/The%20Beatles) and then instead of reverting back to space, stayed %20 on import. So that was no help. Final solution: Exported the library as a playlist in a .txt file. Imported the playlist, and all the tracks and ratings seem to be there. The only thing missing is play counts, but that's fine.


Thank you for the responses.

Migrating library to new PC, issue with library .itl file?

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