dan at clearvisiontech.com
Wed Jun 2 18:08:24 EDT 2010
I am using the "put" because I am writing to a ftp web server. So I need to pass a username and password.
How would I rename the file on a remote server? Also, how would you suggest I go about this? I could end up in a endless error check...
rename the original file
write the data
if error then
rename the original file back
if error then
What do you think?
> After reading a bit more of your original post, I think I understand that you are creating an XML file each time you do a PUT? If so, are you "PUTTING" to the same file name each time? If so, then if the command fails for some reason the file system would delete the original, and then the new file, having failed would never get to the server. It might be better to rename the original, "PUT" the new XML file, verify the existence of the file after "PUTTING" it, then delete the old one.
> I'm curious why you are using this command and not the low level file commands:
> open file
> read from file
> write to file
> close file
> Bear in mind I'm not an expert on low level file commands. I am simply curious about your method.
>> Thank you VERY much for the insight. I really need some help resolving this problem. However....
>>> Volume Corruption
>> On one file only? I suppose that possible, but I think it's pretty unlikely.
>>> File was not saved where you thought it was saved.
>> Then why would the original file have been deleted?
>>> User or app appears to have saved the file but in reality, didn't.
>> Again, why would the original file have been deleted?
More information about the Use-livecode