long filename: cannot delete

Status
Not open for further replies.
M

michael

Hi there,

I cannot delete some files; error msg:

connot delete file; filename specified invalid or too
long; specify a different filename.

But I could not change the filename.

What can I do?

Thanks.
 
R

R. C. White

Hi, Michael.

How about the old faithful: Open a "DOS" window and use dir /x to get the
8.3 filename. Then delete that.

RC
 
Joined
Dec 14, 2006
Messages
1
Reaction score
0
Howdy Michael.

What you need to do is open up a command line (Start > Run > Command) in windows. Then you need to navigate to the directory that the file(s) that're too long to delete are located in. (i.e, If it's on your Desktop and you're at C:\Documents and Settings\Owner>, you'd use cd Desktop, or if you were at C:\Windows>, you'd use cd.. | cd Documents and Settings | cd YOURACCOUNTNAME | cd Desktop

Once there, take the first 6 characters of your file name (i.e, if the file were ThisIsAReallyFrigginLongFileName.doc), then append a ~1 to those 6 characters. Your file will now look like ThisIs~1.doc (do not remove the file extension, if it's visible.)

Now all you should need to do is run the DEL command:

C:\Documents and Settings\YOURACCOUNTNAME\Desktop>DEL ThisIs~1.doc

If you encounter an error like this:Could not find C:\Documents and Settings\YOURACCOUNTNAME\ThisIs~1.doc, Make sure that the file you're trying to delete does not contain any out-of-the-ordinary attributes; the most common being Hidden (users hide the files they can't delete due to sheer frustration of having to look at them.:p) In this case you would want to append the /AH operator to the DEL command.

C:\Documents and Settings\YOURACCOUNTNAME\Desktop>DEL /AH ThisIs~1.doc

I hope this helps you with your problem, I know it was very frustrating when I first had it. =)
 
Last edited:
Status
Not open for further replies.

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

Top