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.

My iTunes media folder keeps resetting to default. Please please help.

Writing this late on a Sunday evening.


I've been using iTunes since around 2005, I currently have it installed on an HP Envy laptop which is approx. 4 years old but in great condition. I have over 200,000 tracks stored on a Synology DS216play (version DSM 7.1) and have used this set-up since 2016 experiencing only a couple of minor problems. The Synology is

always connected to my laptop. I’m not a techie, I kind of battle through slowly if I hit issues and get confused if explanations are jargon heavy so if you can help, please keep it simple.


A week or so ago my laptop got crushed in the boot of a car and the screen broke. A local guy fixed it and it seems to be working fine. However, he also increased the memory (hard drive) and whilst my laptop is now as good as new, I’ve had to reload all of my programs…including iTunes. I’ve hit a serious problem playing

my music and have spent most of the weekend hunting online for help. Either I’m not understanding what I’m reading, or the suggestions just aren’t working.


It appears to be a common problem which is simply when I try to alter the folder location (in Advanced Preferences) from ‘C’ to my Synology (‘F’), it accepts the new location but still nothing plays. I can see every track I have but only about 1% of them change to ‘F’ and play, the majority have exclamation marks alongside them and still state file://localhost/C: in the file information. If I close iTunes then reopen it, the folder location reverts back to ‘C’.


I initially downloaded iTunes version 12.10.11 (64bit) but couldn’t get anywhere as the message: The file ‘iTunes Library.itl’ cannot be read because it was created by a newer version of iTunes. I have no idea what version I was running prior to the laptop being fixed. The current version I am having this issue with is 12.12.10.1.


I have tried holding down the Shift key and double-clicking the iTunes icon but once I change the location and click ‘Open’ nothing happens. Some people online with this problem have reported that this works. Does it sound like I am missing a step? I have tried so many things, but nothing works. One suggestion was to delete the folder with my playlists and ratings in but that has taken me years to sort and I’m not sure it’ll work anyway. Please, any ideas would be appreciated.


Many thanks.

Posted on Oct 8, 2023 4:31 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 9, 2023 11:51 AM

There is a bug in recent builds of iTunes that, at least for some users, seems to stop the media folder preference from being saved properly. See Make a split library portable - Apple Community and put your library in a shape that isn't affected by the issue, and is easier to backup and move around in future.


As for the .itl read error see the section of bullet points in Empty/corrupt iTunes library after upgrade/crash - Apple Community.


tt2

Similar questions

11 replies
Question marked as Top-ranking reply

Oct 9, 2023 11:51 AM in response to Theodore_Mutt

There is a bug in recent builds of iTunes that, at least for some users, seems to stop the media folder preference from being saved properly. See Make a split library portable - Apple Community and put your library in a shape that isn't affected by the issue, and is easier to backup and move around in future.


As for the .itl read error see the section of bullet points in Empty/corrupt iTunes library after upgrade/crash - Apple Community.


tt2

Oct 17, 2023 10:39 AM in response to Theodore_Mutt

I'll start with some boilerplate....




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.



--- End of boilerplate ---



Your structure that you posted earlier explains part of the issue. When tracks are in the standard iTunes layout of <Media Folder>[\Music]\<[Album]Artist>\<Album>\[D-]## <Name>.<Ext> iTunes can usually do a reasonable job of reconnecting a moved media folder when you correct the path in preferences (and it can remember that new path). When you organize everything by hand any move has to be carefully planned, or you do what I do and use a script to organize things to my custom layout and update the link in the library as part of the process.


Note you likely don't want to consolidate anything. For a start that only affected items that iTunes can currently find, and it puts them in the standard layout, not the way that you want them.


One potential approach is to use the FindTracks script noted above with some extra logic to cope with the subfolders that you mentioned, ‘1. Studio albums’, ‘2. Live albums’, ‘3. Miscellaneous’, ‘4. Compilations’. Alternatively you might import all of the media from the current locations (with Keep organized turned off) and then dedupe the library with another of my scripts. See Duplicate songs in iTunes - Apple Community for details. The DeDuper script should be able to merge ratings, play counts, and playlist membership, while discarding missing tracks. I think it can even preserve date added by switching the broken link to the found track, but it is a while since I used it personally.


