Possible Duplicate:
Clear temporary internet files via “C#”
How to clear browser cache programmatically?
I am trying to delete a file from Environment.SpecialFolder.InternetCache
by iterating all directories of this folders and deleting all files in these directories. The problem is that it doesn't delete .tmp and index.dat files as they are locked by Windows itself.
My question is that: Is there any work around for deleting .dat and .tmp files OR Can I read Index.dat file and delete the entry of specific file which I want to delete from IE Cache?
Note: I want to this from C# desktop application not through ASP.NET