To resolve the error 0x80070091 “Directory Not Empty,” follow these steps systematically:
-
Identify the Directory: Locate the directory that is causing the error.
-
Manual Deletion:
- Delete all files within the directory manually.
-
Remove any subdirectories by recursively deleting their contents.
-
Check Permissions:
- Right-click the directory, select “Properties,” and navigate to the “Security” tab.
-
Ensure you have full access permissions; modify if necessary.
-
Use Disk Cleanup:
- Open the Start menu, search for “Disk Cleanup.”
-
Select the drive containing the problematic directory, click “Clean up now.”
-
Cipher Command:
-
Run Cipher /W:C:\Path\To\Directory in Command Prompt to remove unnecessary encryption.
-
Third-Party Tools: Utilize tools like Recuva or CCleaner for deeper cleaning, ensuring safe usage of delete options.
-
Command Line Tools:
- Use del /F/Q “C:\Path\To\File” to forcefully delete files.
-
Use rmdir /S/Q “C:\Path\To\Directory” to recursively remove directories.
-
Check for Locked Files:
-
Open Process Explorer, search for locked files in the directory, and end any related processes.
-
Disk Error Check:
- Run Command Prompt as Administrator.
-
Execute chkdsk /f /r C:\Path\To\Drive to scan and fix disk errors.
-
Reboot System: Restart your computer after making changes to apply updates or fixes.
-
Last Resort – Format Disk:
- Backup all important data.
- Use the “Format” option in File Explorer or Command Prompt to reformat the drive, ensuring a clean slate.
By methodically following these steps, you can effectively address the directory not empty error and resolve underlying issues.