Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to delete file with long filenames

Status
Not open for further replies.

ranijee

MIS
Jan 7, 2003
18
MY
Hi I have a file in windows 2000 server (file server) with a very long file name. I tried to delete it but couldn't.I have tried to download software to delete it but unsuccessful .I tried to map it to the windows XP and delete it but couldn't either.
Is there a way to delete it.??

appreciate the feedback
thanks
 
Have you taken ownership of the file? Did you check the NTFS permissions of the file?

I hope you find this post helpful.

Regards,

Mark
 
Open a Command Prompt and see what filename you get when you go to the file using dir /x

What the dir/x does is show you the name in 8.3 format - something like filena~1.txt for filename.txt

You can then use
erase filena~1.txt
for eg to delete the file or even the "rename" command to change the name to something smaller.





Claudius (What certifications??)
 
If the file+directory path have reached the 255 char limit that Win2K imposes, try using the DOS SUBST command to create a drive letter associated with that path. From there you can delete the file from the command prompt.
 
thanks for the feedbacks...
The owner of the long file name is me. And when using dir/x, it doens't use 8.3 file name bcos I don't see the ~ sign.It uses its name.
COuld you pls show me how to create a drive leeter using subst command? I have type the subst but not sure how to go from there.

thanks again..
 
Hi ranjee, all you need to is go to a command prompt and type SUBST <drive letter:> <long path>. From there you can navigate down to your file and then delete it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top