Fixing “Error 0x80070091: Directory is Not Empty” in Windows 10

Image about Fixing “Error 0x80070091: Directory is Not Empty” in Windows 10

Encountering “Error 0x80070091” on your Windows 10 can be quite annoying, But don’t worry.

This comprehensive guide will help you to understand what the error is, its common causes, and solutions to fix it.

Let us explore to know more about this error.

What is Error 0x80070091?

The “Error code 0x80070091” is a File Explorer issue encountered from Windows 7 to Windows 10, particularly when users attempt to delete folders, transfer files, or back up data.

It may occur due to insufficient folder permissions, hindering actions like deletion or data transfer. Proper permission settings are crucial for smooth file operations.

Error 0x80070091

What is the Cause of Error 0x80070091?

There are multiple reasons which cause the error. Mentioned below are some of them.

  1. Residual Files: Sometimes, leftover files from uninstalled applications or previous operations linger in the directory, triggering the error 0x80070091.
  2. Improper Shutdown: An improper or forced shutdown while files are being written or read can lead to this error, as it might leave the directory in an inconsistent state.
  3. Malware Infection: Malicious software can corrupt or lock files, making the directory appear as not empty and causing the error 0x80070091.
  4. File System Error: Sometimes, file system errors can misrepresent the state of the directory, triggering the “Error 0x80070091: The Directory is Not Empty” notification.
  5. Software Conflict: Conflicting software or drivers might lock files within the directory, leading to this error when attempting to delete or modify the directory.

How to Fix Error 0x80070091?

We have provided simple steps to fix the error. Here is a step-by-step process mentioned below.

1. Deleting a Folder Using Command Prompt

  • Run Command Prompt as administrator.
  • Type the following parameters and hit the Enter key on the keyboard after typing each parameter:
    • takeown/F<folder_path>/r/dy
Open the Command Prompt and type takeown/F<folder_path>/r/dy
  • icacls<folder_path>/grant administrators:F/t
  • rd/s/q<folder_path>
In the Command Prompt Window, icacls<folder_path>/grantadministrators:F/t
  • Confirm that the folder has been deleted successfully.
  • If the folder still exists, double-check the commands for any typos.
  • As a last resort, restart your computer and try the commands again.

2. Renaming the Folder

  • Identify the folder you want to delete (e.g., named “office docs”).
  • Add a hyphen or exclamation character at the end of the file or folder name (e.g., “office docs!”).
  • Attempt to delete or copy the folder.
Select the Folder you want to delete or copy
  • If unsuccessful, restart your computer and try again.
  • As a last resort, consider using alternative methods to delete the folder.
Restart the Device

3. Checking and Fixing Bad Sectors

  • Download and launch MiniTool Partition Wizard.
Download MiniTool Wizard
  • Select one hard disk in the Disk Map and choose the Surface Test feature from the left panel.
  • Click the “Start Now” button to check the bad sectors on the hard drive.
Click the Surface test and click start to check the bad sectors
  • Wait for the feature to complete the testing.
  • Check the test results and repair any bad sectors if found using the Command Prompt.

4. Performing a Check Disk Scan

  • Restart Windows Explorer.
Open Windows Explorer
  • Uninstall your antivirus temporarily.
Check Anti Virus Software
  • Use Windows Recovery Environment.
  • Run System Restore from Safe Mode.
  • Delete the WINDOWS.OLD folder.

5. Renaming the WindowsApps Folder

  • Restart your computer and enter Safe Mode.
  • Rename the WindowsApps Folder in Safe Mode.
Click the Option Change Permission and change to safe mode
  • Alternatively, rename the WindowsApps Folder in the Windows Recovery Environment.
  • Check Your Antivirus Program for any restrictions or false positives.
  • Keep Your System up to date to avoid such errors.
Check for your system update

How to Prevent Error 0x80070091?

Here are some of the preventive measures to avoid the error in future.

  1. Regular System Updates: Keep your operating system and software updated to ensure that any bug fixes or improvements related to file management are applied.
  2. Proper Shutdown and Restart: Always shut down or restart your computer properly to avoid any file system corruption that might occur due to abrupt power loss.
  3. Regular Scans for Malware: Conduct regular malware scans to keep malicious software at bay that might corrupt or lock files and folders.
  4. Maintain Sufficient Disk Space: Ensure there is enough disk space available to avoid errors related to insufficient storage when attempting to create, move, or delete files and folders.
  5. Manage Permissions Correctly: Set the correct permissions for files and folders to ensure that they can be accessed, modified, or deleted as needed without encountering permission-related errors.


To sum it up, the “Error 0x80070091: Directory is Not Empty” can be complex.

This guide discussed the meaning of the error, its common causes, solutions to fix the error, and shared some tips to prevent the error in the future.

Kindly leave your comments or suggestions in the message box. We will reach out to you promptly.

Error 0x80070091 FAQs

What is the 0x80070091 error?

The error is a file management issue in Windows that usually pops up when trying to delete a folder, indicating that the directory is not empty, even if it appears to be.

Why does the 0x80070091 error occur?

This error can occur due to insufficient folder permissions, leftover files from uninstalled apps, or file system misrepresentations. It prevents deletion or movement of folders that the system perceives as not empty.

How can I fix the 0x80070091 Error Code?

To fix this error, you might need to adjust folder permissions to full access or use a Disk Cleanup utility to remove any residual files. Sometimes, scanning for malware and removing malicious software can also resolve the issue.

Can 0x80070091 Error Code prevent file transfers?

Yes, the error can disrupt file transfers as it may prevent the deletion or movement of folders, making it a hurdle in managing your files effectively.

How can I prevent this error in the future?

Keeping your system updated, ensuring correct folder permissions, and performing regular malware scans are key steps in preventing the error. Also, maintaining sufficient disk space and avoiding abrupt system shutdowns can help avoid this error.