In Windows 7, Media Player is supposed to update the library automatically by default, but unfortunately it does not do that, and there is no update button. Although it shows that is doing something when started, it does not scan for new files or remove the delete videos and music from the library. Since there is no button to rebuild and update the library,you have probably tried removing and adding the media folders again and again, only to find that it has little or no effect. This is quite annoying especially if you are using it as DLNA server and expect to see the newly downloaded media on your iPad for example.
The only thing that works is removing all the files from the Media Player Local Data folder, but it involves a lot of clicking and remembering where the folder is. So instead of doing it manually here is a simple BAT script that will do it for you.
Create a new file “Media Player Update.bat” on your Desktop and paste the following lines. You can use Notepad for example. Save the file and close Notepad and Media Player. Now, all you have to do is click the .bat file and it will clear the Media Player cache files and start it again to update the Media Player Library from scratch.
net stop WMPNetworkSvc cd %LOCALAPPDATA%\Microsoft\Media Player del *.* /f /q /s rmdir "Art Cache" /s /q rmdir "HME" /s /q net start WMPNetworkSvc "%ProgramFiles(x86)%\Windows Media Player\Wmpconfig.exe" HMEOn "%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe" /prefetch:1
This has been tested on Windows 7 64-bit and it works great. For other version like 32-bit Windows 7 and Vista it might need small modifications. The commented start service and stop service lines are optional. On some Windows 7 installations, stopping the Media Player service can cause problems.