Microsoft Windows Error Code 0x80070248: How to Fix It

Easy 10-20 minutes Medium Severity Verified June 2026
Error Code
0x80070248
Brand
Microsoft Windows
Product Type
hresult
Severity
Medium
DIY Difficulty
Easy
Estimated Fix Time
10-20 minutes
Error code 0x80070248, also known as ERROR_DIR_NOT_EMPTY, occurs in Windows when you try to delete or modify a folder that still contains files or subfolders. This usually happens because the folder is in use, has hidden/system files, or you lack permissions. Follow these steps to resolve it.
Ad

How to Fix Error Code 0x80070248

  1. Close All Programs and Retry

  2. Use Command Prompt to Force Delete

    Be careful with the path: this permanently deletes all files inside the folder.
  3. Show Hidden and Protected Files

    Do not delete system files outside the target folder.
  4. Take Ownership of the Folder

  5. Use Safe Mode to Delete

    Safe mode loads minimal drivers, reducing the chance the folder is in use.
Ad

When to Call a Professional

If none of the above steps work, the folder may be corrupted. A professional can use advanced recovery tools or recreate the folder structure manually. Consider data recovery services if the folder contains important files.

Frequently Asked Questions

What causes error 0x80070248?
This error occurs when you try to delete or rename a directory that still contains files or subfolders. It's often due to hidden or system files, insufficient permissions, or the folder being in use by a program.
Can I fix error 0x80070248 without losing data?
Yes, because the error prevents deletion of the folder. Follow the steps above to safely remove the folder. If you need the files, move them out first.
Is error 0x80070248 serious?
No, it's a common Windows error and usually easy to fix. It does not indicate hardware failure or system corruption.
How do I delete a folder that says it's not empty?
Use Command Prompt with the /s flag to force delete all contents. Alternatively, take ownership, show hidden files, or boot into Safe Mode.
What if I still see the error after trying all steps?
The folder may be corrupted. Try running chkdsk on the drive: 'chkdsk C: /f' in Command Prompt (as Admin). If that fails, consider third-party file unlocking tools or professional help.