Page 1 of 1

ftp GET question

Posted: Wed Jan 12, 2011 4:12 pm
by marinoni
I am getting a "500 unknown command" for the following code:

Code: Select all

put libURLftpCommand("get gw03128.test.output","170.193.58.13","gw03128","mavic#11") into it
I successfully did a similar command with a PWD, but I don't know why I am getting the 500 for the GET command. I am fairly new to LiveCode, so any help is greatly appreciated.

Re: ftp GET question

Posted: Wed Jan 12, 2011 4:25 pm
by Klaus
Hi marinoni,

arer you sure that "get" is a valid FTP server command?
If yes, then the syntax is not correct.

Check the LiveCode dictionary for the correct syntax, which is like this:
put libURLftpCommand("PWD", ...)
The server command in capital letters and in QUOTES without any parameters!

BTW:
What exactly should this do? I am not too familiar with FTP.

Best

Klaus

Re: ftp GET question

Posted: Wed Jan 12, 2011 4:46 pm
by marinoni
thanks, I'll try your suggestion. The GET command is valid. I can use GET successfully from a command line dialog. it retrieves a file from the FTP server.

Re: ftp GET question

Posted: Wed Jan 12, 2011 5:15 pm
by Klaus
AHA! :D

Then you will need another snytax, since Livecode does not work this way!
You can load a file like this:
1. liburldownloadtofile "ftp://username:password@ftp.server.here ... me_to_load", "path/on/localharddisk/filename", (callbackmessage)
= NOT blocking
2. put URL("ftp://username:password@ftp.server.here ... me_to_load") into URL("binfile:path/on/localharddisk/filename")
= blocking

Check these terms in the LiveCode dictionary for more info!
And it might be a good idea to work through one or more of these stacks here:
http://www.runrev.com/developers/lesson ... nferences/


Best

Klaus