Corrupted files/folders

Posted on Friday, February 08, 2008

A month or so ago my VM completely hard locked. I was working on Graffiti and had just created a category called 'test'. I had no choice but to force the vm closed and reopen. When I booted back up the system ran chkdsk. It fixed a lot of stuff, but 'test' was sititng in that source directory saying 'access denied' when I would try to browse through it. I thought it was no big deal really... who cares about a folder. Well... everytime I go to check in my code, I have to ignore this 'test' folder - it was driving me crazy.

So the folder is corrupted, must be easy to fix...

I tried Unlocker, MoveOnBoot, you name it. Atleast 3-4 other programs. Nothing would delete this damn folder. Finally, I found a command line utility called cacls.exe that is supposed to change the permissions, still didn't work.

Fortunately, there is a gem in the win2k resource kit called subinacl. This little utility worked perfectly to change the permissions back to my user so I could finally delete it. It goes a little something like this:

subinacl /subdirectories "\\?\c:\path\folder\*.*" /setowner=jayme /grant=jayme=f

The test folder can burn in hell.

Jayme

Comments

  • Don on 7.18.2008 at 12:07 PM
  • I had a similar problem trying to delete a corrupted file & folder on a removeable flash drive.

    I tried every normal windows method and explorer, that I could think of as well as several supposedly great utility programs that I was told to try.

    NONE OF THEM WORKED!

    A couple said they ran correctly and even made the file dissappear, but when exiting te folder then going back to check the file, both folder & file were once again there, magically reappearing.

    As the file was also on a removable drive, this created more problems in regards to not being able to even try reformatting without destroying all the preloaded software on it.

    I finally found a solution today, which seemed to work... as both corrupted folder & file no longer appear and seems to have been deleted.

    I used the following:

    1. Open a DOS Command Window.

    2. Type the command "rmdir /S [drive]:[folder name]"

    3. press ENTER

    4. type DIR to see folders remaining (from the root folder)

    this worked for me... hope it helps you and others.

    *note: I tried other DOS commands too, but none worked until this. also note that it will not work without the "/S" included.

    Best regards

    Don

    p.s.

    I tried to share this with others on some boards, but all of them want you to register before psotnig anything... not up to giving out lots of personal info just to post one comment.

    (know what I mean?)

  • ricky on 5.07.2009 at 2:47 AM
  • try the command "rmdir /s /f /s[drive]:[folder name]"

  • piyush on 5.24.2009 at 7:37 AM
  • hi ...i tried a lot...but m unable

    cud u plz do me a favour by writing the cmd line

    i want to delete "april" folder

    its path is "C:\MetaStock Data\april"

    thanks a lot!

  • tukang nggame on 6.11.2009 at 10:28 AM
  • thanks for your sharing. that useful to fix the same problem

  • steve on 6.15.2009 at 9:24 PM
  • @piyush, try this command

    rmdir "C:\MetaStock Data\april"

  • club penguin on 7.05.2009 at 8:53 PM
  • I tried every normal windows method and explorer, that I could think of as well as several supposedly great utility programs that I was told to try.

  • Rusli Zainal Sang Visioner on 7.08.2009 at 12:56 PM
  • this is very interesting. thanks for that. we need more sites like this. i commend you on your great content and excellent topic choices. i'm spreading the good word about this site to all

  • Stop Dreaming Start Action on 7.08.2009 at 12:58 PM
  • accurate, concise, bold! Are you me. thank you and wish a nice day

Leave a Comment


Search this site

Last 3 Tweets

  • @JasonBarile We will have to have a beer night at his house and play pool :)
  • @hkarthik I find the card easier than dealing with a check :)
  • I love JQuery, but all of the datatables that have to offer are nowhere near as good as the YUI one.