Wen Query Issue
Hi Joel
Thanks for your help. The code is great, but it does not help me to delete
all htm files from Temporary Internet Files. When run the program with the
code you suggested, it cannot find any file to delete. In fact, the files
are under sub directory of Content.IE5 which there are some random sub
folders names to store htm files, If I set path with C:\Documents and
Settings\userid\Local Settings\Temporary Internet Files\Content.IE5\ , we can
only find one file: index.dat, this file is not allowed to delete. How can I
delete those htm files under sub directories?
Thanks for your help
Hans
"Joel" wrote:
Temporary Internet files are stored in the following directory on my PC. You
can find the exact location by going into options on Internt explorer where
you delete temporary internet files and view files. To see these files you
must change you window explorer settings to view possible system files.
C:\Documents and Settings\Joel\Local Settings\Temporary Internet Files
Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFile "c:\temp\abc.txt"
to delete all files in a directory
Folder = "C:\Documents and Settings\Joel\Local Settings\Temporary Internet
Files\"
Set fs = CreateObject("Scripting.FileSystemObject")
FName = Dir(Folder & "*.*")
Do while FName < ""
fs.DeleteFile Folder & FName
FName = Dir(
loop
"Hans" wrote:
Thanks Joel
Yes. it sometimes works, but when I repeat web query more times it dose not
work. After I delete the temporary internet files, it works again, but this
does not sovle my problem, since my web qurey will run many times, in which
the code was wrotteb by VBA in excel. Is there a way to delete temporary
internet files from VBA code when each time I start to run web query?
Hans
"Joel" wrote:
Can you open the file using the same URL in your internet explorer?
"Hans" wrote:
When do Web Query in Excel, got the problem with €śthe file could not be
accessed€ť, What is this problem? How to solve it?
|