How to update file 1,000+ file paths in iTunes?

I recently imported my library to a new PC (Windows 10 64-bit). Because I was using a new letter drive (D: vs. C:) and because I had reorganized my music folders, I spent the time to re-link all 1,600 songs in my library, which of course took several hours. I then did a restart, opened iTunes, and found my entire library was empty. I was able to restore an older version, but now 1,250 songs are pointing to the wrong path (a path where the files have never existed) and wrong name format. I had selected the option to keep my library organized, so now the file names aren't aligned. I'm looking for a way, possibly a script, to change the file paths for the remaining tracks, if possible, instead of doing it manually and risking it being wiped again.


For example, the track is saved here:

D:\Music\Music\Yellowcard\Ocean Avenue (organized via iTunes)


But iTunes is looking for it here:

file://localhost/D:/Programs/iTunes/Previous iTunes Libraries/iTunes Media/Yellowcard - Ocean Avenue/03-yellowcard-ocean-avenue-fnt.mp3 (from my old PC, which was not organized via iTunes)


Any help would be greatly appreciated. Thanks. Oh, and I'd really like to maintain my play counts and ratings, as I use this data to build playlists and load my iPod.

null-OTHER, Windows 10, 64-bit

Posted on Feb 17, 2018 9:13 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 17, 2018 11:32 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

3 replies
Question marked as Top-ranking reply

Feb 17, 2018 11:32 AM in response to bethany52

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 17, 2018 12:18 PM in response to bethany52

Hey turing, let me start by saying that I've browsing your responses to others with similar issues the past few days so was pleased to see a response from you on my problem. I tried the find tracks script a few days ago, before I reorganized my library into the post-iTunes 9 (artist/album/track) format but it wasn't working. It seems now that my library is organized the script is working to find almost all of my tracks. Thank you so much for your help and especially for your prompt response! I was dreading having to manually link my entire library a second time around.

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.

How to update file 1,000+ file paths in iTunes?

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