Cannot delete files with invalid filenames

  • Thread starter Thread starter Hakan Aysan
  • Start date Start date
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?
 
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.
 
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?
 
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?
 
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?
 
Back
Top