How to delete ALL temporary files

G

Guest

All those not currently open, that is.

The Windows registry defines an Temp files folder. Windows and many apps
place temp files in this folder.

However, on my system, there are 14 other folders with the name Temp or
Temporary. Many of these are in the Windows directory tree and in the
Documents and Settings tree. In addition, there are files with the
extensions .tmp and .temp here & there in the Windows tree.

Is there a utility that will clean up ALL temp files rather than just
allowing them to collect?

ANOTHER QUESTION:
Can I safely get rid of all the service pack and hot fix uninstall files.
I have backups, so I can always get them back if I ever need them.

Thanks for any help.
 
P

Pegasus [MVP]

All those not currently open, that is.

The Windows registry defines an Temp files folder. Windows and many apps
place temp files in this folder.

However, on my system, there are 14 other folders with the name Temp or
Temporary. Many of these are in the Windows directory tree and in the
Documents and Settings tree. In addition, there are files with the
extensions .tmp and .temp here & there in the Windows tree.

Is there a utility that will clean up ALL temp files rather than just
allowing them to collect?

ANOTHER QUESTION:
Can I safely get rid of all the service pack and hot fix uninstall files.
I have backups, so I can always get them back if I ever need them.

Thanks for any help.

You could use the Task Scheduler to run the following batch file at boot
time under an Administrator account:

@echo off
del /s /q /f c:\*.tmp

Is it safe? Well, by universal agreement everyone uses .tmp files for
temporary storage. I have never seen an exception to this convention.

About service packs and hot fixes: Yes, you can delete them safely, in
particular if you keep backups.
 
V

VanguardLH

Pegasus said:
NoSpam wrote ...


You could use the Task Scheduler to run the following batch file at
boot time under an Administrator account:

@echo off del /s /q /f c:\*.tmp

Is it safe? Well, by universal agreement everyone uses .tmp files for
temporary storage. I have never seen an exception to this convention.

Except I've seen install programs that rely on some files in the user
profile %temp% (and sometimes but rarely in the %windir%\temp)
folder for after a requried reboot to then continue the installation or
some cleanup after the installation. Rather than schedule the .bat to
run at Windows startup or on logon, schedule it for a time when you
won't be using the computer, like 3AM in the morning, provided it
doesn't overlap any other scheduled events on your host. If the host is
normally powered off at that time, enable the option in the event to
power up the host. If you don't want the host left powered up, add the
shutdown command to the .bat file. Or just put a shortcut to the .bat
file in a Taskbar toolbar and click on it whenever you feel the need to
purge.

There are also many programs that use the temp folders to store their
log files. Some store their 'lock' files there (used to regulate
process or file access control). In fact, you'll probably find several
files in your %temp% folder and perhaps some in the %windir%\temp folder
that you cannot delete because they still have an open file handle
(i.e., they are inuse).

That there are several "Temp[orary]" folders under the userprofile path
means they are likely under *different* user profile folders. That
means this user logging onto their Windows account will NOT be able to
clean up the temp folders under the other accounts due to privilege
restrictions - unless they are logging in under an admin-level account.
The OP didn't mention if they always use an admin-level account.
However, if these temp files are under accounts for other user's profile
then THEY should be doing their own cleanup and not having an admin yank
the files from under them and probably without the permission and
probably without giving any warning.

