Let’s say you want to edit a file. You may want to give it a different name, move it somewhere else, or delete it altogether. There’s a problem, however; when you go to edit the file, Windows will tell you that another process has “locked” the file. As such, you’re not allowed to edit it. What’s going on?
Windows will naturally stop you from editing a file that’s already opened somewhere else. This is to protect it from being edited while another process is currently using it. For instance, if you open a Word document in Microsoft Word, Windows won’t allow you to delete the document while it’s open. Given how Microsoft Word is currently using the document, editing the file outside of Word may cause strange things to occur!
So let’s say there’s a file on your computer you want to edit, but Windows won’t let you. What do you do now?
What Does “Locked” Mean?
To clear things up; when we talk about a “locked” file in this article, we mean a file that is currently in use in another process. This then creates a “locked” file which you can’t edit outside of the process currently using the file. This isn’t about files with a password lock on them or folders that deny you access due to insufficient security rights; these are different ways files can be “locked!”
If You Know the Process Locking the File
Close the App Locking the File
If you’re lucky, Windows will let you know what app has locked the file. For instance, the above image shows a document locked in WPS Writer. If Windows tells you the process’ name, then it’s a simple case of finding the process in question and shutting it down. The solution in the above example is to find the WPS Writer window with this document open and shut it down. This then releases the lock on the file.
If closing the software doesn’t fix it, there’s a chance the process wasn’t fully stopped. First, ensure the process isn’t something crucial to the operation of Windows, as we don’t want to crash or corrupt the system! If you’re sure the process isn’t integral to the system, open Task Manager by pressing “Shift + Ctrl + ESC.” Click the “Details” tab, and find the process locking your file.
With the process selected, click on the “End task” button at the bottom right. Alternatively, you can right click it and click “End Task.”
If You Don’t Know the Process
Unfortunately, sometimes Windows will claim the file is locked, but it won’t tell you what, exactly, is locking the file. This is especially infuriating, as there’s no obvious way to fix the issue. How can you shut down the process if Windows won’t tell you which one is the culprit? Thankfully, we don’t have to give up hope just yet; there’s still a few more tricks we can try.
Restart the PC
As a simple solution, restarting the PC also restarts all the processes on your computer. This means any process that’s currently hogging your file will be restarted and will hopefully relinquish its grip on your file. It’s not a fantastic solution as it does involve shutting everything down just to unlock a single file. As a quick and easy solution, however, restarting the PC will work the majority of the time.
If restarting your PC sounds like a hassle, don’t give up hope just yet! There are third-party tools you can use to unlock your files instead of having to restart every time. An easy-to-use solution is LockHunter which helps identify what is locking your files and unlocks them for you to edit.
Once you’ve downloaded and installed LockHunter, it’s a simple case of right-clicking the offending file and selecting “What is locking this file?”
LockHunter will then pop up and inform you of the process locking the file. You can then unlock the file if you’d like, but LockHunter also natively supports deleting and renaming the file through the app for an easier time.
Taking Back Control
When you want to edit or delete a file, it’s annoying to discover it’s currently being used by a process. Simply closing the process works most of the time, but when things get a little trickier, restarting the PC or using a third-party app can help.
Have you ever been plagued with locked files? Let us know below!