Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FTP Push 'n Pull
Message
De
17/10/2008 22:47:09
 
 
À
17/10/2008 22:24:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01355626
Message ID:
01355696
Vues:
24
>I was hoping for something more like
>loShell = CreateObject ('WScript.Shell')
>lcDesktop = loShell.SpecialFolders('Internet Explorer')

I don´t understand where you are going with those lines.

>Then getting (or specifing) the path to the ftp site asdf.somewhereintime.com
>So I could then simply copy & paste (or move) some files there.

Well, it´s pretty simple really, you have the name of the local file, you have the ftp site url, it is as easy as:
m.loFtp = newobject("libcurl", "libcurl.vcx")
m.loFtp.FtpUploadFile(cRemoteFileName, cLocalFileName)
m.loFtp = .Null.
Where cRemoteFileName is the full URL to the new remote file, that you can build using the URL to the desired FTP site folder plus the local file name.

So you need one line to create the object, one line for each file you want to upload, one line to destroy the object.

It´s not much harder than doing a COPY FILE cFileName1 TO cFileName2

If the class docs are not clear, please help me improve them by suggesting what could be added/changed.

Carlos Alloatti
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform