Link to home
Start Free TrialLog in
Avatar of Tony Turner
Tony TurnerFlag for United States of America

asked on

Deleting Temporary Internet floder on Terminal Server

I administer 19 Terminal servers and I've ask users to empty their temporary internet files many times.... but they won't. I want to set a group policy that will empty them every time they exit IE or Firefox. Can someone point me in the right direction?

Also, Some of the temp folders are HUGE (2 Gig) can I just delete the temporary folder from the server for each of these users? Will it be recreated when they restart IE.

Thanks,
Tony
SOLUTION
Avatar of Jaroslav Mraz
Jaroslav Mraz
Flag of Slovakia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tony Turner

ASKER

Thanks, I'll work on this over the weekend and see how it goes on Tuesday.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you decided to delete them on exit - well, what's the cache good for, anymore?
Better: take a scheduled task that deletes files that are older than a certain amount of days. This can be done easily using delage32.exe or forfiles.exe, the latter being built-in.
Also: there's more to it than just the TIF folder, I could provide a script tomorrow.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
McKnife, could you please explain what your script does?

Thanks,
Tony
Line 1: lists all users using the directory structure c:\users\ and writes them to %temp%\users.txt
2:  for each user it deletes anything older than 14 days below c:\users\UsernameTakenFromStep1\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5
3 same for ...\Temporary Internet Files\Content.IE5
McKnife, that is a very slick way of doing it. I've been playing with the individual lines of the scrip since early this morning and I believe this may be the best way to keep the temp internet files in check.

I think I will drop those lines in a batch file and schedule it to run everyday late in the evening. That way I won't have all the extra overhead right at 5 pm when everyone is logging off.

I did have to edit the path to reflect "c:\documents and settings\%%a\Local settings\Temporary Internet Files\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"

On my 2003 Server I don't have a \Temporary Internet Files\Low\Content.IE5 folder??
That paths are found in 2008 server and higher.
I should have specified which version of Windows Server I was using.... DUH!!

Anyway! All three of you guys have given me great information and I don't know how to fairly divide the points since I feel all of you have done a great job. How would you guys like me to divide them??

Thank you all so much for the help.

Tony
It's up to you. I don't think one should judge the quality of his own solution.
By the way: do you already have forfiles.exe, was it builtin 2003 already? If not, download it from the resource kit or download and use delage32.exe
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All three answers contained useful information and each helped me to formulate a plan for my servers.

The initial answer from JEREMYNO was the immediate help I needed to free up disk space. I was not comfortable using a third party software (ccleaner) and even more so since Server 2003 was not listed as a supported OS.

Ultimately the answers provided by jcimarron and McKnife are the long term solutions to the original "cause" for the question. I will be using the solutions provided both experts in my enterprise environment.

Thanks for the help,
Tony
tonkyman--You are welcome.