Windows Data Recovery- Professional

What is Error 0x80070091 & How to Fix it?

Table of Content

    Summary: Error0x80070091 – The directory is not empty error prevents you from deleting or transferring files to a specified location. Learn the possible reasons and fixes for this issue. Further, keep data recovery software as a backup plan to restore files if they go missing due to this error.

    Free Download Windows Free Download100% secure

    Being a PC user, creating and sorting data (files, folders, documents, etc.) must be part of your daily chores. But, what if one day you’re trying to delete files from your system or an external drive, and you just can’t do it? Instead, you receive an error 0x80070091.

    Rather than running around in circles, it’s always better to focus on finding the solutions. Thankfully, there are some ways to fix the directory is not empty error. Further, learning the underlying cause of this error will make fixing it a cakewalk. Let’s start!

    What is the Error0x80070091?

    This system error has a bug check value – 0x80070091. The bug code further states – The directory is not empty. The error blocks you from removing data from any folder on your system. Whenever you try to delete any file or folder, Windows throws this bug code.

    While digging into the root cause of this issue, you may find that it occurs because the folder isn’t empty or has already been accessed by some application (running in the background). However, it’s not the case. Even if the folder is empty, you may encounter this bug code.

    What Causes Error0x80070091?

    There could be multiple possible reasons behind this system issue, including corrupted system files, bad sectored hard drives, insufficient folder permission, or malware infection. Since there could be multiple factors contributing to the rise of this error, we’ve come up with the best possible workarounds that will help you resolve the problem.

    How do I Fix Error Code 0x80070091?

    Try out the below methods and see which one works in your favor.

    Primary Solution

    Method 1: Delete Folder with Command Prompt

    Since the error prevents you from deleting data, you can try removing your files and folder with the Command Prompt. However, be careful while using the Command Prompt, as one wrong attempt can cost you important data. Either back up your wanted files or restore important files using professional data recovery software. Once done, proceed with the following steps:

    • Press Windows + S to access Search, type cmd, and select Run as administrator.
    • Click ‘Yes’ when prompted to proceed.
    • In the elevated Command Prompt window, type rmdir /s “folder path” and hit Enter. Here, replace the ‘folder path’ with the location of whatever directory you want to delete.
    • The location must include the drive letter. For example – rmdir /s “C:\Users\Work”.

    When you’re prompted with the Y/N option, type Y and hit Enter to confirm your action. Once the process is complete, close the cmd window. Restart your system, retry deleting any folder/file, and check if the error is gone.

    Additional Note: If you want to delete one or more files, you can use the delete command. You can also run this command from the WinRE console. The whole syntax for the delete command goes as – del [/p] [/f] [/s] [/q] [/a[:]<attributes>] <names>. Replace the [:} after /a with the file types (like system files, read-only files, hidden files, etc.) Then use the Folder name in place of <name> from which you wish to delete files. All the included files in the folder will be deleted.

    #2 Check for Disk Errors

    The error could also occur due to a hard drive that’s corrupted or has bad sectors on it. Try checking your disk for errors and fixing the corrupted drive to resolve the bug code. You can do it two ways – (I) Using Command Prompt and (II) Using Error Checking tool.

    With Command Prompt

    • Open and run the command prompt as administrator.
    • Once in the elevated cmd window, type chkdsk /f/r D: and Enter. (Replace D: with your drive letter.)

    Let the scanning complete. Once done, close the window and reboot your system.

    With Error Checking Tool

    • Press Windows + E to open File Explorer and then right-click on the drive you want to scan; choose Properties.
    • Go to the Tools tab and under Error Checking, click Check.
    • Click Scan drive option on the next prompt.
    • If it shows error results, fix it with the recommended suggestions. Once applied, close the window and complete the process.
    • Finally, reboot your system and see if the issue is solved.

    #3 Assign Full Permission to Affected Folder.

    Insufficient access permission may also be the reason for ‘the directory is not empty’ error. You can assign Full Permission to the affected folder with the following steps and check if the issue is resolved.

    • Locate the affected folder, right-click on it, and select Properties.
    • Next, go to the Security tab and select a user account with which you’re logged in. Afterward, click Edit.
    Edit the account you are logged in
    • Ensure that Full Control and other options are selected. Now, click Advanced.
    • Check the entries under the Permission tab.
    • If you wish to make changes, click the Change button provided against Owner at the top.

    Type the name of the user for which you want to change the permission settings and click OK to confirm.

    Finally, check if you can access the folder error-free.

    Secondary Solutions

    However, the problem would get resolved by now. Yet, in worst-case scenarios, if it persists, try out these methods.

    Delete Folder with CMD in Recovery Environment

    • Turn off your system and boot into it using the Windows media USB installer. (If you don’t have it ready, create a bootable USB with a media creation tool by Windows.)
    • Once you’ve booted into your system with the media installer, set Preferences, and click Next.
    • Select Repair your computer > Troubleshoot > Advanced options > Command Prompt.
    • In the cmd window, type Notepad and hit Enter.

    Now, in the notepad, go to File > Open.

    • From the drop-down, select All Files.
    • Locate the folder you wish to remove and Delete it by right-clicking on it.
    • Once done, close the programs. Reboot your system normally and see if the problem is gone.

    Run SFC Scan

    Missing or damaged system files could be the cause of this system error. Try running SFC to repair the incorrect versions of the system files and resolve the error. To do so, follow the given steps:

    • Run Command Prompt as administrator, type sfc/scannow, and hit Enter.
    • It will take time to scan the system for corrupted/damaged system files and repair them.
    • Once the process is done, type exit and hit Enter. Finally, check if the problem is solved.

    Scan your PC for malware

    If the error is bugging you, your last bet is scanning your PC for malware infection. If you’ve any third-party antivirus program installed on your system, run it for scanning. Else, you can run Microsoft Defender Antivirus Program in Windows using the following steps:

    • Open Windows + I to open Settings and then follow Update & Security > Windows Security.
    • There, on the right panel, select Virus & threat protection.
    • Next, scroll down, and below Quick scan, select Scan options.
    • Now, Microsoft Defender Offline scan and then click Scan now.

    Lastly, if it feels that the error is unsolvable, try resetting your Windows. Sometimes, so many factors could be responsible for the issue, making it difficult to identify the root cause and fix it accordingly. Resetting Windows can bring your system to the default configuration and fix the bug.

    While resetting Windows, it’s recommended to choose the ‘Remove everything’ option to effectively complete the process. However, you should back up your data before performing this method. In case you forgot to take backup of the data, you could still recover data after resetting Windows.


    1. How do you permanently delete a file?

    You can use Shift + Delete to remove files permanently. Windows prompts you with a dialog box to confirm the action. When you click ‘Yes’ on the prompted confirmation box, the file will be lost.

    2. Are deleted fine gone forever?

    When you delete files with DEL or Shift + Del key, only the file pointers get removed, but the file data remains there. File pointers indicate the beginning and the ending of a file’s existence. When these pointers are removed, the file becomes inaccessible but recoverable. You can recover shift-deleted files using a powerful data recovery solution.

    3. What is 0x8007045d Error in Windows?

    When the OS can’t read the files on the system or there is some issue with the externally connected drives, you may face a 0x8007045d bug code. This bug code may appear during Windows update installation or while transferring data.

    4. What is error 0x80071a91 on Windows 10 update?

    The 0x80071A91 error code occurs when there is corruption in Windows file system transactions. Whenever a file error occurs, the Windows file system uses the transaction log to restore the system transaction. This bug code translates to – Transaction support within the specified file system resource manager is not initiated or is already shut down due to this bug code

    Was this article helpful?

    No NO

    About The Author

    Mansi Verma linkdin

    Mansi Verma is a Senior Technology Writer at Stellar®. She is a Tech enthusiast, holding over a decade of experience in technical writing. She writes guides, articles, blogs and tips on Data Recovery, IoT, Artificial Intelligence, and Robotics. She loves providing DIY solutions to solve various Windows system related issues. In her spare time, she likes reading her favorite novels, and writing poetry. She is also an avid traveller.


    1. Hello, I experienced problem 0x80070091. On my Windows PC, it happens when I try to delete a folder, and I get the notice
      “An unexpected error is keeping you from deleting the folder. I am getting this Error 0x80070091: The directory is not empty
      Could you please explain the causes of the directory not empty problem.

      1. Hi Arzoo,
        Here I have listed below the causes of Directory not empty Problem:
        1.The temporary folder has an excessive amount of useless files.
        2. There are bad sectors on the hard drive you want to remove files from.
        3. Drivers on your PC are damaged or corrupted.
        4. You lack the necessary authorization to remove files from computer.
        Hope this helps.

    Leave a comment

    Your email address will not be published. Required fields are marked *

    Image Captcha
    Refresh Image Captcha

    Enter Captcha Here :

    Related Posts


    Why Choose Stellar?

    • 0M+


    • 0+

      Years of Excellence

    • 0+

      R&D Engineers

    • 0+


    • 0+


    • 0+

      Awards Received