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.

📰 Newsroom Update

Billie Eilish is Apple Music’s Artist of the Year for 2024. Learn more >

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

New iTunes Media Folder location won't "stick"

This question pertains to iTunes running on Windows 10. I had my iTunes media folder (not the library itself, just the media folder) stored on a mapped network drive (D:\Music\iTunes). I needed to move the media files to a new drive (call it U:\Music\iTunes), so I did the following:


1) Updated the media folder location under Edit | Preferences | Advanced from D:\Music\iTunes to U:\Music\iTunes.


2) Went to File | Library | Organize Library and selected Consolidate Files. That resulted in iTunes copying all of the media files to the new location (U:\Music\iTunes), as expected. With a library of about 130GB of media files this took some time.


After doing this, when I right click any song in my library and choose Show in Windows Explorer, it does show the file in a path under the new location, also as expected.


However, here's the question: when I close and reopen iTunes, the iTunes Media Folder location under Edit | Preferences | Advanced keeps reverting back to the old location (D:\Music\iTunes) even if I change it again to point to the new location (U:\Music\iTunes).


I tried disconnecting the network drive (D:) and then opening iTunes. When I did this, the Media Folder location was displayed as the location of my library file on my local C: drive (iTunes Library.itl).


Since asking iTunes to show me where my songs are located in Windows Explorer shows that they are in the correct (new) location, I suspect that if I never add another song to the library I'd be fine as is. However, if I do add new media, I suspect it's going to try to put it either in the old location (D:\Music\iTunes) - at least until that network drive goes away; and then once that's gone, it's going to want to put new media files into the Music\iTunes folder on my local C: drive - which will quickly run me out of space since my C: drive is not that large.


Is there a way to force iTunes to accept the new location of the Media folder once and for all?

Posted on Apr 1, 2021 11:21 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 2, 2021 1:55 PM

Yes, that looks like it should work. On the other hand you could copy your existing iTunes files directly to U:\Music\iTunes since that is where you want them, shift-start-iTunes to access the library on the new path, set the media folder to U:\Music\iTunes\iTunes Media, and use my ConsolidateByMoving script to move files to your chosen media folder, which might be a lot faster than copying and then deleting.


tt2

Similar questions

11 replies
Question marked as Top-ranking reply

Apr 2, 2021 1:55 PM in response to mmaic90

Yes, that looks like it should work. On the other hand you could copy your existing iTunes files directly to U:\Music\iTunes since that is where you want them, shift-start-iTunes to access the library on the new path, set the media folder to U:\Music\iTunes\iTunes Media, and use my ConsolidateByMoving script to move files to your chosen media folder, which might be a lot faster than copying and then deleting.


tt2

Apr 2, 2021 9:18 AM in response to turingtest2

Thanks for the detail. Obviously I outsmarted myself when I first started using iTunes years ago and stored the media folder on my file server, instead of locally. One follow-up question on the link you provided: does iTunes, theoretically at least, first check the iTunes Media folder under the parent iTunes folder to see if media files are present there; and THEN reference the Media Folder location specified in Preferences | Advanced?


If that were the case, then "un-splitting" my library would be as easy as creating a new iTunes folder, copying the five configuration files (*.itl, etc.) and subfolders (Album Artwork, etc.) to it, and then copying all of my media files/folders (with the existing sub-directory structure intact) to the iTunes Media folder under the new iTunes folder. With that done, I could start iTunes while holding the Shift key and point it to the new copy of the library...

Apr 2, 2021 9:47 AM in response to mmaic90

Difficult to say without access to the code, but when you have a split library iTunes will check that the path to the media folder is valid on launch, and if not it will reset to iTunes Media in the same folder as the .itl file. What is interesting from your post is that it is the old path that is being restored rather than it resetting to iTunes Media. Whether or not the media folder gets reset iTunes should still assume that every track is available at the last known path.


You should be able to copy the library files and Album Artwork folder into U:\Music, access them on that path, check that music still plays, change the media folder to U:\Music\iTunes, close iTunes, rename U:\Music\iTunes as U:\Music\iTunes Media, and open the library again. It should correctly update the media folder and all of the links in the library should work. I'd also suggest closing the library, renaming U:\Music as U:\iTunes to complete the transition to the standard portable shape.


tt2

Apr 2, 2021 1:33 PM in response to turingtest2

Thank you for the detailed responses. And for your patience - I now see that my original question has been asked over and over (kind of amazing that Apple hasn't fixed this bug yet)...


I want to both: get my library portable AND get it into the standard naming convention with no extraneous files. So copying the library files and Album Artwork, etc. to the U:\Music folder is almost there but not quite - because there are other non-iTunes related media and stuff in the top level U:\Music folder. So I'm thinking:


1) Copy my iTunes folder from my local drive (the folder with the library files and album artwork folder, etc.) to the root of U:


