Cannot delete files with invalid filenames

H

Hakan Aysan

Hi,


We are trying to delete a number of files on a Windows 2000 Server with
NTFS. They are in a short path, and all have illegal filenames (appeared
AFTER a successful checkdisk that ran after a RAID disk crash). For example
E:\users\joebloggs\M0?Z?KHE.GIF


Nothing has worked: we have tried the posix deletion tools, deleting the
directory itself, using \\?\ and \\.\ syntax to access them as all suggested
by MS.


Any ideas?
 
C

CheckAbdoul

Open up a command prompt and type 'dir /x'. This will list you the short
path name of the file.
Run a 'del' command on the shortpath name.
 
H

Hakan Aysan

Hi,


We've tried dir /x, but the files are 8.3, and dir /x doesn't list a short
file name. Every deletion tool and syntax basically says "The filename,
directory name, or volume label syntax is incorrect."

Surely there must be a way to delete these files? There is a knowledgebase
article number 320081 which is quite comprehensive on this subject, but
nothing suggested there works here. I should also say that checkdisk has
been run several times, and reports no problems at all. There are literally
11 files corrupt in this form, the rest of the disk and data is fine.


Thanks for any suggestions!


CheckAbdoul said:
Open up a command prompt and type 'dir /x'. This will list you the
short
path name of the file.
Run a 'del' command on the shortpath name.

--
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

Hakan Aysan said:
Hi,


We are trying to delete a number of files on a Windows 2000 Server with
NTFS. They are in a short path, and all have illegal filenames (appeared
AFTER a successful checkdisk that ran after a RAID disk crash). For example
E:\users\joebloggs\M0?Z?KHE.GIF


Nothing has worked: we have tried the posix deletion tools, deleting the
directory itself, using \\?\ and \\.\ syntax to access them as all suggested
by MS.


Any ideas?
 
R

R. C. White

Hi, Hakan.

Have you tried isolating these file in a folder, then removing the folder?

In a "DOS" window, use the rd command with the /s switch to remove the
entire directory tree, subdirectories, files and all. Before you do it, of
course, make sure that everything you DO want to keep has been moved to some
other directory.

rd e:\users\joebloggs /s

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

Hakan Aysan said:
Hi,


We've tried dir /x, but the files are 8.3, and dir /x doesn't list a short
file name. Every deletion tool and syntax basically says "The filename,
directory name, or volume label syntax is incorrect."

Surely there must be a way to delete these files? There is a knowledgebase
article number 320081 which is quite comprehensive on this subject, but
nothing suggested there works here. I should also say that checkdisk has
been run several times, and reports no problems at all. There are
literally 11 files corrupt in this form, the rest of the disk and data is
fine.


Thanks for any suggestions!


CheckAbdoul said:
Open up a command prompt and type 'dir /x'. This will list you the
short
path name of the file.
Run a 'del' command on the shortpath name.

--
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

Hakan Aysan said:
Hi,


We are trying to delete a number of files on a Windows 2000 Server with
NTFS. They are in a short path, and all have illegal filenames (appeared
AFTER a successful checkdisk that ran after a RAID disk crash). For example
E:\users\joebloggs\M0?Z?KHE.GIF


Nothing has worked: we have tried the posix deletion tools, deleting the
directory itself, using \\?\ and \\.\ syntax to access them as all suggested
by MS.


Any ideas?
 
H

Hakan Aysan

Just tried that. Again, an error complaining about invalid filenames.


R. C. White said:
Hi, Hakan.

Have you tried isolating these file in a folder, then removing the folder?

In a "DOS" window, use the rd command with the /s switch to remove the
entire directory tree, subdirectories, files and all. Before you do it,
of course, make sure that everything you DO want to keep has been moved to
some other directory.

rd e:\users\joebloggs /s

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

Hakan Aysan said:
Hi,


We've tried dir /x, but the files are 8.3, and dir /x doesn't list a
short file name. Every deletion tool and syntax basically says "The
filename, directory name, or volume label syntax is incorrect."

Surely there must be a way to delete these files? There is a
knowledgebase article number 320081 which is quite comprehensive on this
subject, but nothing suggested there works here. I should also say that
checkdisk has been run several times, and reports no problems at all.
There are literally 11 files corrupt in this form, the rest of the disk
and data is fine.


Thanks for any suggestions!


CheckAbdoul said:
Open up a command prompt and type 'dir /x'. This will list you the
short
path name of the file.
Run a 'del' command on the shortpath name.

--
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

Hi,


We are trying to delete a number of files on a Windows 2000 Server with
NTFS. They are in a short path, and all have illegal filenames
(appeared
AFTER a successful checkdisk that ran after a RAID disk crash). For
example
E:\users\joebloggs\M0?Z?KHE.GIF


Nothing has worked: we have tried the posix deletion tools, deleting
the
directory itself, using \\?\ and \\.\ syntax to access them as all
suggested
by MS.


Any ideas?
 

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