Howdy Folks:
I am trying to download some files off the Internet, so I made a sub called DownloadFile as follows:
Now, I can't figure out why this works:Code:Sub DownloadFile(Host As String, Directory As String, File As String, OutputFile As String) Inet1.RemoteHost = Host While Inet1.StillExecuting = True DoEvents Wend Inet1.Execute Host, "cd " & Directory While Inet1.StillExecuting = True DoEvents Wend Inet1.Execute Host, "GET " & File & " " & OutputFile While Inet1.StillExecuting = True DoEvents Wend Inet1.Execute Host, "CLOSE" While Inet1.StillExecuting = True DoEvents Wend End Sub
DownloadFile "ftp://weather.noaa.gov", "/data/observations/metar/stations", "KFCA.TXT", "C:\Test.txt"
...and this doesn't:
DownloadFile "http://www.flightsimnetwork.com", "/montair/ma", "page5.html", "C:\Test.html"
Any ideas? I'm stumped.




Reply With Quote