Dear EE ExpertS,
I get one website for download my data files and when I input edit my product No and press enter key ,the IE7
window will display data I want according to my input product No. , and so I try to do testing , I try to
disconnect internet and then after that I try to click its download button in the webpage,the download popup
window is still comming out or appear and I still be able to save the exact file I want after click save button .
So I wonder why I can save the file even I disconnect internet ,So I believe it is because when I input edit
the product NO and press enter key , the data file is fetched already into Cache file or memory in my PC before
I disconnect internet. So my question is if so, whether I am able to save my file without going through the
download or popup memu process that will help me to save a lot VBA download file program code and
exceute time with automation
I go to seach to my PC directory, finally I found one directory which is asynchronous to what I nagivate in IE7
In such directory it has so many sitename and image, files name that I fire IE website before in recent days
The directory name is like C:\users\myaccount\Appdata\Local\Microsoft\Windows\Temporary Internet Files\
something like that in Window Vista
, it seems it is mirror or Cache file to my PC memory, Is it true ?
In other words, I am able to save files directly from the Temporary Internet Files directory,Is it Right ?
So if so, I am easier to use VBA and following code to check file is existed or not and copy it to my directory from
the Temp Internet File directory, Is it right ? Please advise
Since I have a lot of files want to download in target website, so I prefer to do it in VBA with everything in auto
that will save a lot of execute time when number of file to be download is huge like 1000 files
I try it before, but it is fail and it might be not as much as easy I say.. Or I ask where the Cache file is stored for internet file
in most in our PC 's memory and Cache file directory ? I know Cache file directory is just a link or mirror to direct our PC
memory location. are those files to be able to be saved by users ?
Please advise and Thanks
On Error Resume Next
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oFile = oFS.OpenTextFile(sFilePath, 8, False)
If Err.Number <> 0 Then
CheckFileAvailable = "Fileinuse"
' Debug.Print "FileinUse"
CheckFileAvailable = "Fileisfree"
Sub CopyFile2File(wkdir As String, workbookname As String, wkdir2 As String, workbookname2 As String)
Set Fso = CreateObject("Scripting.FileSystemObject")
On Error GoTo Err
Fso.CopyFile (wkdir & workbookname), wkdir2 & workbookname2 ' Change "\*.*" to "\*.xls" to move Excel Files only
MsgBox "File path or Files not Found"