Discussion Locked

Can't delete a file

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a file that I can't delete. I tried every which way to delete it ie: DOS, rename, move, drag to recycle, and explorer. I get an the error message "Cannot delete the file: the file name you specified is invalid or too long"

The name of the file is very long but I get this message even if I try to modify it's properties. I'm on a Win2K machine with SP2.
Any suggestions???

Thanks,

TKE402

12 replies

by dklippert

Try this from the forums:
1. Click the Start button, click Run...,
and in the "Open:" box type (or copy/paste) this command:

cmd /k cd "C:\Documents and Settings\Administrator\Desktop" & dir /x

2. To delete the shortcut: type the delete command, which is del, a space,
and the short name. For example, if the short name is SHORTC~1.LNK, you
would type this:

del SHORTC~1.LNK

by fenaikh

Hi
1. Press Alt, Ctrl and del check the process list for a suspeious software then stop it.
2. Run regedit32 and check the RunAs value under the following key in the registry HKEY_CLASSES_ROOT for a suspeious running software
3- check the othersubkeys for a running suspeious software.

4. Check your startup files autoexec.bat config.sys ect .. for a suspeious software
5. Run an anti virus scanner software with a new updated data file or use an online scan at housecall anti virus.
6. Run an ad-ware.
7. Run a trojin scanner.
8. Run the command del xxx*.yyy (where xxx are the first 3 leters of the name of the file and yyy the ext) with an administrator account.

Good luck

Mohamed

thecleaner
http://www.moosoft.com/thecleaner/

***Very Important NOTE *********
After you copy the URL a space or a %20 maybe gets inserted in the URL when you paste it into your browser. Delete any spaces or such characters from the URL for the page to be loaded.
***Very Important NOTE *********

by iainsheppard

Ok, it's still been posted incorrectly - even though it was fine in the "Comment" box. Honestly, it was!

by maxwell edison

There are some file names that violate the naming rules of Windows, but the system usually refuses to let you create them in the first place. In this case, perhaps Windows allowed you to create a file name that breaks the rules, and then the system chokes on the name and won't even let you correct it. I suspect the problem here is the inclusion of some "illegal" characters, the order or a combination. You actually can delete the file, but it requires going to a DOS prompt. If you tried to delete if from the "MS-DOS Prompt" via the Start/Programs menu and it wasn't successful, then try if from DOS by booting up on a DOS disk.

Then navigate to the directory containing the file and invoked the DOS "delete" command to expunge it. You have to look carefully for the file, because DOS truncates the name to eight characters followed by the DOC extension.

If it still won't delete, then check for file attributes - either -H, -S, -A, etc. Remove the attributes, and then it will delete.

by maxwell edison

Answer number 3, which is a very interesting possibility, shows that it would be helpful to know the name of the file that you're trying to delete. How about puting the name of the rascal file in a comment?

This discussion is closed to new replies.