Fix For Win7 Not Letting You Delete Files

I, TonySinclair qqqq, am posting this so I can find it in a google search if I ever need it again, but I hope it helps other people.

If you created folders in XP, and you’re now using the same drive in Win7, you might find that you are unable to move or delete files in some directories, even if you have admin privileges. If you’re like me, you will waste a lot of time trying to get at it through the Win7 security access before finding out that it’s actually an NTFS issue. Here’s how to fix it.

Take ownership of the files. Start a Command Prompt (cmd) as an administrator, and enter:

takeown /f file
takeown /f directory /r

Give yourself full rights on the file:

cacls file /G username:F
cacls directory /T /G username:F

Or, after taking ownership, you can just go into the security properties of the folder and give full access to everybody (may not be what you want if you share the PC, but it’s all I need for my home PC).