Delete Temporary Internet Files using c#
-
Hi I try to delete my Temporary Internet Files using C# Code. I thought.. no problem, but the only file that was found is the desktop.ini... No other files in that Directory..
private void button1_Click(object sender, EventArgs e) { string dir= Environment.GetFolderPath(Environment.SpecialFolder.InternetCache); foreach (string fileName in Directory.GetFiles(dir)) { File.Delete(fileName); } }
-
Hi I try to delete my Temporary Internet Files using C# Code. I thought.. no problem, but the only file that was found is the desktop.ini... No other files in that Directory..
private void button1_Click(object sender, EventArgs e) { string dir= Environment.GetFolderPath(Environment.SpecialFolder.InternetCache); foreach (string fileName in Directory.GetFiles(dir)) { File.Delete(fileName); } }
-
Under what user account are you running the code? Each user account have their own cache folder for Internet Explorer. --- b { font-weight: normal; }
Hi It's an account where the User is in the administrator group.
-
Hi It's an account where the User is in the administrator group.
-
Hi I try to delete my Temporary Internet Files using C# Code. I thought.. no problem, but the only file that was found is the desktop.ini... No other files in that Directory..
private void button1_Click(object sender, EventArgs e) { string dir= Environment.GetFolderPath(Environment.SpecialFolder.InternetCache); foreach (string fileName in Directory.GetFiles(dir)) { File.Delete(fileName); } }
I found few articles that solves your problem : http://www.codeproject.com/csharp/ponta.asp[^] Another one can be found here http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c1245/[^] but you must port this solution to C# DevIntelligence.com - My blog for .Net Developers
-
Hi It's an account where the User is in the administrator group.