I know it is too late to reply back, but I just had this issue and fixed it simpler and the good thing about this method is that I do not have to reboot the PC or start anything in safemode.
1-If you go to resmon from run (resource monitor) and look for associate handlers, and search for mysqld.exe, you´ll probably see it used by explorer.
2-Open Task Manager
3-Open CMD
4-Stop the explorer.exe from taskmgr (This will close all your explorer windows)
5-Go to the Command prompt or CMD and run
cd C:\XAMPP\directory where the mysqld.exe is stored, once you are within the directory where mysqld.exe
type and run del mysqld.exe to delete the file
type and run explorer.exe and everything will go back to normal, you will see the file dissapeared and you will be able to delete the directory.
Late but I just wanted to provide another method. Imagine if you would need to do this on a cluster or a server where you are not able to restart. :-)