Differences
This shows you the differences between the selected revisions of the page.
2013-04-29 | 2013-05-09 | ||
explain what StreamReader.ReadToEnd is good for (martin) | use /xmllog for xml logging explicitly (martin) | ||
Line 50: | Line 50: | ||
==== [[log]] Using log file ===== | ==== [[log]] Using log file ===== | ||
- | To capture results of script, you can use [[logging_xml|XML logging]]. For this you need to instruct WinSCP to store log file using ''/log'' [[commandline|command-line parameter]] (''[[dotnet>system.diagnostics.processstartinfo.arguments|ProcessStartInfo.Arguments]]''). | + | To capture results of script, you can use [[logging_xml|XML logging]]. For this you need to instruct WinSCP to store log file using ''/xmllog'' [[commandline|command-line parameter]] (''[[dotnet>system.diagnostics.processstartinfo.arguments|ProcessStartInfo.Arguments]]''). |
<code csharp> | <code csharp> | ||
const string logname = "log.xml"; | const string logname = "log.xml"; | ||
... | ... | ||
- | winscp.StartInfo.Arguments = "/log=\"" + logname + "\""; | + | winscp.StartInfo.Arguments = "/xmllog=\"" + logname + "\""; |
... | ... | ||
winscp.Start(); | winscp.Start(); | ||
Line 142: | Line 142: | ||
Process winscp = new Process(); | Process winscp = new Process(); | ||
winscp.StartInfo.FileName = "winscp.com"; | winscp.StartInfo.FileName = "winscp.com"; | ||
- | winscp.StartInfo.Arguments = "/log=\"" + logname + "\""; | + | winscp.StartInfo.Arguments = "/xmllog=\"" + logname + "\""; |
winscp.StartInfo.UseShellExecute = false; | winscp.StartInfo.UseShellExecute = false; | ||
winscp.StartInfo.RedirectStandardInput = true; | winscp.StartInfo.RedirectStandardInput = true; | ||
Line 213: | Line 213: | ||
Dim winscp As Process = New Process() | Dim winscp As Process = New Process() | ||
winscp.StartInfo.FileName = "winscp.com" | winscp.StartInfo.FileName = "winscp.com" | ||
- | winscp.StartInfo.Arguments = "/log=" + logname | + | winscp.StartInfo.Arguments = "/xmllog=" + logname |
winscp.StartInfo.UseShellExecute = False | winscp.StartInfo.UseShellExecute = False | ||
winscp.StartInfo.RedirectStandardInput = True | winscp.StartInfo.RedirectStandardInput = True |