Can't delete empty folder because it is used

You will need to use Microsoft's Process Explorer (just an exe): https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

It will let you know which app is handling that folder and you will also be able to kill that handle.

Find -> Find handle -> search for folder's name (will take a while..)

Visual tutorial: enter image description here


I found another way. You can also solve it by restarting explorer.exe.

However this does not work if it is locked by another process other than explorer.exe.


You can follow these steps to find which program is locking folder:

  1. Run following command on command prompt wmic process > processes.txt. This will create an output file processes.txt with details of all process running.
  2. Open file in processes.txt in a text editor.
  3. Search for locked folder name. You will get Name and PID or process accessing folder.
  4. Kill process using TaskManager or using command TaskKill /PID <pid>. Where <pid> is PID found at step #3.