Probably safer would be to use the CCleaner utility (it's free).
Besides running it interactively, you could run it as a scheduled event
on logon. It has an '/auto' command-line parameter to run without
showing its GUI (i.e., silently run) along with a user configurable
option to leave temp files that were created within the last 24 hours.

http://www.piriform.com/ccleaner
 
B

- Bobb -

I use Ccleaner to do exactly that.
Its freeware- you can get it at
http://www.piriform.com/ccleaner/screenshots or www.cnet.com , filehippo,
etc

During install it was ask " put a shortcut on desktop, etc. etc"
I choose only to allow " Right click on Recycle bin"
When right click on recycle you can then choose to
open Clceaner or
Run Cleaner

The first time , choose Open
then choose what you would 'normally' like it to do. empty all temp files,
empty trash, etc
After that you can choose RUN cleaner and it will do ''' whatever you
chose" as defaults.
To change options go back to OPEN.
I normally do not have it purge my history, etc but do that periodically by
choosing OPEN and clicking the boxes.
One of the boxes has to do with " delete install files" 'hot fix
uninstalls', etc.

Plenty of help , screenshots at above links .
Great app. I use it on all my pcs.
 
A

antioch

All those not currently open, that is.

The Windows registry defines an Temp files folder. Windows and many apps
place temp files in this folder.

However, on my system, there are 14 other folders with the name Temp or
Temporary. Many of these are in the Windows directory tree and in the
Documents and Settings tree. In addition, there are files with the
extensions .tmp and .temp here & there in the Windows tree.

Is there a utility that will clean up ALL temp files rather than just
allowing them to collect?

ANOTHER QUESTION:
Can I safely get rid of all the service pack and hot fix uninstall files.
I have backups, so I can always get them back if I ever need them.

Thanks for any help.

I am running WIN XP SP3 -

As far as I am concerned there are only two 'temp folders' to keep an eye
on -

START/RUN type in the box TEMP or temp

OR

START/RUN type in the box %temp% or %TEMP%

Most of all the others have nothing in them.

The files present in the these Temp folders can safely be deleted. However,
if
you've installed any software during the current session, reboot once before
deleting the temporary files. It is good practice to always reboot after
installing any software.
XP will not let you delete a file that is in use. Those that cannot will not
when you try.

When you use the Disk Cleanup utility, you delete the files in %TEMP%
folder, some of the files may not be deleted by the utility. The Disk
Cleanup utility does not delete files which have been accessed in the last 7
days.
You can configure Disk Cleanup so that it deletes all the files in the
%TEMP% folder, irrespective of the last accessed date. To do so, requires
altering the registry, but I consider a bit over the top.

When you reboot, the files in TEMP/temp are reset with the date of that
boot.
You may find one or two from a previous date still there, but they should
delete manually.

My thanks to Ramesh Srinivasan, Microsoft MVP; Malke Microsoft MVP; Wes
Vogel
MS-MVP from whom the above was compiled.

Antioch
 
T

Twayne

In
All those not currently open, that is.

The Windows registry defines an Temp files folder. Windows
and many apps place temp files in this folder.

from the Command Prompt, you could run the following, or make a batch file
of it:

c:\
del *.tmp /s
del *.temp /s
del ~*.* /s
del *.bak /s
del *.wbk /s
and any other backup file extension you're aware of that you may have but
that will cover the OS, Office and most other programs.

If you're doing this because you need more space, it's a futile effort. It
will only last for a day or so and is overall probably a very tiny amount of
space compared to what you need.
Here a better fix would be to get a larger hard drive since they're so
cheap these days, AND stop forcing programs to close by using the Power
Button or pulling the plug to get programs to close. If a program cannot
close properly, it will always leave those things behind. Normally they
should be deleted automatically as the program closes down.

To get the most space back, Disk Cleanup in System Tools is all you should
need. Let it run and do all it can do; it'll take a few minutes most likely
to complete.
However, on my system, there are 14 other folders with the
name Temp or Temporary. Many of these are in the Windows
directory tree and in the Documents and Settings tree. In
addition, there are files with the extensions .tmp and
.temp here & there in the Windows tree.

Is there a utility that will clean up ALL temp files rather
than just allowing them to collect?

For what you listed, use System Tools' Disk Cleanup.

Be aware that you've given painfully poor information for your query so any
well targeted answers aren't really possible.

HTH,

Twayne`
 
C

C.Joseph Drayton

All those not currently open, that is.

The Windows registry defines an Temp files folder. Windows and many apps
place temp files in this folder.

However, on my system, there are 14 other folders with the name Temp or
Temporary. Many of these are in the Windows directory tree and in the
Documents and Settings tree. In addition, there are files with the
extensions .tmp and .temp here& there in the Windows tree.

Is there a utility that will clean up ALL temp files rather than just
allowing them to collect?

ANOTHER QUESTION:
Can I safely get rid of all the service pack and hot fix uninstall files.
I have backups, so I can always get them back if I ever need them.

Thanks for any help.

I have been using this app for years and it does a good job. I have set
to empty all my temp folders every time I boot the computer.

http://www.danish-shareware.dk/soft/emptemp/index.html

Sincerely,
C.Joseph Drayton, Ph.D. AS&T

CSD Computer Services

Web site: http://csdcs.site90.net/
E-mail: (e-mail address removed)90.net
 

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