Windows Media Player - Empty Music Library

Music Library

I was working on my office computer, a Windows 7 Pro box, when I launched Windows Media Player, and to my shock I had no music in my library. I jumped to my Music folder and there was nothing.
What, where did my music go!

After some research I found that the problem causing WMP to drop your music library is either:

  • Database get corrupted
  • Attributes get fowled up
You can tell if you have attribute errors by navigating to your Music folder.
  • Are you files there ?
  • Are they marked as Read-only ?

So to resolve this issue follow these steps.

Database Corrupted

  1. Exit Windows Media Player.
  2. Click Start, click Run, type %LOCALAPPDATA%\Microsoft, and then click OK.
  3. Select the Media Player folder, and then click Delete on the File menu.
  4. Restart Windows Media Player.

Attributes messed up

  1. Click Start, Click All Programs, Click Accessories. Then right click Command Prompt and select 'Run as administrator'.
  2. Type the following command attrib -r -s -h c:\users\"your user name"\music\*.* /s /d
  3. Once the file attributes are cleaned up, make sure Media Player is closed. Click Start , Click Run, Copy and paste in: %LOCALAPPDATA%\Microsoft, Click OK
  4. Delete the 'Media Player' folder completely. That gets rid of the database and the cached entries.
  5. Restart Media Player

Source for this tutorial can be found at Answers.microsoft.com