iTunes PLEASE HELP - how do I generate Library.itl file?
September 29, 2021 2:36 PM   Subscribe

I put all of the music I have in a single folder on an external hard drive. I want this to be my iTunes library. When I open iTunes and go to the Advanced section to reroute it, it just... doesn't do anything. Apparently I'm missing this vital document and I don't know how to create it. Apple refuses to help me.

I have asked this question here at AskMeFi before but have been unsuccessful; I have been on the phone with Apple for over an hour and they won't help me because I am running Mojave which they no longer support.

I had my old iTunes library on my old MacBook (2009). I moved all of the music plus a huge chunk of new music onto an external hard drive, all into a single folder called "New iTunes." I opened iTunes on my newer MacBook (2016) to redirect it to that folder, but even though I type it in as the new location, iTunes doesn't show any of the music in that folder -- it keeps showing the, like, 45 songs that I bought from the iTunes store or whatever. This seems to be because I am missing the database file called "iTunes Library.itl", and I don't know how to recreate it.

I am tearing my hair out here and could really use some help.
posted by tzikeh to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
I'm pretty sure the problem is that your "library" as iTunes sees it is metadata (this missing file), and files, not just the files and folders you've copied. You can't just create a new library file easily, you'll need iTunes to create it itself.

Probably the fastest option is to re-import this folder containing all your music files into iTunes on the new machine, which will lead to the creation of a new library file. You'll lose some metadata -- I can't remember exactly which but I think play counts and things like that may be lost. Everything from the ID3 tags embedded in each file should be re-imported fine, though.
posted by Alterscape at 2:49 PM on September 29, 2021


Response by poster: Probably the fastest option is to re-import this folder containing all your music files into iTunes on the new machine

I don't have enough room on my laptop for my music. Hence the 2TB external drive specifically for this purpose.
posted by tzikeh at 2:53 PM on September 29, 2021


It will reimport the music 'metadata' from the hard drive, the music will remain on your external. The metadata will sit on your main computer, but that is tiny.
posted by sandmanwv at 2:58 PM on September 29, 2021 [1 favorite]


“Also note that this behavior is dependent on enabling "Copy Files to iTunes Music folder when adding to library" [in iTunes 7 this is] under the Advanced -> General preferences (which is on by default).”

I don’t know if that’s helpful but I remember that setting back when I used iTunes. You’d want to turn that that off.
posted by one4themoment at 3:10 PM on September 29, 2021 [2 favorites]


Greetings, fellow Mojave user!

I looked at what Google suggested for Apple and moving the iTunes library, but it doesn't really cover moving libraries to external drives, and (fun) it uses Windows screenshots. Anyway!

I'd suggest copying your "Music/iTunes" folder over, not just "Music/iTunes/iTunes Media", which holds all the music. At least here, I see an "iTunes Library.itl" file in the parent folder.
posted by Pronoiac at 5:22 PM on September 29, 2021