Whatever approach you take back up everything first so you can restore the current state if things don't work out as expected. Be extra careful with NAS drives as they don't always behave in quite the same way as local storage.


tt2

Feb 22, 2024 6:46 AM in response to turingtest2

Part 2 (of 2)


Questions

The more files I plod through, the more confident I feel I will eventually get everything back how it was and should be. I’m pretty sure the initial carnage with duplication/corruption was caused when the iTunes Library was lost as a result of my laptop breaking and certain folders/files disappeared when the memory was expanded. However, I would appreciate it if you would help with the following questions.


1.      Which of the folders/files mentioned above are safe to delete. Despite reading masses of help topics online, my understanding of the iTunes basics is still patchy and whilst I think the older files/duplicates aren’t required,  I don’t want to delete something that I need which will cause me more grief.

2.      Despite moving everything off my PC, weirdly there is still an ‘iTunes’ folder in ‘Music’ on my PC which holds the following: ‘Album Artwork’ folder, ‘iTunes Media’ folder and ‘iTunes Library’ (last modified 2023.10.13). Surely these aren’t needed.

3.      Re the error message 13005 (mentioned above), I find it hard to believe the Library isn’t being saved as I have been turning my laptop on and off after changes and it’s not like I’m losing any. Should I ignore this when it appears and is there anything I can do to stop it popping up?

4.      Given everything that has happened, would you agree the corruption was probably as a result of iTunes

pulling info from anywhere other than the lost Library?


If you have any questions relating to this post, please let me know. I really want to believe the end is near.

Many thanks in advance.

Feb 22, 2024 11:23 AM in response to Theodore_Mutt

Hi,


1: Rough view of the normal layout of the iTunes folder:

(Ignore iPod Games, iTunes U, Mobile Applications, Tones & Voice Memos; all obsolete now!)



If you manually manage the folder layout within the media folder files will be wherever you put them. If you move anything manually once connected to iTunes then it will lose track of the file until you either put it back where it came from or give it an updated location by manually browsing when prompted, or by use of a script.


2: When you install iTunes it will normally create an iTunes folder at C:\Users\<User>\Music\iTunes. If your active library is on another drive the original folder won't be removed automatically. Any housekeeping has to be done by hand.


3: Unable to save library errors may be the result of anti-virus software when considering local files, or perhaps networking issues when the data is being saved over the network. When iTunes saves the library it typically creates a file called iTunes.tmp, deletes iTunes Library.itl, then renames iTunes.tmp to iTunes Library.itl. Check for hidden .tmp files in the iTunes folder. These aren't meant to persist so if any exist that is when something has gone wrong. Close iTunes before shutting down your laptop. Review any security software. Your library file should be called iTunes Library.itl. Remove the trailing .itl from iTunes Library.itl.itl and shift-start-iTunes to select the renamed library.


4: Hard to say. Ideally you would keep a complete backup of the .itl, supporting files, album artwork folder, and all of your media, so that in the event of a disaster all can be restored exactly as they were.


tt2

Oct 27, 2023 8:23 AM in response to Theodore_Mutt

So my "time to fix iTunes" hasn't materialised and I'm off again today until 6th November. Work pays the bills but this isn't great. I'll be on it as soon as I return. In answer to your 3 questions...


  1. F:\iTunes1\iTunes Media (F: is my Synology NAS)
  2. None of the tracks show anymore so I can't answer these questions, sorry.


