Delete file in Temporary Internet Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I try to delete all files from my Temporary Internet Files with:

foreach (string s in System.IO.Directory.GetFiles(@"C:\Documents and
Settings\Administrator\Local Settings\Temporary Internet Files"))
{
System.IO.File.Delete(s);
}

However, I found that I can only get 1 file - C:\Documents and
Settings\Administrator\Local Settings\Temporary Internet Files\desktop.ini
returned.

I use dotnetframework 1.0 on windows 2000.

I tried to do the same thing on winxp with dotnetframework 1.1, and it works
fine.

Why is that?

Thanks.
 
Hi Michael,

I can't at the top of my head remember if there is a difference in storing temporary internet files between W2K and XP but in XP the files you are trying to delete are located in subdirectories of that directory, typically the Content.IE5 directory and subdirectories of that directory.
 
The location of "Temporary Internet Files" is the same for both XP and 2000.
And what I am trying to do is just to delete files inside folder "Temporary
Internet Files" of current user.

Thanks for your advice.
 
Back
Top