xml files in iTunes folder

What's the difference between "iTunes Library.xml" and "iTunes Music Library.xml". Are they both necessary for the iTunes Library to operate properly? It seems like they sometimes/might get regenerated if you delete them, but I'm not sure. Does anyone know anything about them?

MacBook (Intel), Mac OS X (10.5.2), iTunes 7.6.1

Posted on Mar 17, 2008 8:49 AM

Reply
14 replies

Mar 17, 2008 10:07 AM in response to varjak paw

iTunes has an iTunes Library file (no extension on a Mac)

Actually, it is .itl but in the Finder you can turn on/off show extensions for know file types. I believe it's in Finder View options.

*iTunes Music library.xml* is the default .xml file.
If I recall correctly, if the iTunes library file is not in the default location, iTunes creates the *iTunes library.xml*.

Mar 17, 2008 11:06 PM in response to Chris CA

Hmm so still, what's with this "iTunes Library.xml" then? I have an "iTunes folder" (with library files inside) on both my ext and int drives. The ext drive only has "iTunes Library.xml", while the int drive has both "iTunes Library.xml" and "iTunes Music Library.xml".

Should I rename the file on the ext drive to "iTunes Music Library.xml" ??
Should I delete the "iTunes Library.xml" on the int drive?
What happens if you delete the xml file? Does iTunes regenerate it?

Mar 17, 2008 11:14 PM in response to audiofreq

I just tried creating a new iTunes Library to test this, and it created the "iTunes Library.xml" file. So maybe this naming is a new thing. Maybe the "iTunes Music Library.xml" is what a previous version called it?

After I deleted the file, a new one was generated, and it appears to update itself whenever you close iTunes (makes sense, since it says "iTunes is saving your library" usually).

Mar 17, 2008 11:27 PM in response to audiofreq

In the default location (\Username\Music\iTunes) only the iTunes library (no .itl) and the iTunes music Library.xml are needed.

BTW, the .xml file is not really needed for iTunes. iTunes creates it only for other applications to access the library.
You can delete the .xml file and iTunes will recreate it.

I created a new library in a different location (hold Option when starting iTunes, then select *Create new library*) and the iTunes library and iTunes library.xml file are there. No iTunes Music Library.xml file.

If in doubt, drag the xml files to the desktop and start iTunes.

Mar 18, 2008 7:56 AM in response to Chris CA

Hi, Chris,

I just checked and you're right; iTunes 7.6, at least, does indeed create only iTunes Library and iTunes Library.xml files when a new library is created. But if you delete the iTunes Music Library.xml file and then launch iTunes, it cheerfully creates a new iTunes Music Library.xml file, not iTunes Library.xml. So I'm not sure what's causing the difference in file names, but both seem to be valid depending on the circumstances.

Mar 18, 2008 1:04 PM in response to varjak paw

OKAY, HERE'S THE DEAL WITH THE XML FILES:

- "iTunes Music Library.xml" is the xml file for the default iTunes folder (\Username\Music\iTunes)
- "iTunes Library.xml" is the xml file for any user-created iTunes library folders that are NOT in the default location
- BOTH of the above xml files will be contained in the folder if it was created in the default location and then moved to another location.
- EITHER of the xml files can be deleted and will be regenerated the next time iTunes is opened

-----

Here's what I did to draw the above conclusions:

- before beginning I moved the default iTunes folder (\Username\Music\iTunes) so I didn't lose my initial library

-then:

(A) started iTunes without holding "option"
- new folder automatically created in default location, containing "iTunes Music Library.xml" but NOT "iTunes Library.xml"
- then I moved this to another location for later testing
(B) "option"-opened iTunes and created new library in default location
- the created folder contained "iTunes Music Library.xml" but NOT "iTunes Library.xml"
- note: same as (A)
(B) created new library in arbitrary location
- "iTunes Library.xml" was automatically created, but NOT "iTunes Music Library.xml"

- next, I opened up each library (A, B, C) and imported an album into each.
- (A) now contained BOTH "iTunes Music Library.xml" AND "iTunes Library.xml"
- (B) still just contained "iTunes Music Library.xml"
- (C) still just contained "iTunes Library.xml"

- then I deleted all the xml files and opened all the libraries again.
- (A) ONLY "iTunes Library.xml" was recreated
- (B) "iTunes Music Library.xml" was recreated
- (C) "iTunes Library.xml" was recreated

- next, I deleted the default folder (B) and (C), and move (A) back into default location (but folder not named "iTunes").
- oddly, a new iTunes folder was created, but was empty
- folder with library file only contained "iTunes Library.xml", even after making changes to library files and closing.

- then, I deleted the empty "iTunes" folder and renamed the other folder to "iTunes" and opened the library.
- BOTH "iTunes Music Library.xml" and "iTunes Library.xml" were there.
- after deleting both xml files and reopening iTunes, ONLY "iTunes Music Library.xml" was there.

- note: all of these "iTunes" folders contained "Album Artwork" and "iTunes Music" folders as well as the "iTunes Library" file.

Mar 18, 2008 1:06 PM in response to audiofreq

Wow that was a lot of work for something so relatively insignificant, but I'm glad I know now. I don't like file clutter, and I'm very careful about my iTunes library (way too many ratings to risk losing!).

So, now I now that I can delete the "iTunes Music Library.xml" file from any iTunes folder not in the default location, and I can delete "iTunes Library.xml" from the default iTunes folder. Actually though, I can delete any of these files and they will be regenerated!

I hope someone else finds this useful besides me. I'm such a nerd...

Mar 18, 2008 1:18 PM in response to audiofreq

Warning - be careful whenever you're working with iTunes library files! After all this diligent testing, I deleted all the test folders, then moved my original iTunes folder back to its default location.

Then I realized that I hadn't closed iTunes, and so after I closed it and reopened from this library, my original library had been replaced with the test one that was open last. What a stupid mistake!

Fortunately, this was done on a new library I just started using, and my old priceless library (with all the ratings) is safely untouched on my external drive!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

xml files in iTunes folder

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