Windows · Guide

How to Find Out Which Program Is Using a File on Windows

Short answer

Open Process Explorer, press Ctrl + F, type part of the file or folder name, and it lists every process holding a handle to it. You can then close the handle or end the process that is locking the file.

Requirements

  • Windows 11 or Windows 10
  • Process Explorer (free, Microsoft Sysinternals)
  • Optional: Process Monitor for tracing repeated access
  • Administrator rights for system-owned files

Steps

  1. 1. Read the error message first

    Windows sometimes names the culprit itself: "The action can't be completed because the file is open in ...". If it names an app, close that app and retry before installing anything.

  2. 2. Run Process Explorer as administrator

    Extract the Sysinternals download, right-click procexp64.exe and choose Run as administrator. Without elevation you cannot see handles owned by services or other user accounts.

  3. 3. Search for the file handle

    Press Ctrl + F, type a distinctive part of the file name — you do not need the full path — and press Enter. Each result shows the process name and PID holding the file.

  4. 4. Decide between closing the handle and closing the app

    Double-click a result to select the process, then close the application normally. Force-closing a handle from the lower pane works, but the owning program may misbehave because it still thinks the file is open.

  5. 5. Handle locked folders the same way

    Searching for the folder name finds processes with the directory open, which is the usual reason a folder refuses to be renamed or deleted.

  6. 6. Trace repeat offenders with Process Monitor

    If a file is re-locked seconds after you free it, start Process Monitor, add a filter Path contains <file name>, and watch which process opens it and how often.

  7. 7. Check for indexing and backup agents

    Search indexers, sync clients and backup agents lock files briefly on a schedule. Pausing the sync client or backup job is safer than killing it mid-write.

Alternative methods

  1. 1. Use Resource Monitor

    Run resmon, open the CPU tab, and type the file name into Associated Handles. It is built into Windows and enough for simple cases, though slower and less detailed.

  2. 2. Use Everything to find the real path first

    When you only know part of the file name, Everything locates the exact path instantly, which makes the handle search in Process Explorer far more precise.

Troubleshooting

Process Explorer finds no handle at all

The lock may be held by a kernel-mode component such as an antivirus filter driver, or by a remote session over a network share. Check Computer Management > Shared Folders > Open Files for network locks.

The file is still locked after the app is closed

A background helper process often outlives the window you closed. Search the handle again and look for a second process from the same vendor, then end that process tree.

I get Access denied when searching handles

Process Explorer must be elevated, and some protected processes never expose their handles. Restart and delete the file before other software loads if it is genuinely stuck.

Frequently asked questions

Is it safe to close a handle instead of the program?

It works, but the program keeps writing as if the file were open, which can corrupt the file. Closing the application is always the safer order of operations.

Why does Windows not just tell me the program?

Only some APIs report the locking process, so File Explorer often shows a generic message. Handle enumeration is what makes Process Explorer able to answer reliably.

Do I need Process Monitor as well?

Only for recurring locks. Process Explorer shows the current state; Process Monitor records the history, which is what you need when the lock returns by itself.

Are Sysinternals tools free?

Yes. Process Explorer and Process Monitor are published free of charge by Microsoft and need no installation — they run from an extracted folder.

Reviewed by SoftNexi Editorial Team

Last verified: September 8, 2026