Delete a Locked File
By default, the Windows operating system prevents the user from deleting files that are in use. While this is usually a helpful provision, if your computer has any unwanted "malware" you may encounter a situation in which you cannot delete an unwanted file because Windows reports that it is in use or otherwise not accessible. There are 3 solutions that let you delete a locked file like this. Each one can be performed by following a few steps.
Contents
Steps
Delete the File by Ending the "explorer.exe" Process
- End the "explorer.exe" process. This process is the one associated with Windows Explorer, and keeps users from deleting files that are in use. Ending the process will allow you to delete the file through the command prompt. Open the Task Manager by holding down the "Control," "Alt," and "Delete" keys. Click the "Processes" tab and select the one reading "explorer.exe." Click the "End Process" button.
- Navigate to the file's location in the command prompt. To open the command prompt, click "Start" and then "Run." Type "cmd" into the window and click "Run." In the command prompt window, you can use the "cd" (change directory) command to navigate to the file's location. For example, you could type: "cd C: \ Documents and Settings \ My Documents \ filename." You should, of course, use the directory in which your locked file is located.
- Delete the locked file through the command prompt. To do this, use the "del" command. Type "del filename," substituting your locked file's name for the "filename" portion of the command.
- Restart the Explorer process. To do this, open the Task Manager again and click on "File", and then "New Task." Type "explorer.exe" into the window and click "OK." You can also restart your computer to relaunch the Explorer process.
Delete the File Using Windows Recovery Console
- Boot your computer from the installation disc. Turn off your computer, place the Windows reinstallation disc into the optical drive, and then turn the computer on. Windows will boot from the disc instead of the hard drive.
- Enter the Recovery Console mode. Recovery Console is a troubleshooting application included with Windows. When the "Welcome to Setup" screen appears, press the "R" key to enter the application.
- Delete the locked file. When the Recovery Console loads, navigate to the locked file's location just as you would using the command prompt (using the instructions in the above section). After deleting the file using the "del" command, type "exit" to exit the Recovery Console and restart the computer.
Delete the File Using Unlocker
- Download and install the Unlocker application. Unlocker is a free software application that allows you to easily delete locked files. Download the program from the Internet, and double-click the setup file to begin the installation.
- Open the Unlocker application. Begin by navigating to the file's location in Windows Explorer. Right-click on the file, and select the new "unlocker" option from the context menu that appears. The Unlocker application will open with the locked file's information displayed.
- Delete the locked file. In the Unlocker window, click the "Unlock All" button. This will remove all restrictions on the file's access. Close the Unlocker window and delete the file as you normally would in Windows Explorer.
Tips
- The Unlocker application can also be used to allow safe removal of "locked" USB drives and devices.
Things You'll Need
- Computer
- Windows operating system
- Windows installation disc
- Unlocker software (optional)
Related Articles
- Delete Locked Files on a Mac
- Find Hidden or Locked Files in a Directory
- Lock a File for Free
- Make an Invisible File
- Remove the Password from a Zip File Without Knowing the Password
- Delete a File Using Command Prompt