Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FTP Push 'n Pull
Message
From
17/10/2008 22:47:09
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01355626
Message ID:
01355696
Views:
23
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform