How to delete a locked file

Table of contents:

How to delete a locked file
How to delete a locked file
Anonim

By default, the Windows operating system does not allow you to delete files accessed by the active program. This is a useful feature, although it does not allow deleting, for example, malicious files. There are three ways to delete locked files.

Steps

Method 1 of 3: End the explorer.exe process

Delete a Locked File Step 1
Delete a Locked File Step 1

Step 1. End the explorer.exe process

This process is associated with Windows Explorer and does not allow you to delete locked files. After completing this process, you should be able to delete the file via the command line. Open Task Manager by pressing Control + alt = "Image" + Delete. Go to the Processes tab and highlight explorer.exe. Click End Process.

Delete a Locked File Step 2
Delete a Locked File Step 2

Step 2. Open a command prompt window by clicking "Start" - "Run"

In the window that opens, type cmd and press Enter. Change to the directory with the file to be deleted using the cd command, for example, cd C: \ Documents and Settings \ My Documents \ filename.

Delete a Locked File Step 3
Delete a Locked File Step 3

Step 3. Delete the locked file via the command line by entering the command del filename

Delete a Locked File Step 4
Delete a Locked File Step 4

Step 4. Restart the Explorer process

To do this, open the Task Manager and click "File" - "New Task". Enter explorer.exe and click OK. Or just restart your computer.

Method 2 of 3: Via Windows Recovery Console

Delete a Locked File Step 5
Delete a Locked File Step 5

Step 1. Boot your computer from the installation disc

Turn off the computer, insert the Windows installation disc into the optical drive, and then turn on the computer. The system will boot from the installation disc.

Delete a Locked File Step 6
Delete a Locked File Step 6

Step 2. Enter the Recovery Console

Recovery Console is a system troubleshooting application. When the message “Welcome to the installer” appears on the screen, press the R key to launch the Recovery Console.

Delete a Locked File Step 7
Delete a Locked File Step 7

Step 3. Delete the locked file

In the recovery console, go to the directory with the file to be deleted using the command described in the previous section. Then delete the file via the del command and enter exit to exit the recovery console. Reboot your computer.

Method 3 of 3: Via Unlocker

Delete a Locked File Step 8
Delete a Locked File Step 8

Step 1. Download and install the free Unlocker program, with which you can easily remove locked files

Delete a Locked File Step 9
Delete a Locked File Step 9

Step 2. In Windows Explorer, navigate to the directory with the file to be deleted

Right click on the file and select "unlocker" from the menu. Unlocker will launch and display information about the locked file.

Delete a Locked File Step 10
Delete a Locked File Step 10

Step 3. Delete the locked file

In the Unlocker window, click "Unlock All". This will remove restrictions on access to the file. Close the Unlocker window and delete the file in Windows Explorer.

Popular by topic