Cannot delete a folder in Windows 7
I have a few folders that I can't delete:
I right-click > properties > security to try and give myself permission, but no joy:
So I try to take ownership of the folder in advanced > owner...
But no...
So I try running the command prompt as administrator and doing rmdir
, doesn't work:
I've run out of ideas! How can I delete these folders?
Solution 1:
Take ownership and add permissions using the command line.
takeown /F (path to folder name) /R /D Y
(takes ownership)
icacls (path to folder name) /grant administrators:F /T
(sets full permissions for the folder to the admin group)
You should be able to delete it now.
If this does method not work due to other complications, boot from a flavor (Ubuntu or other) of Linux Live CD or USB and delete folders and files while in Linux.
Solution 2:
There's always the live CD method of file deletion. It doesn't take too long, just a couple reboot's worth.
Download your favorite linux Distro (or use a tool such as Bart's PE or the Trinity Rescue Kit (TRK). My personal favorite is the Trinity Rescue Kit. It's got a lot of tools I use with some frequency.
Most Linux live disks by default prevent modifications to your HDD for protection, but they usually also have relatively simple ways of removing these protections to allow advanced file management on the hosts HDD.