Error 0X80070091Error 0X80070091 occurs when trying to delete or rename a folder. The error’s main cause is the corruption of the file system. The folder is not empty error can also be related to permission settings.  In this guide, we will review five possible ways to fix this cumbersome error.

Causes of Error 0x80070091

Hard Drive Damage 

Another thing is if the problem is more serious and is ensured by damage to the hard drive’s file system, which can, in turn, be triggered by a number of factors, starting from update curves, unsuccessful installation/uninstallation of software or the presence of viruses, ending with a violation of integrity due to physical malfunctions of the hard drive. 

Windows Apps directory

Considering the error “The folder is not empty”, we can distinguish two options for its manifestation – in the process of restoring the OS, when there are problems with the contents and registration of applications in the Windows Apps directory, or when trying to delete any folder. A failure notification can usually contain additional information.

In our case, the location of the problematic element is indicated here – the directory located in the Program Files – Windows Apps directory. It is in it that the data for restoring the OSes resides, and also the remnants of previously installed versions of the system may be contained. The problem of deleting a folder occurs for various reasons. 

For example, the object continues to be used by the current Windows, which implies the need to complete the process to complete the operation of the system blocks access to Windows Apps. In addition, the failure was widespread after updating KB 3213968 (regular OS updates are famous for not such surprises). There will be several ways to fix the error 0x80070091 due to the fact that the problem can be associated with various provoking factors. Since the exact cause of the failure is unknown.

OS Update 

Almost all users have encountered the problem of deleting files and directories and know that it is impossible to perform the procedure when the element is used, is involved in any process at the moment, or in the absence of access rights. 

So, with renaming, completion of the process, involving utilities for unlocking, shredders, obtaining rights, or downloading from an external drive like LiveCD, the problem is usually solved. Moreover, in case of an error, “Folder is not empty” with code 0x80070091, and these actions are not always effective.

Failure often occurs when using the OS recovery function, for example, when trying to return to a created point or to recreate it. Let us consider in more detail what caused this problem and how to deal with it.

Ways To fix The Error

If you are trying to delete a folder while any applications are working with it, the appearance of a failure with error code 0x80070091 is quite natural. So, the processes must be completed, and in the case when the software is still using the object, it is necessary to disable working software, including in the background.

1. System boot in clean mode

The clean boot status is used to troubleshoot problems with Windows. So, using this solution option, you can choose a minimum of drivers and programs with which the operating system will boot, and then return to the recovery procedure. For a clean boot, do the following:

  1. Go to the System Configuration (click Win + R and in the console line “Run” type msconfig).
  2. In the window that opens, in the “General” tab, select “Selective launch”, where the ability to start system services should be noted. In contrast, opposite the item “Download startup items”, the mark should be removed.
  3. Then go to the “Services” tab, where the item “Do not display Microsoft services” at the bottom of the window should be noted.
  4. After that, press the button “Disable all”, confirm the action and boot into Windows clean boot mode.

We are trying to restore the system by returning it to the previously created point so deactivates the mode in the opposite way.

Fix – 2: Rename folder

This simple solution method is to rename the Windows Apps system directory. To do this, we perform the following manipulations:

  1. Change the name of the Windows Apps folder, but first, we need to get the rights to change the object. We launch the command line under the administrator account, where we enter the command TAKEOWN / F “C: \ Program Files \ WindowsApps” / R / D Y.
  2. Then wait for the end of the process, it will take some time, after which we close the console.
  3. Turn to the explorer, in the settings, we turn on the option of showing system elements (in the settings you need to check “Show hidden files, folders and drives”).
  4. Now, using the Unlocker tool (its portable version is enough for the manipulation), select the Windows Apps folder and click Rename, specify a new name, then click the Unlock All button.

The procedure allows you to rename the folder, which in some situations will help to cope with the failure, and the next attempt to restore the OS is successful. Sometimes it’s possible to succeed in removing the directory from under LiveCD, and if the file system contains errors, further problems are likely to occur; therefore, we will work on a possible source of trouble.

3.Scan hard drive for errors

The system utility CHKDSK (Check Disk) allows you to scan the disk for errors, bad sectors and eliminate detected problems. You can run the tool using the command line. It is necessary to open it as administrator through the “Run” console, where the cmd command should be entered in the field and press Ctrl + Shift + Enter. The same can be done by using the search from the Start menu. Then in the results of the issue, you need to click RMB on the utility name and select the desired option to download the tool. We proceed to the procedure:

  1. In the command line, opened as administrator, enter the command chkdsk C: / f / r.
  2. Instead of the value “C: /”, substitute the name of the drive where the system is located. The value f in the command means checking for errors and correcting them when detected. The / r option is responsible for finding bad sectors and restoring their contents.
  3. At the next start of the system, the utility will start working (checking a non-system disk does not require a reboot), it will take a while to wait until the process is complete.
  4. In the final report, you will see the result of the check.

Often, this method solves the problem of the appearance of error 0x80070091, because if the file is written in the damaged area, there is no access to it. In order for the contents of the sectors to be read and deleted if necessary, it is necessary to perform file system data recovery.

4.Change The Return Point

It happens that it is impossible to return to a saved point solely because of the deletion of a specific directory. In this case, a return to an early point will solve the problem. Since many conflicts arise during the operation of the OS, they subsequently provoke various errors and bugs. So, returning the system to an earlier state when such problems did not occur, using the standard Windows recovery functionality and it is likely that error 0x80070091 will no longer bother.

5.Open Access To Windows Apps

Another option, how to delete a folder, if this is prevented by a failure with the code 0x80070091, involves gaining access to a locked object, which will provide the ability to restore the system or delete files. Do the following:

  1. First, go to the Program Files and in the “View” tab of the explorer, open the “Options”.
  2. In the “Folder Options” window, go to the “View” tab, in the additional settings block, check “Show hidden files, folders and drives.”
  3. Now the Windows Apps folder will be displayed click on it with RMB to go to the properties of the object, select the “Security” and “Advanced” sections.
  4. Click “Continue”, find the “Change” option, enter the administrator name at the bottom of the window and click on the name check, confirm the action. It is also necessary to note the item on changing the owner.
  5. In the “Security” section of the folder properties, select the administrator by checking the “Full Access” item.

Conclusion

After the completed manipulations, you will have the full right to change the Windows Apps folder, and you can rename it (see above), reboot the device and try to perform system recovery again. Error 0x80070091, although it is not critical, causes a lot of inconveniences, while the above methods are enough to fix the failure.