Hello,

I have a VB.Net Windows app that is transferring 1 file using Rebex.Net.SFTP.

It works fine, but I need to know the status of the transfer so I can create my own log file.

How do I get the transfer status telling it the transfer had a problem or completed successfully?

MANY thanks

asked 29 Jan '10, 16:42

Carl's gravatar image

Carl
16
accept rate: 0%

edited 02 Mar '10, 15:20

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18


Hello Carl,

status of the currently transferring file is reported by TransferProgress event. How to register it shows following sample code.

Dim client As New Sftp

AddHandler client.TransferProgress, AddressOf client_TransferProgress
client.GetFile("remotePath", "localPath")

Public Sub client_TransferProgress(ByVal sender As Object, _
    ByVal e As SftpTransferProgressEventArgs)
End Sub

You can also check out the ResumableTransfer sample where the TransferProgress event is used.

When the transfer is completed TransferProgress event is fired and Finished property (of the SftpTransferProgressEventArgs) is set to true.

However, if any problem occurs during the transfer exception is thrown (no event with failed status is faired).

link

answered 29 Jan '10, 20:55

Lukas%20Matyska's gravatar image

Lukas Matyska ♦♦
78217
accept rate: 27%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×115
×3

Asked: 29 Jan '10, 16:42

Seen: 729 times

Last updated: 02 Mar '10, 15:20