PC and Mac Error CodesWindows PC and Mac errors explained

Home › All codes › 0x80070091

Files and disks

0x80070091 - The directory is not empty

0x80070091   Microsoft name: ERROR_DIR_NOT_EMPTY

What it means

Windows could not delete or move a folder because it still contains files.

Where you see it

Deleting a folder, uninstalling an app, or an update step.

Likely causes

Back up first. Before anything that resets, reinstalls or repairs the disk, copy your photos and documents to another drive or to the cloud. Back up your Windows PC. Do not reset, reinstall or format until your files are safe.

Three safe steps, in order

Try them one at a time and test after each. No registry edits, no repair tools to buy, and no switching off your security. If a step needs a driver, firmware or Windows installation media, get it only from Microsoft or your device maker.

  1. Close programs that might be using the folder, restart, and try again.Related Microsoft page: Fix problems that block programs from being installed or removed
  2. Open the folder (turn on View > Show > Hidden items), move anything you want to keep, and delete the folder only if you are sure nothing inside is needed.Related Microsoft page: Fix problems that block programs from being installed or removed
  3. If it keeps happening, back up your files and run chkdsk.Related Microsoft page: chkdsk command reference

Stop and get help when…

the folder is inside Windows or Program Files. Do not delete system folders.

Source and date

Official Microsoft reference
System Error Codes (WinError.h)
More Microsoft help
Use the System File Checker tool to repair missing or corrupted system files
Date checked
24 November 2026. Microsoft changes its pages; if a step no longer matches, trust the Microsoft page.

Win32 error 145 wrapped as an HRESULT (0x8007xxxx)

ERROR_DIR_NOT_EMPTY

Microsoft describes it as: “The directory is not empty.”

Source: System Error Codes (WinError.h) (Microsoft Learn content, CC BY 4.0)

The wording above is ours. Where a box quotes Microsoft's description, it comes from Microsoft Learn documentation published under CC BY 4.0 and is credited to the page linked.

Related codes