I did this kind of thing many times when I was a Windows user (it hasn't been a problem for me with Apple Music on Big Sur or Monterey Beta). My memories are from last fall, when I last had a Windows machine, so may not be perfect, and I'm not sure how much Mac iTunes differs from Windows iTunes.

The most important thing is to be sure you have another copy of your music folder, so if something messes up you have a solid backup of the actual important stuff.

You will need to start up iTunes and create a new library from scratch. The library can be on your local drive or your external drive -- iTunes doesn't care, but it's probably better to keep it on you local drive. The library (the library.itl file) is a separate thing from the media folder(s) and takes up very little space.

Then you will import your current music folder into the new library. To leave the music where it is, turn off any option to copy music to the iTunes music library folder, as one4themoment said. It should leave your music on the drive where it started. (My "should" here is why you are working on a folder for which you have a copy. Doing this kind of thing without backup is strongly frowned upon).

Once you've created the library, to prove you have succeeded, shut down iTunes, unplug your external drive, and restart iTunes. In my experience, this will show you the contents of your library (all your album art, id3 tags, etc) but tell you it can't find the actual files. Shut down iTunes again, plug in, and restart iTunes. It should now indicate it knows where the music files are and will let you play them.

The biggest problem I ever had was when iTunes got confused about where the music files were actually located. When I finally learned to let go and allow iTunes to actually decide where it wanted to see the files, all was well. If it wants to move the files to a subfolder of where they started, let it. It's much easier to compromise with iTunes than to dictate to it; as long as stuff is on your external drive, you should be good.

Good luck!
posted by lhauser at 6:49 PM on September 29, 2021 [2 favorites]


Best answer: Also still a fellow Mojave user (on some devices at least)!

I basically agree with everything in the answers so far and re-importing is probably the way to go at this point, but I think I might be able to further clarify what's going on, and since I'm on Mojave, can give you an exact set of steps that I've tested.

An iTunes library consists of basically two things:
  • Library part 1: An .itl file, which by default on Mojave (and many versions) is located in ~/Music/iTunes. This is basically a database of file locations, cached metadata (which is usually also in the files as well, though may not be in some cases), playlists, play counts, etc. There's a few more bits, the album art is cached separately, etc., so really part 1 consists of a small folder hierarchy with a few misc files, the .itl being the most important one.
  • Library part 2: A set of music files, which could be anywhere. But, on default settings, when you import something to your iTunes library, it also copies the file into a designated location. By default, on Mojave this location is ~/Music/iTunes/iTunes Meda/. So for many people, everything here is organized into a subfolder of the location of library part 1 (but e.g. mine is organized a bit differently because I have this turned off for most imports).
Within iTunes (on Mojave at least) you cannot change, or even view, the location of library part 1 -- by starting iTunes normally, this is already chosen. In iTunes Preferences -> Advanced, you can change the location for #2 only, which is nearly the exact opposite of what you want -- it really will just change the location for future imports. To change the location of the library (or create a new one) for #1, you have to start iTunes differently, in particular, you need to hold the Option key while starting iTunes, and another dialog will pop up.

It sounds like you no longer have the .itl file + library folder from the original library. In that case, I think what you want to do is this (building on some of the existing suggestions):
  1. Start iTunes while holding the Option key. This should pop up a dialog with choices "Quit", "Create Library..." and "Choose Library..."
  2. Select "Create Library..." and then select a location on your external drive giving it a library name that you like. Inside of the location you choose, this will create a subfolder named with your library name, containing iTunes Library.ttl, some misc other dbs, a subfolder for the album artwork, and a subfolder iTunes Media. iTunes will start with an empty library.
  3. Optional: for the next step, go into iTunes Preferences -> Advanced, and uncheck "Copy files to iTunes Media folder when adding to library". This will save a lot of time (and disk activity) but it does mean you need to be happy with the current file organization. You can recheck this after the import if you want so that future stuff does get organized. I think you can also use "consolidate" to later copy stuff under the organize folder though I haven't verified this.
  4. Optional: if you unchecked the box in the previous step, you could now move your whole music folder under the library folder you have just created, so that everything is nicely in one place. Probably name it something like "iTunes old library" or something.
  5. Now, go to File -> Add to library... and select the folder on your external drive containing all the music files. This is basically what everyone above was suggesting.
  6. You are done! Without Option held, iTunes will start up with the last library it had open. Be warned, iTunes won't open correctly if your external drive is not connected. (It'll drop you to the same choice you get when starting with Option.) It would be possible to keep the .itl file on your main drive to remedy this, but personally I find iTunes' failure mode when it can't find music files (which is now what would happen without the external drive connected) to be super annoying so I don't recommend this. Also, it'll probably need to redownload album art.
(If you do still have the whole iTunes hierarchy including the .itl file, you maybe be able to instead use the "Choose..." option at the Options dialog.)
posted by advil at 1:08 PM on September 30, 2021 [2 favorites]


Response by poster: Thank you, advil! That worked perfectly! Oh my gosh thank you so much.
posted by tzikeh at 8:24 AM on October 1, 2021 [1 favorite]


« Older What lightbulbs do I need for these fixtures?   |   To read, or not to read, that is the question Newer »
This thread is closed to new comments.