Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I've tried everything: DOS commands safe mode everything every time it sys the file cannot be deleted the file is inavlid or the the name is too long." what should i do

One Easy Possible solution could be that you will find it running in your Task Manager "Processes" Tab. If you don't see it then search for any relationships the file has with any prog's currently running. Process of elimination. Now if it is a windows system file or anything associated, your running win2k, so you still have a lot of options for that. XP is another story. Also try shortening the filename. Then when attempting to delete, hold the shift key while pressing delete. (When Highlighted of course) and it will bypass the recycle bin altogether, in return permanently deleting it.
Hope this helps.

Well I tried the shift key trick, no luck. its not a program or anything ita a TIF file. so its a little more tricky. any solutions?

Dear Eric,
I presume that the file is not deletable as the name is more than 256 characters long. DOS commands (even the commands from NT cmd.exe) fail to delete/open such files. I would suggest try this:
type the command dir /x
A short name for the file would be shown (this is the alternative name by which the file is known to the system).
Try deteing the file by that name.Else one has to write a small program in C or C++ in UNICODE that calls the function FindFirstFile, FindNextFile on this folder, Reads the file name and calls MoveFile(, NULL) to delete the file. Remind you that one would fail to delete such long files in perl. I have not experimented with java.
HTH,
Manoj

I tried writing this program, but FindFirstFile and FindNextFile return the WIN32_FIND_DATA structure. The cFileName member of the struct is declared as such:
TCHAR cFileName[MAX_PATH];
... and since MAX_PATH is 255, it returns an invalid handle. Any ideas?

![]() |
How do I?????
|
RDC-6000 camera netmeetin...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |