libURLftpCommand help required please....

Dave Cragg dave.cragg at lacscentre.co.uk
Sat May 22 19:02:56 EDT 2010


On 22 May 2010, at 20:38, Bob Earp wrote:

> 
> I'm trying to send an ftp command to a site, and being a neophyte at these things I'm not having much success.  This is what I'm using, what's wrong with it ?
> put libURLftpCommand("LIST",ashford.ca,test at ashford.ca,"myTest") into fld "results"

Bob, you won't be able to get LIST to work like this. libURLftpCommand sends ftp commands through the ftp command connection. But the actual listing data is transferred over a separate data connection. This requires opening a separate socket after you get a response to the LIST command.

However, you don't need to do that.  A simple "get url" to a directory on an ftp server  actually performs a LIST command for you. So something like this:

put url "ftp://myname:mypassword@my.server.com/images/" into tListData

Cheers
Dave


More information about the Use-livecode mailing list