ftp again

rand valentine jrvalent at wisc.edu
Tue Sep 7 18:04:20 EDT 2004

 Hello, dear runrev intelligentsia. I have written you guys before and you
have _never_ failed me, so I am hoping that the reason no one responded to
my question about ftp and "put" is that was phrased/framed too pathetically.
So let me restate it -- by the way, I've dutifully browsed through the list
and didn't find anything addressing this --

 Basically, what I need to do is to download up to 10 files to update an
informational database -- I have files on a webpage that hold the
information -- I have no problem uploading any number of files to this
webpage, but I can't seem to get proper downloading to work. I was using a
"put" command because it was said to be "blocking," which I assumed to mean
that the script commands following the "put" command would not be executed
until the file was fully downloaded. But it appears that this is not the
case. So here's my question: what is the best way to do this, i.e., to ftp
download a bunch of files and have them download in serial sequence? Obvious
candidates are:

1. a "put" command.

2. a libURLDownloadToFile downloadURL,filePath[,callbackMessage] command.

 Now I like the idea of this latter option, since I could use the
callbackMessage part of the structure to check and see that a file has been
successfully downloaded before proceeding. But it isn't clear at all to me
how this callbackMessage is to be monitored. Let's say you have a scriptline

libURLDownloadToFIle <something>

 Right after this I need to use the callbackmessage, right, to check and see
that the file is downloaded. How do I script the callbackmessage part,
something to the effect of

wait until myCallbackmessage

 From what I've read of the docs, "wait" structures are decided no-no, but
the documentation is not at all clear to my humble as to how you _properly_
use a callbackMessage in a script. Oddly, the documentation tells you what
_not_ to do, but doesn't do a very clear job of telling _what_ to do.

 Thank you so much for your help.

rand valentine

More information about the use-livecode mailing list