Delete File Not Deleting

Sep 14, 2011 at 1:27 PM

I'm unable to delete a file on the remote FTP server using the project. I believe the root cause is that the FullName property of the File object is not getting populated, which is used by the Delete method.

Here's the code sample:

            foreach (FTPSource ftp in FTPSourceConfig.GetConfig().FTPSources)
                //ftplib documented and source available at
                using (FtpConnection ftpConn = new FtpConnection(ftp.FTPAddress, ftp.FTPUserName, ftp.FTPPassword))
                    foreach (var file in ftpConn.GetFiles())
                        ftpConn.GetFile(file.Name, Path.Combine(ftp.LocalDirectoryToCopyTo, file.Name), false);

The GetFile call works properly, but the on the next line fails. Any thoughts?

Sep 20, 2011 at 4:43 PM
Edited Sep 20, 2011 at 4:44 PM

I believe you are correct. However, I don't have the ability to test right now. You should be able to change the constructor and add 

base.FullName = filepath;