Topic "Local listing does not get written in log file"

Author Message
alexsts
[View user's profile]

Joined: 2013-07-16
Posts: 5
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
alexsts
[View user's profile]

Joined: 2013-07-16
Posts: 5
alexsts wrote:
Hi guys,
in my automation for getting list of the files from local directory ...
Sad
Did not realized but there are similar question and answer from Martin. Not exactly what most of the users would want to hear but her it is: https://winscp.net/forum/viewtopic.php?p=45989#45989 Rolling Eyes
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License