Saturday, December 4, 2010

Can you delete locked files?

Have you ever tried deleting a locked file using common windows commands? If so, then you’ll know that this is just not possible, because the explorer.exe process locks files that are in use prevent you from deleting them. When you are really needed of erasing those files, you can try the below solutions.

#1: Kill explorer.exe
  • Open a command prompt & navigate to the location where the locked file is.
  • Press CTRL-ALT-DEL à “task manager”, select the Processes tab
  • Kill the explorer.exe process via the “End Process” button and go back to the command prompt and delete the file.
  • Bring up the task manager windows again by select file->new task -> Type explorer.exe -> ok
#2: Use Unlocker
Unlocker is a freeware helps to unlock any files that are currently in use by Windows. This freeware helps you get any of the following messages when trying to delete a file:
  • Cannot delete file: Access is denied
  • There has been a sharing violation
  • The source or destination file may be in use
  • The file is in use by another program or user
  • Make sure the disk is not full or write-protected and that the file is not currently in use.
#3: Windows Recovery Console (WRC)
Just insert your Windows CD in your CD tray, boot on it, and at the “Welcome to Setup” screen, press “R“. Once the recovery console has started, navigate to the location of your locked file, and delete it. Since WRC does not really start the system, the files will not be in use, and you will be able to delete them.

1 comment: