Can't list files in Temporary Internet Files

  • Thread starter Thread starter cs
  • Start date Start date
C

cs

foreach (string file in Directory.GetFiles(
System.Environment.GetFolderPath
(System.Environment.SpecialFolder.InternetCache)) )
{
Console.WriteLine(file.ToString());
}


I can only get the code above to list desktop.ini and no
other files. What's going on with this folder?
 
Temporary Internet Files is a special folder
that has it's own view of files. It's not
intended to be manipulated directly as files.

There are lots of subfolders each with an
index.dat that links to encoded files that
contain things like cookies, history items,
and the cached files themselves. You should
use the various Win32 APIs for manipulating
the cache of IE (managing cookies, history,
cached elements, etc).

-c
 
Back
Top