# Can't delete file



## rkselby98 (May 6, 2000)

This is a goodie, got a file I can't delete in dos.

Operating system Win ME. Booted up with a win 98 boot disk to get to the prompt.

File is in the MyDocuments folder

File name is something like

con.porn and it goes on and on and uses just about every key, symbol on the keyboard. Really long file name. IT would look something like below

con.pronjf- ojosdfije 3 32 !#!$ () Garbage ks0auf874~!0!00f8 [1] [2]

IF I were to try to type it out.

SO what I did was boot to dos and typed in the following

C:\Windows>cd mydocu~1
Pressed enter
C:\my documents>del con.*?
Pressed enter,
error returned 
Access Denied

So I did a little research and con is a compute device and cannot be deleted. IT is the keyboard and display

Now anyone have an idea how to delete this file. Using wild cards will not work and the file name makes it almost impossible to type the command in dos because of the symbols used.

Any help would be appreciated.

Now for everyone interested, this file was downloaded when a boy was downloading a movie from a web site. Instead of the movie he got this file instead.

IT cannot be deleted, attribs changed, name changed or anything else done to it in either dos or windows.


----------



## Roe727 (Mar 9, 2004)

Can you boot in safe mode?? If so, what about trying Killbox? You can get the DL from here:

http://www.downloads.subratam.org/KillBox.zip

Double-click on Killbox.exe to run it. In the "Paste Full Path of File to Delete" box, copy and paste the file you want to delete.

Now put a tick by Delete on reboot. 
Click on the button with the red circle with the X. It will ask for confirmation. Click yes. Not sure if this would work, but you can try. It is something I have used with stubborn files that I have had a hard time deleting.


----------



## rkselby98 (May 6, 2000)

Sorry, no go but at least a try. It would probably work if this were not a con file. Well actually it is not a con file but the computer thinks it is.

That is why it won't delete using dos and yes the computer boots to safe mode, normal mode and dos. It runs okay but just can't delete this file and what this file is actually doing is not known so that in itself could create a few problems with the spyware, viruses and such going around. 

If we knew what this file was actually doing it might not be a problem except for the language used in the file name.


----------



## MacFromOK (Mar 19, 2001)

Well I've only used Win 9x, so these may or may not apply:

Try the DOS "lock" command in case the drive is locked.
Try the DOS "attrib" command to remove system/hidden/read only attributes as follows:
attrib [filename] -s -h -r

If it still will not delete using DOS "del", try using DOS "deltree" on the folder it is in. Be aware that "deltree" is permanent though, so move/copy any files you want to keep from the folder to another location.

Good luck. 

Cheers, Mac


----------



## rkselby98 (May 6, 2000)

Mac,

Thank for the reply, the attrib were removed earlier or we think they were, there was no "Access Denied" when the command was applied.

Tried the unlock but it made no difference.

I am positive this has to do with it being a com file and because windows thinks this is the keyboard or display device it will not let it be deleted but there should be a way around this. CON -- Keyboard and Display (CONsole) 

Now on one forum I did find the following but I did not find any solutions to this problem so I am still looking hoping someone can figure out how or "WHY" the computer thinks this is a "con" file. 

The syntax \\.\ does not work with a file named con or nul .
In fact, no Win32 tool may delete these files.


----------



## MacFromOK (Mar 19, 2001)

Hmmm... well I never saw a file I couldn't remove - did ya try renaming it to some other extension? Or try messing with it in a hex editor?

Ya might also try a different virus scanner or an online one like housecall:
http://housecall.antivirus.com/housecall/start_corp.asp

I find this intriguing. 

Cheers, Mac


----------



## rkselby98 (May 6, 2000)

I find it intriguing too other wise it would have been formated by now.

Spyware, virus scans do not find the file.

This is the first file I couldn't delete myself. 

Can't rename it, can't move it, can't do anything with this file. IF you try to change the attribs in windows it will not let you. In dos I can change them but still can't delete it.

I have tried deltree, del, also the following
C:\Windows> del C:\mydocu~1\con.*?
Access denied

Tried 
C:\windows>cd C:\mydocu~1
C:\My Documents>del con.*?

Also tried both of the above using deltree. I was thinking about using the rm command and delete the My Documents folder and then create a new one but I just don't feel like trying that.


----------



## rkselby98 (May 6, 2000)

Well we won't have to worry about it anymore, the owner said he was going to format. He has spent enough time on this one.

Thank all of you who have added to this and tried to help and maybe one day we will find out why.


----------



## philwages (May 4, 2005)

I was having the same problem with a file that has a really long name (and it was in a directory with a very deep path). Couldn't delete, rename, change properties, and Killbox couldn't delete it either. My problem was certainly related to the pathname length (C:\Documents and Settings\Administrator\Desktop\etc etc.....). *All I did was rename the folder that contained the file (to a shorter name)* and I could then open, rename, and do all the other regular stuff with the file.


----------

