libUrlFtpCommand not working?

Dave Cragg dcragg at lacscentre.co.uk
Tue Oct 15 03:50:04 EDT 2002


At 7:03 pm -1000 14/10/02, Sannyasin Sivakatirswami wrote:
>Goal: be able to move a file from one directory to another under ftp 
>control with FTP command "mv"
>
>so, we try to take the new libURL syntax for a walk (thank you Dave Cragg!)
>
>get libUrlFtpCommand("PWD","myDomain.org","myLogInName","myPassword")
>answer it
>
>result : 257 "/" is current directory
>
>so far so good; but, I can't get to first base with
>
>get libUrlFtpCommand("ls","myDomain.org","myLogInName","myPassword")
>answer it
>
>I should get a listing, but instead
>
>500 "LS" command not understood
>
>same for "cd public_html"
>
>500 "CD public_html" command not understood.
>
>Any clues?

It seems to me it's working fine. It's telling you it doesn't 
understand the commands you are sending. :)

To find what commands the server implements, set a log field using 
libUrlSetLogField, and then  send the ftp "HELP" command. The 
commands should appear in the log between lines that start with 214. 
As far as I know, neither MV or LS are standard ftp commands. 
(Perhaps you need telnet and not ftp.)

Try sending "SITE HELP" to find out what specific "SITE" commands are 
implemented. These commands not part of the FTP standard command set, 
and are sent by using "SITE" followed by the  command name. For 
example, "SITE CHMOD 755"

You should probably refer to rfc 0959 or another FTP reference for 
information about the commands.

<http://www.faqs.org/rfcs/rfc959.html>

But to move a file, put url <url_1> into url <url_2> should work. (A 
bit heavy on the bandwidth perhaps.) And then delete the first file 
with: delete url <url_1>

Cheers
Dave



More information about the Use-livecode mailing list