FTP To and From My Mac

Gregory Lypny gregory.lypny at videotron.ca
Wed Aug 10 11:18:22 EDT 2011


Hi Dave Cragg and Mark Schonewille,

Thank you both for your responses.  Problem solved with a unexpected fix!  I tried all of your suggestions, learned a lot about the various libURL commands, which will be useful in my project, but unfortunately, none solved the problem not being able to download that particular 183 KB file.  The FTP log told me the download was complete, indicated the correct number of bytes, and that the socket had been closed.  But the variable into which the file had been loaded had zero lines in it and did not appear in the field into which I put it.  I tried many other files, some as big as 2 MB, and they downloaded fine and in a jiffy.  It then occurred to me that this was the only file created with LiveCode using RETURN to delimit line endings, and that perhaps something gets messed up when it is transferred to the remote Mac server.  I went through my old Revolution tips and found an email from you, Dave, from 2005, explaining how to clean line endings.  Worked like a charm!!!

on cleanLineEndings @pText
   replace crlf with return in pText
   replace numToChar(13) with return in pText
end cleanLineEndings


Thanks again,

Gregory






More information about the use-livecode mailing list