2) Open iTunes holding down shift and point it to the U:\iTunes library file (the copy of the itl file from step 1).


3) Change the Media Folder location in iTunes preferences to U:\iTunes\iTunes Media (this should stick since it's the standard location, yes?)


4) Go to Files | Library | Organize Library, and choose the Consolidate Library option. This will take hours to create yet another full copy of my media library, but this time in the standard location of iTunes\iTunes Media


-- I believe at this point I would now have a fully portable library, yes? --


5) Delete the "old" copy of my iTunes Media folder from under U:\Music (called U:\Music\iTunes). This is the copy I made of my Media Folder based from the original file server based location.


6) Move the new library folder (U:\iTunes) - with its (hopefully permanently) associated iTunes Media subfolder - to U:\Music


7) Open iTunes with shift depressed and point it to the library file in U:\Music\iTunes


8) Live happily ever after.


Does this look like a plan?


Apr 2, 2021 6:38 PM in response to turingtest2

I think I have found a work around to this problem which infuriated me for many months. iTunes, every time it restarted, ignored my address for the music library and put new items in the "iTunes Media" folder in the same directory as the iTunes library database file.


I have a rather huge library (over 5TB) and a small SSD drive on the computer that I use as a media server. The benefit of splitting the library is that the SSD can hold the database and the image files for the album art and an external drive can hold all the media files. This allows iTunes to respond very quickly when you scroll through a huge library. I've sent multiple feedback requests to Apple to fix this bug, and apparently many others have as well. Apple doesn't seem to care about fixing the bugs in their windows version of iTunes.


So here is the work-around. Windows lets you map any drive to an empty folder. You can map it to a folder AND also have it appear as a disk drive in your computer. To set this up you have to run "Disk Management" (right click on the Windows icon). Before you do, empty the folder called "iTunes Media" by moving the contents to the top level of your external drive if you haven't moved everything already to your external drive. If you have already moved the iTunes media folder to your external drive, move the contents of the folder to the top level of the external drive (since the drive is going to become the "iTunes Media" folder.) In "Disk Management" Select the external drive in the top window, right click, and choose "Change Drive Letter and Paths...". In the window that opens select "add" and then select "Mount in the following empty NTSF folder" and then browse to the empty "iTunes Media" folder in the iTunes directory that you are using. That's it. Now the folder that iTunes wants to use is mapped to your external drive.


There is only one problem with this setup that I have found, and that is a different iTunes bug. If for some reason there is a problem with the mapped drive, like it gets unplugged, then iTunes will think all your media files are missing. It recovers from this when the drive is reattached, except that many of the album artwork images don't appear right away. They are still in the metadata, but don't reappear until you select "song info" from the first track of each album with missing artwork. When you see the metadata, you'll see that the album art is there. Closing the metadata edit window restores the artwork. Yet another infuriating bug that Apple isn't fixing...

Apr 2, 2021 6:46 PM in response to SamSF

That sounds very similar to creating a symbolic link or a junction. I haven't tested it lately but in the past iTunes hasn't always behaved well when the media folder is redirected like this, though I have used it to successfully offload iOS backup data. Make sure that you have a backup just in case iTunes ever decides to dump your data.


tt2

Apr 4, 2021 9:21 AM in response to turingtest2

Your ConsolidateByMoving script worked like a charm - thanks!


For what it's worth, U: is a portable USB drive, and not my intended final location of live data (U: will be an onsite, just-in-case, copy of all of my data). The live data is going to live in OneDrive, with the .itl and Album Artwork (essentially all non-media files) living in the OneDrive cache on my local SSD drive.


So I used ConsolidateByMoving to first "re-integrate" my library into a non-split one on the U: drive (under U:\Music\iTunes), and then subsequently moved the whole thing to <OneDrive cache>\Music\.


Here's the (perhaps) interesting part: upon first start of iTunes after the move to OneDrive, I of course had to repoint it to the itl file in my OneDrive cache. No problem there. When iTunes launched after doing that though, it was still pointing to D:\Music\iTunes for media. D: is a mapped drive to my server. That media location is essentially two library moves ago.


So I closed iTunes, and temporarily disconnected the D: drive mapping. Upon restarting iTunes (with D: not mapped to my server), it "fell back" to using the iTunes Media folder under the new library path (<OneDrive cache>\Music\iTunes).


This ridiculous behavior was re-creatable if I remapped D: to my server. Ultimately I had to rename D:\Music\iTunes to something else to stop iTunes from trying to look there for media files.


I searched the registry for any reference to "D:\Music\iTunes" and found none. That path reference must be coded in an xml or settings file somewhere until the end of time...

New iTunes Media Folder location won't "stick"

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