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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!! Script to delete Internet Temp files on multiple user Profiles

Status
Not open for further replies.

Antoniof

IS-IT--Management
Oct 3, 2002
37
0
0
US
Hi guys and Girls,

I was wondering if someone can help me with a Script.
Well here it goes. I am in charge of a citrix farm and have about 100 users connecting to 6 citrix servers, now I need to delete the temp files, Internet temp files and cookies in each one of their profiles.
I was wondering if there is a script that I can run that will go to each profile and delete the contents of those folders.
Please help I am a Script novice and still am not fully able to get this going.
F1 F1 F1 F1 F1

Thanks for your help.
 
start with the FSO object and get a reference to the folder whcih holders your user profiles

something like
Set objFolder = FSO.GetFolder("d:\profiles")
or perhaps
Set objFolder = FSO.GetFolder(WshShell.ExpandEnvironmentStrings("%Profiles%")
Once you have this folder you can loop through all the sub folders with

For Each aFolder In objFolder.SubFolders
'now the folder should be that of the user
Msgbox aFolder.Name


Next
 
Take a look at the WshShell.SpecialFolders property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top