Are you seeing the vexing error 0x80070091 when attempting to remove files on your Windows 10 or 11 system? This perplexing File Explorer bug displays the deceptive “The directory is not empty” message, obstructing your folder deletion efforts. Surprisingly, even seemingly empty directories cause this issue, exacerbating the situation.
Not to worry, there is a solution. While simple folder renaming may provide temporary relief, more robust options are available in this blog. Investigate the following techniques to gently handle this issue and finally bid farewell to stubborn folders.
Table of Contents
The directory is not empty Error 0x80070091 in Windows 10 or 11
Here is how to fix the directory is not empty Error 0x80070091 in Windows 10 or 11:
Run SFC Scan and DISM Commands
To rectify the Directory is Not Empty error 0x80070091, utilizing the System File Checker and Deployment Image Servicing and Management command line tools is the best and easiest step.
SFC scan can meticulously examine and repair corrupted or missing system files and replace their copy from %WinDir%\System32\dllcache folder that might be causing the problem. On the other hand, the DISM functions to fix system image issues, further bolstering the Windows’ health.
- Click on Start and type cmd.exe.
- Select Run as administrator.
- User account control prompt appears; click on Yes.
- Type the following command and press Enter –
SFC /SCANNOW
- After you see “Windows Resource Protection did not find any integrity violations.”, reboot the device.
- Go to “Settings > Windows Update” and click on “Check for updates”.
- If the process fails and error code 0x80070091 shows then open “Administrator: Command Prompt” again.
- Then execute the following command lines sequentially:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
- After all the 3 commands are finished running restart the computer.
- Now check for updates and see if it is successfully installed.
Read: SFC /Scannow, DISM.Exe, CHKDSK Windows 11 or 10.
Restart Windows Explorer
A simple yet effective remedy to solve the 0x80070091 error code in your system is by restarting Windows File Explorer. This action will refresh your explorer’s processes, often resolving the error and allowing hassle-free folder deletions. The steps are mentioned below:
- Access Task Manager by pressing Ctrl + Shift + Esc.
- Locate Windows Explorer in Processes.
- Right-click on this and select Restart.
Reference: How to Restart File Explorer Using Task Manager in Windows 10
Use Command Prompt to Remove Folders
Deleting the problematic folder using the Command lines provides a potential way for solving The Directory is Not Empty error 0x80070091 in your Windows system. By directly navigating the system’s file structure, this method sidesteps the error message and allows successful folder removal.
- Press Winkey and type cmd.
- Copy and paste the cd command to reach the folder’s location. (Remember to replace Pathtoyourfolder with the path of your folder).
cd C:\Pathtoyourfolder
- Press Enter.
- Then run the following command in the same way:
rmdir /s /q Yourfoldername
Note: /s will erase all content, including the folder, and /q will suppress confirmation prompts.
- If prompted, type Y and press Enter to confirm.
Read: How to Forcibly Delete Files on Windows 10
Perform a Disk Scan to Uncover Errors
If you are yet to find a way to fix the error code 0x80070091 on your Windows you might scan your disk for errors to potentially identify and rectify underlying issues that trigger this error. Follow these steps:
- Open Command Prompt as Admin as mentioned in the previous method.
- Enter the Check Disk command, and press Enter:
CHKDSK /F /R /X
- Press Y to schedule the scan on restart.
- In the end, click Start > Power > Restart.
Run Antivirus Scan
Curious, if your Windows antivirus scan holds the solution to tackle the concerned error? It very well could! By initiating an antivirus scan, you’re taking a proactive step to detect and remove potential malware causing this glitch.
- Click on Search and type Windows Security.
- Press Enter.
- Go to Virus & Threat Protection > Scan options.
- Choose Full Scan (comprehensive but lengthy).
- Click on Scan now to start the antivirus scan.
- Wait and Remove if detection finds threats.
- Click Start actions to apply.
Adjust Folder Permissions
You can also try to modify the folder’s permissions by adjusting permissions, you’re granting the necessary access to erase files, potentially putting an end to the error code’s 0x80070091 reign. Follow these steps:
- Open File Explorer (Winkey+E) and right-click the affected folder.
- Choose Properties.
- Click the Security tab.
- Press the Advanced button.
- Click Change by Owner name.
- Enter the Windows user account name in the object name box.
- Select Check Names, then OK.
- Check the box Replace all child object permission entries with inheritable permission entries from this object.
- Press Apply and OK in the Advanced Security Settings window.
See: How to Change File Permission to Grant Ownership in Windows 10
Use Installation Media External Drive to delete the folder
Some users report that using installation media in external drive helps them to remove the directory without getting error 0x80070091. Move forward with the steps:
- Insert the installation media into the port of your computer.
- On the initial setup screen, select your language and other preferences, and then click on “Next”.
- Then click on “Repair your computer”.
- When Choose an option screen appears, go to Troubleshoot > Advance Option > Command Prompt.
- Type notepad on Command Prompt and hit Enter.
- On the Notepad, click on File > Open.
- Then, select All files from the drop-down and browse the location where the folder is located.
- Right-click on the folder and select Delete.
Use Windows Recovery Environment
Windows Recovery Environment (RE) can be a valuable ally in combating persistent startup errors, especially the Directory is Not Empty Error 0x80070091. This particular solution within Windows is equipped with a plethora of tools for repairing and troubleshooting common system startup issues.
- Type system restore in the search.
- Hit Enter.
- Click on System Restore…
- Click Next on the wizard.
- Choose a restore point, and click “Next“.
- Then, select Finish on the wizard to complete.
- On the warning popup, click on Yes.
Start in Safe Mode
Find respite from the troubling error code in your Windows through a simple approach which is rebooting into Safe Mode as it can help you in creating a conducive environment to tackle the error head-on, ensuring a smooth path for folder management.
- Open the Start menu, and press the Shift key.
- Click the power icon, and select Restart.
- You will see the WinRe environment after the restart.
- Choose Troubleshoot > Advanced options.
- Select Startup Settings, and click Restart.
- Press number four or F4 on the next screen.
- You’re now in Safe Mode.
- Delete the troubling folder.
- Reboot the PC to return to normal mode.
We hope with these 9 ways you will be able to Fix The Directory is Not Empty Error 0x80070091 in your Windows 10 or 11.
Methods:
Run SFC Scan and DISM Commands
Restart Windows Explorer
Use Command Prompt to Remove Folders
Perform a Disk Scan to Uncover Errors
Run Antivirus Scan
Adjust Folder Permissions
Use Installation Media External Drive to delete the folder
Use Windows Recovery Environment
Start in Safe Mode
That’s all!!