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.

Changing "iTunes media folder" doesn't correct location of songs on Library

Hello forum,


Long time user first time poster here. I have an issue with my newly upgraded PC.


I'm using iTunes 12.5.2.36 and have quite an extensive library on an external hard drive "E"; this setup has worked for me for several years now, I have changed drives before and managed to port my library from one HD to another without issues.


Now, I just upgraded my PC and I'm having issues making sure my library content points to the external hard drive as before. So far I have:

  1. Installed iTunes 12.5.2.36 on the new upgraded PC (Windows 10 Pro, ASUS H170-PLUS, Intel Core i5, 16 GB DDR4 Kingston Fury RAM)

    User uploaded file

  2. Turned ON the external hard drive where all my music is

    User uploaded file

  3. Copied over the backup (got it copied to another external HD before doing the PC upgrade) of my library to the new "Music" folder on my PC

    User uploaded file

  4. Opened iTunes with "shift" pressed in order to get the option to open my newly copied library
  5. Changed the "iTunes media folder" location

    User uploaded file

  6. Tried to confirm songs now point to the newly set "iTunes media folder" location but seen the old location

User uploaded fileUser uploaded file


Now, trying to resolve the issue I made a backup of my library .xml file, and did a search and replace for all the places where "file://localhost/C:/Users/oscar/Music/gTunes/iTunes%20Music/" is being used and changed them to "file://localhost/E:/"; I then opened Itunes again but the files are still pointing to the "C:/" location.


I have spent few hours already trying to get my library as it were before the PC upgrade but starting to get desperate.


Any help is greatly appreciated and kudos for such an awesome community.

Windows 10, External hard drive

Posted on Oct 31, 2016 10:52 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 2, 2016 11:32 AM

Changing "iTunes media folder" doesn't correct location of songs on Library


This is correct, and it has always been the case. Note that a well-formed library has the library files in \iTunes, with the media in \iTunes\iTunes Media, and artist folders down inside \iTunes\iTunes Media\Music. It may be best to manipulate the library into this shape before trying to repair it. The XML file is provided for third party support. iTunes doesn't read it except in very particular instances of library corruption, where iTunes may try to rebuild the ITL using it, however this potentially leads to the loss of some original information.


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

7 replies
Question marked as Top-ranking reply

Nov 2, 2016 11:32 AM in response to oavina

Changing "iTunes media folder" doesn't correct location of songs on Library


This is correct, and it has always been the case. Note that a well-formed library has the library files in \iTunes, with the media in \iTunes\iTunes Media, and artist folders down inside \iTunes\iTunes Media\Music. It may be best to manipulate the library into this shape before trying to repair it. The XML file is provided for third party support. iTunes doesn't read it except in very particular instances of library corruption, where iTunes may try to rebuild the ITL using it, however this potentially leads to the loss of some original information.


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

Nov 2, 2016 11:40 AM in response to turingtest2

turingtest2 wrote:


Changing "iTunes media folder" doesn't correct location of songs on Library


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.


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


Thank you for your reply TurningTest2,


I think my issue relates to the pre-Itunes 9 layout you mention. This was an somehow old installation of iTunes so it can perfectly predate the change on layout for iTunes 12 libraries, hence the issue.


Please find below the specific details you asked for:

  1. The location of the media folder under Edit > Preferences > Advanced

    User uploaded file

  2. The location of a sample missing track shown under Get Info > File > Location that begins file://localhost/
    • file://localhost/C:/Users/oscar/Music/gTunes/iTunes%20Music/Abacus%20and%20Esthe ro/Unknown%20Album/When%20I%20Fall%20(In%20Love).mp3
    • User uploaded file
  3. The true path to the file whose details you gave in 2

    D:\Abacus and Esthero\Unknown Album\When I Fall (In Love).mp3


Thank you again for taking some time from your day to look into this, greatly appreciate it.


Regards.

Nov 3, 2016 10:22 AM in response to oavina

So your library was in the old layout, with the artist folders in the media folder, and the media folder still called iTunes Music instead of the new name of iTunes Media. I suggest you create the folder D:\iTunes\iTunes Media\Music, move the artist folders that are currently in D:\ down into the new folder, reset the media folder under Edit > Preferences > Advanced so that it points to D:\iTunes\iTunes Media, then try the repair method described earlier:


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.


tt2

Nov 3, 2016 10:19 AM in response to turingtest2

turingtest2 wrote:


So your library was in the old layout, with the artist folders in the media folder, and the media folder still called iTunes Music instead of the new name of iTunes Media. I suggest you create the folder D:\iTunes\iTunes Media\Music, move the artist folders that are currently in D:\ down into the new folder, reset the media folder under Edit > Preferences > Advanced so that it points to D:\iTunes\iTunes Media, then try the repair method described earlier:


tt2


Hello again,


I moved all my music to "D:\iTunes\iTunes Media" as this was the Folder iTunes (at least 12.5.2.36) uses if you make "D:\iTunes\iTunes Media" your iTunes Media Folder on Advanced preferences.


Now, unfortunately I did not get the prompt to update the rest of my broken links so I either fix them one by one or I use something else; do you think your "FindTracks" script could help?


Many thanks, think I'm a little bit closer to get this sorted out. 🙂

Nov 3, 2016 10:29 AM in response to oavina

In the modern layout artist folders go into a Music subfolder of the designated media folder, in the same way that podcasts go into Podcasts, movies into Movies, etc.


Make sure iTunes shows at least two tracks with exclamation marks. Try play > locate. Try Get Info > locate. If neither work use FindTracks and point it at the iTunes Media folder.


tt2

Nov 3, 2016 11:22 AM in response to turingtest2

turingtest2 wrote:

Make sure iTunes shows at least two tracks with exclamation marks. Try play > locate. Try Get Info > locate. If neither work use FindTracks and point it at the iTunes Media folder.


tt2


The "Play > locate" triggered iTunes to find the files, unfortunately a lot of my files were not found, will try my luck with the script and see if the rest can be found or if I completely lost them. 😟

User uploaded file


Does the script work on Windows 10?

Changing "iTunes media folder" doesn't correct location of songs on Library

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