File with invalid name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a file named L2*+5* that I cannot delete. Is there any way to delete
this file from my system? When I try to delete it I get the message: "Cannot
Delete: volumne label syntax is incorrect. Any help with this would be
greatly appreciated.
 
Hi, Phil.

Open a "DOS" window and use the Dir command with the /x switch:

dir /x

That should produce a normal directory listing with one additional column.
Before the Long File Names (LFN), you should see a column showing the SFN
(Short File Name, also known as the 8.3 filename) for any file or folder
whose name is not "legal" under MS-DOS rules. Even short names can be
considered LFNs if they include an illegal character, such as a space.

Once you have the SFN for that file, use that SFN with the Del command to
delete it:

del <SFN>

If you don't understand any of this, post back with questions.

RC
 
When I do that, I don't see the SFN. Here is what I get when I do the dir,
and then dir /x. Do you have any more suggestions?


F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222>dir
Volume in drive F is Art Data
Volume Serial Number is 78C1-D090

Directory of
F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222

08/15/2005 09:42a <DIR> .
08/15/2005 09:42a <DIR> ..
07/16/2007 04:28a 0 L2*+5*
1 File(s) 0 bytes
2 Dir(s) 1,060,994,150,400 bytes free

F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222>dir /x
Volume in drive F is Art Data
Volume Serial Number is 78C1-D090

Directory of
F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222

08/15/2005 09:42a <DIR> .
08/15/2005 09:42a <DIR> ..
07/16/2007 04:28a 0 L2*+5*
1 File(s) 0 bytes
2 Dir(s) 1,060,994,150,400 bytes free

F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222>
 
You might try using ^ in the del as in:

del L2^*^+5^*

^ says to ignore the special meaning of the char that follows.

J
 
When I try that, I still get:

F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222>del
L2^*^+5^*
F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L2*+5*
The filename, directory name, or volume label syntax is incorrect.

F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222>

Any other ideas?
 
Hmmm. Can you open an explorer window to the file and delete it? If not
can you see it's attributes?

Since it is the only file in the directory can you do an rd and then
recreate it? (rd /S should not care about non-empty directories). Or
delete the folder in explorer?

J
 
I can see it in an explorer window, but I can't delete it. I can see the
attributes. It is a 0k file that says it was modified on 7/16/2007 at 4:28
am. I have tried the rd /s and that didn't work. Every time I try to delete
it in any way, I get the error:
Cannot Delete L2*+5*: The filename, directory name, or volume label syntax
is incorrect.


This is a tough one, I have been looking for months to fix this. The file
showed up one time when my raid crashed, and I have never been able to get
rid of it since.
 
I have a file named L2*+5* that I cannot delete. Is there any way to delete
this file from my system? When I try to delete it I get the message: "Cannot
Delete: volumne label syntax is incorrect. Any help with this would be
greatly appreciated.


Try

del "\\?\C:\Folder\L2*+5*"

or

del "\\?\C:\Folder\L2^*^+5^*"

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
When I try that, I get:

F:\>del
"\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L
2^*^+5^*"
Could Not Find
\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L2
8222\L2^*^+5^*

F:\>del
"\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L
2*+5*"
\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L2*+5*
The filename, directory name, or volume label syntax is incorrect.

Any other ideas?
 
Hi, Phil.

Hmmm... I've read the rest of this thread to date and I agree, that is a
toughie!

Any idea how you managed to create a file with asterisks in the filename?
The "DOS" window won't let me make a directory with that name, either with
or without quotation marks surrounding the name. And using ^ doesn't help.
It simply won't create a folder with a filename that includes a wildcard,
either * or ?. And, of course, your file's future date of 7/16/2007 tells
us that it's weird! (You don't suppose that temporarily setting your system
date to the future would help, do you?)

Have you tried navigating to your
F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999 folder and
removing the L28222 subfolder, including all its subfolders and files:

F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999>rd L28222 /s

First, of course, make sure there's nothing that you want to keep in that
L28222 folder.

If that doesn't do the job, you can work your way upstream, first copying
all the good stuff to a new location and then using rd /s on each subfolder
until you get up to rd f:\art_work /s. I hope you don't have to go all the
way to the top but, at some point in the process, it should work. Then you
can copy the good stuff back to where it belongs.

RC
 
I have tried those things also to no avail. The file seemed to show up
around the time that I had multiple RAID drives fall offline and had to force
some back online. Thanks for the help though.
 
When I try that, I get:

F:\>del
"\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L
2^*^+5^*"
Could Not Find
\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L2
8222\L2^*^+5^*

F:\>del
"\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L
2*+5*"
\\?\F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222\L2*+5*
The filename, directory name, or volume label syntax is incorrect.

Any other ideas?

Have you tried RD /S on the immediate folder?

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
When I said 'attributes' earlier, I meant whether it was read-only, hidden,
system or whatever. And if the file system is NTFS, what kind of access are
you using to delete the file?

If none of that helps, what kind of file system is the disk running? If it
is a network drive, is it on another Windows machine or some other os? Is
this drive still on a RAID? Is there any RAID support software that gives
you access to the file?

I'm sorry that all I can throw out now is questions.

J
 
I hate to keep throwing but I'm wondering, did you ever solved your problem?

One thing I noticed was that you volume label syntax *is* incorrect at least
for a Windows disk. From one of your other posts:

Volume in drive F is Art Data
Volume Serial Number is 78C1-D090

Directory of
F:\Art_Work\Work\L00000-L99999\L20000-L29999\L28000-L28999\L28222

08/15/2005 09:42a <DIR> .
08/15/2005 09:42a <DIR> ..
07/16/2007 04:28a 0 L2*+5*
1 File(s) 0 bytes
2 Dir(s) 1,060,994,150,400 bytes free

I've never been able to assign a volume name with a space in it. If you can
change the volume label then the delete might work. Why a volume label
would interfere with a delete, I don't know.

J
 
Hi, J.

I don't understand this line:
I've never been able to assign a volume name with a space in it.

My volume names include "SATA 120" and "Vista x64 5231", for example. These
were assigned in WinXP Disk Management. Those names show up that way in
both My Computer and the "DOS" window.

But I can't create a file or folder (or volume?) name that includes a
wildcard (? or *). So I don't know how Phil got a file with the name
"L2*+5*".

RC
 
Hi RC.

I've gotten errors when I tried to assign volume names containing spaces
with some of the "DOS" tools. Unfortunately, I can't remember if the
command was label or format. I thought that since the error output
mentioned the volume label that it might be worth a try to change it.

The only other idea I have is to write a small c program to FindFirstFile(),
FindNextFile() in the directory, and delete the file file based on the file
name returned to Windows. This would bypass the command processor. But
anyway, since the file can't be deleted from explorer, this probably won't
work either.

It's an interesting problem.

J


R. C. White said:
Hi, J.

I don't understand this line:

My volume names include "SATA 120" and "Vista x64 5231", for example. These
were assigned in WinXP Disk Management. Those names show up that way in
both My Computer and the "DOS" window.

But I can't create a file or folder (or volume?) name that includes a
wildcard (? or *). So I don't know how Phil got a file with the name
"L2*+5*".

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
snip
 
I had a similar problem. I wrote down the the DOS directory name (with
tildes), booted from a floppy, navigated to the directory and deleted the
file using wildcards.

Hope it works for you.

Saginaw
 
Back
Top