Somewhere along the lines I have done something that was clearly a basic error as at one point I could see all of the tracks. My fear is I have now lost any hope of seeing my ratings (and possibly manually copying them over if I can't track them down anywhere else). The same goes for my playlists. Roll on 6th November.


Oct 9, 2023 4:32 AM in response to Theodore_Mutt

This isn't a reply as such, just more info as I'm completely stuck. After more reading online, I think the issue could be related to the fact my iTunes Database File (.itl) - so not the actual tracks but 50.6MB of info - is sitting on my C drive. That said, it has always been there so it should work...shouldn't it. Note: It is possible to click 'info' on a track that has an exclaimation mark, find it (in 'F' - Synology) and it'll play, even after restarting when the media folder location is showing 'C'. If anyone out there has ideas, please share them.

Oct 13, 2023 12:28 PM in response to turingtest2

Hi. Many thanks for your reply, everyday life has delayed me working through your ‘Split library’ information until

today. I jumped in earlier and after many hours of carefully following your instructions, I feel I have got somewhere but not necessarily where I need to be. To make sense of what I mean by this, I need to briefly explain in the following paragraph how my music folder was set up prior to me having to reinstall iTunes. I have 5 points/questions relating to where I am so have numbered them below. Any help or advice would be appreciated.


1.

I have around 1800 folders, each containing a different music artist. In each folder I have sub-folders, typically ‘1. Studio albums’, ‘2. Live albums’, ‘3. Miscellaneous’, ‘4. Compilations’. I have spent many years getting to this point which helps me easily find tracks and compile playlists. When I re-downloaded iTunes after I got my laptop back, not only wouldn’t it read from ‘F’ (the main problem) somehow my Music folder on Synology duplicated many of the albums within their original folders. For example, previously ‘Aladdin Sane’ would sit in the David Bowie folder in the ‘1. Studio albums’ folder with all 10 tracks in it. After the reload, a folder (also named ‘Aladdin Sane’) appeared on its own, sitting under ‘4. Compilations’ but when opened it only contained 2 tracks. When I looked back at the version in ‘1. Studio albums’ these same 2 tracks were missing. On Bowie’s albums alone, over 30 duplicates were created as well as new folders ‘David Bowie & Iggy Pop’ and ‘David Bowie with Tin Machine’. This glitch has caused havoc with my collection, but I live in hope it may go back to how it was if I can fix the bigger picture. That said, I don’t think I can restore to an older version of iTunes as I’m not sure where that information would be as it wasn’t backed up to the cloud.


2.

I’ve followed your directions re creating a library on my external Synology drive which took way longer than I expected as it wasn’t until I deleted the iTunes folder from my ‘C’ drive that the media folder stopped resetting from ‘F’ back to ‘C’. Once I could close iTunes and re-open it knowing ‘F’ remained as the default, I could see all 200,000+ tracks but realised all of them still had exclamation marks next to them and wouldn’t play. I then realised (looking back at your 2 typical layouts on the link you included) that ‘Music’ was outside of the ‘red box’. I then created a new folder within my main music folder (alongside the other 1800 folders), called it ‘iTunes’ and added ‘iTunes Media’ and ‘Music’ folders inside it. As you suggested, I tested every step and at this point I copied an artist’s folder into the ‘Music’ folder to see if the tracks played. When I tried to click onto iTunes to play the tracks, none of the albums from the numbered folders (i.e., ‘1. Studio albums’ etc) could be seen, but the folders that sat below them (the copies of the albums) could be and played okay.


Whilst I see this as a step forward, I’m pretty sure I have done something wrong as I have used this foldering system for years and find it hard to believe iTunes would take such a backward step as to limit the way people can set up their folders.


3.

I have noticed that within the new iTunes folder in ‘F’ (Synology) both ‘iTunes Library Extras’ and ‘iTunes Library Genius’ files have duplicated themselves. I have no idea is this is relevant to this issue or why this has happened.


4.

Given the mess this whole issue has made of my collection, I’ll admit to being too scared to hit the ‘Consolidate files’ button in ‘Organise Library’. Thought I’d include this just in case it is relevant.


5.

I just checked something on iTunes prior to posting this reply and iTunes now isn’t showing any music after it opens even though the media folder is still showing ‘F’. It turns out I'm either further down the non-Techie pathway than I thought or iTunes truly is the work of the devil. This has been a long fruitless day. Any further help would be appreciated. Many thanks.

Oct 17, 2023 5:36 AM in response to Theodore_Mutt

Once again, this isn't a reply, just me updating the world on what happened between last Friday (13th) and today (Tuesday).The majority of my weekend was spent trying and re-trying things I could find on this forum and elsewhere with the only positive being I can now see all of my tracks but can still only play a small percentage (maybe 1%). The duplications as mentioned in point 3 above have also stopped.


After my initial laptop problem, the guy who fixed the screen has managed to save all of my downloads and a number of other files that weren't backed up to the cloud. Unfortunately there weren't any iTunes folders in there so I've now resigned myself to simply wading through them all to sort them out at a later date.


For now, if anybody can simply help me to get all of my tracks to play, you would be a God in my eyes. I can't continue on a day to day basis without music and whilst Spotify is staring at me and calling me over on a regular basis, I really don't want to answer that call.


turingtest2...if you have any further suggestions, please feel free to share them, I just don't understand why all the tracks won't play.


Many thanks




Feb 22, 2024 6:42 AM in response to turingtest2

Part 1 (of 2)


This message is in 2 parts as despite various checks to keep me under the limit,  the rulings for keeping under 5,000 characters told me I’d exceeded said limit.


Apologies for the extremely long delay in responding, more work abroad and a crazy start to the year…the word ‘relentless’ springs to mind. I have jumped in and out of the iTunes issue but am currently resting up so trying to resolve the iTunes issue once and for all.


Current situation

Things have moved on since my last post on here as I finally managed to get iTunes working with all tracks showing but the duplication/corruption issue remained. Given all was working well, I commenced the clean-up of my files but very quickly realised it would take forever. During a random conversation with a friend who knows coding, I shared my iTunes corruption problem. To cut a long, boring story to the bone, he wrote a short program that found duplicated folders (for albums) and moved any tracks in them back to the original (same name) folder. This process fixed around 75%. and over the last few weeks I’ve been working through the rest.


A couple of weeks ago, iTunes fired a warning shot across my bows ‘The iTunes Library Extras.itdb file is locked, on a locked disk or you do not have write permission for this file’ appeared out of nowhere. After

reading up previous posts on this forum I simply restarted my laptop and everything worked fine (although this has happened a total of 3 times now). A week or so ago the following message popped up on my screen: ‘The iTunes Library file cannot be saved. An unknown error occurred (13005)’. It kind of slowed me down somewhat and make me think I should repost on here.


Information

Hopefully, the following information will mean way more to you than it does to me and help you with any advice you would kindly give.


All my music is held in the ‘Music’ folder on my Synology DSM (7.1) which is where I have relocated the ‘iTunes’ folder to. At the same level as the ‘iTunes’ folder there is also a folder named ‘Music’ (which I named ‘F’) which was the original location I used which iTunes pulled from when it was located on my PC prior to this problem. When my PC got smashed (and repaired) I moved iTunes to Synology and copied this original music folder as I was unable to successfully link to it. I plan to delete it once everything is working okay. I refer to the copied (new music folder) as ‘O’.  Music (\\synology\music\iTunes\iTunes\Media) (O:) Also in the main ‘Music’ folder (and I’m not convinced they should be there…or even exist) are the following: ‘.iTunes Preferences.plist’ (last modified 2016.03.02), ‘Iainfback.xml’ (last modified 2016.03.27), ‘iTunes Library.itl’ (last modified 2023.10.09), ‘iTunes Music Library.xml’ (last modified 2016.03.13) and ‘Music.xml’ (last modified 2016.03.27).


Within the iTunes folder there are 3 folders: ‘Album Artwork’, ‘iTunes Media’ and ‘Previous iTunes Libraries’.

The following files also exist within this folder: ‘iTunes Library Extras.itdb’ (last modified 2024.02.22), ‘iTunes Library Genius.itdb’ (last modified 2024.02.09), ‘iTunes Library.itl’ (last modified 2024.02.22), ‘iTunes Library.itl.itl’ (last modified 2023.10.27), ‘iTunes Library.xml’ (last modified 2024.02.22) and ‘iTunes Music Library.xml’ (last modified 2020.01.14). I am aware some of the spellings of these names are odd but I can assure you they are as seen (and checked 3 times).


Within ‘iTunes Media’ there are 2 folders: ‘Automatically Add to iTunes’ and ‘Music’ (‘O’). There is also a file ‘.iTunes Preferences.plist’ (last modified 2020.09.21). The Music folder has 1,792 folders in it.


My iTunes media folder keeps resetting to default. Please please help.

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