C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2722
Number of posts: 5749

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Accessing Temporary Internet Files Posted by DORUMONSG on 23 Aug 2011 at 11:38 PM
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.


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:\Users\XXXXX\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Test\fileCopy" + x + ".txt");
                    x = x + 1;
                }
            }
        }




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.