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.

Move iTunes library to different hard drive, without iTunes organizing my library

I've searched and read lots of posts where people have asked this same basic question but I have a little bit of a difference. I'm using Windows 11. My C drive is out of space but I have another drive with over 4TB free and so I want to move my 360GB music library to the bigger drive. All that is fairly common, however, I don't let iTunes organize my media folder, nor copy the files to the iTunes media folder. I like how I have my media organized and I don't want iTunes messing with that. I just want to move the library as-is to the other location. I've copied the entire library to the bigger drive, with the same folder names; I've redirected Windows to recognize that my Music is now in the other drive; and I've changed my iTunes Media folder location to the other drive. But it's still looking at the original location for the files. With over 9,000 tracks in my library, I don't want iTunes to change anything about the way it's organized. I feel like there's probably just some simple step that I'm missing to get this to work but can't seem to figure out what it is.

Windows, Windows 11 (22631)

Posted on Aug 27, 2024 3:21 PM

Reply
8 replies

Aug 31, 2024 2:57 AM in response to rstrack

Moving files around by hand and then getting iTunes to reconnect to them usually leads to problems, unless the library is in the right shape (library folder containing media folder containing all media, in any layout you like). I have scripts for moving working files to a new location and updating the library with the new path, but that won't help if you've already moved the content. Depending on the rules you have for managing things your way I have another script that can potentially fix the broken links, or you can import everything from the new location and then deduplicate.



Here is my boilerplate on fixing broken links:


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.





See Duplicate songs in iTunes - Apple Community for my advice on deduping. The script I have for that should be able to preserve ratings, play counts, and playlist membership while eliminating broken references.



tt2

Aug 31, 2024 4:27 PM in response to rstrack

Uninstalling and reinstalling iTunes won't help as, baring accidents, the library is preserved unchanged by this operation. If you've already copied the files to a new location manually and they are in the same layout as before but with some common change to the path then my SwitchLinks script may be able to make the library reference the new paths instead of the old ones. This preserves ratings, playlist membership, etc. which would be lost if you simply imported the media into a new empty library.


tt2

Sep 2, 2024 9:02 PM in response to turingtest2

TT2, thanks so much! I got your script to start working for me--it took a couple of tries to realize that the iTunes locations for the tracks in my library seem to have different capitalizations for some reason for the folder names, in some cases, and the script is definitely doing a case-sensitive search. I haven't dug in deep enough yet to see why it's still skipping some of the tracks but I'll definitely figure it out.


I'm also finding that there are some tracks in my Windows folder that are not in my iTunes library. Perhaps those are things that I previously reviewed and thought I deleted or maybe I never added them to the iTunes library in the first place, so that will be a fun little exercise at the end of this process.


Since the script is not changing everything on a given pass, I'm going to take my time with this and verify, in batches, that the paths got properly updated, then delete them from the old location to free up that space.


I've bookmarked your script page, for future reference. Keep up the awesome work!

Aug 30, 2024 11:12 PM in response to rstrack

Similar situation here. My PC was less than 150mb remaining, not used my C drive for a while for music, instead using an external H drive. Tried to consolidate, but nothing seemed to happen after 3 hours - btw my H drive is where new music is imported.

So I did a straight move of the music folder over to the H drive, but all the C drive stuff just displayed ! and their location is local.tempfile.c/music or whatever.

So then I just Added Folders of everything I'd moved into iTunes and now I have 3 copies of stuff with one of them copies being marked as '!'

To complicate matters, I also have stuff on 2 other drives, F and G, in there, but iTunes is fine with that stuff.

I've got about 1tb of music, I'm wondering whether to just bite the bullet and shove EVERYTHING onto 1 folder on H and consolidate and just do huge clean up.

Also thinking that I'd prefer an mp3 only library, so would need to convert my aac and wav files so even more crap to clean through!

But when I swapped originally from C to H, I lost a lot of artwork and even some tracks and whole albums didn't load which is annoying.

Aug 31, 2024 7:40 AM in response to turingtest2

Thanks, TT2, for the very thorough response. I've seen a number of your other posts trying to help others with their similar headaches caused by iTunes, and I've gotten some useful bits of information from some of those already.


I will definitely read through your comments a couple of times at least and see what seems to make sense for me to try. Fortunately, right now, I don't have the problem with iTunes not knowing where my music is because I didn't move it from the old location, I just copied everything to where I want it to live going forward. So when I click on a track and choose Song Info and look at the File tab, it just shows everything where it has always been.


The nuclear option that I have considered is uninstalling/reinstalling iTunes and pointing it at the new location where I copied my library to, then trying to figure out which file(s) from the existing installation would have to be copied over to get my ratings and playlists, etc. to come back. Is that even a possibility?

Sep 1, 2024 9:05 AM in response to turingtest2

This sounds like it could be exactly what I'm looking for. I'm not 100% clear on the usage though and I don't want to mess anything up.


I see that the instructions on the script page read "Select a playlist or highlight some tracks in iTunes and then double-click on the script to execute it." So, does this mean select the tracks in iTunes then run the script outside of iTunes? Does it then access iTunes and see what's selected? Also, does the script try to figure out what element of the path needs to change, and what it needs to change to, or will I be prompted to specify that.


My job involves a lot of VBA macro writing in Excel and Access so the code of your script looks very familiar. Seems like this one potentially does significantly more than just redirecting links-impressive.


Thanks again for your help!

Sep 2, 2024 8:03 AM in response to rstrack

rstrack wrote:

This sounds like it could be exactly what I'm looking for. I'm not 100% clear on the usage though and I don't want to mess anything up.

I see that the instructions on the script page read "Select a playlist or highlight some tracks in iTunes and then double-click on the script to execute it." So, does this mean select the tracks in iTunes then run the script outside of iTunes?


Yes, you'll access the downloaded script from Windows File Explorer.


Does it then access iTunes and see what's selected?


Exactly so.


Also, does the script try to figure out what element of the path needs to change, and what it needs to change to, or will I be prompted to specify that.


The script should prompt you. There may be variables you can preset if you edit the script to streamline your use of it.


tt2

Move iTunes library to different hard drive, without iTunes organizing my library

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