title: Deleting Internet Explorer cache programmatically
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8256804/clear-temporary-internet-files-via-c">Clear temporary internet files via &ldquo;C#&rdquo;</a><br>
    <a href="https://stackoverflow.com/questions/8306839/how-to-clear-browser-cache-programmatically">How to clear browser cache programmatically?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to delete a file from <code>Environment.SpecialFolder.InternetCache</code> by iterating all directories of this folders and deleting all files in these directories. The problem is that it doesn't delete <strong>.tmp</strong> and <strong>index.dat</strong> files as they are locked by Windows itself. </p>
  
  <p>My question is that: Is there any work around for deleting <strong>.dat</strong> and <strong>.tmp</strong> files <strong>OR</strong> Can I read Index.dat file and delete the entry of specific file which I want to delete from IE Cache?</p>
  
  <p><strong>Note:</strong> I want to this from C# desktop application not through ASP.NET</p>