Hey Mark,
Drop the MS Internet Transfer Control on your form and call it "Inet1".
Set the Protocol property to 2 - FTP. In your code do this:
* Set the remotehost property first
* You can either use the IP address or the DNS name (
www.whatever.com)
thisform.inet1.remotehost = "XXX.XXX.XXX.XXX"
* Then set the UserName and Password properties
* You must set the RemoteHost property before UserName and Password
thisform.inet1.username = "username"
thisform.inet1.password = "password"
* Next connect to the server
* The Execute method's parameters are optional RemoteHost, optional command
* Since we set the RemoteHost, etc., previously, we don't need the params here.
thisform.inet1.execute()
do while thisform.inet1.stillexecuting
* Do nothing
enddo
* First param not needed since we already connected.
thisform.inet1.execute(, "PUT c:/thisfile.fil thisfile.fil")
do while thisform.inet1.stillexecuting
* Do nothing
enddo
thisform.inet1.execute(, "QUIT)
do while thisform.inet1.stillexecuting
* Do nothing
enddo
This, however, assumes that you will have no connection errors or server-side errors. To track those errors takes a little more effort.
Phillip
>Hi John,
>
>Thanx 4 ur reply.I have checked the MSDN but the explanation isn't up 2 much and the code is in VB. is there any other sites which will explain this in VFP6.0 format?
>
>Thanks in advance (John)
>
>Cheers
>
>Mark!!!!!
>
>****in wine theres truth****
"D'OH!" --Homer Simpson