OK. SO. When Windows is being a pill about this, what you're gonna do is:
You're gonna open up Resource Monitor (resmon.exe) using the start menu or the terminal, or you're gonna go to Task Manager and click on the Performance tab, where there may be a button to go to resmon.
You're gonna go to the CPU tab. You're gonna expand the Associated Handles section, enter the name of the file/folder/whatever you want to delete and hit enter.
AND THEN. Windows will show you a list of everything that's using the file, and you can either kill those processes manually, or right-click the handles within resmon and kill 'em from there.
You're welcome.
Signed, one very tired computer ghostbuster who has seen this problem way too many times on her own dumb work machine.
(Original instructions and screenshots to be found at https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows)


























