#Include <File.au3>
#Include <Array.au3>
$Debug=1
Func EmptyFolder($FolderToDelete)
$AllFiles=_FileListToArray($FolderToDelete,"*",0)
If $Debug Then ConsoleWrite("-->" & $FolderToDelete & @CRLF )
If IsArray($AllFiles) Then
If $Debug Then
_ArrayDisplay( $AllFiles,$FolderToDelete)
EndIf
For $i = 1 To $AllFiles[0]
$crt = FileGetTime( $FolderToDelete & "\" & $AllFiles[$i], 1 )
If $crt[2] = @MDAY And $crt[0] = @YEAR And $crt[1] = @MON Then
If $Debug Then
ConsoleWrite( $FolderToDelete & "\" & $AllFiles[$i] & " --> Today's File, Skipping!" & @CRLF )
EndIf
ContinueLoop
EndIF
$delete = FileDelete($FolderToDelete & "\" & $AllFiles[$i])
If $Debug Then
ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i]& " =>"&$delete & @CRLF )
EndIf
DirRemove($FolderToDelete & "\" & $AllFiles[$i], 1)
Next
EndIf
EndFunc
EmptyFolder (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files\Content.IE5")
EmptyFolder (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files")
EmptyFolder (@HomeDrive & @HomePath & "\Cookies")
EmptyFolder (@HomeDrive & @HomePath & "\Local Settings\History")
EmptyFolder (@HomeDrive & "\Temp\Temporary Internet Files")
EmptyFolder (@WindowsDir & "\Temp")
EmptyFolder (@HomeDrive & "\Temp")
EmptyFolder (@HomeDrive & @HomePath & "\Recent")
EmptyFolder (@HomeDrive & @HomePath & "\Application Data\Microsoft\Office\Recent")
EmptyFolder (@HomeDrive & @HomePath & "\Local Settings\Temp")
ShellExecuteWait("RunDll32.exe"," InetCpl.cpl,ClearMyTracksByProcess 255")
That Should do it. I think