---Sponsored Links---

Saturday, June 20, 2009

Delete Undeletable Files by command line

If you want to upgrade your Windows operating system to Windows 7 and install windows 7 on another partition with windows xp/vista still on hard drive,you will get a big Issue how to Delete Undeletable Files in Windows 7.
Here are two command line syntaxes which can delete undeletable files or directories in windwos 7.

For Files:
takeown /f file_name /d y
icacls file_name /grant administrators:F

For Directories :
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t

Note you are the administrator or a part of administrator group to run the command.
via BlogsDNA


  1. In every post this is very vague how to enter the file name. is it "takeown/f UNDELETABLE FILE/d y icacls UNDELETABLEFILE/grant administratiors:F/t"? this is command line so exact instructions would be helpful.

  2. hello plz help me....here is a problem that my friend has using windows7 which has been corrupted and again he formatted that with again window7 which is different from previous version....which does not consists of the FORMAT or DELETE option....still he's facing the previous problems which he had previously encountered ....plz help me with your suggestions and help...send me to my mail...08s31a1240@gmail.com
    thank you.