Narrative of a little trouble I just had with Windows 7′s clinginess with certain files and file types.
During my upgrade the Windows 7 installer backed up the old system files and folders for Windows XP and not only that, the first upgrade failed (due to the Bluetooth thing, apparently), so the second upgrade attempt backed up the failed attempt’s system files and folders as well. The oldest backup was in a folder named C:\Windows.old.000\, and the newer backup in a folder named C:\Windows.old\.
I’d backed those up (in case the newest install was somehow relying on them) and then attempted to delete them. This was tough for a number of reasons. Attempts at normal deletions failed. Attempts at deletions elevated to Administrator rights also failed.
Digging a little deeper, it looked like I needed to take ownership of the files and grant myself permissions to delete the files and folders. Oddly enough, this required command line commands: takeown and icacls (included in Windows 7) (this link talks about cacls instead – that’s deprecated in Windows 7 and replaced with icacls – run icacls without arguments for the help). With various flags and arguments I was able to take ownership of the top level folder and all subfolders and files recursively.
This was fine for all but two files: an *.exe and *.ocx to do with Adobe Flash. They lived deep in the directory hierarchy. On the theory that these were locked somehow because they were in use, I rebooted into Safe Mode in Windows 7 (core drivers only, no explorer), which didn’t work at all. I recalled using Unlocker (free) for something similar in Windows XP. While Unlocker was unable to find a locking handle for the files it was finally able to delete each of them. After they were deleted, I was able to delete the top level folders (thank god – I hate having huge directory hierarchies lying around on my disk drive.
Later, being unable to determine why I suddenly had 65 GB of data (instead of the 25 or so I was supposed to have utilized on the drive), I went into WinDirStat Portable (free)and tried to figure out where all the space was going. Turned out the Recycler was caching old deletions even though I’d emptied the Recycler. I was able to use WinDirStat to flush out older Recycler folders. I also took the opportunity to clean out some redundant iTunes data and other duplicate data I didn’t need.
Finally, I was back down to a trim 25GB.
And I’ve just kicked off a final baseline backup with my new copy of Acronis True Image Home 2010 (not free), which is my backups product of choice.