Topic "Synchronize live progress"

Author Message
Siao

Guest


Hi,

would like to check if anyone knows how do i print the progress line by line for synchronization?

Quote:
exec = shell.Exec("\"" + WINSCP + "\"");
exec.StdIn.Write(
"option batch abort\n" +
"option confirm off\n" +
"open \"" + SESSION + "\"\n" +
"synchronize local \"" + LOCALPATH + "\" \"" + REMOTEPATH + "\"\n" +
"exit\n");

// wait until it finishes and collect its output
var output = exec.StdOut.ReadAll();

// optionally print the output
WScript.Echo(output);


As seen above, the code only prints the output when the script finishes running. I want to print the file synchronization line by line instead of the whole lump when script finishes running.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
See this example:
http://www.sbin.org/doc/wscript/html/wslrfstdoutproperty.htm

Anyway, you should better use WinSCP .NET assembly and handle Session.FileTransferred event:
https://winscp.net/eng/docs/library_session_filetransferred
_________________
Martin Prikryl
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