Simple Methods to Delete Locked Files [2021]

A locked file is a protected file in which the computer denies you access to it and allows another user or process to access it. So how to delete locked files on PC?

Wondershare Recoverit Authors

Sep 16, 2021 • Filed to: Windows Computer Solutions • Proven solutions

0

A locked file is a protected file in which the computer denies you access to it and allows another user or process to access it at any specific time. Locked files are used to restrict access to other users when the file is in use. Moreover, some applications use lock files to prevent users from writing, deleting, reading, or tampering with the existing content. When you are saving a shared file and another user is using it then you may receive a message informing you that the file is locked.

How to check whether a file is locked or not

Some files are locked only for certain access. To know if the file is locked to prevent you from writing on it, try to gain access by writing some on the file. A Locked file uses an On Error Resume Next statement to protect itself. If your attempt at the file access succeeds and the file you are using says writing is desired, then the lock file function will return "False". On the other hand, if your file access method is not allowed then the function returns "True". Whenever you encounter a lock file, try various alternatives to see if you can gain access.

How to delete a locked file

Method 1 Delete the file by ending the explorer.exe process

Step 1. End the explorer.exe process

This process mostly prevents users from deleting files in use. To end the process, open the "Task Manager" by pressing "Control", "Alt" and "Delete" keys simultaneously. Then click on the tab "Processes" from the menu, choose "One reading explorer.exe" and hit on the "End Process" button.

4 methods to delete locked files

Step 2. Go to file location in command prompt

To open a command prompt, click "Start" and then "Run". In the open window, type "cmd" and click on the "Run" button. While at the command window, use "cd" to move to the file location. Type the correct direction in which the locked file is located.

4 ways to delete locked files

Step 3. Delete the locked files

In the command window, type "del filename". Replace the "filename" with the name of the locked file. The command should be in small letters.

Steps to delete locked files

Step 4. Restart the process

Open the "Task Manager" and click on file as well as "New task". Type "explore.exe" from your keyboard into the command window and select "OK". Another way to restart the explorer process is by rebooting your computer.

how to delete locked files

Method 2 Delete locked files using Windows Recovery Console

Step 1. Turn on your computer from the installation disc

Shut down your computer and place the Windows reinstallation disc to the disc drive. Reboot your computer and wait for windows to restart it from the disc rather than the hard drive.

tips to delete locked files

Step 2. Enter Recovery Console mode

Immediately "Welcome to Setup" appears on the screen. Tap on the "R" key to enter into Recovery Console mode. This application is for troubleshooting and is connected to Windows.

delete locked files

Step 3. Delete the locked file

Once the application loads, move to the location of the locked file using the command prompt. Type "del filename" and replace "filename" with the name of the locked file. After the locked files have been deleted, type "exit" on the command window to exit the process and reboot your computer.

how to delete locked files munually

Method 3 Delete locked files using Unlocker

Step 1. Download Unlocker application

Download the Unlocker program to your computer. Double click on the setup of the program to install and follow the instructions given.

why to delete locked files

Step 2. Open the Unlocker program

To open the program, go to the "file location" in Windows Explorer and right-click on the file. When a new context menu appears, immediately choose "new Unlocker" from the given options. The Unlocker program will, therefore, open displaying the contents of the locked file.

delete locked files from computer

Step 3. Delete the locked file

While on the Unlocker application, select the "Unlock all" option. This command will delete all the locked files from your computer. Finally, close the Unlocker and delete the files manually.

how to delete locked files on pc

Method 4 Deleting locked files using File Assassin

Step 1.Download the utility

Download File Assassin utility and install it on your computer. Once installed, open the application by simply double-clicking or right-clicking its icon and then selecting "Open".

File Assassin to delete locked files

Step 2. Select the following

Ensure that you enable the following checkboxes

  1. Unlock locked files handles
  2. Unlock modules
  3. Terminate the file’s process
  4. Delete file

follow to delete locked files

Step 3. Execute

Hit on the "Execute" button after you have selected the checkboxes.

Execute to delete locked files

If the files are not deleted, select "Use delete on windows delete function" and then click "Execute".

guide to delete locked files

Things we need to take care of before deleting locked files

When using command prompt, keenly state the exact location of the file. Any mistakes can lead to the deletion of valuable files. Also when using the File assassin method, care must also be taken to avoid data loss and even system failure.

When you delete important files carelessly during the operation, there is no need for panic. Download the effective data recovery software and see whether you can retrieve your files.

If you lost data on your computer, unfortunately, don't worry! You still have the chance to get lost data back. To recover files from your computer, you can have tried the following tool.

Locked file recovery

Your Safe & Reliable Data Recovery Software

  • Recover lost or deleted files, photos, audio, music, emails from any storage device effectively, safely and completely.
  • Supports data recovery from recycle bin, hard drive, memory card, flash drive, digital camera, and camcorders.
  • Supports to recover data for sudden deletion, formatting, hard drive corruption, virus attack, system crash under different situations.

Other popular Articles From Wondershare

Recoverit author

David Darlington

staff Editor

(Click to rate this post)

Generally rated4.5(105participated)

0 Comment(s)
Home > Resources > Windows Computer Solutions > 4 Ways to Delete Locked Files