Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i copy a file from a website to my hard drive

Status
Not open for further replies.

shellj

Technical User
Sep 19, 2002
30
I have an .ini file that is stored on our company intranet site - it is not visible to everyone but only in the same directory as all the forms. The problem I have is I can open the file no problem using open " but when I try to do 'filecopy " C:\Windows\.ini" ' it says 'Runtime Error 76 - Path not found". It may be something really stupid, but I'm not seeing it! Can someone please advise?
 
If you can open the file, that means you can at least get there in two steps - open it, and then save it to where you need it. The filecopy method probably relies on a traditional folder\file designation.
Rob
[flowerface]
 
Thanks RobBroekhuis. I could probably do this but I don't want the file to be visible to users. Is there a way I can do that? Thanks though!
 
Use application.screenupdating=false during the open/save procedure. Admittedly, you'll get the name of the file flashing in the taskbar for as long as the file is open. If that bothers you, you could launch a new instance of Excel running in the background (application.visible=false) to do the job. But that would be a bit heavyhanded for such a simple job. If the open command (not method) in VBA will work on a web address, then it would be easy to copy the file using line input# and print# statements, without opening it as a workbook. Somehow, though, I suspect that the open command has the same limitations as the filecopy. Worth a try, though.
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top