ftp GET question

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
marinoni
Posts: 2
Joined: Wed Jan 12, 2011 4:08 pm

ftp GET question

Post by marinoni » Wed Jan 12, 2011 4:12 pm

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.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ftp GET question

Post by Klaus » Wed Jan 12, 2011 4:25 pm

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

marinoni
Posts: 2
Joined: Wed Jan 12, 2011 4:08 pm

Re: ftp GET question

Post by marinoni » Wed Jan 12, 2011 4:46 pm

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.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ftp GET question

Post by Klaus » Wed Jan 12, 2011 5:15 pm

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

Post Reply