7 Ways to Fix Error 0x80070091: The directory is not empty

Windows
7 Ways to Fix Error 0x80070091: The directory is not empty
Quick Fix

Download and try Outbyte PC Repair right now to see what it can do for your Windows.

Developed for Windows 10 (8, 7, Vista, XP)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.

While using Windows, you may occasionally face an unexpected error. Error 0x80070091 is one of these errors, and it’s frequently accompanied by a warning that says “An unexpected error is keeping you from deleting the folder. Error 0x80070091: The directory is not empty.”

Although the error notification makes it plain that you can’t delete a folder you tried to delete, the part that says “the directory isn’t empty” can leave you perplexed as to what the message actually means.

If the error is preventing your computer from functioning properly or affecting your productivity, then you’ve come to the right place. In this guide, we’ll discuss what this error is about and how you can resolve it. 

What Is Windows Error 0x80070091? 

This error can be confusing because it can appear in different scenarios. One of the common situations in which this issue appears is when you are deleting or moving a folder. Other users who experienced the same issue did so while transferring files from an external device or backing up their data.

Pro Tip: Run a dedicated PC optimization tool to get rid of incorrect settings, junk files, harmful apps, and security threats that can cause system issues or slow performance.

Free Scan for PC Issues
3.145.873 downloads
Compatible with: Windows 10, Windows 7, Windows 8

Special offer. About Outbyte, uninstall instructions, EULA, Privacy Policy.

In this case, you’ll get the following message pop up:

  • Interrupted Action.
  • 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.

This problem can be found on PCs running Windows 7 all the way up to Windows 10. It’s unclear what’s causing the issue, but it’s most likely caused by corrupted sectors on the external drive or corrupted data that can’t be erased.

Error 0x80070091: The directory is not empty can also appear when using System Restore. The Windows System Restore function allows you to go back to any point in time that you specify after creating a System Restore point. It’s a method of creating a backup plan in the event that your computer fails.

But when you encounter the 0x80070091 system restore issue, you’ll get a message that says: 

  • System Restore failed while restoring the directory from the restore point.
  • Source: AppxStaging
  • Destination: %ProgramFiles%\WindowsApps
  • An unspecified error occurred during System Restore. (0x80070091)

The issue appears during the System Restore process when you try to restore your machine to a previous point and prevents you from successfully conducting a System Restore.

What Causes Error 0x80070091: The directory is not empty? 

Causes Error 0x80070091: The directory is not empty

If you are deleting a file or folder from any section of your computer when you encounter this error, then you might be dealing with: 

  • Administrative issues which prevent you from deleting any file or folder.
  • Bad sectors in your computer’s hard drive.
  • Corrupt or damaged drivers.
  • Too many junk files in the temporary locations folder.

As a workaround, you can try deleting the folder via Command Prompt. 

To delete a folder, follow these steps:

  1. Launch Command Prompt as administrator.
  2. Type in the following commands in the CP windows and hit the Enter key after typing each line:

takeown/F #;

icacls #/grant *: F

del #

Note: # denotes the complete path and name of the folder you failed to delete; * denotes the Administrator account’s username.

If you come across error 0x80070091 windows 7 while using System Restore, then a problem with the WindowsApps folder is causing the error. The 0x80070091 system restores problem indicates that the destination directory isn’t empty. So, throughout the System Restore procedure, there’s a folder under WindowsApps that should be empty but isn’t. This could be due to an antivirus program stopping the process or Sync Settings. But, because this is happening with the most recent versions of Windows 10, we can’t be sure what’s causing the problem.

The traditional solution is to simply delete or rename the WindowsApps folder, but TrustedInstaller is the only way to access it. As a result, you are unable to access or modify this folder. In this tutorial, we’ll try to uninstall all antivirus software before running System Restore without any other apps interfering. If that doesn’t work, the next step is to get inside the WindowsApps folder and rename it so that the System Restore process may continue.

Knowing the reasons behind the error: 0x80070091 allows the affected users to formulate a better strategy to successfully resolve the problem. 

How to Resolve Error 0x80070091: The directory is not empty

Although the problem may appear to be a minor issue at first, it can prevent you from performing some computer operations. As a result, it is critical that you fix it as soon as possible. Depending on the cause, you can remedy it in a variety of ways.

Method 1: Run the SFC Tool. 

Run the SFC Tool

The built-in System File Checker tool can aid in the resolution of the error. The utility checks for faulty files that may be the source of the error and attempts to repair them.

  1. Start by pressing the Start button.
  2. In the Search applications and files box, type cmd.
  3. To open Command Prompt with admin rights, press the CTRL + Shift + Enter combination.
  4. Type SFC /scannow into the Command Prompt window and press Enter.
  5. Restart your computer when verification is complete. 

