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?
Re: How can I open a file saved in Temporary Internet Files?
This seems to work:
vb Code:
Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
Dim fInfo, fInfos() As IO.FileInfo
Dim dInfo As IO.DirectoryInfo
dInfo = New IO.DirectoryInfo(path)
fInfos = dInfo.GetFiles("*.*", IO.SearchOption.AllDirectories)
For Each fInfo In fInfos
'Do you thing
Next
Note the search option of AllDirectories. Without it all I got was the Desktop.ini file.
Hope this helps you.
Re: How can I open a file saved in Temporary Internet Files?
Thanks a TON I *REALLY* appreciate it. This works great!