Delete All Temporary Internet Files Of IE
Delete all the temporary files from Internet Explorer's cache folder using basic methods available in the System.IO namespace.
|
On Friday, October 17th 2008 at 09:31 PM By Andrew Pociu (View Profile)
    (Rated 2.8 with 6 votes) |
Contextual Ads
More C# Resources
Advertisement
using System.IO;
public static void Main()
{
ClearFolder (new DirectoryInfo (Environment. GetFolderPath(Environment. SpecialFolder. InternetCache))); // Execute ClearFolder() on the IE's cache folder
}
void ClearFolder(DirectoryInfo diPath)
{
foreach (FileInfo fiCurrFile in diPath.GetFiles())
{
fiCurrFile.Delete();
}
foreach (DirectoryInfo diSubFolder in diPath.GetDirectories())
{
ClearFolder(diSubFolder); // Call recursively for all subfolders
}
}
|
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|
Rate this code snippet
Current Comments
|
Related Source Code
There is no related code.
Related Tutorials
There are no related tutorials.
C# Job Search
|