To see if the error has been fixed, wait for the tool to finish before attempting to delete the file or folder.

Method 2: Perform a Check Disk Scan. 

The built-in disk check (chkdsk) software works similarly to System File Checker, except it focuses on correcting damaged sectors on hard drives. It can be extremely useful in fixing a variety of issues, including error 0x80070091. To perform a scan, follow these instructions:

  1. To access the menu, press Win + X.
  2. Select the Command Prompt (Admin) option.
  3. To run Command Prompt as an administrator, select Yes.
  4. Run the command chkdsk C/f/r/x.
  5. Hit Enter to start the scan, then wait for it to finish before restarting your computer and deleting the file or folder you want to delete to see if error 0x80070091 has been repaired.

Method 3:  Restart Windows Explorer. 

Restart Windows Explorer

Windows explorer is a file manager that first appeared in Windows 95 and later versions of Windows. It allows users to manage files, folders, and network connections, as well as search for files and related components.

Restarting Windows Explorer can resolve the issue of being unable to delete a folder in Windows 10. The steps can be found below: 

  1. On the desktop, right-click on the Taskbar and select Task Manager from the context menu.
  2. In the Task Manager window, go to the Processes tab and look for Windows Explorer. 
  3. Right-click on it and select Restart from the menu, or select Windows Explorer and then click the Restart button in the Task Manager window’s lower right corner.

To see if the problem has been resolved, try deleting the folder. If you’re still getting a notice that the directory isn’t empty, try the solutions below.

Method 4: Uninstall Your  Antivirus. 

The next step is to delete any antivirus software you may have installed on your computer. Antivirus software is known to interfere with these processes, preventing your machine from successfully restoring its system.

Method 5: Use Windows Recovery Environment.

A system restoration from the Windows Recovery Environment may also be successful, particularly if it has been interrupted by other processes.

  1. Press the Windows key once.
  2. Select Restart while holding down the Shift key.
  3. You’ll be sent to the Windows Recovery Environment screen after the machine restarts, where you can choose to Continue, Troubleshoot, or Turn Off your PC. 

To get to the System Restore option from this environment, click Troubleshoot >  Advanced Options > System Restore. 

Now the computer will ask you to select the System Restore Point. Select the Restore Point that you want to go to and follow the on-screen instructions from there.

Method 6: Run System Restore from Safe Mode.

Safe Mode is a Windows feature that uses a simple interface and only executes the apps that are required. This way, you can be sure that no other programs like antiviruses are interfering with your System Restore.

  1. Press Windows > Power option.
  2. Press and hold the Shift key and hit Restart.
  3. Click Troubleshoot > Advanced Options > Startup Options > Restart.
  4. Your system will now restart and provide you with a number of options to choose from.
  5. To enter Safe Mode, press F4 on your keyboard.

Your computer will reboot to Safe Mode, which means that only the programs that are absolutely necessary will be operating, ensuring that there are no disruptions. Now conduct a System Restore by following the steps below.

  1. Hold the Windows key, then press the R key.
  2. Type in rstrui.exe and hit Enter.
  3. Click Next and select the restore point that you want to revert to.
  4. Click Next > Finish. 

Now, wait for the system restore to finish.

Method 7: Delete the WINDOWS.OLD Folder.

Another effective method for resolving this problem is to delete the junk files on your computer. To do so, take these steps:

  1. Press and hold the Windows key while pressing R to open the Run box, then paste or type C:windowsSYSTEM32cleanmgr.exe into the run box and click OK.
  2. After that, choose a target drive and click OK; the Disk Cleanup will run automatically.
  3. Next, select Clean up system files and select Previous Windows installation from the drop-down menu, then click OK.
  4. Select Delete Files, which will remove the C:Windows.old folder.

The easiest way to remove junk files is to run Outbyte PC Repair so that you don’t miss anything. This tool will scan your computer for files that you don’t need and delete them while optimizing your processes and apps along the way. 

Conclusion

The error “Error 0x80070091: The directory is not empty” may occur when you try to remove a file or folder or conduct similar activities on your PC. This article contains seven solutions for resolving this problem and should assist you in getting your computer back up and running. 

Click here to Download Outbyte PC Repair If you’re running into errors and your system is suspiciously slow, your computer needs some maintenance work. Download Outbyte PC Repair for Windows or Outbyte Antivirus for Windows to resolve common computer performance issues. Fix computer troubles by downloading the compatible tool for your device.
Special offer. About Outbyte, uninstall instructions. Please review EULA and Privacy Policy.
Leave a Reply

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