Cannot delete files

  • Thread starter Thread starter Steel
  • Start date Start date
S

Steel

I have two folders on my system which contain files, when
i try to delete them xp return with "Cannot delete
file:Cannot read from source file or disk". These files
contain illeagal characters for example "W
NOD.EE",also when ever i use a virus scan the
scan freezes and goes over and over the same file, I've
tried to delete these files from MSDOS prompt with del
deltree rm, but to no avial. even tried copying them to
another drive....doesn't work
Please help
Steel
 
Hi, Steel.

In the "DOS" window, use the Dir command with /x, the switch that reveals
the SFN (Short File Name, also known as the 8.3 filename). Then use del
<SFN> to delete individual files, or rd <SFN> /s to remove the entire
directory tree, including all files and folders. Deltree is not available
in WinXP, but the /s switch with rd does just about the same thing.

As usual in a "DOS" window, type any command followed by /? to see a
mini-help file listing all the switches available with that command. For
example: Dir /?

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP

I have two folders on my system which contain files, when
i try to delete them xp return with "Cannot delete
file:Cannot read from source file or disk". These files
contain illeagal characters for example "W
NOD.EE",also when ever i use a virus scan the
scan freezes and goes over and over the same file, I've
tried to delete these files from MSDOS prompt with del
deltree rm, but to no avial. even tried copying them to
another drive....doesn't work
Please help
Steel
 
sorry mate this doesn't appear to work
it seems there r no SFN to any of the files
and when i try to delete the whole directory using its
SFN it returns "the filename, directory name, or volume
label syntax is incorrect
 
Hi, Steel.

There HAS to be an 8.3 filename! (I think. I'm an accountant, not a techie
or CS expert, but I've spent years prowling around in HD directories, a byte
at a time. Of course, that was in FAT; I never learned much about NTFS.)

SFN is a slight misnomer in that even a 3-letter filename can be illegal if
it contains an illegal character, even a space. In such case, the system
will automatically generate a legal filename that does not include the
illegal character. Dir /x will show those legal filenames in a column
before the LFNs. For instance, when you ask for Dir /x in the Root of a
WinXP volume, you should get a listing that includes the folder "Program
Files". In a column between the file size and "Program Files", you should
see "PROGRA~1". If you then type "rd progra~1", it will tell you Access
Denied. But, if you add the /s switch, it will ask, "Are you sure (Y/N)?"
I've not been brave enough to tell it Yes on THIS folder, but on just about
any other, it will wipe out the whole tree.

Your first post said:
contain illeagal characters for example "W
NOD.EE"

When I use Ctrl+F3 to see the actual content of your post, that quote
translates to:
"W
N=17O=12D.E=18E"

In Windows Explorer, I created a New folder named "N?O?D.E?E". (The
characters don't look quite the same in this email font; I used the Alt key
+ the Num pad keys to create them.) Then I went to the "DOS" window and
typed Dir /x. The LFN on that line looked weird (a still different set of
characters), but the SFN was "NOD~1.EE". When I typed rd N?O?D.E?E, using
the Alt+key combos, I got the same error message you did ("...syntax is
incorrect"). But when I typed rd nod~1.ee, that folder was erased and did
not appear in the next Dir.

Try the Dir /x command again, looking for the SFN column between the file
size and the LFN. Many of the SFNs will probably include the ~ character,
and they will probably be in ALL CAPS. Use those SFNs with the Del command
to delete a file or RD <SFN> to delete a folder.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP

sorry mate this doesn't appear to work
it seems there r no SFN to any of the files
and when i try to delete the whole directory using its
SFN it returns "the filename, directory name, or volume
label syntax is incorrect
 
Back
Top