How to delete an "undeletable" file?


Sometimes you want to delete a file but when you do so an error message pops and tells you it cannot be done.

Method #1 - Kill explorer.exe


Do successfully delete an undeletable file that is caught be the explorer.exe process (and most of them are) do the following:

1. Open a Command Prompt window and leave it open.

2. Close all open programs.

3. You now need to close EXPLORER.EXE. The proper way to shutdown Explorer is to raise the "Shut Down Windows" dialog (select "Shut Down..." from the start menu), hold down CTRL+SHIFT+ALT and press the CANCEL button. Explorer will exit cleanly.

Note: The at the 'Shut Down Windows' dialog method of closing Explorer is built into Explorer. (It was specifically designed so that developers writing Shell Extensions could get Explorer to release their Shell Extension DLLs while debugging them).

4.Go back to the Command Prompt window and change to the directory where the undeletable file is located in. At the command prompt type DELwhere is the file you wish to delete.

5.Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell.

6.Close Task Manager.

No comments