From time to time, when attempting to delete folders, Windows may deny you that ability and may pop up an error message that states “Access is denied”. Windows work in funny ways. This happened to me recently when I was trying to remove Windows.old which contained old Windows installation files that had been left behind after I upgraded to Windows 8. There was one specific file which couldn’t be removed and it irritated me to see the folder still there (signs of OCD).
The reason for Windows denying access is largely attributed to the ownership rights of either the file, folder, drive, registry key objects in Windows 7 or Windows 8. This is a safety measure to prevent you from deleting crucial files. So be careful with what you are deleting.
Otherwise, it is pretty much straightforward to perform.
In my case, the Windows.old folder contains a copy of the previous Windows installation, and can be quite large in size. Also, if you already had a C:Windows.old folder in the installation that you performed a refresh, upgrade install, or a custom install on, then it may be renamed to say C:Windows.old.000 (older previous installation) in addition to the C:Windows.old folder. The most recent previous installation will always be in the C:Windows.old folder. They are safe to delete once you confirm that you have all the necessary files transferred over.
- Press the Start Button
- Type “CMD”
- Move your mouse over the Command Prompt icon, right click and select Run As Administrator
- A Windows permission box would pop up for you to grant administrator access to the command prompt.
- Next, a command prompt box would appear and the first line should be C:WindowsSystem32. This would confirm that its in Administrator mode
- Type in the following command (exclude the brackets) at the command prompt to remove the directory. (RD /S /Q “C:Windows.old”)
And that’s it. Replace the folder directory in the quotations to other files / folders that you are having problems with. There are a couple of methods, which involved either deleting the folder when your computer is booting up, or to take ownership of the folder. This method above is by far the easiest. Let me know if it works for you.