⚡ 100% FREE Single Standalone Executables under 100 KB •No Install•No Telemetry•No Ads

How to Force Delete a File Locked by Another Process in Windows 11

⚡ Quick Answer (10 Seconds):

To force delete a locked file: Open Resource Monitor (resmon.exe), navigate to the CPU tab, expand Associated Handles, search for the locked file name, right-click the locking process, and select End Process. Or drag the file into the free 70 KB Pexoris FileUnlocker utility to unlock and delete it in 1 click without restarting your PC.

Few errors on Windows are as infuriating as this ubiquitous modal dialog:

File In Use: The action can't be completed because the file is open in another program. Close the file and try again.

The worst part? Windows often doesn't even tell you which program has it open! Even after closing all your visible applications, hidden background processes like Explorer, antivirus scanners, or orphaned text editors keep their claws buried in the file.

Why Does Windows Lock Files?

The Windows NTFS kernel enforces file handle locking to avoid data corruption. When a program opens a document or executable, it creates a handle via the Win32 CreateFile API. If it specifies exclusive access without sharing rights (FILE_SHARE_READ | FILE_SHARE_WRITE), the operating system rejects any request to rename, move, or delete that file with error code 0x80070020 (ERROR_SHARING_VIOLATION).

Method 1: The Native Windows Resource Monitor Fix

You don't always need third-party tools to locate which program has your file hostage. Windows includes a built-in diagnostic tool called Resource Monitor:

Step 1: Launch Resource Monitor

Press Win + R, type resmon.exe, and press Enter.

Step 2: Search for the File Handle

Click on the CPU tab at the top. Under the Associated Handles section, type the exact name or extension of the locked file into the Search Handles field.

Step 3: End the Process Holding the Lock

Windows will display the process name and PID holding the handle. Right-click the process name and choose End Process. Once terminated, return to File Explorer and delete the file.

⚡ The Instant 1-Click Solution

Skip searching through hundreds of system handles in Resource Monitor. Pexoris FileUnlocker is an ultra-portable 70 KB tool that queries the Windows Restart Manager API directly, highlights the rogue process in red, and unlocks or deletes the file in 1-click.

Download Pexoris FileUnlocker Free (48 KB)
Portable Single .EXE • 0 Installer • Zero Telemetry

Method 2: 1-Click Deletion with Pexoris FileUnlocker

  1. Download and run PexorisFileUnlocker.exe.
  2. Browse or drag-and-drop the locked file or folder into the app.
  3. The locking process, PID, and executable path appear immediately in red.
  4. Click ⚡ Unlock & Force Delete to instantly destroy the locked file!

Frequently Asked Questions

What if the locking process is Windows Explorer (explorer.exe)?

Explorer frequently locks folders when generating thumbnail previews. In Pexoris FileUnlocker, clicking "Restart Explorer" gracefully restarts the shell without losing open folder positions.

Can this damage my operating system?

Pexoris FileUnlocker includes safety guards that warn you if you attempt to unlock critical Windows protected system files (such as ntoskrnl.exe or System32\drivers). Normal user files and downloads can always be safely unlocked.