Can't Delete This File (>)

  • Thread starter Thread starter BoomerM3
  • Start date Start date
B

BoomerM3

Somehow I ended up with a file named '>' Yes the name is just the
greater than symbol. I don't know how it got there, since it can't be a
legal file name. It is nested in a directory about four levels deep.

Now, I can't delete it. I tried from Explorer and the Command window.
No matter what, it gives me a strange error (like name too long,
illegal name, etc). Naturally I can't delete the directories either.

Anyone know how to get rid if the file?

peter
 
BoomerM3 said:
Somehow I ended up with a file named '>' Yes the name is just the
greater than symbol. I don't know how it got there, since it can't be
a legal file name. It is nested in a directory about four levels deep.

Now, I can't delete it. I tried from Explorer and the Command window.

Sure, you can delete that file at the command prompt (Start > Run: CMD).
Move all important files and folders out of that tree and delete either
the file using "DEL *." or the folder using "RD <folder>" (w/o quotes).
Type "DEL /?" and "RD /?" for more information.
 
BoomerM3 said:
Somehow I ended up with a file named '>' Yes the name is just the
greater than symbol. I don't know how it got there, since it can't be a
legal file name. It is nested in a directory about four levels deep.

Now, I can't delete it. I tried from Explorer and the Command window.
No matter what, it gives me a strange error (like name too long,
illegal name, etc). Naturally I can't delete the directories either.

Anyone know how to get rid if the file?

peter

Can you rename it?

--
Frank Saunders, MS-MVP, IE/OE
Please respond in Newsgroup only. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com./athome/security/protect/default.aspx
http://defendingyourmachine.blogspot.com/
 
Detlev said:
window.

Sure, you can delete that file at the command prompt (Start > Run: CMD).
Move all important files and folders out of that tree and delete either
the file using "DEL *." or the folder using "RD <folder>" (w/o quotes).
Type "DEL /?" and "RD /?" for more information.

Not that easy.
I can't remove the directory 'cause it's not empty.
Del *. takes no action.
Del *.* results in "filename, directory name, or volume label syntax is
incorrect."

This is all caused by the fact that the ">" is a special character
which used to be used (DOS) to redirect commands.

Other ideas?
 
BoomerM3 said:
Not that easy.
I can't remove the directory 'cause it's not empty.

This shouldn't be a problem. You may want to move important files and
subfolders to a temporary folder using the Windows Explorer. When done,
recreate the deleted folder and move those files and subfolders back
to the original location.
This is all caused by the fact that the ">" is a special character
which used to be used (DOS) to redirect commands.

Correct, that's the "DOS pipe" character.
 
BoomerM3 said:
Somehow I ended up with a file named '>' Yes the name is just the
greater than symbol. I don't know how it got there, since it can't be a
legal file name. It is nested in a directory about four levels deep.

Now, I can't delete it. I tried from Explorer and the Command window.
No matter what, it gives me a strange error (like name too long,
illegal name, etc). Naturally I can't delete the directories either.

Anyone know how to get rid if the file?

peter

Thanks for all suggestions. Same problem.

If I go into the directory and try to rename or delete (regardless of
syntax) I get 'filename, directory, or syntax is incorrect'.

If I leave the directory and try to remove the directory, I get a
directory not empty error.

Yes, the '>' is a redirect symbol. That's why all these commands fail!
I was looking for another approach - short of reformatting my drive.

Alternatives?

peter
 
This is what I got:
rd oxark5a7 /s
oxark5a7, Are you sure (Y/N)? y
oxark5a7\> - The filename, directory name, or volume label syntax is
incorrect.

peter
 
This is what I got:
rd oxark5a7 /s
oxark5a7, Are you sure (Y/N)? y
oxark5a7\> - The filename, directory name, or volume label syntax is
incorrect.

peter
 
How about:

del ">" ???????


BoomerM3 said:
Thanks for all suggestions. Same problem.

If I go into the directory and try to rename or delete (regardless of
syntax) I get 'filename, directory, or syntax is incorrect'.

If I leave the directory and try to remove the directory, I get a
directory not empty error.

Yes, the '>' is a redirect symbol. That's why all these commands fail!
I was looking for another approach - short of reformatting my drive.

Alternatives?

peter
 
Using the Quote marks indicate that the filename is using the long name
structure. It seems to not give me an error in my XP.
 
Hi Boomer - Sometimes you will find files which you are unable to delete
because they are in use. I believe that Delete Invalid File, below is what
you need, but try them all.

A program called Copylock, here,
http://noeld.com/programs.asp?cat=misc#CopyLock can aid in the process of
"replacing, moving, renaming or deleting one or many files which are
currently in use (e.g. system files like comctl32.dll, or virus/trojan
files.)"

Another is Killbox, here: http://www.downloads.subratam.org/KillBox.zip

A third which is a bit different but often useful is Delete Invalid File,
here: http://www.purgeie.com/delinv.htm which handles invalid/UNC
file/folder name deleting, rather than the in use problem.


--
Please respond in the same thread.
Regards, Jim Byrd, MS-MVP



In
 
Jim said:
Hi Boomer - Sometimes you will find files which you are unable to delete
because they are in use. I believe that Delete Invalid File, below is what
you need, but try them all.

A program called Copylock, here,
http://noeld.com/programs.asp?cat=misc#CopyLock can aid in the process of
"replacing, moving, renaming or deleting one or many files which are
currently in use (e.g. system files like comctl32.dll, or virus/trojan
files.)"

Another is Killbox, here: http://www.downloads.subratam.org/KillBox.zip

A third which is a bit different but often useful is Delete Invalid File,
here: http://www.purgeie.com/delinv.htm which handles invalid/UNC
file/folder name deleting, rather than the in use problem.


These programs fail with a similar error.

peter
 
BoomerM3 said:
This is all caused by the fact that the ">" is a special character
which used to be used (DOS) to redirect commands.

When using the del command, try using a ? in place of the >

eg if the filename is filena>e.ext

try

del filena?e.ext
 
Somehow I ended up with a file named '>' Yes the name is just the
greater than symbol. I don't know how it got there, since it can't be a
legal file name. It is nested in a directory about four levels deep.

Now, I can't delete it. I tried from Explorer and the Command window.
No matter what, it gives me a strange error (like name too long,
illegal name, etc). Naturally I can't delete the directories either.

Anyone know how to get rid if the file?

Open a command prompt, navigate to the directory in question, type
erase ? /p
This will tell the command prompt to delete every file with a one-
character name, but only after prompting you file by file and
receiving your permission.

(I haven't tested the specific case of a file named >, but in the
past this technique has worked for other files with illegal names.)
 
Back
Top