Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Anybody know of any tools which force deletion of a folder on my drive? The user I am logged in as doesn't own the files either.

More background though, I found some info which should help me take ownership of the files. E.g. if I use the command line tools takeown and cacls I should be able to get the files in a state I can delete them.

The problem is actually more than that. I believe the data has become corrupt, or else something buggy has gone on with the process which created the files (which I believe was xcopy).

I basically enter a folder like this,

D:\Documents and Settings\All Users\Application Data\Application Data\Application Data\Application Data\Application Data

And I can just keep clicking on the folder Application data and it keeps going deeper until some limit is reached (perhaps 256 character limit or something). The folder contents each time I go deeper is the same too.

What can I do to force the files and folders to be deleted? takeown and cacls cannot handle the depth of the folders, and scandisk didn't help.

share|improve this question

6 Answers 6

up vote 1 down vote accepted

I've always used an ubuntu liveCD to do this since it supports longer file paths even on NTFS drives.

share|improve this answer

Download slax (a good linux live cd) http://www.slax.org/get_slax.php

Burn the cd image with ImgBurn or any other capable burning software

After booting with the live CD try deleting from there. I would also recommend you run some kind of HDD test to see if it's really corrupt (this you can do from within windows of course). Or if you suspect the hardrive is really about to crash, then turn off the computer, take it out and keep it safe. Take it to someone who does data recovery and let them have a look at it.

share|improve this answer

7zip's file manager can delete folders that are too long for Windows to deal with normally. If something in Windows seems to be locking it, you can try MalwareByte's FileAssassin, or a Linux liveCD. If it's a filesystem error, running chkdsk /r might fix the problem (but make sure you have backups first).

What exactly happens when you get to the bottom of the folder tree?

share|improve this answer
    
You mean when I traverse as far down the Application Data folders as I can? Eventually I try to click the Application Data folder and it says 'Access Denied'. I counted the characters, and the folder length was 240 characters. Another Application Data folder would push it over the 256 level. –  peter Sep 20 '09 at 21:54
    
Another question though, would a linux live CD have permission to delete the files if they are owned by a windows user? How does linux get around that? –  peter Sep 20 '09 at 21:57
    
By the way this drive is a mirrored drive. The solution might be to break the mirror, format one of the drives, copy over the stuff I want, and then create the mirror again. 7-zip didn't work. –  peter Sep 20 '09 at 22:12
    
Linux doesn't care about windows permissions, they're totally irrelevant there. –  Phoshi Sep 20 '09 at 22:29
    
7zip's file manager (7zFM.exe) worked for me! –  Marek Grzenkowicz Sep 21 '09 at 7:54

Sounds like you have a junction point that points to its own folder. NTFS Junction point It is possible to have a recursive junction point. I haven't tried it myself (I don't have windows server or the tools to make a junction point( MKLINK )), you should be able to remove it with rmdir or linkd.

share|improve this answer

To work around this problem, reduce the length of the path to less than 256 characters.

open the folder one level above the folder that returns the error. Right-click the folder returning the error and then click Rename. Rename the folder to reduce the number of characters used in the folder name.

share|improve this answer

Try boot a Linux destro live cd and delete from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.