Kfir,
You should use the functions in the WinInet library to do this. You can
call the FindFirstUrlCacheEntry and FindNextUrlCacheEntry functions to
enumerate through the cache, and then call the DeleteUrlCacheEntry or
DeleteUrlCacheGroup functions to delete the entries in the cache.
If you need help with the definitions for the functions, then you can
probably get them from
http://www.pinvoke.net.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Kfir Marouani" <fe*******@hotmail.comwrote in message
news:O2**************@TK2MSFTNGP06.phx.gbl...
Hi,
I'm trying to delete files from the browser's cache by doing this:
DirectoryInfo di = new
DirectoryInfo(Environment.GetFolderPath(Environmen t.SpecialFolder.InternetCache));
foreach (FileInfo fi in di.GetFiles())
{
fi.Delete();
}
The strange thing is that it only delete 2 files! It's doesn't "see" the
rest of the files.
Any idea?
Thanks in advance.