How to delete a “protected” file within Windows 7

Certain files within Windows 7 can not be deleted even as using the administrator account.  Launch a command prompt with administrative privileges and use the following commands.

takeown /f C:\folder\file

cacls C:\folder\file /G account:F

Capture