You cannot disable the temporary XML log, it's needed for the assembly to work. And the log should get deleted automatically, when the
Session object is disposed.
Hi Thanks for your reply.
But the tmp file didn't be deleted after the session object was disposed.
The tmp files caused the folder reached the limitation of Windows file count.
So my script stopped because no more tmp file could be generated.
My script is following.
' Setup session options
Set sessionOptions = CreateObject("WinSCP.SessionOptions")
.Protocol = .Protocol
.HostName = "TSTTRANSFER.COM.AU"
.UserName = "u_monitor"
.Password = "123456"
.SshHostKey = "ssh-rsa 2048 c7:e9:40:70:f9:54:54:7c:ac:74:6c:75:a7:f4:32:8c"
Set session = CreateObject("WinSCP.Session")
DateFile = formatdatetime(NOW(),1)
LogFile = "C:\Program Files\WinSCP\tstscp_" & DateFile & ".log"
session.SessionLogpath = LogFile
session.DebugLogpath = DebugLog
On Error Resume Next
If Err.Number <> 0 Then
FireActions = True
Details = "Connection Failed. Please Check Logs."
' Upload files
Set transferOptions = WScript.CreateObject("WinSCP.TransferOptions")
transferOptions.TransferMode = TransferMode_Binary
Set transferResult = session.PutFiles("c:\temp\Axway_test\*", "/", False, transferOptions)
' Throw on any error
' Print results
For Each transfer In transferResult.Transfers
' WScript.Echo "Upload of " & transfer.FileName & " succeeded"
' Disconnect, clean up