Cleaning Out Temporary Files


Q. The folder that holds my temporary files just keeps growing. Is there a way to clean it out automatically ?

A. Yes, there is. But first a little advisory for those who don’t know about temporary files and aren’t aware that it’s a good idea to clean them out regularly. When you open a file in Windows, the system automatically stores it in a special “temp” folder (c:windowstemp); Windows encodes the file with a name that ends in .tmp. Then, when you close the file, the temp file usually is erased. But, for technical reasons, Windows sometimes holds onto the file. Over time, the temp folder can get quite large (see exhibit 1, below). It’s a good idea to empty it. However, then you have the nuisance of locating the folder in the Windows directory and cleaning it out. And if you try to delete a temp file created during a current work session rather than an earlier one, Windows often will stop you. So the best time to empty a temp folder is after you fire up your computer but before you open any files.

Exhibit 1

Part of a typical temp folder.

Here’s a safe way to have your computer automatically do the job each time you boot up: Go to Start, Run and then type sysedit in the command line and press OK. A bunch of tiled files will appear, as shown in exhibit 2, below. The top file probably will be autoexec.bat . If it’s not on top, click on the Xs in the topmost files until you get to autoexec.bat. It may be empty; don’t worry about that. Type in the following two lines:

deltree /y c:windowstemp

md c:windowstemp

That command instructs the computer to delete the entire temp folder and create a new, empty one each time you boot up .

Exhibit 2

A tile view of Windows’ configuration files. On top is the autoexec.bat file that contains the command to delete the temp folder and create a new one.

SPONSORED REPORT

Revenue recognition: A complex effort

Implementing the new standard requires careful judgment. Learn how to make significant accounting judgments and document them and collaborate with peers for consistent application.

VIDEO

How to Excel pivot a general ledger

The general ledger is a vast historical data archive of your company's financial activities, including revenue, expenses, adjustments, and account balances. J. Carlton Collins, CPA, shows how to prepare data for, and mine data with, PivotTables.

QUIZ

News quiz: Taking an economic snapshot and looking to the future

Recent news included IRS actions that affect individuals and partnerships and a possibly influential move by a Big Four accounting firm.Take this short quiz to see how much you know about the news.