How do I delete a folder that's in use?

There's a native GUI for Windows:

Start>>All Programs>>Accessories>>System Tools>>Resource Monitor (or Run resmon.exe)

You can search for the "Associated Handles" using the searchbox (circled in red), and right click the process you want to end.


As an example, in the image below I could not delete my Eclipse directory. Searching for the Eclipse associated handles showed that the adb.exe had a handle to the directory. After ending the adb process, I could then delete the Eclipse directory.

enter image description here


This answer is old, but seems to still get traffic. As noted below, there is a built in tool in Windows now:

Start → All Programs → Accessories → System Tools → Resource Monitor (or Run resmon.exe)

You can get more info in the answers below this one. The rest of this answer is no longer as relevant.


Process Explorer from Sysinternals will let you search through the handles and DLLs. Search for the directory and find out which process is "using" the folder.

From there, you have the ability to either shut down that process, or just close that particular file handle. Be sure about what you're doing when working with the file handle directly, and make sure it's not being used by some important process.


Unlocker and WhoLockMe don't work on 64-bit Windows. I use LockHunter.