When trying to delete a folder, you may encounter an error message that implies that the directory is not empty. However, when trying to speculate on the issue, we noticed that the folder is vacant and there might be some other plausible explanation for this issue. So, in this post, we are going to see what to do if you get Error 0x80070091 that says The directory is not empty.
An unexpected error is keeping you from deleting the folder. If you continue to receive this error, you can use the error code to search for help with this problem. Error 0x80070091: The directory is not empty.
What is error 0x80070091 The directory is not empty?
It mainly occurs when you try to delete a folder from an external hard disk, SD card or pen drive, but it can also happen when deleting a file from the system drive.
Error 0x80070091 The directory is not empty on Windows 11/10
Before you begin, restart your computer and try again. If you still receive this error, then you may need to troubleshoot the issue further. Since you are receiving an error that says “Error 0x80070091 The directory is not empty”, follow these solutions.
- Run Check Disk
- Restart Windows Explorer
- Scan PC with antivirus
1] Run Check Disk
Bad sectors on the hard drive can cause such errors. Open Command Prompt with administrator privilege and run this command-
chkdsk /f /r E:
Where E is the drive letter of that drive where you get the error message. You need to replace it with your drive letter. For information, the Command Line Check Disk switch /f will try to fix the detected problems, and /r will let you identify the bad sector and try to recover information.
After entering this command, your computer will restart and perform the task. Do not shut down the machine forcefully.
After finishing the whole process, you will be able to delete that folder.
2] Restart Windows Explorer
Sometimes strings get attached internally, and hence users start getting different error messages like this one. Therefore, you can try to restart Windows Explorer and then check whether you can delete that folder or not.
To do so, open Task Manager on your machine and be on the Processes tab. Scroll down until you get Windows Explorer. Select it and click on the Restart button visible in the bottom-right corner of Task Manager.
3] Scan PC with antivirus
If you have recently installed a third-party software and started getting such error messages, you should uninstall that tool as well as scan the full system with a reliable antivirus.
These are some of the best solutions to this problem.
Read: Cannot delete icons, files or folders on Windows desktop
How to fix error the directory is not empty?
If you see an error that the directory is not empty, first try to clear out all the files inside the directory. In case that is to no avail, rename the folder and then try removing it. You can also check the aforementioned solution for further troubleshooting.
Also Read: The action can’t be completed because the file is open in another program.