Excel can't delete temp internet files using Excel Macro

Joined
Jun 27, 2005
Messages
1
Reaction score
0
I'm running about 400 sequential data queries from the web. They eventually bog down my PC, causing it to slow down and then later lock up. I think the problem is related to having too many temporary internet files, because if I delete them before I start the macro, the PC executes more queries before locking up
than otherwise.

So I'd like to have the macro purge the temporary internet files after it gets the data from them and before it executes another web query. I tried using a code like this.

Kill "C:\Documents and Settings\Dick\Local Settings\Temporary Internet Files\" &
"hp?s=^DJI&a=01&b=01&c=2004&d=12&e=31&f=2005&g=w.html"

But this statement won't delete files in "C:\Documents and Settings\Dick\Local Settings\Temporary Internet Files". I can't even delete a file like x.gif from that directory

Example - Kill "C:\Documents and Settings\Dick\Local Settings\Temporary Internet Files\x.gif"

But the same statement will delete x.gif from My Documents\Word directory using the command

Kill "C:\Documents and Settings\Dick\My Documents\WORD\x.gif"

Do you have any ideas as to how I can make the macro delete files from "C:\Documents and Settings\Dick\Local Settings\Temporary Internet Files" ?

If you do, another complication I don't know how to deal with is that Windows Explorer shows the file name as "hp?s=^DJI&a=01&b=01&c=2004&d=12&e=31&f=2005&g=w and says it's type is html. I'm not sure what extension to give it in the kill statement. I've tried .html, .htm, .*, and no dot. None of these work - I think because I can't delete any type of file from that directory.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top