Differences
This shows you the differences between the selected revisions of the page.
2016-02-03 | 2016-02-03 | ||
redundant type specification (martin) | no my prefix (martin) | ||
Line 106: | Line 106: | ||
Try | Try | ||
' Setup session options | ' Setup session options | ||
- | Dim mySessionOptions As New SessionOptions | + | Dim sessionOptions As New SessionOptions |
- | With mySessionOptions | + | With sessionOptions |
.Protocol = Protocol.Sftp | .Protocol = Protocol.Sftp | ||
.HostName = "example.com" | .HostName = "example.com" | ||
Line 115: | Line 115: | ||
End With | End With | ||
- | Using mySession As New Session | + | Using session As New Session |
' Will continuously report progress of transfer | ' Will continuously report progress of transfer | ||
- | AddHandler mySession.FileTransferProgress, AddressOf SessionFileTransferProgress | + | AddHandler session.FileTransferProgress, AddressOf SessionFileTransferProgress |
' Connect | ' Connect | ||
- | mySession.Open(mySessionOptions) | + | session.Open(sessionOptions) |
Try | Try | ||
' Download files and throw on any error | ' Download files and throw on any error | ||
- | mySession.GetFiles( _ | + | session.GetFiles( _ |
"/home/martin/public_html/*", "d:\backup\").Check() | "/home/martin/public_html/*", "d:\backup\").Check() | ||
Finally | Finally |