Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using FTP to pick up files from Unix server
Message
De
02/05/2001 16:29:23
Phillip Perkins
Technology Consulting, Inc.
Louisville, Kentucky, États-Unis
 
 
À
02/05/2001 12:36:06
Mark Evans
Business Systems Services (Uk) Limited
Swansea, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00502473
Message ID:
00502754
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform