General discussion
February 15, 2005 at 01:32 PM
keebmachine

Temp File deletion needed!!!

by keebmachine . Updated 21 years, 8 months ago

I need a script (.vbs,.bat,.wsh, etc.) that will enumerate all user profiles on a computer and then delete \local settings\temp and local settings\temporary internet files\

It will have to run as a startup script using local system privileges in order to access these directories.

The script file will begin by outputting the profiles to a text file for example:
dir “c:\documents and settings\”>directories.txt

The contents of this file will look something like this:
Volume in drive C has no label.
Volume Serial Number is E0000-0000

Directory of c:\documents and settings

02/15/2005 03:46 PM

.
02/15/2005 03:46 PM ..
06/19/2003 05:33 PM SMITHC
02/15/2005 03:46 PM TAYLORA
02/01/2005 07:32 AM WILLIAMSR
0 File(s) 0 bytes
3 Dir(s) 22,949,040,128 bytes free

The script file will read the contents of this file and discover that there the following folders for SMITHC, TAYLORA and WILLIAMSR exist and delete the ?local settings\temp? and ?local settings\temporary internet files? subdirectories of these directories

Any ideas?

This discussion is locked

All Comments