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