Results 1 to 3 of 3

Thread: How can I open a file saved in Temporary Internet Files?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    79

    How can I open a file saved in Temporary Internet Files?

    I have an application that is very difficult to interface with (I'm trying to make another application that monitors it), but it saves its data in the IE Temporary Internet Files folder ("C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files").

    When I browse to this folder in windows explorer I can see a file list and if i right click on a file and hit "copy" and "paste" it outside the folder, I can actually view the file -- which is great for my application because I need to view the files that this other application produces. However, when I try to browse the folder from my own application written in VB.NET (or from command prompt for that matter), I can't see any files at all, and definitely cant open anything.

    Anyone know how I can get my app to work/function/interface with Temp Inet Files?

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840

    Re: How can I open a file saved in Temporary Internet Files?

    This seems to work:
    vb Code:
    1. Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
    2.         Dim fInfo, fInfos() As IO.FileInfo
    3.         Dim dInfo As IO.DirectoryInfo
    4.  
    5.         dInfo = New IO.DirectoryInfo(path)
    6.         fInfos = dInfo.GetFiles("*.*", IO.SearchOption.AllDirectories)
    7.  
    8.         For Each fInfo In fInfos
    9.             'Do you thing
    10.         Next

    Note the search option of AllDirectories. Without it all I got was the Desktop.ini file.

    Hope this helps you.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    79

    Re: How can I open a file saved in Temporary Internet Files?

    Thanks a TON I *REALLY* appreciate it. This works great!
    Last edited by JohnVM; Jul 21st, 2007 at 05:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width