How to recover a playlist after moving the music

As iTunes has been updated several times since I wrote the article a much needed update was required.
The updates are underlined

How to recover a playlist after moving the music from one location, folder or hard disk, to a new one, folder or disk.


I have performed this procedure after moving my music from one hard disk to a second hard disk using Windows XP sp3, I don’t know if this works on MacOS.


I have performed this procedure with Win 10 Pro 64


Words inside brackets {} refer to a path

{%UserData%} is the path to folder {My documents} of the current Windows user

Most iTunes users let iTunes manage their music, so they normally they have their music in;

{C:\%UserData%\My music\iTunes\iTunes Music}

If this is not the case for you, you need to change the default path for the music on iTunes so it points to the actual location.  To do it in iTunes; from the menu Edit>Preferences>Advanced- iTunes Music folder location

In the rare cases were people didn’t let iTunes manage the music, those people should know where their music is located.

For this example we’ll be using the default location

NOTICE: You cannot set the new path to a network location; you need to have a local disk, if you are using a NAS (Network Attached Storage) or any other type of remote storage you’ll need to map the drive before trying this.

Inside {C:\%UserData%\My music\iTunes} there are two files; {iTunes Library.itl} and {iTunes Music Library.xml}

By default iTunes does not generate the xml file, so if you can't find it do the following steps;

-Open iTunes

-Go to Edit

-Select preferences

-Select Advanced

-Check share xml library file with other apps.

-Close iTunes

Now you should have the xml file.

The rests of the procedure remains the same.

The one with the extension .itl is the database.

Make a copy of both files

With a text editor open the .itl file

Delete its contents

Save it, be sure that the .itl extension is still there and that nothing has been added at the end of the file name.

It should have a 0 Byte length

With a text editor open the xml file

You should see something like this

  <?xml version="1.0" encoding="UTF-8" ?>

  <!DOCTYPE plist (View Source for full doctype...)>

- <plist version="1.0">

- <dict>

  <key>Major Version</key>


  <key>Minor Version</key>


  <key>Application Version</key>




  <key>Show Content Ratings</key>

  <true />

  If you move downwards, you’ll find the path were your music folder used to be

<key>Music Folder</key>


 And a little lower, an entry for a specific song


So what you do is perform a “Search and Replace” on the text, search for the original path

{C:/%UserData%/My music/iTunes/iTunes music/}

and replace it with the new path

{D:/My music/}

Then save the file, be sure that the xml extension is still there and that nothing has been added at the end of the file name.

Open iTunes; it will state that the database is corrupt and will try to recover it.  Depending on the size of your database it may take a while.

Once completed, you should have a working database and your playlists should be completely functional.

If you encountered a problem performing this procedure, you can restore the original files from the copy you made at the beginning of the procedure.

This is a recompilation of answers I’ve given regarding this issue and we’re accepted


Comments (1)


This is a compilation of answers to a recurrent question, I think I've been the only one to provide this answer, I did search EE database and the only answers regarding the manupulation of files I found were awarded to me.
If there's somebody else that had provided this answer please reject the article.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.