Page 1 of 1

ftp question

Posted: Wed Jun 29, 2011 2:51 pm
by richardmac
I am attempting to upload a file to an ftp server inside a LiveCode script. The trick is that the upload has to be able to overwrite the file on the ftp server. I've gotten close using the following command:

put myInformation into URL "ftp://username:password@10.1.12.21/Data ... school.txt"

This worked... and then it didn't. And it won't override the file on the server. Any help appreciated, including telling me that there's a much easier way if I'm missing something. Thanks!

Re: ftp question

Posted: Wed Jun 29, 2011 2:55 pm
by bangkok
One solution is to delete the file, first.

constant FTPHOST = "wwwwwwwwwwwwwww"
constant FTPUSER = "xxxxxxxxxxxxx"
constant FTPPASS = "yyyyyyyyyyyyyy"

get libURLftpCommand("DELE "&theFileName,FTPHOST,FTPUSER,FTPPASS)