Can't delete reserved file name

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I have a win2K server acting as a FTP box. Someone has logged on as
anon, and created 2 folders. One is called "P 3215" and contains an
object called "null"
The other is called "s 70331" and contains an object called "LPT2"

These objects have folder icons. So do the folders above, but no
security tab is present on the properties tab.

I cannot delete these, even using the RM.exe util from KB 120716
It seems that windows can't find the parent folders.

Any ideas on how to delete these? Is it possible that the folder names
(P 3215) contain special characters? Maybe ascii codes?

I have done dir /X, but the name shown is the only name visible.

Thanks!
 
Brad said:
I have a win2K server acting as a FTP box. Someone has logged on as
anon, and created 2 folders. One is called "P 3215" and contains an
object called "null"
The other is called "s 70331" and contains an object called "LPT2"

These objects have folder icons. So do the folders above, but no
security tab is present on the properties tab.

I cannot delete these, even using the RM.exe util from KB 120716
It seems that windows can't find the parent folders.

Any ideas on how to delete these? Is it possible that the folder names
(P 3215) contain special characters? Maybe ascii codes?

I have done dir /X, but the name shown is the only name visible.

Thanks!

Here is how you can delete these:

del \\.\c:\LPT2
 
Here is how you can delete these:

del \\.\c:\LPT2
No, that won't work.

I've tried DEL \\.\F:\fullpath\P 3215\null

It returns an error that it can't find P 3215 (and I put quotes around
it) "P 3215" "

Or do you mean skip the full path part? Like del \\.\F:\null ?
 
Brad said:
No, that won't work.

I've tried DEL \\.\F:\fullpath\P 3215\null

It returns an error that it can't find P 3215 (and I put quotes around
it) "P 3215" "

Or do you mean skip the full path part? Like del \\.\F:\null ?

I just tried this on my machine. In works very well:

del "\\.\D:\Fullpath\p 3215\nul"

You need to watch your spelling. The reserved file name is "nul",
not "null".
 
I just tried this on my machine. In works very well:

del "\\.\D:\Fullpath\p 3215\nul"

You need to watch your spelling. The reserved file name is "nul",
not "null".
Nope, it's null. I've spelled it correctly, and I've tried to delete
these things about 50 times, so I know I got it right at least once
:-)

Also, how did you create a folder named nul? If I try to recreate a
reserved filename (nul, null, LPT2, etc), it won't work.

Anywho, the issue seems to be finding the P 3215 folder, like so...

Directory of F:\inetpub\ftproot\incoming

3/19/2004 02:51p <DIR> .
3/19/2004 02:51p <DIR> ..
3/18/2004 11:56a 1,024 1kbtest.ptf
3/19/2004 11:29a <DIR> Cloverpoint
3/18/2004 12:19p <DIR> P 3215
1/16/1999 10:18p 114,564 RM.EXE
3/18/2004 12:19p <DIR> s 70331
3/19/2004 09:33a <DIR> Timberline
2 File(s) 115,588 bytes
6 Dir(s) 159,830,691,840 bytes free

:\inetpub\ftproot\incoming>cd P 3215
he system cannot find the path specified.
 
Brad said:
Nope, it's null. I've spelled it correctly, and I've tried to delete
these things about 50 times, so I know I got it right at least once
:-)

Also, how did you create a folder named nul? If I try to recreate a
reserved filename (nul, null, LPT2, etc), it won't work.

Anywho, the issue seems to be finding the P 3215 folder, like so...

Directory of F:\inetpub\ftproot\incoming

3/19/2004 02:51p <DIR> .
3/19/2004 02:51p <DIR> ..
3/18/2004 11:56a 1,024 1kbtest.ptf
3/19/2004 11:29a <DIR> Cloverpoint
3/18/2004 12:19p <DIR> P 3215
1/16/1999 10:18p 114,564 RM.EXE
3/18/2004 12:19p <DIR> s 70331
3/19/2004 09:33a <DIR> Timberline
2 File(s) 115,588 bytes
6 Dir(s) 159,830,691,840 bytes free

:\inetpub\ftproot\incoming>cd P 3215
he system cannot find the path specified.

You MUST surround your folder names with double
quotes if they contain embedded spaces:

cd "P 3215"

To create a file name with a reserved name is much
the same as deleting it (stands to reason, doesn't it?):

echo. > "\\.\D:\Fullpath\p 3215\nul"

"null" is NOT a reserved name. This command works
very nicely:

echo > null

If you are unable to delete a file called "null" then it
may be a permission issue. Navigate to the folder
where it resides, delete it like so:

del null

then quote the error message in your reply.
 
You MUST surround your folder names with double
quotes if they contain embedded spaces:

cd "P 3215"
If you are unable to delete a file called "null" then it
may be a permission issue. Navigate to the folder
where it resides, delete it like so:

del null

then quote the error message in your reply.
OK, here is the output for trying to navigate to the "null" object

F:\inetpub\ftproot\incoming>cd "P 3215"
The system cannot find the path specified.

This is where I believe the problem is. I cannot get inside this "P
3215" folder from a cmd prompt. I can get there in Win explorer, but
cannot delete the file/folder/thingy. The error is "Cannot delete
file: Cannot read from source file or disk."

The other folder, s 70331, does have a reserved name, LPT2. I get the
same behaviour from it as well.

I'm sure that if I could get into the folder, either your suggestion
or the posix utility (RM.exe) would work fine.
 
Brad said:
OK, here is the output for trying to navigate to the "null" object

F:\inetpub\ftproot\incoming>cd "P 3215"
The system cannot find the path specified.

This is where I believe the problem is. I cannot get inside this "P
3215" folder from a cmd prompt. I can get there in Win explorer, but
cannot delete the file/folder/thingy. The error is "Cannot delete
file: Cannot read from source file or disk."

The other folder, s 70331, does have a reserved name, LPT2. I get the
same behaviour from it as well.

I'm sure that if I could get into the folder, either your suggestion
or the posix utility (RM.exe) would work fine.

Maybe you have trailing spaces too . . . Use this syntax instead:

cd p* (for P 3215)
cd s* (for S 70331)
 
Maybe you have trailing spaces too . . . Use this syntax instead:

cd p* (for P 3215)
cd s* (for S 70331)
I tried that already. No good.

I've also verified that there is 1 trailing space, and including that
still doesn't get me in. ex. cd "P 3215 "

I'm also not sure of what this object (P 3215) is. By viewing the
properties, there is no security tab and the page has an "Open
with..." feature. So the folder thinks it's a file with no NTFS
security tab.
 
Brad said:
I tried that already. No good.

I've also verified that there is 1 trailing space, and including that
still doesn't get me in. ex. cd "P 3215 "

I'm also not sure of what this object (P 3215) is. By viewing the
properties, there is no security tab and the page has an "Open
with..." feature. So the folder thinks it's a file with no NTFS
security tab.

More tricks:
- From your existing Command Prompt, invoke a secondary
command processor like so:
cmd /F:on
- Navigate to the parent directory of "P 3215".
- Type cd P then press Ctrl+D
The command processor will complete the directory name.
Press Enter to change into the shown directory.

If this does not work then I would move all useful files & folders
out of the parent directory of "P 3215", then remove that
parent directory alltogether, using rd /s /q {ParentDir}
 
Brad said:
I tried that already. No good.

Have you tried del p?3215? or del p* or del ??3215?

I'm no 2000 expert but had a similar problem in DOS a long time ago. I'd
managed to create a folder that was hidden and had a space in the name and I
couldn't do anything to the attributes of it so I found the only way to get
hold of it was to substitute ? for the space.

Steve
 
Back
Top