Computing.Net > Forums > Windows 2000 > deleting a file with a long name

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

deleting a file with a long name

Reply to Message Icon

Name: Eric
Date: September 20, 2002 at 15:37:38 Pacific
OS: WIN 2000
CPU/Ram: 333 256 ram
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: 1BigBird3
Date: September 20, 2002 at 17:34:09 Pacific
Reply:

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.


0

Response Number 2
Name: Eric
Date: September 20, 2002 at 21:40:53 Pacific
Reply:

I tried deleting with the s--- key no luck. Its a TIF file so it woulnt be running.


0

Response Number 3
Name: Eric
Date: September 21, 2002 at 09:48:40 Pacific
Reply:

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?


0

Response Number 4
Name: Manoj Patra
Date: September 23, 2002 at 02:43:50 Pacific
Reply:

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


0

Response Number 5
Name: t3sture
Date: September 25, 2002 at 04:31:37 Pacific
Reply:

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?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

How do I????? RDC-6000 camera netmeetin...



Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: deleting a file with a long name

Deleting file with long name www.computing.net/answers/windows-2000/deleting-file-with-long-name/34129.html

PFS First Choice & Win 2k www.computing.net/answers/windows-2000/pfs-first-choice-amp-win-2k/47348.html

Sjaring files with 98 www.computing.net/answers/windows-2000/sjaring-files-with-98/27057.html