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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INET FTP

Status
Not open for further replies.

adiMasher

Programmer
Aug 31, 2001
144
US
I know I know, there are plenty of examples of the use of inet and ftp for visual basic.

However. I seem to have a more unique question that I can't see that anyone has asked.

I'm writing a vbScript (Windows scripting host) that uses the inetctls.inet.1

My problem is, I don't quite understand why this simple little script doesn't work.

Code:
dim objInet
dim LocFileSpec, SerFilespec

Set objInet = CreateObject("InetCtls.Inet.1")
LocFileSpec="test.txt"
SerFilespec="dirmap.htm"

with objInet
    .requestTimeout = 900
    .URL = "ftp://ftp.microsoft.com"
    .Username ="anonymous"
    .Password = "someone@script.test"
end with

objInet.Execute , "Get " & SerFilespec & " " & LocFilespec

what is wrong with it? I don't suffer from insanity.
I enjoy every minute of it.
 
I can see two possible causes for failure:

1) Highly Unlikely: The AccessType property is not set, and I can only see that being a problem if your default internet connection settings in the registry are not correct.

2) The FTP server cannot find the file. Try using a full pathname.

Good Luck

 
You might also want to try adding an additional slash after the URL property.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top