0X00000010

Can't delete a folder? It's locked by your own open window (0x10)

Windows Errors Beginner 👁 7 views 📅 Jun 28, 2026

ERROR_CURRENT_DIRECTORY means you or another app has the folder open as the current directory. Close the window or use a tool to unlock it.

Quick answer

Run this in an admin Command Prompt to find what process has your folder set as current directory: handle.exe -a "C:\Your\Folder\Path" (from Sysinternals). Then kill that process with taskkill /PID xxxx /F.

Why you're stuck with 0x10

I've seen this one around 50 times in the last 10 years. A client last month couldn't delete a temp folder on a Windows 10 machine. They tried everything – safe mode, unlocking tools, even renaming. The error was always 0x10. The real fix? They had an Explorer window open with that folder set as the current directory. It's not a file lock – it's the folder itself being the active directory of a process. Think of it like this: you're standing in a room and someone says 'clear this room' – but you can't leave because you're already standing there. Windows won't let you delete a folder that's the current directory for any process, including Explorer.exe.

How to fix it: step by step

  1. Close any open File Explorer windows that might be showing that folder. Hit Ctrl+W to close them fast.
  2. If that doesn't work, download handle.exe from Microsoft Sysinternals (it's free, no install needed).
  3. Open an elevated Command Prompt (right-click CMD, Run as Administrator).
  4. Run: handle.exe -accepteula -a "C:\Full\Path\To\Your\Folder". Replace the path with your folder's actual path. This shows every process with a handle (file, directory, or current directory) on that folder.
  5. Look for a line that says PID: xxxx and type: Directory. That's the process that has your folder as current directory.
  6. Kill it: taskkill /PID xxxx /F. Replace xxxx with the PID from step 5. If it's Explorer.exe (PID usually around 2000-4000), be careful – killing Explorer will hide your taskbar and desktop icons, but it restarts automatically.
  7. Now try deleting the folder again. Right-click it, Delete. It should work.

Alternative fixes if the main one doesn't work

Sometimes handle.exe doesn't show anything because the folder is held by a service running as SYSTEM. That happened to me once with a print spooler service using a temp folder. Use Process Explorer (also from Sysinternals) instead. Open it, hit Ctrl+F, type the folder path, and it'll show all handles. Then kill the process from there.

Another trick that works for simple cases: open a new Command Prompt, run cd \ to get to the root, then try deleting the folder from there. If the folder is only locked by your own CMD window, this drops the lock.

Last resort: boot from a Windows USB or Linux live USB and delete the folder outside of Windows. But that's overkill for 99% of cases.

Prevention tip

Train yourself to close Explorer windows before deleting folders. It's a habit. Also, if you're a developer or IT pro, avoid setting a folder as current directory in scripts and leaving them running – I once had a Python script running in a temp folder that blocked cleanup for weeks. Use absolute paths in scripts instead.

Was this solution helpful?