Quantcast
PCWorld.com is upgrading some back-end systems. Some site features, such as user registration, may be temporarily unavailable.

Windows Tips: Superscrub Your Drive Automatically

Automate disk maintenance, speed up printing from your laptop.

Scott Dunn

  • 0 Yes
  • 0 No

For years, Windows NT users have been able to use the command line to delete temporary files automatically. Now Windows 2000 and Windows Me let you fine-tune the process by using the Disk Cleanup tool's Task Scheduler to perform such disk-keeping chores as emptying the Recycle Bin and deleting offline network files, cached Internet files, and indexed catalog files.

Choose Start, Run, type cleanmgr /sageset:1, and press Enter. The number 1 in the command line can be changed to any number you choose from 0 to 65535, each representing a separate custom cleanup style that you can record and invoke at any time. In the Disk Cleanup Settings dialog box, check the items you want deleted. When you're done, click OK to store the settings in the Windows Registry. To make Disk Cleanup run with the new settings, choose Start, Runand type cleanmgr /sagerun:1 (replacing 1 with the number you specified in the /sageset switch). Note: When you customize Disk Cleanup this way, it unfortunately acts on all drives rather than prompting you for a specific drive to clean up.

You can, however, use this technique to create a shortcut containing custom cleaning settings. For example, to make a shortcut that deletes only Internet Explorer cache files, enter cleanmgr /sageset:2 (or another number) in the Run box as explained above, and press Enter. Check Temporary Internet Files and confirm that everything else remains unchecked. Then click OK. Next, right-click the desktop (or the folder that will hold your cleanup shortcut) and choose New, Shortcut. In the command line, type cleanmgr /sagerun:2 (use the same number here that you used earlier), and click Next. Type a name for your shortcut such as Destroy IE Temp Files, and click Finish. Next time you double-click the icon, your temporary Net files will be history.

To make Windows delete these files automatically at a preset time, choose Start, Programs, Accessories, System Tools, Scheduled Tasks. Select the icon you just created and drag it into the Scheduled Tasks folder window. Double-click the icon, click the Schedule tab, and specify when you want your custom cleanup shortcut to run. Then click OK and close the Scheduled Tasks window. Henceforth, your custom cleanup will occur on the schedule you established.

For more information, check out last February's Windows NT column.

  • Recommend this story?
  • 0 Yes
    0 No
  • Great year-end deals
    for small business!
  • Get 24/7 live remote AT&T Tech Support 360* service along with select Lenovo* PCs (with Intel® Core™ 2 Duo processors) and save up to 200!

    Learn more

  • HP EliteBook* 6930p Notebook with Intel® vPro™ technology and a free HP Basic Docking Station - $641 instant savings!

    Learn more

Dell End of Year Deals

Focus on Personal Productivitysponsored by Microsoft

  • Personal Finance 2.0 These free and fee-based Web services not only aggregate data from your online bank accounts, they give you tools for managing your money.
  • High-Tech Travel Tips Plenty of stories provide advice for elite mobile professionals. But what about you, the unproductive traveler?

People who read this also read:

  • Perfect Printing Solutions Find just the right All-in-One printer for you from HP. Visit the HP Resource Center.
  • Lenovo Laptop Showcase Find out how Lenovo IdeaPads and Thinkpads balance performance and portability. Visit the Lenovo Resource Center for more info...

Sponsored Links