The problem is:
we have an internal application. The application compresses (ZIP) some files (bds backups, windows backup files - bkfs) and then connects (code below) to a remote FTP and sends the zip file.
the strange thing is:
this single line
source.CopyFilesTo(destination, True, True, "myzip.zip")
- sometimes, sends sucessfuly the ZIP file, disconnects from the server then... connects again and deletes the ZIP file
- sometimes sends sucessfuly the ZIP file and the file is NOT deleted
but I allways get this error
Erro no FTP : An unexpected internal failure occurred in the FileSystem component, or one of its descendants.
Type: Xceed.FileSystem.DiskFolder
FullName: C:\Data\Documents
C:\Data\Documents is the sourceFolder containing the ZIP file - "myzip.zip"
thank you
Dim connection As FtpConnection
connection = New FtpConnection(_ftpServer, 21, _userName, _password)
Dim PassiveFtp As Boolean = True
connection.PassiveTransfer = PassiveFtp
Dim source As New DiskFolder(sourceFolder)
Dim remoteFolder As String = ""
remoteFolder = _remoteFolder
Dim destination As New FtpFolder(connection, remoteFolder)
source.CopyFilesTo(destination, True, True, "myzip.zip")
connection.CloseConnections()
connection.Dispose()