FTP via "put" opens files but fails to write data?

Dave Cragg dcragg at lacscentre.co.uk
Wed Feb 8 03:06:06 EST 2006


On 8 Feb 2006, at 04:38, Sivakatirswami wrote:

> This FTP script below frequently fails
>
> I get three files on the server with the correct name, but no data  
> is written to them....


Typically, that's a symptom of a problem with the data source part of  
the "put".

>
>  repeat for each item x in tImages
>    put url (tLocalLocation & x) into url (tRemoteLocation & x)
>  end repeat
> end uploadImages

You should check the "url (tLocalLocation & x)" part is valid before  
trying to upload the data.

   Ex,

   put url (tLocalLocation & x) into tUploadData
   if the result is not empty then
   ##  do error stuff here
   else
    put tUploadData into url (tRemoteLocation & x)
    -- check the result here
   end if

Cheers
Dave



More information about the use-livecode mailing list