Accessing Temporary Internet Files - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Accessing Temporary Internet Files

DORUMONSGDORUMONSG Posts: 1Member
Correct me if I am wrong, ALL web sites viewed have their htm/html/aspx/jsp pages downloaded into the Temporary Internet Files right? I am trying to access the Temporary Internet Files to collect and copy Information from these web sites. For example if I view a page on Wikipedia, I want to pull the HTML file out of my Temporary Internet Files and then extract the content of the Wikipedia out of it.

So I am doing an experiment to see if I can copy files out of my Temporary Internet Files

I am trying to access my Temporary Internet Files and then copy out some files that are accessed at the same time the web page has completed loading or later(This is to ensure that I only copy out the files that from the web site I am currently viewing) but it is not working.

On top of that even if I were to try manually open my Temporary Internet Files, I do not see any htm/html/aspx/jsp, all I see are images and scripts. I am unsure if I am even in the correct direction to start with. Please direct me.

[CODE]

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
currentDateTime = DateTime.Now;
}

private void toolStripButton1_Click(object sender, EventArgs e)
{

String temporaryInternetFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);
DirectoryInfo directoryInfo = new DirectoryInfo(temporaryInternetFilesPath);
int x = 0;
foreach (FileInfo fileInfo in directoryInfo.GetFiles())
{
if (fileInfo.LastAccessTime >= currentDateTime)
{
fileInfo.CopyTo(@"C:UsersXXXXXDocumentsVisual Studio 2010ProjectsWindowsFormsApplication1WindowsFormsApplication1inDebugTestfileCopy" + x + ".txt");
x = x + 1;
}
}
}[/CODE]
Sign In or Register to comment.