0X000010D3

Fix ERROR_NOT_EMPTY (0x000010D3) When Deleting a Folder

Hardware – Hard Drives Intermediate 👁 8 views 📅 Jun 20, 2026

This error means Windows thinks a folder isn't empty but it is. The fix is usually a command-line cleanup or a quick disk check. We'll start with the easy stuff.

What Actually Happens Here

You try to delete a folder that looks empty. Windows Explorer shows nothing inside. But when you hit Delete, you get ERROR_NOT_EMPTY (0x000010D3). What's going on is a mismatch between what Explorer shows and what the file system knows. The folder has hidden files, system files, or leftover metadata that Windows can't display normally.

This error happens a lot after uninstalling programs, especially on Windows 10 and 11. For example, you remove an old game or app, and the leftover folder has a hidden Thumbs.db or desktop.ini that Windows won't show by default. Other times, the file system itself has a tiny corruption – a directory entry says something's there, but the data is gone.

Here's the fix flow. Start with the 30-second test. If that doesn't work, move to the 5-minute fix. The last one takes 15+ minutes but handles any corruption.

30-Second Fix: Delete Hidden Files with CMD

Open Command Prompt as Administrator. Don't use PowerShell for this – the del command behaves differently there. Press Win+R, type cmd, then Ctrl+Shift+Enter. Yes, that's the shortcut.

Now navigate to the folder that won't delete. Replace the path below with yours:

cd /d "C:\Path\To\Your\Folder"

Then run these commands in order:

del /f /s /q /a *.*
rmdir /s /q .

The first command removes every file, including hidden and system ones. /f forces deletion, /s goes into subfolders, /q is quiet mode, and /a targets all attributes. The second command removes the now-empty folder.

Why this works: Explorer hides system files by default. The del command with /a doesn't care about those settings. It nukes everything.

If you still get the error after this, the problem is deeper.

5-Minute Fix: Quick Disk Check (CHKDSK)

The error can come from a minor file system corruption. CHKDSK fixes that. Open Command Prompt as Administrator again (same as above).

Run this command – replace D: with the drive letter where the folder lives:

chkdsk D: /f

If it's your C: drive, Windows will ask to schedule it for next restart. Accept with Y and reboot. For other drives, it runs immediately.

After the check finishes, try deleting the folder again with the 30-second method above. If it still fails, move to the advanced fix.

Why this works: CHKDSK repairs the $MFT (Master File Table) – the index that keeps track of what's in each folder. When that index gets a wrong entry, Windows thinks a folder still has content. CHKDSK realigns the index with the actual file system state.

15+ Minute Fix: Force Ownership and Remove with Safe Mode Tools

This fixes cases where system files or permissions are locked. You'll need to boot into Safe Mode or use a live Linux USB, but let's stay inside Windows first.

Step 1: Take Ownership with icacls

Open Command Prompt as Administrator. Run this (replace the path):

icacls "C:\Path\To\Your\Folder" /grant Administrators:F /T

/grant Administrators:F gives full control. /T applies to all subfolders. This overwrites any permission locks.

Step 2: Boot into Safe Mode

Restart your PC. As it boots, hold Shift and click Restart. Go to Troubleshoot > Advanced Options > Startup Settings > Restart. Then press 4 for Safe Mode. Safe Mode loads only essential drivers – no antivirus, no background apps that might hold a handle on the folder.

Step 3: Delete from Safe Mode

In Safe Mode, open File Explorer. Try deleting the folder normally. If that fails, use the CMD method from the 30-second fix again. It almost always works here because no process is locking the folder.

Step 4: Use LockHunter (Third-Party Tool)

If Safe Mode still fails, download LockHunter (free, no ads). It's a tiny tool that shows what's locking a file or folder. Right-click the folder, choose What is locking this folder?, and unlock or delete it from the tool. LockHunter handles kernel-level locks that even Safe Mode can't bypass.

Why step 3 works: Windows services like Search Indexer or File History might cache the folder's state. In Safe Mode, those services don't run, so the lock disappears. The folder becomes truly accessible.

When to Give Up and Use a Live USB

If all three methods fail, the file system might be badly damaged. Boot from a Linux Live USB (Ubuntu works fine). Mount the Windows drive, navigate to the folder, and delete it from Linux. Linux doesn't respect Windows file locks. I've done this for clients with NTFS corruption – always works.

Once deleted, run CHKDSK when back in Windows to clean up the $MFT.

One Last Thing

Don't waste time with Disk Cleanup or Safe Mode's built-in tools – they don't touch folder deletion issues. And skip the takeown command; icacls is faster and more reliable. The real fix is always about finding and removing the invisible content or the corrupt index entry.

Was this solution helpful?