temporary files

M

mike7411

I noticed there are a lot of leftover temporary files in the directory:

C:\Documents and Settings\myusername\Local Settings\Temp\

I was wondering if there is an automatic way to force Windows to clean
these up.

Thanks.
 
M

mikeyhsd

you can try Disk Cleanup, but it always leaves a few strays sleeping around.



(e-mail address removed)



I noticed there are a lot of leftover temporary files in the directory:

C:\Documents and Settings\myusername\Local Settings\Temp\

I was wondering if there is an automatic way to force Windows to clean
these up.

Thanks.
 
K

Ken Blake, MVP

mikeyhsd said:
you can try Disk Cleanup, but it always leaves a few strays sleeping
around.


The Temp folder 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.

Yes, Disk Cleanup is a good way to do this. The reason Disk Cleanup (or any
other method of deletion) "always leaves a few strays sleeping around" is
that Windows won't let you delete open files.
 
L

Lester Stiefel

The Temp folder 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.

Yes, Disk Cleanup is a good way to do this. The reason Disk Cleanup (or any
other method of deletion) "always leaves a few strays sleeping around" is
that Windows won't let you delete open files.
The practice i use here is, if \temp\ has files/folders
present, you can remove the empty ones safely. If they have
some substance (in kb) I don't remove them as they can be
used by the associated program or installer. Sometimes the
programs will appear to work fine, but if you ever need to
remove an associated application- and it doesn't find it's
temp file/folder, you'll receive a "installer cannot find
script file" error.
 
K

Ken Blake, MVP

Lester said:
The practice i use here is, if \temp\ has files/folders
present, you can remove the empty ones safely. If they have
some substance (in kb) I don't remove them as they can be
used by the associated program or installer. Sometimes the
programs will appear to work fine, but if you ever need to
remove an associated application- and it doesn't find it's
temp file/folder, you'll receive a "installer cannot find
script file" error.


Well-mannered programs don't purposely keep any temp files. The only time
you should be wary of deletinmg a temp file is if you are in the middle of
an installation. Some installations work in two parts. The first part
concludes by saving files in the temp folder, then 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.
 

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