Posted: 08 Nov 2008 13:32 | ||
Registered User Currently Offline |
Posts: 2 Join Date: Nov 2008 |
|
Currently, i wish to upload a set of files to another server and create a log of uploaded files.
Here is how i do it.. fileopen read, "inputFile.txt" fileopen append, "output.txt" loop 4 begin filereadline ~fileName; filewriteline ~fileName; end fileclose; In this, the access to file gives erratic behaviour. What i want to achieve is to append a line to a log file after uploading successfully. There seems to be a problem with this. |
Posted: 08 Nov 2008 13:33 Last Edited By: sysaxsupport | ||
Moderator Currently Offline |
Posts: 367 Join Date: Nov 2008 |
|
During script execution, only one file can be open for processing at a time. Can you try reading all items first into variables from the first file, close it, and thenopen the second file for appending and then write to it?
--------------------------------------------------------- File Transfer Protocol and Windows SFTP Server |
Posted: 08 Nov 2008 13:33 | ||
Registered User Currently Offline |
Posts: 2 Join Date: Nov 2008 |
|
The idea seems ok. But, how does this mean, i need to use so many variables to hold the values read? Or how do i pump the read values in a List?
Alternatively, i can hold the upload result in a variable also and keep on append untill all the uploads are over. But, after each upload, i need a CR and LB in the variable. How do i achieve this? |
Posted: 08 Nov 2008 13:34 Last Edited By: sysaxsupport | ||
Moderator Currently Offline |
Posts: 367 Join Date: Nov 2008 |
|
I have passed this on to our developers. Basically it looks like you need to have multiple files open simultaneously or have a mechanism to read and store the entire contents of a file.
------------------------------------------------ SFTP Server Windows Solutions |