[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


How to recover a playlist after moving the music

Published on
10,426 Points
1 Endorsement
Last Modified:
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



1 Comment
LVL 17

Author Comment

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.

Featured Post

Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Join & Write a Comment

Microsoft Office 365 Backup and Restore Solution by SysTools to export Office 365 mailbox to PST / EML file format on Windows OS. On Mac, tool backup O365 to PST / MBOX / MSG / EML / EMLX file formats. Not only this, restore option helps to import s…
There are many cases found where ScanPST.exe fails to repair corrupt Outlook PST File. When user tries to repair PST using Inbox Repair tool and it throws below error: •      Inbox Repair tool does not recognize the file •      ScanPST.exe hangs in betwee…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month