Deleting Mystery Files
July 5, 2004 1:48 PM   Subscribe

Win2K: a crashed FTP transfer left several zero-K files on my desktop, which I cannot delete. I have tried Safe Mode, I've tried del/deltree/rmdir in DOS, I've tried MoveOnBoot, and nothing works. The files are not in use. No handles for them exist. The error messages are all variants of: "File cannot be found or does not exist." It's as if the delete function just can't see them, but I can see them right there in Windows Explorer. How can I delete these buggers?
posted by scarabic to Computers & Internet (12 answers total)
 
Can they be moved? Maybe you can move it to a directory and then try deleting the directory?
posted by PWA_BadBoy at 2:15 PM on July 5, 2004


have you tried dir /x in a command prompt window? this will bring up a 8.3 file name like this :

07/05/2004 02:21 PM 0 EXAMPL~1.TXT example file.txt


If you want to delete it, just type del exampl~1.txt. Works most of the time.
posted by addyct at 2:23 PM on July 5, 2004


You might need to run chkdsk
posted by quiet at 2:54 PM on July 5, 2004


Something that's worked for me in the past is to create files with the same names in another directory and then copy the new files over the 0k files on your desktop. I was then able to delete the files.
posted by hootch at 3:08 PM on July 5, 2004


Ahhhh! Thank you addyct, that did it!

What are those? Some kind of DOS-internal filenames? I was never aware of them before.

I also tried moving in a file with the same name, and, bizarrely enough, it moved the file in, and I saw two files in the same dir with the same name!

Thank you all for the help!
posted by scarabic at 3:33 PM on July 5, 2004


It is a vagary of the way windows handles long file names. They put support for long file names on top of the old fat partitions, which only supported the 8.3 characters in a file name. So Microsoft's solution was to make a lookup table for the long name, and reference the shorter version of the name. Sometimes the table gets corrupted, which is why it said file not found, and why there could be two entries with the same name.

this is a longer explanation of the sillyness that is lfn.
posted by addyct at 8:51 PM on July 5, 2004


wow you guys are smart.
posted by lazaruslong at 9:07 PM on July 5, 2004


If that worked -- and I'm glad to hear it did! -- you've got directory entry corruption. Run chkdsk or scandisk or something, anything, to try to straighten out the filesystem, or you may see far, far uglier problems down the road.
posted by majick at 10:39 PM on July 5, 2004


I have a similar problem (on an NTFS file system running XP) at home. I will have to try that when I get back tonight. Been bugging me for months!
posted by stavrosthewonderchicken at 10:42 PM on July 5, 2004


It may actually not be the dreaded directory entry corruption that majick speaks of. (Not saying it couldn't be, simply that there are other options.) I know that on some of the older windows OS's (And I think that win2k is included in this) that if you have characters that the windows gui doesn't read it won't let you delete the file except through dos. You can check this by renaming a song in dos by typing "rename file.txt [alt+2+3+6]file.txt" (where alt+2+3+6 means that you hold alt then type 2,3,6 then release alt. A nifty 8 infinity symbol should appear. in win xp you can delete these files, but there may still be some symols that you can't.
posted by woil at 11:10 PM on July 5, 2004


The files were being transferred over from a Mac, so you might be right about those special characters, woll. For good measure, I'll be sure to do as quiet and majick say at my next opportunity.
posted by scarabic at 1:09 AM on July 6, 2004


"It may actually not be the dreaded directory entry corruption that majick speaks of."

If you can't delete the containing directory with deltree.exe, there's more wrong here than the way Explorer mishandles non-Windows character sets. Better safe than sorry, when it comes to filesystem integrity!
posted by majick at 7:04 AM on July 6, 2004


« Older Does Substitute Teaching Get You Closer to or...   |   How to stop automatic news alerts from WSJ Newer »
This thread is closed to new comments.