Problem is that there is no "canonical form" of path in FTP protocol specification. Some FTP servers use only "/", some use only "\". Some allow both of them. And some may use a completely different directory separators.
The safest way is to split directory change and GetFileLength into two separate call.
using (var client = new Ftp()) {
client.Connect("Server");
client.Login("UserName", "Password");
client.ChangeDirectory("folder");
var size1 = client.GetFileLength("file");
}//using
UPDATE::
Answer to "why GetFileLength is failed and GetFile no?"
The GetFileLength
internally issues the SIZE filename
command. The GetFile issues the RETR filename" command. It might be possible that this specific FTP server does support paths with '\' for RETR and doesn't support it for SIZE command.
It looks quite strange. Would it be possible to create a communication log from Rebex component (as described at rebex.net/kb/logging.aspx) and from FileZilla and either update your question or send it to support@rebex.net for analysis?