|
-
Jan 1st, 2006, 12:57 AM
#1
Thread Starter
Hyperactive Member
Watch internetcache [SOLVED]
VB Code:
Private Sub Wtch()
Dim watcher As New FileSystemWatcher
watcher.Path = System.Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
AddHandler watcher.Created, AddressOf File_Created
End Sub
Private Sub File_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs)
fileName = e.FullPath
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.
-
Jan 1st, 2006, 07:45 AM
#2
Member
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.)
-
Jan 3rd, 2006, 03:52 PM
#3
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|