The Explorer:Scrub Your Hard Disk Clean: Part 2 - InformationWeek
Software // Enterprise Applications
11:40 AM
Fred Langa
Fred Langa
[Dark Reading Crash Course] Finding & Fixing Application Security Vulnerabilitie
Sep 14, 2017
Hear from a top applications security expert as he discusses key practices for scanning and securi ...Read More>>

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.

1 of 4
Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
[Interop ITX 2017] State Of DevOps Report
[Interop ITX 2017] State Of DevOps Report
The DevOps movement brings application development and infrastructure operations together to increase efficiency and deploy applications more quickly. But embracing DevOps means making significant cultural, organizational, and technological changes. This research report will examine how and why IT organizations are adopting DevOps methodologies, the effects on their staff and processes, and the tools they are utilizing for the best results.
Register for InformationWeek Newsletters
White Papers
Current Issue
2017 State of IT Report
In today's technology-driven world, "innovation" has become a basic expectation. IT leaders are tasked with making technical magic, improving customer experience, and boosting the bottom line -- yet often without any increase to the IT budget. How are organizations striking the balance between new initiatives and cost control? Download our report to learn about the biggest challenges and how savvy IT executives are overcoming them.
Twitter Feed
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.
Flash Poll