A Better Way to Empty WindowsÆ Temp Folder


I was stung with criticism for my advice on deleting the contents of C:\Windows\Temp every time you boot (see "Empty the Temp Folder Automatically," www.pcworld.com/may00/al). Readers pointed out, correctly, that I used two DOS commands where the single command line deltree /y c:\windows\temp\ (donÆt forget that final backslash) would also do the job (see FIGURE 3).

Certain installation programs leave files in the Temp folder, reboot your computer, then use those files to finish the installation. If you empty Temp via autoexec.bat as I stated, the installation wonÆt work.

The solution is to put this deltree command in the StartUp menu, since programs in this menu run only after any such installation routines. Right-click the taskbar and select Properties. Click the Start Menu Programs tab, then the Add button. For the Command line, enter

deltree /y c:\windows\temp\. Click Next. For the rest of the wizard, pick the defaults.

Once youÆre done with the wizard, select StartòProgramsòStartUp, right-click deltree, and select Properties. (If you have Windows 95, right-click Start and select Explore. Navigate to the Programs\StartUp folder, right-click deltree and select Properties there.) Click the Program tab, check Close on exit, and click OK.


Category:Windows 9x
Issue: October 2000

These Web pages are produced by Australian PC World © 2000 IDG Communications