Results 1 to 3 of 3

Thread: Watch internetcache [SOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Watch internetcache [SOLVED]

    VB Code:
    1. Private Sub Wtch()
    2.         Dim watcher As New FileSystemWatcher
    3.         watcher.Path = System.Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
    4.                
    5.         AddHandler watcher.Created, AddressOf File_Created
    6.  
    7.     End Sub
    8.  
    9.     Private Sub File_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs)
    10.                fileName = e.FullPath
    11.     End Sub

    This code works fine for any map on C:, for instance C:\Temp
    but doesn't seem to respond in the internetcache.
    Does anybody know how to watch a download file.
    I have to catch a textfile being downloaded,
    with a specific name like "bla.txt"
    Last edited by HWijngaarD; Jan 3rd, 2006 at 03:52 PM.

  2. #2
    Member
    Join Date
    Nov 2005
    Posts
    36

    Re: Watch internetcache

    watcher.IncludeSubdirectories = True
    '"C:\Documents and Settings\LOGONNAME\Local Settings\Temporary Internet Files\Content.IE5" is where the cache is (I know, looking from inside IE it seems everything is dumped in TempInternetFiles)

    watcher.EnableRaisingEvents = True
    'This seems to me to be needed?

    (And your Private Sub File_Created is on its own thread.)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Watch internetcache

    This works perfectly!
    Thanks man, That's what I needed.

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