Deleting Temp Internet files, new approach ? 
Author Message
 Deleting Temp Internet files, new approach ?

Al,

I don't think there *is* a more elegant way.  In fact, I think the solution used
by inetcpl.cpl (the Internet Options applet) is just the brute force method
applied to deleting everything but cookies from the current user's listed
Temporary Internet Files location.


Quote:
> I want to delete Temporary Internet flies like a lot of
> people, but have not found a good soloution to do it
> automatically (on Windows 2000). All methodes seam to
> focus on brute force. What about a script that basically
> does what we would do when we manually delete them from
> contol panel\Internet Properties ?



Tue, 19 Oct 2004 01:16:30 GMT  
 Deleting Temp Internet files, new approach ?
I am so new at this that I love, and have to rely on Brute Force. I am sure
there is a more elegent way to script this, but it works for me and does not
seem to do harm. But then again..........

This manhandles the cookies too.

Jerry

'***************************************************************************
****************
'***************************************************************************
****************
'Step 5: Delete the Temporary Internet files and folders in the C:\Documents
and Settings\"USERNAME"\Local Settings\Temporary Internet Files folder.
  'Deletes and removes temporary Internet files and folders.
  'Any files in use by the system will not be deleted.

  'Checks to see if folder is there.
On Error Resume Next

If filesys.FolderExists("C:\Documents and Settings\" & WshNetwork.username &
"\Local Settings\Temporary Internet Files\") Then

  'Forces deletion of files and subfolders not in use.

filesys.DeleteFile ("C:\Documents and Settings\" & WshNetwork.username &
"\Local Settings\Temporary Internet Files\*.*"), True
filesys.DeleteFolder ("C:\Documents and Settings\" & WshNetwork.username &
"\Local Settings\Temporary Internet Files\*.*"), True

filesys.DeleteFile ("C:\Documents and Settings\" & WshNetwork.username &
"\Local Settings\Temporary Internet Files\Content.IE5\*.*"), True
filesys.DeleteFolder ("C:\Documents and Settings\" & WshNetwork.username &
"\Local Settings\Temporary Internet Files\Content.IE5\*.*"), True

On Error GoTo 0

End If

'***************************************************************************
****************
'***************************************************************************
****************
 'Step 7: Deletes the Cookies if you want to.
             'Input from previous Message Box determines deletion

If Cookies = vbYes Then

On Error Resume Next
'ilesys.DeleteFile ("C:\Documents and Settings\" & WshNetwork.username &
"\Cookies\*.*"), True

filesys.DeleteFile ("C:\Documents and Settings\Default User\Cookies\*.*"),
True
On Error GoTo 0
Else
End If



Quote:
> Al,

> I don't think there *is* a more elegant way.  In fact, I think the
solution used
> by inetcpl.cpl (the Internet Options applet) is just the brute force
method
> applied to deleting everything but cookies from the current user's listed
> Temporary Internet Files location.



> > I want to delete Temporary Internet flies like a lot of
> > people, but have not found a good soloution to do it
> > automatically (on Windows 2000). All methodes seam to
> > focus on brute force. What about a script that basically
> > does what we would do when we manually delete them from
> > contol panel\Internet Properties ?



Thu, 21 Oct 2004 22:57:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Deleting Temp internet files

2. Delete all temp internet files for all users

3. Delete temp.internet files ecc..(newbie)

4. How can I delete cookies and temp internet files w/VBS

5. Deleting Temp Internet Files via script

6. Deleting Temp Internet Files via script

7. deleting temp internet files through script

8. Temp Internet files check box

9. Temp Files Not Deleting after closing Word 2002

10. Deleting a temp file

11. How to delete files in Windows\Temp?

12. Auto-Delete Temp file

 

 
Powered by phpBB® Forum Software