Every Windows user has encountered the frustrating operating system alert: “The action can’t be completed because the file is open in another program.” Worse still, Windows frequently fails to disclose which specific application is holding the file lock. Users are often forced into tedious guesswork, hunting through Task Manager process lists, or restarting their PC entirely just to delete an obsolete temporary file or rename a project directory.
To resolve this longstanding desktop nuisance, Microsoft developed File Locksmith as part of the official Microsoft PowerToys utility suite for Windows 11. Integrated directly into the Windows File Explorer context menu, File Locksmith scans open process handles and reveals exactly which applications are accessing a file, allowing you to close them with a single click.
How File Locksmith Operates
When Windows opens a file, it assigns an open file handle to the responsible process to protect against data corruption. File Locksmith interfaces with the Windows kernel process tracking API to perform diagnostic audits:
- Handle Resolution: Scans active Win32 processes, background services, and system threads to match targeted directory paths against open system handles.
- Process Tree Visibility: Displays the executable name, Process Identifier (PID), and user account under which the locking application is running.
- Granular Process Termination: Offers one-click termination of individual rogue tasks without needing to hunt through nested trees in Task Manager.
Installing and Enabling File Locksmith
File Locksmith is bundled with Microsoft PowerToys. To ensure it is installed and active:
- Install Microsoft PowerToys from the Microsoft Store or via Windows Package Manager:
winget install Microsoft.PowerToys --source winget - Open the PowerToys settings dashboard from your Start menu or system tray.
- In the left sidebar, select File Locksmith.
- Ensure the toggle switch next to Enable File Locksmith is switched to On.
How to Use File Locksmith in File Explorer
Using File Locksmith during your daily workflow is straightforward:
- Open File Explorer (Windows key + E) and navigate to the stubborn file or folder you cannot rename, move, or delete.
- Right-click on the selected file or folder.
- If using the modern Windows 11 context menu, look for Unlock with File Locksmith (or click Show more options > Unlock with File Locksmith).
- The File Locksmith diagnostic window appears and automatically scans open handles.
- If an application is locking the file, File Locksmith displays:
- Process Name: (e.g.,
excel.exe,node.exe, orcode.exe). - Process ID (PID): Unique identifier assigned by Windows.
- User Context: The user account holding the lock.
- Process Name: (e.g.,
- Click End task next to the offending process to terminate it immediately.
- Close File Locksmith and proceed to rename, delete, or move your file in File Explorer without error prompts.
| Method | Speed & Convenience | System Impact |
|---|---|---|
| File Locksmith | Instant (1-click right-click context menu) | Safe, targeted process termination |
| Resource Monitor | Moderate (Manual search under Associated Handles) | Built-in, but requires navigating multiple tabs |
| System Restart | Slow (Interrupts all ongoing work) | Clears locks but disrupts productivity |
Scanning System Processes as Administrator
If a file is locked by a Windows background service or an administrative installer, scanning as a standard user may display “No results found”:
- In the File Locksmith dialog, click the Restart as administrator button in the top-right corner.
- Accept the User Account Control (UAC) prompt.
- File Locksmith relaunches with elevated kernel privileges, revealing protected system handles and background services that were previously obscured.