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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot delete file - filename too long

Status
Not open for further replies.

gypsy247

Programmer
Jan 30, 2003
6
US
When trying to delete a folder in my windows\programs folders I got the following message ""the folder {foldername} contains items whose name is too long for the recycle bin. Do you want to permanently delete it ?"
I answered "yes" and got the following message :
"Cannot delete Programs: The filename you specified is invalid or too long. "
Explorer show that this folder is 0 bytes and has 238 folders ! It has all the standard sub-folder that the other profiles have but instead of files they all contain a sub-folder called "programs" which contains a sub-folder called "programs",etc. (238 folders called programs
The profile does not appear under Users in the control panel.
CAn anybody give me any idea on how this mightbeen created and how I can get rid of it. I ran a virsus scan with the latest definitions and int doesn't appear to be a virus
 
To start with, reboot, run a scandisk with autofix, full scan, reboot. Sounds like you Fat is corrupt.
If it doesn't work, post back.

If 'something' 'somewhere' gives 'some' error, excpect random guesses or no replies at all. Please specify details.
Free Tip: The F1 Key does NOT destroy your PC! -
Marc
 
If the suggestions above doesnt work then you might try the long route by going into the tree and deleting farther into the system to get past the longfile name proble and work your way backwards
 
Thank you all for your suggestions. Here's what I've tried so far:
I ran scandisk, it didn't help. I then downloaded scandefrag and ran it but got the following error
"ScanDisk was unable to correct this error because there is already a file or folder named 'Programs' in the top-level folder of this drive. To repair this error, quit ScanDisk by clicking Cancel, rename the folder in the top-level folder, and then restart ScanDisk. To continue checking your disk without repairing this error, click OK."
I deleted the offending folder and ran defrag again. And got the same error. I did this a few times and checked to make sure the \programs folder was definitely deleted, but it keeps re-appearing. The creation date is 1-11-2003 (same date as the problem folder in \windows\folders). Then I remembered that I moved it to the root in an attempt to delete it a few weeks ago, but instead ended up with it in both places. CAn't run defrag anymore at all - It hangs at about 20%.
I have tried to get to the last sub-folder by "stepping down" in to the tree but still got the same error. Tried to do it in DOS too, but after going down abpout 20 levels I get "path not found" message. Haven't tried ADAware yet. I'll try that tonight.
 
correction - In my previous post I meant "scandisk" when I wrote "defrag". sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top