Read-only files also cannot be edited and can be confused with locked files. Or if your computer is in a network and you don’t have ownership of the shared files, it may be locked from deleting. Anyways, in this article, we’ll discuss force deleting all types of locked files in Windows.
How to Force Locked Delete Files on Windows?
Using keyboard shortcuts would be effective in bypassing the recycle bin and permanently deleting your files. To do so, you can select the desired file and press the Shift + Del keys on your keyboard. Some files may even want admin permissions. However, locked files may not co-operate with any usual method of deletion. So, you can try the method listed below to delete locked files:
Use DEL Command
Commands in the command prompt provide you with the privilege to easily delete files. It can also force delete files open in any application. Follow the given steps to delete a locked file using the command:
End Task, Then Delete
We cannot delete the files open in some application or process in the background. As already mentioned, applications lock the in-use files to prevent any unwanted hindrances in their operation. Thus, you will have first to close such apps or processes from the Task Manager, and then only you will be able to delete files. If you are aware of the particular app by which the file is being utilized, then follow: Various processes of a single application may also use some files. And sometimes, these processes won’t close just by ending the application. So, proceed to the end task for all such known processes. But you shouldn’t just try to shoot in the dark, as ending any important process can cause severe inconvenience in the functioning of your computer. Once you stop all such processes opening your file, you can easily delete it with the above-mentioned shortcut, i.e., Shift + Del. Or, you can also use the traditional method of right-click and then Delete, which will dump your file into the recycle bin.
Locate the Process with Process Explorer
Task Manager doesn’t specify which process is being executed under which application. So, to ease out, Microsoft has a different application called Process Explorer, which can be downloaded through their website. Download and install it as per the instructions. Then, follow the listed steps to locate and delete processes: After killing the unwanted processes, you can use the manual or command prompt methods to delete the files.
Close the Open Handles and Delete
With the use of handles, processes may access any permitted resources within the system object by calling out the pointers. And open handles may lock the associate files. Simply, just know that there may be some open handles assigned to the file that forbid deleting it. So, first, you need to halt the process for all the handles and then delete the file. To stop all the handles, follow the steps mentioned below: Now, delete the desired file by either using the above command or the traditional method.
Delete in Safe Mode
Safe Mode is the simplistic launch state of Windows. Only very essential drivers operate in default settings, closing all the third-party background apps. So, safe mode highly minimizes the chance of your file being locked by any app/process/handle. Eventually, making it convenient to delete files. Follow the given steps to enter the safe mode on your computer: Windows will start on Safe Mode once done. You can then navigate to the file location and perform the manual click method or the shortcut one. Or, the command prompt method would be more effective. Follow the steps mentioned above in the Use Command section to continue force deleting files.
Delete Read-Only Files
Files can be marked as read-only on pc to resist editing and deletion. And since they can’t be deleted, some people may confuse read-only files with locked ones. Either way, to delete read-only files, you can change remove the read-only status and proceed. Follow the steps below to swap the status:
Take Ownership to Delete
For a shared file whose ownership was already overtaken by another user in a local network, you may need first to take back the ownership to delete it. It would be easy if you’re logged in from the network administrator’s PC. Now, you can use manual methods to delete the files.