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, [EMAIL PROTECTED] wrote:
From: Sarah Reichelt <[EMAIL PROTECTED]> Subject: FTP queries To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> 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?
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution