Subject: Ftp.DownloadFiles issue Date: 2015-12-11 13:58:45 From: Ronald Igarashi Source: ftp-downloadfiles-issue ----------------------------------------------------------------------I'm running version 6.2.50719 of the FTP Components and i'm having an issue calling the DownloadFiles method. When i put in an UNC path of \\TheServer\MyPath in the destination path it downloads the files to C:\TheServer\MyPath instead of the UNC Path \\TheServer\MyPath. When i check the Progress event and log the e.DestinationFileInfo.FullName on the TransferState.FileDownloaded state it displays the UNC path with only one beginning backslack like \TheServer\MyPath. When i check the \\TheServer\MyPath path nothing is in the folder but when i check C:\TheServer\MyPath all the files are there. Below is an example of my code.
using (var client = new Ftp() { TransferType = FileTransferType.Binary, SslUpgradeType = FtpSecureUpgradeType.SSL, SecureDataTransfers = true}){client.TransferConfirm += client_TransferConfirm;client.Progress += client_Progress;client.CommandResponse += client_CommandResponse;client.Connect("MyFtpSite.Com", 21, FtpSecurityMode.Explicit);client.Authenticate("MyUserName", "myPassword");var transferOption = new TransferOptions(){FileExistsAction = FileExistsAction.Confirm,SearchCondition = new NameSearchCondition(string.Format("*{0}*.csv", DateTime.Today.ToString("yyyyMMdd"), SearchConditionFileTypes.File))};client.DownloadFiles("/TheFtpPath", "\\TheServer\MyPath, transferOption);}---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index