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

ftp download

Status
Not open for further replies.

fluppe689

Programmer
Jul 11, 2008
75
BE
Hello Experts,

I hope that this question is easy, allthough I have not done this before. I have to get csv en picture files from an ftp site.
Is there an easy way to do it. So how to copy the files in a directory on my server ?

wfg,

Filip Merlier
 
There is also the Internet Transfer Control, which is one of the Activex controls that come with VFP. You can use this to send any command to an FTP server, including file transfers. It also supports FTP sites that require a log in.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Internet Transfer Control, yes. That is what I meant as I said file transfer ActiveX. Thanks Mike, noobody ould have found that as file transfer ActiveX.

Bye, Olaf.
 
And, for what it's worth, here is an example of how to download a file:

Code:
loNet = CREATEOBJECT("inetctls.inet")
loNet.Password = "MyPassword"
loNet.UserName = "Mike"

lcSite = "FTP://ftp.somesite.com"
lcCommand = "GET MyFile.csv c:\data\somefile.csv"
loNet.Execute(lcSite, lcCommand)

This will retrieve a file from the specified FTP site, and save it in a local directory on the C drive.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top