Private Function UploadSFTP(transferFile As String) As Boolean
   Dim mySession As New Session
   Dim mySessionOptions As New SessionOptions
   Dim myTransferOptions As New TransferOptions
   Dim transferResult As TransferOperationResult
   Dim transfer As TransferEventArgs
   Dim succeeded As Boolean
   
   With mySessionOptions
      .AddRawSettings "AuthGSSAPI", "0"
      .Protocol = Protocol_Sftp
      .HostName = DTServer
      .UserName = DTUserID
      .Password = DTPassword
      .SshHostKeyFingerprint = "ssh-rsa 2048 xxxx..."
   End With
    
   ' Connect
   mySession.SessionLogPath = "C:\Temp\WinSCP.log"
   mySession.Open mySessionOptions
'   MsgBox mySession.ScanFingerprint(mySessionOptions, "SHA-256")
   
   ' Upload files
   myTransferOptions.TransferMode = TransferMode_Binary
   Set transferResult = mySession.PutFiles(RCSetup.OutputFolder & transferFile, transferFile, False, myTransferOptions)
     
   ' Get status
   succeeded = transferResult.isSuccess
     
   ' Clean up
   mySession.Dispose

   ' Return value
   UploadFileSFTP = succeeded
End Function
