Can't Delete This File (>)

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
 
D

Detlev Dreyer

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.
 
F

Frank Saunders, MS-MVP

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/
 
B

BoomerM3

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?
 
D

Detlev Dreyer

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.
 
B

BoomerM3

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
 
B

BoomerM3

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
 
B

BoomerM3

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
 
Y

Yves Leclerc

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
 
Y

Yves Leclerc

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.
 
J

Jim Byrd

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
 
B

BoomerM3

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
 
P

Plato

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
 
S

Stan Brown

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.)
 

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

Similar Threads

Can't delete file 3
Can't Delete File 1
File in Temp I can't delete Help Appreciated 7
Can't seem to delete fonts 1
Can't delete file 3
can't delete file 10
Can't delete file 4
Help: Can't delete folder! 3

Top