Top 3 Ways to force delete lock file in Windows
1. Using Linux to delete lock file
2. Delete the File/Folder with Command Prompt
Press the Windows key + R and type cmd to open the Command Prompt or just search for Command Prompt at the start.
In the Command Prompt, enter del and location of folder or file you want to delete, and press “Enter” (for example del c:\users\Max\Desktop\demo.txt
3. Enter Safe Mode to Unlock and Delete lock File
Boot into Safe Mode to unlock and delete the file.
- Open “Settings” > Click on “Update & Security” > Click on “Recovery” > Under “Advanced Startup”, click the “Restart now” button.
- Click on “Troubleshoot” > “Advanced options” > “Startup Settings”.
- Click the “Restart” button.
- On “Startup Settings,” press F4 to enable Safe Mode.
While in Safe Mode, use File Explorer to locate and delete lock file that were previously locked, then simply restart your device as you would normally to exit Safe Mode.