Keep in touch

you can keep in touch with my all blogs and sites by install this Toolbar...
http://rworldtoolbar.ourtoolbar.com/

Showing posts with label Delete All Temporary Internet Files Of IE. Show all posts
Showing posts with label Delete All Temporary Internet Files Of IE. Show all posts

Saturday, October 18, 2008

Delete All Temporary Internet Files Of Internet Explorer

  1. using System.IO;
  2. public static void Main()
  3. {
  4. ClearFolder(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache))); // Execute ClearFolder() on the IE's cache folder
  5. }
  6. void ClearFolder(DirectoryInfo diPath)
  7. {
  8. foreach (FileInfo fiCurrFile in diPath.GetFiles())
  9. {
  10. fiCurrFile.Delete();
  11. }
  12. foreach (DirectoryInfo diSubFolder in diPath.GetDirectories())
  13. {
  14. ClearFolder(diSubFolder); // Call recursively for all subfolders
  15. }
  16. }
Happy Coding..!!