Cant delete file with zero length

H

holdgaj

Somehow I have created a file with zero length - I can't delete it. When I
try I get "Illegal file entry" File system check shows all OK - how can I
get rid of it ?
 
R

R. C. White

Hi, holdgaj,

Open a Command Prompt and use the old DOS command "Dir", from days before
Directories were Folders. Type "DIR /?" to see a mini-Help file with a list
of switches and parameters that can be used with the Dir command.

Navigate to the directory where your zero-byte file is. Then type "Dir" to
see a list of all the files and folders there, including your mystery file.
You can use Dir /os to "order" them by size; any zero-byte file should be at
the top. (If the list is too long, you can use Dir /o-s to put the
zero-byte file at the bottom of the listing.)

Then use Dir /x to produce the list with an extra column before the
filenames. See if your zero-byte file has a name that includes characters
that are not allowed in an 8.3 filename. If so, use that "short" filename
with the Del command to delete that file.

If all else fails, create a new folder and move everything EXCEPT the
zero-balance file to the new folder. Then use the RD (Remove Directory)
command with the /s switch to remove that entire directory tree, including
all the files and folders left in it; there should be only the one file that
you want to delete. Then you can rename your new folder to the original
name, if you like.

If these tricks don't work, post back with details. "Tried it" doesn't tell
us much; neither does "Didn't work". We need step by step details of what
you did and what you saw, including verbatim text of any error messages.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
Windows Live Mail 2009 (14.0.8064.0206) in Win7 Ultimate x64 7000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top