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

How to make the most of a negotiation

Negotiators are made, not born. In this sponsored report, we cover strategies and tactics to help you head into 2017 ready to take on business deals, salary discussions and more.

VIDEO

Will the Affordable Care Act be repealed?

The results of the 2016 presidential election are likely to have a big impact on federal tax policy in the coming years. Eddie Adkins, CPA, a partner in the Washington National Tax Office at Grant Thornton, discusses what parts of the ACA might survive the repeal of most of the law.

QUIZ

News quiz: Scam email plagues tax professionals—again

Even as the IRS reported on success in reducing tax return identity theft in the 2016 season, the Service also warned tax professionals about yet another email phishing scam. See how much you know about recent news with this short quiz.