iTunes doesn't find my music anymore

A previous version of iTunes apparently added the string file://localhost/ to the path and now iTunes doesn't find the music anymore. How can I correct the path for all of my songs without having to edit every single one of them? I already copied back the whole iTunes Media folder from the NAS to a local drive (because I suspect this to be the underlying problem for iTunes) but this did not change anything to the path information. All the music is stored on a local drive now but iTunes marks every song with an exclamation mark.

Windows 7

Posted on Sep 12, 2016 3:07 AM

Reply
8 replies

Sep 12, 2016 6:24 AM in response to torkelsen

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.


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 (Windows only) is normal for a file that isn't quite where iTunes is expecting to find it.


tt2

Sep 12, 2016 5:39 AM in response to turingtest2

Thank you very much for your answer.

First of all, I am the only one who uses this library, I have 100% control, no third party or other player that could come in the way - I don't use Windows Media Player, only iTunes.

I put the music on a NAS, some years ago, to access it from another machine using iTunes as well. This worked fine for some time. But from a certain iTunes update on, it started to not find certain songs while others would still be found.

Recently I had a bit of time and I thought the reason for the file-not-found error might be that iTunes does not like drives in the network, so I had iTunes change the library and songs to a local disk. It just didn't change the issue.

"Look on the file tab for the location that iTunes thinks the file should be", you write. That's what I did, and while the original, working path would have been before I changed it to a local disk (for example): T:\iTunes\iTunes Media\Music\Fila Brazillia\Black Market Gardening\04 Blubber Plinth 1.m4p

in the location field was the following entry: file://localhost/T:/iTunes/iTunes Media/Music/Fila Brazillia/Black Market Gardening/04 Blubber Plinth 1.m4p which is, as you say "normal for a file that isn't quite where iTunes is expecting to find it." But why didn't iTunes find those songs even if I never changed their location (until yesterday). I have no explanation to this. Even if I try to correct the path now for one song, iTunes accepts the correct path - but only for this one song and not for the rest of the disk which is stored under the same path.


Anyway, the answer to the 3 questions is

1. The location of the media folder is now: E:\iTunes Media

2. file://localhost/T:/iTunes/iTunes Media/Music/Oregon/Always, Never, And Forever/01 Beppo 1.m4a

3. E:\iTunes Media\Music\Oregon\Always, Never, And Forever\01 Beppo.m4a

Sep 12, 2016 6:33 AM in response to torkelsen

Assuming the file://localhost/T:/iTunes/iTunes Media/Music/... pattern is typical then you should change the drive letter to T:, create an iTunes folder at T:\iTunes, put iTunes Media inside T:\iTunes, then fire up iTunes and reset the media folder to T:\iTunes\iTunes Media, then close iTunes, reopen, and test.


Alternatively you can use my script and tell it to start searching from the E:\iTunes Media folder, although I would recommend you add the extra iTunes folder into the path anyway while you're fixing things so you can place the library files in there at a later date if needed. (See Make a split library portable for more.)


tt2

Sep 12, 2016 6:50 AM in response to turingtest2

"then you should change the drive letter to T:, create an iTunes folder at T:\iTunes, put iTunes Media inside T:\iTunes, then fire up iTunes and reset the media folder to T:\iTunes\iTunes Media, then close iTunes, reopen, and test."

This structure still exists on the T:-Drive - and since it stopped working from a certain version of iTunes on (not sure which), I copied everything to E: (a local disk). So I will have to take a closer look to your script, thank you.

Sep 12, 2016 7:21 AM in response to turingtest2

I tried your script which is working fine so far, there is just one problem: I am german and working on a german machine with a german version of iTunes. The script seems to expect some file description in english but finds a file description in german, so the script says:

The function "ExtFromKind" needs updating to generate the correct extension for files of type: AAC-Audiodatei

How could I possibly fix this to have the script run automatically?

Sep 13, 2016 3:32 AM in response to torkelsen

Open the script in Notepad++ and locate the function ExtFromKind which starts like this:


' Determine file extension - .mp3 .mp4 .m4a .m4b .m4p .m4v .mov .mpg .mpeg .wav .aif .mid .ipa .ipg .ite .itlp .m4r .epub .pdf

' Modified 2016-05-25

Function ExtFromKind(K)

Dim E

Select Case K

Case "AAC audio file","Apple Lossless audio file","Purchased AAC audio file","Matched AAC Audio file"

E=".m4a.m4b"

Case "AIFF audio file"

E=".aif"



You need to add the German description to each line as appropriate. E.g.

Case "AAC audio file","Apple Lossless audio file","Purchased AAC audio file","Matched AAC Audio file"

becomes

Case "AAC audio file","Apple Lossless audio file","Purchased AAC audio file","Matched AAC Audio file","AAC-Audiodatei"


Save the script and it will be able to find similar files. Depending on the composition of your library you may only need to add two or three definitions.


tt2

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 doesn't find my music anymore

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