# Delete undeletable files



## pyritechips (Jun 3, 2002)

Have you ever tried to delete an unknown, suspicious or temp file but have been denied? This ususally happens because it is in use or protected. If you are sure it is a junk file and want to get rid of it, try the following, compliments of Daniel Petri of MCSE World:

*Sometimes you want to delete a file but when you do so an error message pops and tells you it cannot be done. Do successfully delete such a file do the following:

Open a Command Prompt window 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+ALT+DEL> 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 Task Manager.
*

The above is for W2K/XP. You an also delete a nuisance file in W98se by booting into DOS and performing the same operation. For example:

C:\windows> cd\

cd C:\windows\mydocu~1>

C:\windows\mydocu~1> del nuisansefile.txt


----------



## gotrootdude (Feb 19, 2003)

A useful tool for deleteing files where you get a sharing or protection error is the freeware program WhoLockMe. This useful explorer extention will let you know exactly which program has the file you wish to delete locked so that you can terminate the program or the process responsible.

http://www.dr-hoiby.com/WhoLockMe/


----------



## zephyr (Nov 6, 2003)

And another little jim dandy is MoveOnBoot which is totally free. It places an option on your right-click menu to delete the particular file upon the next boot. You can also open the main program screen and select other things of value.

Since we have no dos in XP, this little utility takes on added value for doing the equivalent of a dos delete.


----------



## aarhus2004 (Jan 10, 2004)

Perhaps (certainly!) a failed link there zephyr.

MoveOnBoot:

http://www.webattack.com/get/moveonboot.shtml

or

http://www.softpedia.com/public/cat/13/4/13-4-17.shtml


----------



## zephyr (Nov 6, 2003)

Thanks Ben, I don't know how that could happen. I never make mistakes.


----------



## Katzy (Nov 9, 2003)

No DOS in XP???

It's here: C:\windows\system32\cmd.exe

At least, it is on my version of XP Pro...


----------



## pgriffet (Aug 10, 2002)

It should be too easy if you can just delete a locked file this way.

There are a lot of situations where you can't delete it not because the file/folder is opened but because it's corrupted or has special characters in the name or you don't have the rights to delete it (on NTFS volumes, which are now very common).

Here is how to gain the rights on a file

http://support.microsoft.com/?kbid=308421
http://support.microsoft.com/?kbid=298345

If the name is corrupted, a chkdsk can be the solution.

Another way if the name of the file/folder is too long or contains a special character is to get its short name.
Just open a command line (start -> run -> cmd enter), navigate to the folder and then, type dir /X
You will see both names for each file. Then you can delete a file name "this file is very long" this way
del "this f~1" or 
rd "this f~1" /s if it's a folder.

For 9X/ME, moveonboot or CopyLock should do the trick or eventually, a Scandisk for corrupted file names.

I've made a subject on a French forum about the same problems, beware it's in French 

http://forum.pcastuces.com/sujet.asp?SUJET_ID=2446


----------



## foxfire (Jan 14, 2003)

Many thanks Pyritechips.Gotrootdude & Zephyr.
Printed & stored.

Foxfire


----------



## angellove (Jul 20, 2004)

if there is anyone in this world who can delete a file named *.* pls contact me

i have a file in my c:\ whos name is "*.*" without " sign.

take a look at

http://www.virtualx.go.ro/Image2.jpg


----------



## hewee (Oct 26, 2001)

angellove,

Welcome to TSG 

You should post up in the help forums.

I clicked you like to the image2 but get this...

403 Forbidden
You must supply a local referer to get URL '/Image2.jpg' from this server.


----------



## aarhus2004 (Jan 10, 2004)

Hi angellove,

If I type *.* in Search (Find) my entire c drive shows up. It does the same thing if I type *. It is, as far as I know, a symbol for ALL. I do not know the significance of a file on C:\ with that 'name'.

Wait for a response from those who know.

There is something wrong with your link, by the way.


----------



## hewee (Oct 26, 2001)

That is because it is searching all files.

Type in the *.* with the file type after it and it will look for all of that file type.
Like *.*.txt and *.*.bmp etc.


----------



## Elvandil (Aug 1, 2003)

There's also Dr.Delete:

http://www.dslreports.com/forum/remark,7374516~root=sware~mode=flat

Inuse.exe:

http://download.microsoft.com/download/win2000platform/inuse/1.0/NT5/EN-US/inuse.exe

Movefile (in the same folder as the program "pendmoves" that reveals processes to be completed on reboot, like the installation of Windows Updates):

http://www.sysinternals.com/files/pendmoves.zip

And the "Remove on reboot" shell extension:

http://www.bjb-inc.com/removeonreboot/setup.exe


----------



## Bold_Fortune (Jan 3, 2003)

Tony Klein, one of my true heroes in computing, (other than all you guys and gals, that is) once helped me with a very stubborn file...very stubborn. He made this for me. 


angellove, if none of the methods mentioned above work for you, you might want to give it a try....only, replace the path to your particular stubborn file

-------------------------------------------------------------------------------------------------------------------

Make a batch file that you have executed by having it run from the 
HKLM\RunOnce key.

Paste the following into a blank text document:

cd %UserProfile% 
rd /s/q "Local Settings"\"Temporary Internet Files" 

Save for example in C: as Clean.cmd.


--------------------------------------------------------------------------------------------

Open Regedit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Runonce

Rightclick somewhere in the RIGHT hand pane, and choose new > String Value



Doubleclick it, call it DelTemps and hit Enter.

Doubleclick it to bring up the Edit box, and type this in the Edit data: C:\Clean.cmd. 
Click OK.

Of course make sure the path to the location where you saved the batch file is correct.

Reboot, and your TIF folder will be deleted and recreated automatically once.


-----------------------------------------------------------------------------------------------------------------


----------



## hewee (Oct 26, 2001)

[email protected] 1.9.5 is free and works great.

Look down at the bottom for the free older versions.

http://www.gibinsoft.net/gipoutils/fileutil/index.htm


----------



## angellove (Jul 20, 2004)

to look at the image with my *.* file just copy and paste in browser this address:
http://www.virtualx.go.ro/Image2.jpg

i got this file when i updated my bios with amif339.exe utility. i tried to save my bios into a file and i got this file in my c: . It has only ~250k so it's not a problem but it is just so funy - how is that possible

i think one posibility is to move the content of drive to anothe partition and then format the partition c:\ , and then move back all the files -- of course i will not do that.
i will try some of the programs above - see if it works - i tried DOS - not good. and in windows it will ask me : confirm multiple files delete- and still not work.


----------

