The Explorer:Scrub Your Hard Disk Clean: Part 2 - InformationWeek

InformationWeek is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Software // Enterprise Applications
11:40 AM
Fred Langa
Fred Langa

The Explorer:Scrub Your Hard Disk Clean: Part 2

More ways to clean up -- including Cookie sweeping and Registry compacting!

This two-part series on disk cleanup began as an offshoot of our "Save Your Butt With DOS" series, which was itself occasioned by the imminent release of Windows Millennium Edition. You see, in WinME, Microsoft has hidden access to DOS and made it difficult even to create a bootable floppy disk. Alas, while Microsoft is doing its best to shield utter newbies from DOS, it's making life harder for the rest of us. Without easy access to DOS, some types of low-level, powerful disk diagnostic and repair operations become much more difficult.

Of course, Windows 2000 goes even further, by design; it has no component that we would normally refer to as standalone DOS.

The "Save Your Butt With DOS" series was and is designed to help you create a DOS-based toolkit you could stick on a shelf against future need; a toolkit that can help you get yourself out of system trouble even if you can't run Windows itself, or if you end up in a DOS-free version of Windows.

Part of a good DOS toolkit includes utilities in the form of "batch files," which are simple text files that contain a series, or "batch," of DOS commands. You can think of batch files as a form of scripting that can greatly simplify low-level system maintenance tasks. Knowing how to cobble together a simple batch file is a very handy skill, and so, as a starting point for our discussion of batch files, I offered a simple batch file called Cleanup.Bat.

Cleanup.Bat was just intended to show how an extremely simple text file could perform a very useful task -- in this case, cleaning up anywhere from (typically) tens to thousands of megabytes of junk files that can accumulate on your system, beyond the reach of Windows' own cleanup tools. Cleanup.Bat was also a teaching tool: By the end of the planned article, I was going to show you how to tweak, optimize, and streamline the basic batch file to do whatever you wanted it to.

But even in its basic form, Cleanup.bat was a huge hit. So big, in fact, it demanded a detour in our planned coverage of batch files, temporarily shifting to focus on disk cleanup techniques. "Scrub Your Hard Disk Clean, Part I" was the first such column. This column -- Part Two -- extends and expands on the concepts in that first column, so if you haven't checked out Part One, please do so now. (And as before, this column is specific to Win98, but can be generalized to other versions.)

Cleanup.Bat and the TIF
Cleanup.Bat has worked successfully on tens of thousands of readers' systems, cleaning up vast amounts of otherwise-wasted disk space. But one thing the original versions of Cleanup.Bat didn't do was clean up Cookies; and it also didn't erase many files in the TIF (Temporary Internet Files) area. That was by design:

Cleanup.Bat didn't touch Cookies because Cookies may contain site logon information, including passwords and other account information. Deleting the wrong Cookies may leave you unable to connect to your favorite sites. Worse, improperly deleting Cookies may leave a file called Index.Dat bloated with (literally) megabytes of bogus Cookie pointers; and improperly deleting the pointers may leave you unable to access the Cookies you do have.

Cleanup.Bat was selective in what it cleaned out of the TIF because handling the TIF is tricky: Portions of the TIF are created on the fly by Windows. You can see this for yourself:

In Windows Explorer, navigate to \WINDOWS\TEMPORARY INTERNET FILES (or wherever your TIF is located). Right click on the folder, and select properties: You'll see how many files are in the TIF, and how much space they occupy. Click Cancel, and then open the \WINDOWS\TEMPORARY INTERNET FILES folder in the normal way and take a look inside: You'll typically see a pile of files and some subdirectories.

Now drop to DOS (that is, exit Windows) and navigate to the same folder, such as by typing

Type DIR to see what in the folder. Surprise! Even though this is exactly the same folder you were looking at a moment ago inside Windows, its contents are radically different. In fact, the directory may appear empty.

Restart Windows, navigate back to your TIF, and presto! The files are back.

Except they're not really back: Many of the files in the TIF are actually ghosts: pointers to, or copies of, the real files which exist someplace else. Cookies, for example, may appear in the TIF, but they're really stored in the WINDOWS\COOKIES directory. Other content files may actually be stored lower in the TIF directory tree, such as those in a hidden directory called CONTENT.IE5.

We welcome your comments on this topic on our social media channels, or [contact us directly] with questions about the site.
1 of 4
Comment  | 
Print  | 
More Insights
Augmented Analytics Drives Next Wave of AI, Machine Learning, BI
Jessica Davis, Senior Editor, Enterprise Apps,  3/19/2020
How Startup Innovation Can Help Enterprises Face COVID-19
Joao-Pierre S. Ruth, Senior Writer,  3/24/2020
Enterprise Guide to Robotic Process Automation
Cathleen Gagne, Managing Editor, InformationWeek,  3/23/2020
White Papers
Register for InformationWeek Newsletters
Current Issue
IT Careers: Tech Drives Constant Change
Advances in information technology and management concepts mean that IT professionals must update their skill sets, even their career goals on an almost yearly basis. In this IT Trend Report, experts share advice on how IT pros can keep up with this every-changing job market. Read it today!
Flash Poll