How To: Delete Un-Deletable “Access Denied” Files or Folders in Windows Vista/XP
Many times when trying to remove an unwanted program or files on your Windows XP or Vista computer, especially a piece of adware or spyware, you may run across a file that is undeletable by any normal method. When you try to remove that file or folder it you’ll receive the error message telling you “access denied” and explaining the file may be in use.You may also receive one of the following messages.

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.
So if the file is in use, how do you delete it?
Do successfully delete an undeletable file that is caught be the Windows Vista or XP explorer.exe process (and most of them are) do the following:
- Open a Command Prompt window in Windows Vista or in XP and leave it open.
- Close all open programs.
- 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 <CTRL+SHIFT+ALT> 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).
- Go back to the Command Prompt window and change to the directory where the undeletable file is located in. At the command prompt type DEL <filename> where <filename> is the file you wish to delete.
- Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell.
- Close Windows Vista /XP Task Manager.
Popularity: 5%
Did You Like This Post? Then You Might Find These Also Interesting:
Written by Tony on January 20th, 2009 with
no comments.
Read more articles on Windows Error Fix.





