Keep in touch

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

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..!!

1 comment:

Karthik .net said...

hi,
i am using these code to delte the temporay files, its working fine in my local system, but when i am using these code in my website, its not working.
This is my concept, i am using a flash which will display the Client Address(from XML file), if i update the data's in xml file using c#.net coding the updated address is not showing in the flash instead of the new addresss it will show the old data(xml is stored in temp folder), but its is working in Firefox not in IE6.pls provide any solution for this issues