Cannot find a directory that was previously found

0 votes
asked Aug 24, 2010 by Parthasarathy (120 points)
edited Mar 23, 2011

I am getting this error while download multiple files from ftp server. Can you please let me know what needs to be done for this.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Aug 25, 2010 by Lukas Pokorny (126,910 points)
edited Aug 25, 2010

Usually, this error indicates that a directory being transfered or one of its subdirectories was deleted while the PutFiles or GetFiles was in progress.

However, from the communication log you sent to, this appears to be caused by a duplicit "226 Transfer finished successfully" response sent by the FTP server. Two identical responses instead of one confused the MLST command that was used to determine whether a directory to be transfered still exisst. We have not encountered this before - do you know which FTP server is this?

Enabling an option that causes the FTP control connection to be flushed before sending each command should help:


client.Options |= FtpOptions.EnableControlConnectionFlushing;


client.Options = client.Options Or FtpOptions.EnableControlConnectionFlushing

(where "client" is an instance of Ftp object)

This should solve the issue.

Note: It looks like this option has a side effect that causes a noticeable slowdown of the FTP control connection. We will try addressing this in the next release. (If you would like a beta when it's ready, please let us know.)