Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing all users' temp files at the same time. 3

Status
Not open for further replies.

kjfrey55

Technical User
Jul 16, 2005
12
US
Is there a way to run the equivalent of Disk Cleanup to clear out all temp, temp internet files, dump recycle bins for all users at once without having to log on as each user? I have 4 users on my computer and now have to run it 4 times. Would be happy to use a 3rd party software if you know of one.
 
If you are an admin on the PC, you should be able to access all of the temp internet directories and recycler directories for all the users, and delete the files. You could create a batch file to do this for you, something like:

del \documents and settings\user1\local settings\temporary internet files\content.ie5\<dir name>\*.*

del \recycler\<dir name>\*.*
 
Thanks linney and itfellow. What about the \documents and settings\user1\local settings\temp folder? Can I just erase everything in there as well?
 
Just a suggestion but... why not re-direct the TEMP and TMP environment variables for ALL users (and System) to, for example, a C:\Temp folder?

You could re-direct TEMP and TMP files for 'Default User' as well so any new accounts would also store temporary files in C:\Temp.

You could also re-direct Temporary Internet Files to the same C:\Temp folder for each user.

You could then use a Shutdown script to delete the contents of the folder automatically. We've used this method in work for years and it's worked perfectly.

 
What about the \documents and settings\user1\local settings\temp folder? Can I just erase everything in there as well?"

Have a read of "Rick998's" suggestion, but to answer your specific question. Yes you may delete any files you like in the user's temp folder. There may be one or two files that are "in use" that will be undeletable until the next reboot.

I also run simple batch files to delete files in the temp folders at every startup and have never had any problems.

In IE/ Tools/ Internet Options/ Advanced/ Security/, there is the option to clear Temporary Internet Files every time you close IE.
 
Thanks all - good suggestions one and all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top