Help! Can't delete folders in XP

Joined
Oct 23, 2005
Messages
670
Ok, so I was trying to import my existing project into eclipse and something weird happened. It kept importing the same directory into itself and kept repeating so I got...hw8/hw8/hw8/hw8/hw8...etc. I wasn't aware that it was doing this at the time so I let it do this for a good 30 secs or so and now I have a hw8 folder with a whole bunch of other hw8 folders in it that I can't delete because Windows complains that the filename is too long. I've tried essentially everything I know and can't get rid of the folder. I've even tried using a file/folder shredding program but it's unsuccessful in removing the folders. If anyone has any suggestions please let me know. Thanks.
 
You can't delete any of the folders? Go to the furthest level in and see if you can delete them one by one. If you can, try a few at a time, etc.

BTW make sure Eclipse is closed
 
Yes, eclipse is closed and I didn't really want to go in each one to the furthest one manually so I copied part of the path and pasted it a few times and tried to go there but explorer says the path is too long. I guess I'll spend the rest of the night traversing directories.

edit: Well I clicked like mad and after a few secs I hit a wall and can't go any further, "path is too long".
 
Grab deltree.exe (old DOS/Win command) from here:

http://terrikaduck.netfirms.com/deltree.htm

Put it in the root of the C: drive and then type (command prompt) deltree hw8*.*

That assumes you don't have any files/folders matching that "hw8*.*" wildcard that you want to keep.
You could also try just "deltree hw8" (no wildcards) to kill the top level hw8 folder.

If you have a TON of the recursive folder names, you can use the "/Y" switch to suppress asking you on each delete, but be extremely careful with that.

Just be careful with deltree, it deletes things and does exactly as it's told (what you type). If you didn't really mean what you typed, that's too bad for you.

I've often used deltree when I need something to destroy troublesome files/folders.
It should work for this.

EDIT: Just want to make sure you understand this will delete the top level "hw8" folder too if you let it. Backup your data if you haven't! :)
 
D:\Documents\csc130spring07\hw8\hw8>dir
Volume in drive D has no label.
Volume Serial Number is D2E5-CF12

Directory of D:\Documents\csc130spring07\hw8\hw8

04/16/2007 09:15 AM <DIR> .
04/16/2007 09:15 AM <DIR> ..
04/23/1999 10:22 PM 19,083 DELTREE.EXE
04/15/2007 06:35 PM <DIR> hw8
1 File(s) 19,083 bytes
3 Dir(s) 28,893,777,920 bytes free

D:\Documents\csc130spring07\hw8\hw8>deltree hw8*.* /Y
Delete directory "hw8" and all its subdirectories? [yn] y
Deleting hw8...

D:\DOCUME~1\CSC130~2\hw8\hw8>dir
Volume in drive D has no label.
Volume Serial Number is D2E5-CF12

Directory of D:\DOCUME~1\CSC130~2\hw8\hw8

04/16/2007 09:15 AM <DIR> .
04/16/2007 09:15 AM <DIR> ..
04/23/1999 10:22 PM 19,083 DELTREE.EXE
04/15/2007 06:35 PM <DIR> hw8
1 File(s) 19,083 bytes
3 Dir(s) 28,893,777,920 bytes free

D:\DOCUME~1\CSC130~2\hw8\hw8>deltree hw8
Delete directory "hw8" and all its subdirectories? [yn] y
Deleting hw8...

D:\DOCUME~1\CSC130~2\hw8\hw8>dir
Volume in drive D has no label.
Volume Serial Number is D2E5-CF12

Directory of D:\DOCUME~1\CSC130~2\hw8\hw8

04/16/2007 09:15 AM <DIR> .
04/16/2007 09:15 AM <DIR> ..
04/23/1999 10:22 PM 19,083 DELTREE.EXE
04/15/2007 06:35 PM <DIR> hw8
1 File(s) 19,083 bytes
3 Dir(s) 28,893,777,920 bytes free

D:\DOCUME~1\CSC130~2\hw8\hw8>deltree hw8/*
Delete directory "hw8/5" and all its subdirectories? [yn] y
Deleting hw8/5...

D:\DOCUME~1\CSC130~2\hw8\hw8>dir
Volume in drive D has no label.
Volume Serial Number is D2E5-CF12

Directory of D:\DOCUME~1\CSC130~2\hw8\hw8

04/16/2007 09:15 AM <DIR> .
04/16/2007 09:15 AM <DIR> ..
04/23/1999 10:22 PM 19,083 DELTREE.EXE
04/15/2007 06:35 PM <DIR> hw8
1 File(s) 19,083 bytes
3 Dir(s) 28,893,777,920 bytes free

D:\DOCUME~1\CSC130~2\hw8\hw8>

Nope, no go. Went in a few directories to avoid any trouble with deleting top level folders and tried doing it with and without wildcards but the pesky folders are still there.
 
Maybe try moving the folders around, then removing them? I.e. dig deep into the structure (maybe 9 or 10 levels) then drag it to your C:\ drive directly. Sound simple, but it may work. I've had unremovable folders before that I could delete after moving them.
 
Back
Top