[Discussion] How to delete a nameless file?
Leo A. Martin
leo at possi.org
Tue Nov 3 16:41:27 PST 2009
Some things I've done in the past when I created bad file names through
typing mistakes at the command line. Try them in combination:
1 By all means, first boot from a different partition or from the CD to
command line before you try to kill it. I often haven't been able to kill
bad files with the GUI. The
copy-it-to-a-new-folder-and-drag-the-new-folder-to-the-trashcan method
hasn't always worked for me.
2 Use the dir command and a pipe to capture the file name in a text file:
dir [directory containing the bad file] >> c:\desktop\badfile.txt
then you can edit c:\desktop\badfile.txt , select the filename,
cut-and-paste the path in front of it, and get something like this to copy
to clipboard:
x:\baddir\badfile.bad
Then you can paste into the command line, enclosed in quotes if necessary
because it has spaces in the filename.
3 Once you have the filename pasteable as above, move all the other files
in that directory someplace safe. Then get rid of the non-delete
atrributes on the bad file, with either:
attrib -h -s -a -r "x:\baddir\badfile.bad"
or
attrib -h -s -a -r x:\baddir\* (you don't need quotes for this one.)
4 Then try to delete the bad file. You can try to type or paste just the
bad file name, or you can move all the other files in the directory to a
safe place, leaving just the bad file, and use del x:\baddir\*
5 If that doesn't work, try to change attributes and then use the rename
command at command line to rename it to something you're allowed to
manipulate. If it's a name you can't type, paste it into the command line.
Then try to delete at command line.
5 Use a command window disk editor program like Graham Utilities and
directly edit the file name on the disk, changing it to something easier
to delete. This is probably dangerous so be sure you back up first, but it
worked for me once.
6 If that didn't work, use Graham Utilities to erase the filename and the
first few blocks of the file from the disk. Again, this is probably
dangerous, but it worked once for me. See backup warning above.
7 When it's gone, run checkini.exe to remove references to the bad file.
In this situation I personally would sit there and do it manually rather
than using the automatic Yes! Do my job for me! switches.
8 Then after you've cleaned up with checkini.exe, make a new desktop
archive so you don't accidentally go back to an archive that references
the bad file name in one of the big .ini files.
Leo Martin
Phoenix Arizona USA
More information about the Discussion
mailing list