Solved

Deleting Temporary Internet floder on Terminal Server

Posted on 2013-05-25
14
2,199 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:Tony Turner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Tony Turner
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 55

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 55

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:Tony Turner
ID: 39201822
McKnife, could you please explain what your script does?

Thanks,
Tony
0
 
LVL 55

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
 

Author Comment

by:Tony Turner
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 55

Expert Comment

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

Author Comment

by:Tony Turner
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 55

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:
Tony Turner 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:Tony Turner
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Several part series to implement Internet Explorer 11 Enterprise Mode
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
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…
Suggested Courses

632 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