Locked files are annoying, especially those locked in mystery as to no reason why they are locked and what has been holding them off. You often ended up closing all your opened applications and rebooting your computer to clean up the locked handles so that you can deal with these files.
There are a few reasons why your file may have been caught in locked position. For one, the file might be opened by another user on the same network because the file is part of the shared folder on your computer. And another, the file may be opened and locked by an application that is still actively alive in the background even though it’s been closed by the user.
To unlock a file locked by a remote user
Note that if your computer doesn’t have a shared folder that is accessible to the remote user, you won’t be able to unlock a file by this method.
1. Open Computer Management, by right-clicking My Computer icon and choosing Manage.
On Windows 8, you can right-click the Start button to bring up the Power Menu and launch Computer Management straight from there.
2. Expand Shared Folders, and click on Open Files at the left hand panel in Computer Management.
3. Then on the right side panel, find the file that is opened by a remote user, right-click on it and choose Close.
4. After that, you will be able to deal with the file that was locked before.
To unlock a file locked by an application
Sometimes I called these locked files in mystery because often times you found there is just no reason for them to be in the locked mode and you certainly don’t see any running applications that were holding them off.
If you know the name of the application that had been used to open the file before, you may want to check the Task Manager (Ctrl+Shift+Esc) to see if the application that you had closed is still alive in the Processes tab. If so, manually killing it in Task Manager would release the lock handle so that you will be able to deal with the file again.
However, in a lot of cases, you might not have idea of which application you should be looking or the file still remains in locked even after you manually terminated the application described above. If that’s the case, it’s time to call up a help for the 3rd party tool. Among many of them out there, Unlocker is one that is free and portable, and that I have been using for years. I am always quite happy with the output from this extremely tiny but effective tool.
Interestingly, Sysinternals also has a tiny command line tool called Handle that displays information about all or specific open handles for any process in the system. You can use it to see the programs that have a file open. And you can terminate the specified handle to release the locked file.
Handle requires a local admin to run so you will need to open Command Prompt as Administrator first and run it inside.
First, if you don’t know which handle that holds off your file, use the name switch to find out all handles and their IDs. For example, I can use the following command to find out which applications are currently running to access my Desktop.
Then, I can see it’s AcroRd32.exe with pid 9328 that is holding off my file. Then, I can use the following command to terminate the process to release the handle.
handle -c 9328
There is also a GUI version of Handle, called Process Explorer, that you can try out if command line tool is a bit too much to handle for you.
That’s about it. Hope it helps.
Latest posts by Kent Chen (see all)
- Microsoft To-Do App Available in Preview on Windows 10, iOS and Android - April 19, 2017
- Windows 10 Tip: What’s Mini View in Movies & TV App and How To Use it - April 15, 2017
- Windows 10 Tip: How To Convert MBR Partition to GPT without Losing Data - April 12, 2017
Last updated: 11/07/2014