If you login with WinSCP GUI (or any other FTP client) on the same machine as you run your code, can you see a directory listing?
- martin
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Ftp
.HostName = HostName
.PortNumber = Port
.UserName = ftpUsername
.Password = ftpPassword
If ftpUsePassive Then
.FtpMode = FtpMode.Passive
Else
.FtpMode = FtpMode.Active
End If
End With
Using session As New Session
' Connect
session.SessionLogPath = "scp_rename.txt"
session.Open(sessionOptions)
session.MoveFile(mFromFile, mToFile)
End Using
Lost connection.
Timeout detected. (control connection)
Could not retrieve file information
Can't get attributes of file 'FrVessel/tmprry-....
Session.SessionLogPath
. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Ftp
.HostName = HostName
.PortNumber = Port
.UserName = ftpUsername
.Password = ftppassword
.FtpMode = FtpMode.Passive
End With
Using session As New Session
' Connect
session.Open(sessionOptions)
' Upload files
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
transferOptions.OverwriteMode = OverwriteMode.Overwrite
Dim transferResult As TransferOperationResult
transferResult = session.PutFiles(mFromFile, mToFile, False, transferOptions)
transferResult.Check()
End Using
Lost connection.
Timeout detected. (control connection)
Could not retrieve file information
Can't get attributes of file ......