Overview
File Locksmith helps you discover which processes are locking a file or folder, preventing deletion, moving, or modification. It integrates directly into File Explorer’s context menu, allowing you to quickly identify and terminate locking processes.Activation
Key Features
Process Detection
File Handle Detection
Identifies processes with open file handlesShows read/write access modes
Folder Monitoring
Detects processes accessing foldersIncludes files within directories
Multiple Files
Check multiple files simultaneouslySelect multiple files in Explorer
Process Details
Shows process name, PID, and userFull path to executable
Context Menu Integration
Seamless File Explorer integration:- Right-click file/folder
- “Show more options” (Windows 11)
- “What’s using this file?” option
Process Information Display
Detailed information about locking processes:- Process Name: Application name
- Process ID (PID): Unique process identifier
- User: Account running the process
- File Path: Full path to executable
- Access Type: Read, Write, or Read/Write
- Handle Count: Number of open handles
Process Termination
- End Process
- End Process Tree
- Force Terminate
Gracefully terminate a process:
- Select process in File Locksmith window
- Click “End Process” button
- Confirm termination
- Process receives termination signal
- File/folder is unlocked
Configuration
Settings
Minimal configuration required:Enable or disable File LocksmithControls context menu integration
Show in extended context menu onlyRequires holding
Shift while right-clickingExtended Context Menu
Reduce context menu clutter:- Disabled: Always visible
- Enabled: Only visible when holding
Shift
Use Cases
File Deletion Issues
Cannot delete file
Cannot delete file
Common scenario:Solution:
- Right-click file → “What’s using this file?”
- Identify locking process
- Save work in that application
- End process
- Delete file successfully
File in use after closing app
File in use after closing app
Application closed but file still locked:
- Background process still running
- Crash left handles open
- Service holding file
- Find zombie process
- Terminate lingering handles
- Clean up properly
Development Scenarios
DLL Rebuild Issues
Cannot rebuild project due to locked DLL:Identify: Test application still running
Log File Access
Cannot delete or move log files:
- Application still logging
- Log viewer has file open
- Background service writing logs
System Maintenance
Folder Deletion
Cannot delete folder with locked filesFind all processes using folder contents
USB Drive Ejection
“Device is in use” errorIdentify processes accessing USB drive
File Moving
Cannot move files between foldersDiscover hidden locks
Update Installations
Installer cannot replace filesEnd processes before updating
Media Production
- Video Editing
- Audio Production
- Image Editing
Video file locked by:
- Video player in background
- Encoder still processing
- Preview generator
Network Shares
Files on network drives:Technical Details
Architecture
Handle Detection
File Locksmith uses Windows APIs to enumerate handles:- Enumerate all system handles
- Filter handles of type “File”
- Query handle name/path
- Match against target file
- Return owning process information
Components
| Component | Purpose | Location |
|---|---|---|
| FileLocksmithCLI | Command-line interface | src/modules/FileLocksmith/FileLocksmithCLI |
| FileLocksmithContextMenu | Explorer integration | src/modules/FileLocksmith/FileLocksmithContextMenu |
| FileLocksmithLib | Core handle detection | src/modules/FileLocksmith/FileLocksmithLib |
| FileLocksmithUI | User interface | src/modules/FileLocksmith/FileLocksmithUI |
CLI Usage
File Locksmith can be used from command line:src/modules/FileLocksmith/FileLocksmithCLI/main.cpp
Process Termination
Multiple termination methods:Keyboard Shortcuts
In File Locksmith Window
| Shortcut | Action |
|---|---|
Shift+Right-Click | Show context menu (if extended menu enabled) |
Enter | End selected process |
Delete | End selected process |
Esc | Close window |
F5 | Refresh process list |
Troubleshooting
Context menu option not appearing
Context menu option not appearing
No processes shown but file is locked
No processes shown but file is locked
Possible causes:
- System/kernel process holding file
- File locked by Windows itself
- Network share lock (remote process)
- Permissions prevent detection
- Run PowerToys as Administrator
- Check Windows Event Viewer for file access logs
- Use Process Explorer for deeper analysis
- Restart computer to clear all locks
Cannot end process
Cannot end process
Reasons:
- Insufficient privileges (need admin)
- System-critical process
- Process already terminating
- Protected process
- Run PowerToys as Administrator
- Use “End Process Tree” option
- Use Task Manager with admin rights
- Restart computer
File still locked after ending process
File still locked after ending process
Check:
- Process actually terminated (check Task Manager)
- File handle cleanup may take a moment
- Another process opened file
- File system sync delay
- Wait a few seconds
- Re-run File Locksmith
- Check for additional locking processes
- Refresh File Explorer (
F5)
Limitations
Kernel-Mode Locks
Some file locks are held by kernel drivers:- Antivirus scanners
- File system filters
- Disk encryption software
- Backup agents
Permission Requirements
To terminate processes:- User processes: No special permissions
- Other users’ processes: Administrator rights
- System processes: Administrator + may be protected
- Services: Administrator + service control rights
See Also
- File Explorer Add-ons - Preview file contents
- PowerToys Run - Quick file search
- Process Explorer - Advanced process analysis (Sysinternals)