Skip to content

Best PicksOS

Best Free Tools to Find What's Locking a File in Windows 11

Can't delete a file because it's open in another program? These free Microsoft tools show which process is locking it: PowerToys File Locksmith, Process Explorer, Resource Monitor and Sysinternals Handle. Based on Microsoft's documentation, we explain how each works and who it suits.

By , Buying Guides & Peripherals Editor

4 min read

Best Free Tools to Find What's Locking a File in Windows 11

"The action can't be completed because the file is open in another program" is one of Windows' most annoying messages, especially when it doesn't tell you which program. You can't delete, rename or move the file, and a USB drive may refuse to eject. The good news is that Microsoft makes several free tools that tell you exactly which process is holding on, and some can release the file for you. These picks are based on Microsoft's documentation for each tool, checked on 30 November 2026.

Before you start: close it the safe way

Whichever tool you use, the safest fix is to close the program normally once you know what it is, so it can save its work. Ending a process or force-closing a handle can lose unsaved data, and Microsoft warns that closing handles "can cause application or system instability". If the culprit is a Windows process you don't recognise, a restart is often the safer option.

1. PowerToys File Locksmith: best for most people

File Locksmith is a PowerToys utility that, in Microsoft's words, "helps you identify which processes are using specific files or directories in Windows". It adds itself to File Explorer's right-click menu, so there's nothing to type.

  1. Install PowerToys (see our PowerToys guide), open it and turn on Enable File Locksmith.

  2. In File Explorer, select the file or folder, right-click, choose Show more options, then Unlock with File Locksmith. If you pick a folder, all its files and subfolders are scanned too.

  3. File Locksmith lists the processes using it. Select End task to terminate one, or expand it for more detail.

Microsoft notes that processes run by a different user can't be accessed and may be missing, so if the list is empty, select Restart as administrator to scan everything. There's also a command-line version, PowerToys.FileLocksmith.CLI.exe, with --kill to end locking processes, --json for scripts and --wait (with an optional --timeout in milliseconds) to wait until the files are released.

Best for: anyone who wants a point-and-click answer from File Explorer.

2. Process Explorer: best for seeing the full picture

Sysinternals Process Explorer (version 17.21 at the time of writing) is a free Microsoft tool that shows which handles and DLLs each process has opened or loaded, and Microsoft says it "also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded". Search for part of the file name and it lists the processes that have it open.

It shows much more than file locks, which makes it useful if you're also chasing a slow PC or a suspicious process. Our Process Explorer guide covers the basics, and Process Explorer vs Task Manager explains when it's worth the extra complexity.

Best for: power users who want to see exactly what a process is doing, not just end it.

3. Resource Monitor: best if you can't install anything

Resource Monitor is already part of Windows, so it's the one to use on a work PC or a friend's machine where you can't add software. On its CPU tab, the Associated Handles pane lets you search by part of a file or folder name, or even a drive letter, which is handy for a USB drive that won't eject. We walk through it step by step in our Resource Monitor guide.

Best for: locked-down PCs and quick checks without downloads.

4. Sysinternals Handle: best for scripts and the command line

Handle (version 5.0) is the command-line sibling of Process Explorer. Microsoft describes it as "a utility that displays information about open handles for any process in the system", and you need administrative privilege to run it. Type handle followed by part of a path, for example handle windows\system, and it shows which processes have matching files open; Microsoft says the match is case-insensitive and the fragment can be anywhere in the path.

Useful switches include -p to limit the search to processes whose names start with a given string, -u to show the owning user name and -v for CSV output. -c closes a specific handle (you give the handle value and the process ID), but this is the risky option Microsoft's instability warning applies to, so use it only when you understand what you're closing.

Best for: IT admins and anyone scripting checks across many files.

Which should you pick?

Tool

How you get it

How you use it

Ideal user

File Locksmith

Part of PowerToys

File Explorer right-click menu (plus a CLI)

Everyday users

Process Explorer

Free Sysinternals download

Search by file name

Power users

Resource Monitor

Built into Windows

Associated Handles search on the CPU tab

Locked-down PCs

Handle

Free Sysinternals download

Command line, admin rights needed

Scripts and admins

For more of Microsoft's free utilities, see our best Sysinternals tools and best PowerToys utilities.

The bottom line

For most people, PowerToys File Locksmith is the quickest way to find what's locking a file: right-click, choose Unlock with File Locksmith and you'll see the culprit, with Restart as administrator if the list looks empty. Use Resource Monitor when you can't install anything, Process Explorer when you want the full picture, and Handle for the command line, and whichever you choose, close the program normally where you can rather than force-ending it.

Sources

  1. 01Microsoft Learn: PowerToys File Locksmith utility
  2. 02Microsoft Learn: Process Explorer v17.21 (Sysinternals)
  3. 03Microsoft Learn: Handle v5.0 (Sysinternals)

About the author

Hannah Vance

Buying Guides & Peripherals Editor

Hannah edits Forge PC's buying guides and component roundups across gaming monitors, mechanical keyboards, mice, cases and power supplies. She specialises in OLED and Mini-LED panel characteristics, low-latency wireless peripherals, acoustic damping and value-for-money component selection for UK PC builders.

More from Hannah Vance

Read next

How to Add an Exclusion to Microsoft Defender in Windows 11 (Safely)

How-To

How to Add an Exclusion to Microsoft Defender in Windows 11 (Safely)

Microsoft Defender keeps flagging a file you trust? Rather than switching protection off, you can exclude a file, folder, file type or process in Windows Security. Following Microsoft's guidance, we show how to add and remove exclusions, use wildcards safely and what exclusions don't cover.

Marcus Thorne4 min

The Best NVIDIA App Features in 2026: What's Worth Using on a GeForce PC

Best Picks

The Best NVIDIA App Features in 2026: What's Worth Using on a GeForce PC

The NVIDIA App does far more than update drivers. Based on NVIDIA's official pages, we pick the features most worth using on a GeForce PC, from DLSS Override and Smooth Motion to Instant Replay, the performance overlay, RTX HDR and one-click GPU tuning, and explain who each suits.

Hannah Vance4 min

Microsoft Defender Quick Scan vs Full Scan: Which Should You Run?

Versus

Microsoft Defender Quick Scan vs Full Scan: Which Should You Run?

Windows Security offers Quick, Full, Custom and Offline scans, and the longest isn't always best. Using Microsoft's own documentation, we explain what each Microsoft Defender scan checks, how long full scans can take and which to run for everyday checks, USB drives and stubborn malware.

Callum Reid4 min

llamafile vs llama.cpp: Which Is the Better Way to Run Local AI on Your PC?

Versus

llamafile vs llama.cpp: Which Is the Better Way to Run Local AI on Your PC?

llamafile packages llama.cpp, and optionally a model, into one file that runs without installation, while llama.cpp is the upstream engine itself. Using official READMEs and docs, we compare setup, the Windows 4GB limit, model support, GPU backends and which suits you.

Callum Reid3 min