It was just downloaded. Reads File version 4.4.0.1904. Date modified 1/27/2013 10:54 PM
I think that I got past the invalid hostkey but getting
winscp> open sftp://
[email protected]:@ftp.xxx.com:22999 -hostkey="*" Searching for host... Connecting to host... Authenticating... The server's host key was not found in the cache
If I remove the ftp. from the url I get a time out.
I am uncertain about what the various parameters are i.e. from winscp.StandardInput.WriteLine =
Dim hostKey As String = Nil
If hostKey = Nil Then
hostKey = "*"
End If
Dim OpenConnectStr As String = "open sftp://" & pUser & ":" & pPswd & "@" & pURL & ":22999 " ' -hostkey=" & DQ & hostKey & DQ
If hostKey <> Nil Then
OpenConnectStr &= " -hostkey=" & DQ & hostKey & DQ
End If
Dim winscp As Process = New Process()
winscp.StartInfo.FileName = AaaTeXProdExePath & "\winscp.com"
winscp.StartInfo.Arguments = "/xmllog=" + logname
winscp.StartInfo.UseShellExecute = False
winscp.StartInfo.RedirectStandardInput = True
winscp.StartInfo.RedirectStandardOutput = True
winscp.StartInfo.CreateNoWindow = True
Dim process As New Process
If Not winscp.Start() Then
i = i
End If
' Feed in the scripting commands
winscp.StandardInput.WriteLine(OpenConnectStr)
wnscp.StandardInput.WriteLine("option batch abort")
wwinscp.StandardInput.WriteLine("option confirm off")
winscp.StandardInput.WriteLine("open mysession")
winscp.StandardInput.WriteLine("ls")
winscp.StandardInput.WriteLine("put " & pFFn)
winscp.StandardInput.Close()
' Collect all output (not used in this example)
Dim output As String = winscp.StandardOutput.ReadToEnd()
' Wait until WinSCP finishes
winscp.WaitForExit()