Try by giving ".txt" extension for SessionLogPath. I came across this when I was trying to resolve another issue.
Correct. Any extension, but
.xml
will do.
Try by giving ".txt" extension for SessionLogPath. I came across this when I was trying to resolve another issue.
.xml
will do.
Okay I will look into it on Monday thanks a lot for the details.
.Dispose
.
TransferOperationResult
returned from the GetFiles
and PutFiles
methods.
SessionLogPath
: As I wrote, it enables session logging. But you cannot use .xml
in the name of the session log.
SessionLogPath
property is to enable session logging, not XML logging.
# Set TXT assembly debug log to
$session.DebugLogPath = "C:\temp\Visualcron\Powershell\DebugLogPath.txt"
# Set XML transfer log files
$session.SessionLogPath = "d:\SessionLogPath.xml"
# Connect
$session.Open($sessionOptions)
[2016-02-05 15:00:25.521Z] [003e] Starting "C:\Program Files (x86)\WinSCPautomation\winscp.exe" /xmllog="C:\Users\XX\AppData\Local\Temp\wscp1C70.00F34364.tmp" /xmlgroups /nointeractiveinput /dotnet=576 /ini=nul [color=green]/log="d:\SessionLogPath.xml"[/color] /console /consoleinstance=_7280_6920806_341
[2016-02-05 15:01:22.868Z] [0031] Starting "C:\Program Files (x86)\WinSCPautomation\winscp.exe" /xmllog="C:\Users\XX\AppData\Local\Temp\wscp1C70.00C12950.tmp" /xmlgroups /nointeractiveinput /dotnet=576 /ini=nul /console /consoleinstance=_7280_61436044_343