Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Okay, so I've always stored my music on my external hard drive and run it from there with iTunes. Recently, however, it's being a little awkward. I think it was because I accidentally tried to run a song off my hard drive when it wasn't plugged in and, as would be expected, it said it couldn't find it.

So I plug the hard drive in, locate the file and off it goes. But now it won't find any of the files... When I go to the "Get Info" page on the right click menu on a song I notice it has prepended file://localhost/ to everything, so my paths look like this: "file://localhost/E:/Sam/Media/Music/[song name]"

I went into the iTunes Music Library.xml file and did a search and replace for file://localhost/ and replaced it with nothing and tried opening iTunes again and it just added file://localhost/ to every file again!

Anyone have any idea why it does this and how to fix it without reimporting my library?

share|improve this question
    
have you tired re-importing you XML file? –  fady Apr 21 '10 at 20:17
    
what operating system? I'm assuming Windows from your file address path...which one? –  studiohack Apr 21 '10 at 22:35

4 Answers 4

I believe you need to delete the iTunes Music database file, then when iTunes restarts, it will rebuild the database file with the iTunes Music Library.xml file.

share|improve this answer

Delete every item in your iTunes Library, but don't send it to the recycle bin. Then go to your external HDD and drag 'n drop them back into the iTunes Library.

Note: I know you said that you need an alternative to reimporting but this is the only method that works.

share|improve this answer

I had this same problem and fixed it in a simple way.

My files are also on an external drive. iTunes was looking for the files with this string: file://localhost/volumes/MyBook but my drive had been renamed to `Untitled`` for some reason.

So I simply renamed back to MyBook and all 5,000+ of my songs came back to life! What a relief. Maybe that will help some of you.

share|improve this answer

In my experience, the "file://localhost" bit seems to show up when iTunes is unable to locate the file. As long as the rest of the path is correct, everything should work correctly the next time you start iTunes with the external drive connected.

One thing to check is that your external drive is still using the same drive letter (in your case, E: ). If the drive letter has changed, you can fix it as follows:

  1. Click Start>Run (or in Vista/7, just click Start) and type diskmgmt.msc
  2. Right-click your external drive and select "Change drive letter and paths..." and change it to E: (if something else is using E:, you will need to change it to something else first).

If the actual path to your music has changed, or you do not want to change the drive letter of your external drive, you can edit the iTunes Music Library.xml and do a find/replace (no need to remove the file://localhost bit), but once you've done that you need to delete your iTunes Library.itl and import the XML file as documented here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.