Error 0x80070091 “The directory is not empty” When Deleting or Copying a Folder

When you attempt to delete a folder or copy it to another location or drive, the following error may 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.

0x80070091 directory not empty

0x80070091 (ERROR_DIR_NOT_EMPTY) – Decimal 145 – The directory is not empty.

Resolution

Follow the steps below to resolve the error 0x80070091 when copying or deleting a folder in Windows.

Step 1: Rename the folder

See if renaming the folder helps. For example, if the folder name is office docs, append a hyphen or exclamation character at the end of the file or folder name office docs!.



Now try deleting or copying the folder. If that doesn’t help, try Step 2.


Step 2: Run Chkdsk or Disk Error-checking

  1. Open File Explorer
  2. Right-click on the drive letter where the folder is located, and click Properties.
  3. Select Tools and click the Check button under Error checking.
    disk error check tools tab windows
  4. Even though Windows tells you it’s not necessary to check the drive, click Scan drive anyway.
    disk error check - scan drive
  5. After the disk error checking is complete, you may click the Details link in the dialog box.
    disk error check scan completeClicking Show Details will launch the Event Viewer and open the exact disk error check entry in the Application log.

    disk error check - scan results - event log

    Here is a sample entry:

    Disk Error Checking – Results in Application Event Log

    Chkdsk was executed in scan mode on a volume snapshot.  
    Checking file system on D:
    Stage 1: Examining basic file system structure ...
    
        
       41216 file records processed.                                    File verification completed.    
        
       0 large file records processed.    
       0 bad file records processed.
    
    Stage 2: Examining file name linkage ...    
        
       43044 index entries processed.                                 Index verification completed.    
        
     Stage 3: Examining security descriptors ...
    
        Security descriptor verification completed.    
        
       915 data files processed.                                            CHKDSK is verifying Usn Journal...
        
       34431536 USN bytes processed.                               Usn Journal verification completed.
    Windows has scanned the file system and found no problems.
        
     No further action is required.
     283583487 KB total disk space.
        
       54862240 KB in 12528 files.    
           3588 KB in 916 indexes.    
         149583 KB in use by the system.    
          65536 KB occupied by the log file.    
      228568076 KB available on disk.
    
          4096 bytes in each allocation unit.   
       70895871 total allocation units on disk.    
       57142019 allocation units available on disk.
    ----------------------------------------------------------------------
    
        Stage 1: Examining basic file system structure ...
    Stage 2: Examining file name linkage ...
    Stage 3: Examining security descriptors ...
    

Step 3: Run Unlocker

If Chkdsk or Error checking indicate no file system corruption and the problem still persists, it’s possible that the directory is locked by a process. See How to Find Which Process has Locked a File/Folder for more information.

To unlock the folder and delete it, use one of the methods in the article to delete the stubborn folder. The IOBit Unlocker program or the other “Unlocker” program should be able to delete the folder.

The Unlocker (portable) program is avaiable for download from MajorGeeks

https://www.majorgeeks.com/files/details/unlocker_portable.html

Alternatively, you may boot into Safe mode or Windows RE to delete the stubborn folder.

That should fix errors “0x80070091: The directory is not empty”, “Cannot Delete folder” or similar error messages caused by file system/disk errors.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

5 thoughts on “Error 0x80070091 “The directory is not empty” When Deleting or Copying a Folder”

  1. Thank you very much!!!
    This really helped. I was looking for a simpler and direct approach to do it as using the command prompt was a bit scary to me since I was afraid if I’d do something wrong. This worked! Thanks once again!

    Reply
  2. After searching for help and looking at several other sites whose suggestions were either impractical or didn’t resolve the issue, I finally found this site, reviewed it, followed the suggestion solution via ‘Tools’ and the problem was immediately solved.
    For viewers in the UK, my comment is ‘It does what it says on the tin!’

    Reply

Leave a Comment