WiseCleaner Think Tank

Encounter difficult computer problems?
All about maintenance and optimization of your Windows System.

Home > Think Tank > How to Find Which Process Is Locking a File in Windows 11

How to Find Which Process Is Locking a File in Windows 11

May 19, 2026

You've all seen this one. You try to delete or move a file and Windows tells you "The action can't be completed because the file is open in another program." But which program? The error rarely names it.

Windows 11 has two built-in ways to find the locking process without installing anything. One uses Resource Monitor, the other uses PowerShell. Pick whichever fits your workflow.

Method 1. Resource Monitor (GUI)

Step 1. Open Resource Monitor

Press Win + R, type resmon, and press Enter. The Resource Monitor window opens.

Step 2. Switch to the CPU Tab

Click the CPU tab at the top. Below the process list you'll see a section labeled Associated Handles.

Step 3. Search for Your File

In the Associated Handles search box, type part of your file name and press Enter. Any process currently holding a handle to that file appears below, with its PID. You can right-click the process and choose End Process to release the lock.

Method 2. PowerShell

Step 1. Open PowerShell as Admin

Press Win + X, then choose Terminal (Admin) or Windows PowerShell (Admin).

Step 2. Run the Command

Type the following, replacing the path with your own file:

Get-Process | Where-Object { $_.Modules.FileName -like 'C:\path\to\your\file.ext' }

The output lists any process that has loaded the file. This works best for DLLs and EXEs. For data files held by file handles, Resource Monitor is more reliable.

Conclusion

Both methods get you to the same place: the name and PID of the process holding your file. Resource Monitor is friendlier when you just need an answer; PowerShell is better when you want to script the check. Either way, you don't need any extra software.

Latest
How to Know If Your Windows 11 Uses ARM64 or x64How to Limit Diagnostic Log Collection in Windows 11How to Enable Ransomware Protection on Windows
Read more >>
Recommend
Understanding Windows Power Plans: Balanced, Battery Saver, High Performance, and Ultimate PerformanceHow to Pause Windows Update for 100 YearsShould I enable or disable Trim of SSD?
Read more >>
Hottest
How to Install a macOS in VMware Workstation PRO 17How to Enable Task Manager Option in Taskbar Menu on Windows 11How to Fix Office Application Error 0xc0000142
Read more >>

wisecleaner uses cookies to improve content and ensure you get the best experience on our website. Continue to browse our website agreeing to our privacy policy.

I Accept