Re: Error downloading file in in directory
First, make sure you are using forward slashes for remote file.
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Ftp
.HostName = "localhost"
.UserName = "support"
.Password = "password!"
End With
Using session As Session = New Session
session.ExecutablePath = Application.StartupPath & "\Tools\WinSCP.exe"
session.DebugLogPath = "c:\debug.txt"
session.SessionLogPath = "c:\session.txt"
session.Open(sessionOptions)
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
Dim transferResult As TransferOperationResult
transferResult = session.GetFiles("\testje\update.txt", "C:\Test\Document.txt")
transferResult.Check()
End Using