How to delete locked file/folder in Windows 7

Posted: September 28, 2009 in Software

Have you come across that you can’t delete certain folder or file even you are the administrator?

And you are damn sure that no one is using that folder or file as well. This is very frustrating isn’t it. Well, at least I felt that way.

2 solutions that I come across:

  • Windows 7 (32 or 64 bit) compatible unlocker : lockhunter
  • Take Ownership.

    All files could be downloaded from HERE

 

If windows keep telling you that you can’t delete or move that folder because somebody or something is using it (even you are the only user on that pc), you may need a nifty application to release that folder or file from OS hand. As for myself (for Windows 7 x64), I use lockhunter. You may get it at : http://lockhunter.com/ . Best of all, it is a freeware.


 

But, if Windows keep telling you that you need to have xxxxx privilege from xxxxx in order to delete that file mean you need to take ownership of that folder/file. The easiest way to do so is by adding premade registry entry and take ownership by right clicking on that folder/file.

  1. Download Take Ownership registry : HERE

     

  2. Unzip it and right click à merge

     

  3. Go to the locked folder and right click à Take Ownership

     

  4. Done. Now you can delete that locked folder/file.
Comments
  1. Jake says:

    The take Ownership registry hack worked like a charm. I had sever gigs of stupid Microsoft OneCare backups that I couldn’t delete off of my external drive. Been going nuts for a year. One right click and 15 seconds later. They are gone!! Thanks for posting this!!!!!

  2. Angel says:

    Did not work for me. I was trying to delete a directory left on C: after installing Windows 7 but no luck at all with this. Keep on serching for a solution.

  3. Sanjeev Zopfan says:

    I was not able to delete some files or folders lying in win7-64 with this program’s 64bit ver1, beta3.

  4. Did not work when trying to delete an old version of windows on another drive that no longer works. Pesky windows OS files are a pain to delete.

  5. Quebo says:

    use a program called unlocker. works like a charm

  6. Willy says:

    lockhunter working fine. :)
    thank you

  7. gost001 says:

    Thnx! This really worked

  8. zef says:

    thank you. take ownership worked. and it helped me remove the ardamax keylogger in the recycle bin that wont budge off before :) *salutes*

  9. Amir says:

    Thanks so much… take ownership was the solution, after hours of frustration!!!

  10. Mads E Krær says:

    No luck here:-(

  11. Kenny says:

    Properties -> Click (to remove) Read only
    and then
    Delete

    It should work…

  12. Harald says:

    Worked fine for me on a 64 Bit W2k8 R2 server to show me the *!&!*x* service which had my files locked.
    THX!

  13. topaz says:

    wow! it’s like magic! take ownership really worked for me! thank you so so so much!! =)

  14. DS says:

    Thank you so much.Ownership worked perfectly.

  15. kaedron says:

    takeownership worked very well. thank you for the tips.

  16. Leah says:

    I had a folder appear on my external hard drive called “bafd716c585ae87d6f09af”, no idea why or from where it came. Everything I did to try deleting it required “permission from SYSTEM” – I was very concerned until I found THIS! Now it’s been deleted. Thanks so much.

  17. Afterglow says:

    thank you you are out of this world it worked perfectly

  18. Gina Retchs says:

    Thanks, worked for me perfectly, that ownership files are amazing, finally was able to delete that ***** folder

  19. shri says:

    Taking ownership works like a magic!!!

  20. ikhlasali says:

    Its not working ?

  21. Shireen says:

    I’ve been looking for this for ages! Taking ownership worked so well. Thanks :)

  22. steve-o says:

    beauuuuuty!

  23. Joker1017BSM says:

    YOU ARE A FRICKIN LIFE SAVER!!!!!! I had an annoying file on my external hardrive that I couldnt delete. It was something from Microsoft. Anyway thanks!!!!!!!!

  24. joy says:

    work 100% thanks

  25. latooots says:

    the Take Ownership solved my problem. Had a windows update folder in my external disk and it won’t get deleted.

  26. Poppe says:

    cool it really works

  27. Vijay says:

    Take owner ship method works fine

  28. fasal says:

    Thank you so much guy, finaly works

  29. vintrlos says:

    Finally something that is working, thanks much

  30. sempak says:

    Excellent post at How to delete locked file/folder in Windows 7 Expertester. I was checking continuously this blog and I’m impressed! Very useful information particularly the last part :) I care for such info a lot. I was seeking this certain information for a long time. Thank you and best of luck.

  31. ziga says:

    Couldn’t get LockHunter to download so i tried the RegEdit solution and worked perfect.

    Thanks

  32. Anurag says:

    Thanks a lot , Ownership really helped ..thanks a lot !!

  33. sara says:

    thanks! take ownership allowed me to remove locked folders that i couldn’t before!

  34. smitty says:

    Worked incredibly, i set the ownerships and it didn’t fly, but this was an in and out job

  35. gahwioehawio says:

    How to delete locked file/folder in Windows 7 Expertester I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are wonderful! Thanks! your article about How to delete locked file/folder in Windows 7 ExpertesterBest Regards Yoder

  36. Isis Lee says:

    Worked like a CHAMP! 8.7GB of locked files gone!

  37. Anonymous says:

    SET DIRECTORY_NAME=”PATH_TO_YOUR_LOCKED_DIR”
    TAKEOWN /f %DIRECTORY_NAME% /r /d y
    ICACLS %DIRECTORY_NAME% /grant administrators:F /t
    PAUSE

  38. Anonymous says:

    Put the above script in a notepad file and save it as “del.bat” and choose to “Run as Administrator” then delete ur folder.

  39. magus says:

    doesn´t work at all. Tried everything. Windows sucks. It is time to go back to a REAL OS : Mac Os X.

  40. GabrielNar says:

    I had the similar problem and tried Long Path Tool, available at
    http://www.pathtoodeep.com/. It helped me to solve this problem easily.
    Try it, and you will definitely love this tool. Its free.

  41. Lasitha De Silva says:

    Hey it worked. THNX a LOOOOOOOOOT

  42. siyer says:

    Thanks a ton. The registry keys worked like a charm !!!!!!!! Many many thanks

  43. Snypa says:

    Thankyou very much take ownership worked a treat.

  44. rey says:

    wow it worked perfect.. thanks…

  45. Anne says:

    thank you thank you thank you!!!!!

  46. siimax says:

    Great application. It even shows the process locking the app, and gives you the option to stop them as well.

  47. Titwan says:

    you are a genius. That have unblock 22 Go of shitty windows files !!! thanks a lot.

  48. Pratim Roy says:

    Fantastic… ‘Take Ownership’ reg key was something to reckon with…. !

  49. Patrick says:

    Lockhunter worked well for me. I was trying to remove one last dll installed by iMesh (stay away from it). I was simply unable to delete the DLL and lockhunter enabled me to get rid of it immediately.

    Thanks so much for the information. Much appreciated.

  50. Martin says:

    take ownership reg entry best thing ever thanx

  51. great says:

    take ownership registry , works like a charm! thanks

  52. Tony says:

    Awesome worked like a charm :D

  53. bob says:

    Doesn’t work win7

  54. tedchou12 says:

    Hi, the Take ownership preprogrammed registery worked on my win 7, and it can be removed just as easily. My copy of win 7 is a tchinese copy for anyone needing that info.
    Thanks.

  55. Greenhorn says:

    works like a charm on Windows 7 Enterprise Sp1 64bit. Thank you.

  56. brandi says:

    Ok, how about this one.. My teacher gave me what he thought was a copy of Microsoft Office 2010. Instead, it was a corrupt file. It shows up in My Computer as a Q: drive and Malwarebytes will even scan it as it does the hard drives. It doesn’t even give an option to delete it. Please help!

  57. ANURAG says:

    VERY VERY THANK YOU ADMIN

  58. Anandan says:

    great suggession. It worked for me.

  59. Mav says:

    Man, the take ownership is the best thing I’ve ever had tonight. Thank you.
    Now I can get rid of persistent virus.

  60. carlouis says:

    just worked! awesome! thanks for the help!

  61. My family always say that I am wasting my time here at web,
    but I know I am getting know-how every day by reading thes fastidious content.

  62. Mark says:

    Takeownership worked where lockhunter failed to find any problem. Thanks!

  63. alexandra khan says:

    I need to know how to remove the self-locking the computer. when watching a movie or listening to music and not move the mouse locks alone.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s