temp files

G

Guest

How can I get Disk Cleanup to delete temporary files from
C:\Documents and Settings\<user>\Local Settings\Temp\ in
addition to deleting files from C:\Windows\Temp?
 
S

Sharon F

How can I get Disk Cleanup to delete temporary files from
C:\Documents and Settings\<user>\Local Settings\Temp\ in
addition to deleting files from C:\Windows\Temp?

By default, Disk Cleanup will address that folder. Check your Path
statement in System Properties> Advanced> Environment Variables. If not
present, create a variable named TEMP and another called TMP. The value for
both of these should be:
%USERPROFILE%\Local Settings\Temp

NOTE: Disk Cleanup only addresses temp files and folders that are more than
14 days old.
 
G

Guest

-----Original Message-----


By default, Disk Cleanup will address that folder. Check your Path
statement in System Properties> Advanced> Environment Variables. If not
present, create a variable named TEMP and another called TMP. The value for
both of these should be:
%USERPROFILE%\Local Settings\Temp

NOTE: Disk Cleanup only addresses temp files and folders that are more than
14 days old.

Thanks. However -- in Environment Variables, I have TEMP
and TMP defined both under "User variables for <active
user>" and under "System variables." Under "User
variables," TEMP and TMP are defined as you described
above. Under "System variables," TEMP and TMP are
defined as %SYSTEMROOT%\TEMP. Only files in the latter
directory are seen and deleted by Disk Cleanup -- and
there are many files in there that are older than 14 days
(assuming that this is measured from the file "create"
or "modified" date rather than "last accessed."

Is there anything I can check in settings for Disk
Cleanup, or should I just manually delete everything in %
USERPROFILE%\Temp (for all user profiles)?
 
W

Wesley Vogel

Start | Run | Type: cmd | OK
Type: set | ENTER
Look at your TMP & TEMP path(s) there.
I believe they are 'hidden'.

Start | Run | Type: %TEMP% | OK
 
G

Guest

-----Original Message-----
Start | Run | Type: cmd | OK
Type: set | ENTER
Look at your TMP & TEMP path(s) there.
I believe they are 'hidden'.

This command gives the answer you would expect:
TEMP=C:\DOCUME~1\<username>\LOCALS~1\Temp
TMP=C:\DOCUME~1\ said:
Start | Run | Type: %TEMP% | OK

And this command opens a Windows Explorer session with
the contents of

The environment variables are set correctly, it's just
that Disk Cleanup seems to be using the "System"
environment (where TEMP=%SYSTEMROOT%\Temp) instead of
the "Local Settings" environment (where TEMP=%USERPROFILE%
\Local Settings\Temp)

In the bigger scheme of things, this isn't very
important, but it seems like a bug to me. Or should I
change the settings for TEMP and TMP in the "System"
environment to be the same as in the "User" environment?

Do you guys have TEMP and TMP defined separately in these
two different environment areas?
 
G

Guest

If I had to guess, I'd guess that normally TEMP and TMP are
_not_ system environment variables, and that anything set
as a system environment variable overrides the Local
setting of a variable with the same name. See
http://support.microsoft.com/default.aspx?scid=kb;en-us;310519&Product=winxp
which says:

"System environment variables are defined by Windows and
apply to all computer users."

So, if you delete TEMP and TMP from the system environment,
and leave the local settings as is, Disk Cleanup should
probably work.
 
W

Wesley Vogel

Start | Run | Paste: C:\DOCUME~1\<username>\LOCALS~1\Temp | OK
Click Folders on the Toolbar to see the tree in the left-hand pane.
Look around. Lots of stuff.

"Do you guys have TEMP and TMP defined separately in these
two different environment areas?"

If I understand your question, I used to.
You mean with the set command?
One was the long name and the other the short name.
Now they are both the same short name.

I also clean 'em out myself. I don't care how long they've been there.
Unless I've just installed something. :blush:)
=====================
Right click My Computer | Properties | Advanced tab |
Environment Variables button

User variables for Me.
TEMP = %USERPROFILE%\Local Settings\Temp
TMP = %USERPROFILE%\Local Settings\Temp

System variables
TEMP = %SystemRoot%\TEMP
TMP = %SystemRoot%\TEMP
 
G

Guest

Thanks Wes, for continuing with this.

Nothing I've tried gets Disk Cleanup to clean out the local
temp files. I'm just going to clean them out myself and
not worry about it anymore.
 
W

Wesley Vogel

That's the spirit! :blush:)
If you want something done right.............

Keep having fun!
 

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