i added the boolean as FALSE and still transfers the subfolders. I must bemissing something....here is my code, which works except for transferring the subfolders:
Dim filterString As String = "*.*"
If (Not ftpConnection Is Nothing) Then
ftpConnection = Nothing
ftpConnection = New SecureFTPConnection
Else
ftpConnection = New SecureFTPConnection
End If
Try
arcfinalLocation = arcFileLocation
ftpConnection.LicenseOwner = LicenseOwner
ftpConnection.LicenseKey = LicenseKey
ftpConnection.Protocol = FileTransferProtocol.FTPSExplicit
ftpConnection.ServerValidation = SecureFTPServerValidationType.None
ftpConnection.ConcurrentTransferSettings.Enabled = True
ftpConnection.ConcurrentTransferSettings.MaxConnections = 5
ftpConnection.ServerAddress = serverAddress
ftpConnection.ServerPort = serverPort
ftpConnection.UserName = userName
ftpConnection.Password = password
CallClient("Queuing connection to " & serverAddress)
ftpConnection.BeginConnect(New AsyncCallback(AddressOf OnConnect), ftpConnection)
ftpConnection.UploadDirectory(localfolder, remotefolder)
ftpConnection.BeginUploadMultiple(localfolder, remotefolder, filterString, False, New AsyncCallback(AddressOf OnUpload), ftpConnection)
ftpConnection.BeginClose(New AsyncCallback(AddressOf OnClose), ftpConnection)
signaller.WaitOne()
Catch exFtp As FTPException
CallClient("FTP Error:" & exFtp.ToString)
Catch ex As Exception
CallClient("non FTP Error:" & ex.ToString)
Finally
If (Not ftpConnection Is Nothing) Then ftpConnection = Nothing
End Try
My onUopload function is:
Private Sub OnUpload(ByVal ar As IAsyncResult)
Dim c As SecureFTPConnection = CType(ar.AsyncState, SecureFTPConnection)
c.EndUploadMultiple(ar)
CallClient("Upload completed: ")
End Sub