Local listing does not get written in log file

Advertisement

alexsts
Joined:
Posts:
5

Local listing does not get written in log file

Hi guys,
in my automation for getting list of the files from local directory I have following code(nothing new, standard WinSCP automation)
<code>
var path = FILEPATH;
var filename = FILENAME;
var logfilepath = filesys.GetSpecialFolder(2) + "\\" + filesys.GetTempName() + ".xml";
var exec;
exec = shell.Exec("\"" + WINSCP + "\" /log=\"" + logfilepath + "\"");
exec.StdIn.Write("option batch abort\n" + "open \"" + SESSION + "\"\n" + "lls \"" + path + "\"\n" + "exit\n");

// wait until the script finishes
while (exec.Status == 0)
{
WScript.Sleep(1000);
WScript.Echo(exec.StdOut.ReadAll());
}
</code>

and in echo(green colored) I can see that it did read local directory but when I am reading XML file - it is empty. Basically it means that write (in red) part is not working.
Any idea why and how to fix this?
Thanks

Reply with quote

Advertisement

You can post new topics in this forum