FTP.Initialize("FTP", NombreServerFTP,PuertoServer,LoginServer, PasswordServer)
ctm.InitializeAcceptAll
FTP.SetCustomSSLTrustManager(ctm)
FTP.PassiveMode=True
FTP.UseSSLExplicit = True
FTP.DownloadFile(CarpetaRemota & MDATOSZIP, False, RutaExterna, MDATOSZIP)
Wait For FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log("Archivo Bajado exitosamente! ")
Else
Log("Problema al bajar archivo")
Log(LastException)
' LastException = (FTPConnectionClosedException) org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
End If
FTP.Close()