0XC0000107

STATUS_FILES_OPEN (0XC0000107) – Drive ejection blocked by open file handles

You can't eject a drive because something still has its files open. This fix walks through finding and closing those handles, from a quick reboot to forensic tools.

What you're seeing

You plug in an external drive, use it, then try to eject — and Windows throws STATUS_FILES_OPEN (0XC0000107). The notification says “Problem Ejecting USB Mass Storage Device” or something similar. What's actually happening here is that one or more processes still have handles open to files on that drive. Windows won't let the drive go because it's paranoid about data corruption. Makes sense, but it's annoying when you know you're done with it.

Fastest try (30 seconds) – Reboot or sign out

This feels stupid, but it works more often than you'd think. The reason step 3 works is: when you reboot or log off, every user-mode process closes its handles. The kernel flushes them too. So if the blocker is something like a random Explorer window still referencing a thumbnail cache or a leftover command prompt, you're done.

  1. Close all open windows, especially File Explorer tabs pointing to that drive.
  2. Click the “Safely Remove Hardware” icon in the system tray and try again.
  3. If it fails again, restart your PC or sign out and back in. Then try ejecting immediately — before you open anything on the drive.

Moderate fix (5 minutes) – Find the culprit with built-in tools

If rebooting feels like overkill or you can't right now, let's find what's holding the drive. Windows gives you two ways to do this. I'll give you both.

Method A: Use the command line (fast, no install)

  1. Open Command Prompt as admin. (Hit Win, type cmd, right-click, “Run as administrator”.)
  2. Figure out the drive letter for the external drive. Say it's F:.
  3. Run this to see all open handles on that drive:
handle -a -p -nobanner F:

Wait — that requires handle.exe from Sysinternals, which you don't have yet. Let me correct myself. The built-in alternative is openfiles:

openfiles /query /s localhost /u %username%

But honestly, openfiles requires the “Maintain Objects List” global flag to be enabled, which it's not by default. So this method is a dead end unless you've already turned that on. Skip it.

Method B: Use Process Explorer (the real fix)

Download Process Explorer from Microsoft's site — it's portable, no install needed. Unzip and run procexp64.exe as admin.

  1. In Process Explorer, press Ctrl+F to open the “Find Handle or DLL” dialog.
  2. Type your drive letter with a colon and backslash — F:\ — and hit Search.
  3. List will populate with every process that has an open handle on that drive. You'll see things like explorer.exe, maybe a media player, maybe a backup tool, maybe a virus scanner.
  4. Double-click each entry to jump to the process. Then right-click the process and select Close Handle. You can do this for all of them.
  5. Try ejecting now. It should work.

If the process is something you don't want to kill — like a backup software that's mid-sync — wait for it to finish. Closing handles on a process that's actively writing can corrupt data. Use common sense.

Advanced fix (15+ minutes) – When the process refuses to let go

Sometimes the culprit is a system service or something that immediately reopens the handle after you close it — like a file indexer or a syncing tool. In that case, you need to stop the service temporarily, or use handle.exe from the command line to force-close with more control.

Stop the offending service

  1. From Process Explorer's search, note the process name. Is it SearchIndexer.exe? That's Windows Search. Is it svchost.exe hosting the StorSvc service? That's the Storage Service.
  2. Open Services (type services.msc in Run). Find the service, right-click, and Stop it.
  3. Try ejecting immediately. Afterward, restart the service or reboot to restore normal operation.

Use handle.exe to force-close by PID

If you prefer the command line, grab handle.exe. Run as admin:

handle -a -p F:

This prints all handles on F: with their process IDs. For each one you want to close, note the handle number (the hex value in brackets after the file path). Then:

handle -c <handle-number> -p <PID> -y

The -y suppresses the confirmation prompt. For example:

handle -c 0x000001234 -p 5678 -y

This is faster than Process Explorer's GUI if you know what you're doing. But be warned: force-closing a handle on a process that's in the middle of writing can cause corruption. Only do this when you're sure the file is not being actively modified.

Last resort: Disable the drive in Device Manager

If nothing works, you can force Windows to stop using the drive at the hardware level. This is a nuclear option — you might lose unsaved data.

  1. Open Device Manager (Win + X, select Device Manager).
  2. Expand Disk drives. Find your external drive.
  3. Right-click it and select Disable device. Confirm.
  4. Windows will immediately stop talking to it. You can now unplug it. Later, re-enable it from the same menu.

This works because disabling the device forces the driver to revoke all outstanding handles. The drive's file system is unmounted instantly. If any application had a file open, it'll get an error next time it tries to read or write — but no data is lost if nothing was actively being written.

Prevention: Stop it before it starts

The real fix is to close your programs properly before ejecting. Always check that no media player, file manager, or backup tool has that drive open. Also disable “thumbnail previews” in File Explorer for external drives — sometimes Explorer holds a handle just to generate thumbnails.

To do that, open File Explorer, go to ViewOptionsView tab, and check Always show icons, never thumbnails. That alone prevents Explorer from opening files just to look at them.

Related Errors in Hardware – Hard Drives
0XC0210006 STATUS_FVE_FS_NOT_EXTENDED (0XC0210006) – BitLocker Won't Enable RAID Parity Rebuild Stalled – Real Fixes 0XC00D0FAF Fix NS_E_MIXER_NODRIVER (0XC00D0FAF) Sound Mixer Error 0XC00002B8 Fix STATUS_JOURNAL_NOT_ACTIVE (0XC00002B8) on NTFS

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.