Created
September 23, 2010 14:54
-
-
Save msarchet/593741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private WithEvents sFTP As WeOnlyDo.Client.FtpDLX | |
Private Sub ConnectAndGetFile() | |
Try | |
If sFTP.State = WeOnlyDo.Client.States.Receiving Or sFTP.State = WeOnlyDo.Client.States.Connected Then | |
sFTP.Abort() | |
End If | |
sFTP = New WeOnlyDo.Client.FtpDLX | |
_status = Enums.eStatus.Downloading | |
sFTP.LicenseKey = "RAYJ-S8Y9-RTRE-EKZS" | |
sFTP.Hostname = hostname | |
sFTP.Login = loginName | |
sFTP.Password = password | |
sFTP.Protocol = WeOnlyDo.Client.Protocols.SFTP | |
sFTP.Port = 22 | |
'This causes the sFTP_ConnectedEvent to Fire | |
sFTP.Connect() | |
Catch ex As Exception | |
_status = Enums.eStatus.Failed | |
_message = "FTP: Failed to Connect [" & MyBase.Name & "](" & ex.Message & ")" | |
End Try | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment