How PowerToys’ Locksmith tool helps unravel vague Windows error messages

“The action can’t be completed because the file is open in another program” might be one of the least helpful messages Windows has ever shipped. It’s been this way for as long as I can remember. So, I can’t eject a drive, move a file, delete a file, or modify a file because a program is using it. Fine, which program? Why won’t you tell me?!
The good news is that Microsoft has long ago solved this issue perfectly—it just didn’t bother to include that solution in your default Windows installation.
Why Windows makes this problem harder than it should be
While the error message is pretty vague, of course Windows knows exactly which process is currently locking that file. File locking isn’t some mysterious thing beyond the ken of man and beast. It’s how an OS prevents data corruption and software crashes. So there’s exactly zero reasons why the error message can’t simply include the name of the process. Then you could close the program, or end the process in Task Manager.
Speaking of Task Manager, it’s no help here either. Opening it shows you running processes, and it will show you disk usage for those processes, but not which files are currently being locked by that process.
You could, of course, open the Resource Monitor from the CPU tab and then look under “Associated” handles to see if the file is listed under a process. But that means going through every likely process and scrolling through a long list looking for your file. If you don’t even know which process is locking your file, this is hardly a solution!
So what are your options? There are a few, but none of them are great. The file was locked for a reason. It might still be locked because of an error, but it could be locked for a legitimate reason. You can try to close programs or processes you think are likely to be the culprit to see if it helps. You can unplug an external drive without ejecting it if you’re feeling lucky, or you can restart the whole computer and hope that resolves it. There’s no elegant solution on offer.
How PowerToys file locksmith cuts through the mystery
Or, and this is truly ridiculous, you can download Windows PowerToys and use a tool called “Locksmith” to find out exactly what process or program is locking your file and deal with it instantly.
Seriously, once PowerToys is installed, all you have to do is right-click on the offending file and choose “Unlock with Locksmith.”
Then a window pops up telling you exactly what program is locking your file, and you can even click an “end task” button right there in the window.
Real-world situations where file Locksmith is a lifesaver
I touched on this above, but the fact of the matter is that this file locking issue crops up all the time if you regularly use your Windows computer for, well, work. Anything that involves opening local files, copying files, modifying them, and so on means that the file will be locked temporarily. Not a week goes by for me when a file locking issue doesn’t happen at least once. Though, to be fair, I have multiple Windows systems in the house, so the odds are stacked against me here.
It’s also common when I’m consolidating lots of data, copying large amounts of small files to external drives, or generally doing the housekeeping stuff that happens periodically on any computer. Having a massive file transfer queue stop partway because of locked files is maddening and that’s one situation where you can’t just yank everything and restart the machine.
If you use your Windows computer to make money (how brave!), then this dumb error can be a showstopper when you’re editing videos, developing software, or doing anything where time is actual money.
Why this feels like a feature Windows should have shipped with
My question, and yours probably too, is why this feature isn’t just integrated into Windows? PowerToys are meant to be tools for “power users” with the implication being that you wouldn’t want the average user to have access to these tools because they could break something.
From that perspective, giving someone the ability to forcibly break a file lock is risky because it can lead to data loss. However, it’s not hard to build an error system that clearly informs the user that what they’re about to do can lead to data loss and what they should try first before pushing the big red button.
Now, to be honest, since I install PowerToys on my Windows computers anyway, for practical purposes, this is a non-issue for me. I’m thinking of everyone else who probably don’t even know that PowerToys exist (because it’s not like it gets promoted) and run into this vague and genuinely frustrating issue at some point. It’s funny, because Microsoft is happy to nag us to use OneDrive all the time or subscribe to Microsoft 365, but does nothing to inform its customers of PowerToys—a genuinely useful set of utilities.


