I too find that FileTransferred fires after each file, but FileTransferProgress does not fire at all.
WinSCP Ver. 5.5.1 Build 3970
WinSCPNet Ver. 5.5.1 (at least that's what the zip file is named)
Windows XP and 7
VBA in Access 2003/2007 and Excel 2007
The file transfer occurs and completes without any errors or problems. Just no progress updates.
'// Instantiate Class
Sub testEDI()
Dim objEDI As New OfficeEDI
objEDI.doXfer
End Sub
'// Class OfficeEDI
Option Compare Database
Private WithEvents objSession As WinSCPnet.Session
Public Sub doXfer()
Dim objOptions As New WinSCPnet.SessionOptions
Set objSession = New WinSCPnet.Session
objOptions.Protocol = Protocol_Sftp
objOptions.Portnumber = 30
objOptions.hostname = "@xxx.xxx.xxx.xxx"
objOptions.UserName = "test"
objOptions.Password = "xxxxxxxx"
objOptions.SshHostKeyFingerprint = "ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
objSession.Open objOptions
If objSession.opened Then
Debug.Print "Session Opened"
objSession.putfiles "F:\FileName*", "//Test//*", False
End If
objSession.dispose
Set objOptions = Nothing
Set objSession = Nothing
End Sub
Private Sub objSession_FileTransferProgress(ByVal sender As Object, ByVal e As FileTransferProgressEventArgs)
Debug.Print Format(e.overallprogress, "Percent")
End Sub
Private Sub objSession_FileTransferred(ByVal sender, ByVal e As TransferEventArgs)
Debug.Print e.FileName & " To " & e.destination
End Sub
Thanks