Temp dictory can be emptied, yes?

R

Rick Charnes

Running Vista Home Premium, it's ok to delete the contents of my
C:\Users\owner\AppData\Local\Temp\ directory other than those from the
current session, yes? I see a huge number of files and folders in it.
Thanks.
 
R

R. McCarty

Yes, best done immediately after a boot up. Select All, Delete.
Some folder/files will not be removable, due to File locks - Just
select the "Skip" option for those. For some users, I recommend
creating a shortcut to that folder and then periodically removing
the workspace content that has built up.
 
K

Ken Blake, MVP

Running Vista Home Premium, it's ok to delete the contents of my
C:\Users\owner\AppData\Local\Temp\ directory other than those from the
current session, yes? I see a huge number of files and folders in it.


Yes, they can, and should be, deleted periodically.

The temp folder provides workspace for programs. Programs can create
temporary files there for their own temporary use. Each program should
delete all its temporary files when it closes, but for various reasons
it doesn't always happen (for example, if the program crashes, it
never gets to do this). That's why it's a good idea to periodically
clean out anything left there.

Also note that there are some program installations which work in two
steps. The first step concludes by writing temporary files and
rebooting. The second step starts automatically after rebooting and
needs to find those files there (and then deletes them when it's
done).

Other than doing it automatically when rebooting (that would interfere
with installations like the kind I described), it's always safe to
delete the contents of the temp folder. Because it's safe to delete
any temp files that aren't open and in use by an application, and
since Windows won't let you delete open files, it's safe to (try to)
delete them at any time. If any fail to delete because they're open,
they'll either be deleted automatically when the app using them
closes, or you'll get them the next time you delete manually.
 
B

Bill Yanaire

Is there a way to have the temp directory cleaned each time you start the
computer?
I have changed the location of my TEMP directory to C:\TEMP. In the
environment settings I pointed both TMP and TEMP to C:|TEMP so it is easier
for me to get there, but if there was a startup macro or something that
could run, I could just fuggetaboutit!
 
R

Ronnie Vernon MVP

Rick

Yes, these files can be deleted. Best way is to use the Disk Cleanup wizard.
 
M

Max

Get a copy of deltree.exe from your older DOS or Windows installation and
copy to /Windows or /Windows/System32.
Make a batch file in notepad:
Deltree /y c:\temp\*.*
Be careful--deltree, using the 'y' switch, will delete everything after it
specified in the path with no confirmation--including entire folders.
Save it with a .bat extension to the same folder as deltree.exe.
Put a shortcut to it in Startup (you may have to adjust the properties of
the shortcut to Run as Admin, etc).
If you like, you can also use Task Scheduler to run it at specific times.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top