Forum Home
Press F1
 
Thread ID: 35407 2003-07-11 13:25:00 XP Pro - Emptying user temp folders tombarnfield (2475) Press F1
Post ID Timestamp Content User
158926 2003-07-13 02:48:00 I downloaded and tried that program, CM Diskcleaner, mentioned yesterday and it appears to be quite good . First of all I ran Win XP's own disk cleanup and deleted "all" of the temp files then I ran the other one .

Surprise surprise, CM Diskcleaner displayed a whopping 21MB of temp files that had not been picked up and I had the option of deleting the index . dat files . What I also quite liked was that it found ALL of the My Recent Documents file shortcuts, of which there are dozens more than what you see on the Start Menu .

I cannot advise whether it will find the temp files in other user's temp folders though, because this system does not have any at the moment to test on . There is only one way you will find out I guess . :-)
Susan B (19)
158927 2003-07-13 03:26:00 I have run CM DiskCleaner - it does remove some of the files from each users \temp folder, but still leaves up to 20MB of old, unused files in each users \temp folder. (ie for 50 users, there could be 1GB of unneeded files still left in the folder) It's a start, but it would be nice to take everything out of the folder, or stop the folder from being used. tombarnfield (2475)
158928 2003-07-13 11:03:00 Write a batch file to run at logon or logoff Merlin (503)
158929 2003-07-14 00:21:00 If your PC/Server has enough RAM you can create a RAMDrive and point everyone temp variables to this one. No management and every time the PC is rebooted it is deleted automatically.

Under "My Computer" Properties->Advanced->Environment Variables Select TEMP=m:\ and TMP=m:\ assuming you have called your ramdrive m:
KiwiTT (4082)
158930 2003-07-16 07:48:00 Setting the variables in this location only changes them for the current user, other users will still have their temp files stored in \Documents & Settings tombarnfield (2475)
158931 2003-07-16 07:50:00 I understand the principle of writing and using a batch file to run at either login or logoff, but how do I include a variable in my batch file that will enable it to delete the files from the current user's temp folder? tombarnfield (2475)
158932 2003-07-16 13:36:00 Hi Guys

The batch file would not need any extra variables .

You would use the % when defining the directory
to delete the files from .

Perhaps like:

del "C:\Documents and Settings\%User%\Local Settings\Temp\* . *"

Try that - ALTHOUGH the %User% part may NOT be correct .
%LocalUser%?? I don't know the exact expression here .


Rev Species 116
revspecies116 (3916)
158933 2003-07-16 22:31:00 OK, the batch file idea seems a good one, and I can make it run at startup either by putting it in the registry "run" section or in the startup menu, but what would I do if I wanted it to run when each user logs off? tombarnfield (2475)
158934 2003-07-16 22:57:00 Make a directory called TEMP on your largest drive

Try making a batch file TEMP.BAT for all users to run at logon

@echo off
SET TEMP=C:\TEMP
SET TMP=C:\TEMP
exit

Next create a batch file DELTEMP.BAT to run each night. Use Windows scheduler

@echo off
del c:\temp\*.* /s /q
exit

This should work.
KiwiTT (4082)
158935 2003-07-17 01:04:00 This is getting ludicrous

Before the suggestions get out of hand, describe the user profile setup.
Indications are either multiple users on one computer or a network. If so what is the network? A domain or a peer to peer workgroup
Merlin (503)
1 2 3