Tuesday, March 16, 2010

How to force delete files in Windows 7 & Vista

Have you ever wanted to delete files from a previous windows installation, but you couldn’t because of a permission error.

permission

Most of the times, it is purely a problem of ownership over the files you wish to delete. If you are the administrator of the computer, than there is a quick solution of taking the ownership of the files, adding the Take Ownership in your right click context menu.

ownershipMenu

How to add this option in the context menu.
You have to download this file: InstallRemoveTakeOwnership.zip

Once you did this, extract the contents in a folder. There are two registry files insinde, one that adds the Take Ownership context menu option, the other that removes it.

Double click InstallTakeOwnershipOption.reg

Now right click the folder you want to delete, then select Take Ownership.


take Ownership

Once the operation is completed, you have the full ownership of the folder, and you can go further deleting the file.

To remove this option from the context menu, just click on the other registry file RemoveTakeOwnershipOption.reg

What if I still cannot delete the file

If the problem still persists, then it is not related just to permissions. We could be talking about a file blocked by the system, a damaged file…

If you are sure about what you want to do, I recommend in this case a more advanced solution, a tool that serves exactly this purpose - the Unlocker.

It can handle very well a number of special cases when it comes to deleting a file such as the Access denied, sharing violations, source in use, file in use, ..and so on.

Adrian

4 comments:

  1. Thank you very much! this was obv made a few years ago, but thought I would leave a comment to say thank you, and it works fantastically!

    ReplyDelete
  2. Thanksssssssssssssssssssssssss !!!!!!!!!!!!!!!
    This trick help me so so so so so so much !!!!
    i try to delete the file using cmd but still failed , and i use my antivirus try to force delete it and yet the file still exist !
    your trick !! work perfectly !!!! i love you , ts ! muacks ~ ! thanks for sharing the tricks !

    ReplyDelete
  3. Fantastic! Been trying to delete a Windows folder from my 2TB drive after installing Windows on an SSD, no matter what I did with permissions I could not delete it, even Unlocker would not do it! Many thanks :)

    ReplyDelete
  4. Thank you! Thank You! I had a folder that just wouldn't allow me to delete it. Presto it's gone now. :)

    ReplyDelete