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.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iTunes won't recognise song files due to minor filename difference

Somehow my iTunes library became fragmented: the original and biggest part was on a NAS drive:


X:\iTunes\<folders by artist name>


but somehow a new folder branch formed:


X:\iTunes\iTunes\iTunes Media\<folders by artist name>


which I fixed using Change iTunes Media folder location plus Keep iTunes Media Folder organised. I ended up with a lot of file duplication:


filename.m4a and filename 1.m4a and filename 2.m4a


and somehow iTunes linked preferentially to the last copy of the filename. I have removed all the file copies, and want iTunes to re-link to the original files, but so far cannot find a way to do this except manually, one file at a time. As I have 3300 links to repair, I would love to know if a more automated approach is possible. Any assistance much appreciated.

Windows, Windows 6

Posted on Jun 12, 2021 3:43 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 12, 2021 4:19 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.




FWIW I would generally recommend arranging your library such that the media folder is X:\iTunes\iTunes Media. Your library files should either be in X:\iTunes or stored locally for better performance when the media is on a NAS. Using this layout allows the library to be portable, or easily made portable, in advance of a move to a different drive or computer.




tt2

Similar questions

9 replies
Question marked as Top-ranking reply

Jun 12, 2021 4:19 AM in response to monster01

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.




FWIW I would generally recommend arranging your library such that the media folder is X:\iTunes\iTunes Media. Your library files should either be in X:\iTunes or stored locally for better performance when the media is on a NAS. Using this layout allows the library to be portable, or easily made portable, in advance of a move to a different drive or computer.




tt2

Jun 12, 2021 5:04 AM in response to turingtest2

turingtest2, thanks for your reply. I am currently rearranging things to comply with your recommendation that the media folder should be X:\iTunes\iTunes Media. This is taking a while, because I have +17K songs.


To clarify my initial post a little:


  • iTunes expects to find songname 1.m4a (215 examples) or songname 2.m4a (3940 examples) in a specific subfolder of the media folder X:\iTunes\iTunes Media.
  • the file in that specific folder is actually songname.m4a, because I have moved all the copies to other locations
  • so the file is in the right place, but iTunes is looking for the copy file and I would like iTunes to link to the original file

Jun 13, 2021 8:32 AM in response to monster01

FindTrack is working away in the background in automatic mode, correcting 120 tracks I selected manually. Is there a trick to making iTunes line up all the disconnected tracks in a group that can be easily selected? If I could do that, I could set FindTrack to work for a week without supervision, and come back when the job was done. Thanks again, as always!

iTunes won't recognise song files due to minor filename difference

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