What is error 0x80070091 The directory is not empty?

It mainly occurs when you try to delete a folder from an external hard disk or SD card or pen drive, but it can also happen when deleting a file from the system drive.

How do you get rid of error 0x80070091 The directory is not empty?

Before you begin, restart your computer and try. If you still receive this error, then you may need to troubleshoot the issue further. To get rid of error 0x80070091 The directory is not empty, following are a few fixes and suggestions:

1] Run Check Disk

Bad sectors on the hard drive can cause such errors. Open Command Prompt with administrator privilege and run this command- 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 would 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. Related reads:

The action can’t be completed because the file is open in another programCannot delete icons, files or folders on Windows desktop

Fix Error 0x80070091 The directory is not empty on Windows 11 10 - 65Fix Error 0x80070091 The directory is not empty on Windows 11 10 - 89