FTP queries
Frank Leahy
frank at backtalk.com
Mon Jun 21 10:20:54 EDT 2004
Sarah,
Should work fine. Just upload the new file with .new at the end of the
name, check the length, and if it looks good, do the rename.
Here's my rename code. The PWD is there from the debugging I was doing.
put libURLftpCommand("PWD", LFtpServer, LFtpUserName,
LFtpUserPassword) into theResult1
put libURLftpCommand("DELE " & renameToFile, LFtpServer,
LFtpUserName, LFtpUserPassword) into theResult2
put libURLftpCommand("RNFR " & renameFromFile, LFtpServer,
LFtpUserName, LFtpUserPassword) into theResult3
put libURLftpCommand("RNTO " & renameToFile, LFtpServer,
LFtpUserName, LFtpUserPassword) into theResult4
put libURLftpCommand("DELE " & renameFromFile, LFtpServer,
LFtpUserName, LFtpUserPassword) into theResult5
-- Frank
On Jun 21, 2004, at 2:55 PM, use-revolution-request at lists.runrev.com
wrote:
> From: Sarah Reichelt <sarahr at genesearch.com.au>
> Subject: FTP queries
> To: use-revolution at lists.runrev.com
> Message-ID: <7A1859DA-C30F-11D8-AA75-0003937A97B8 at genesearch.com.au>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hi All,
>
> Pursuing my remote notification requirements, I am creating an HTML
> file which gets re-generated and uploaded to the server every few
> minutes. However FTP uploads don't always work, but I don't want to be
> left with a situation where I upload half a file, leaving nothing that
> is readable by a web browser.
>
> A good solution would seem to be to upload the file using a temporary
> file name, check that the file length is the same as expected, then
> re-name the temporary file to the display file name. Is this a good way
> to go - perhaps people with more experience at FTP could suggest
> something better?
>
> If this is a good plan, how do I do the renaming? Will I have to delete
> the original file first, or will the renaming automatically replace it?
More information about the use-livecode
mailing list