Solved

Deleting Temporary Internet floder on Terminal Server

Posted on 2013-05-25
14
2,019 Views
Last Modified: 2013-06-02
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
0
Comment
Question by:tonkyman
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 15

Assisted Solution

by:Jaroslav Mraz
Jaroslav Mraz earned 34 total points
ID: 39196653
Hi,

Yes you can simple delete folder it wil recreate :)

And you can instal ccleaner free and make logout policy ccleaner.exe /auto
0
 

Author Comment

by:tonkyman
ID: 39196733
Thanks, I'll work on this over the weekend and see how it goes on Tuesday.
0
 
LVL 50

Assisted Solution

by:jcimarron
jcimarron earned 33 total points
ID: 39196785
tonkyman---
Here is how to use Group Policy to do what you want using Internet Explorer.
http://community.spiceworks.com/how_to/show/34118-delete-temporary-internet-files-on-exit-via-group-policy
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39199926
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.
0
 
LVL 53

Assisted Solution

by:McKnife
McKnife earned 33 total points
ID: 39200511
dir c:\users /b >%temp%\users.txt
for /f %%a in (%temp%\users.txt) do forfiles /p "c:\users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"
for /f %%a in (%temp%\users.txt) do forfiles /p "c:\users\%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5" /d -14 /S /c "cmd /c del @file /s /q"

Open in new window


Using the "delete on close"-function, you will not shoot everything that this script does, for example you won't get what the plugins cache (documents!).
0
 

Author Comment

by:tonkyman
ID: 39201822
McKnife, could you please explain what your script does?

Thanks,
Tony
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202250
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
0
Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

Author Comment

by:tonkyman
ID: 39202378
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??
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202420
That paths are found in 2008 server and higher.
0
 

Author Comment

by:tonkyman
ID: 39202492
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
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39202508
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
0
 

Accepted Solution

by:
tonkyman earned 0 total points
ID: 39202548
Mc.. I did have forfiles.exe installed. I make it a point to install the resource kit on all my servers during initial install but I had never even seen forfiles... it's pretty slick.

I always try to take care of the people that help me out because they didn't have to, they chose to. In this case I'll divide the points as fairly as possible.

You guys are good.

Humbly,
Tony
0
 

Author Closing Comment

by:tonkyman
ID: 39214107
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
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 39214498
tonkyman--You are welcome.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now