I found some posts from 2006 discussing fxp being implemented in the .net version of edtftp.
Nothing seems to have eventuated. I did notice that it had been implemented in the java version.
I have tried to cobble together my own fxp function but I am obviously missing something as it isn't working correctly. :(
I added it into the .net 1.2.6 version of edtftpnet in the FTPClient module.
CODE:
public void FxpFile(FTPClient dest, string filename)
{
FTPReply reply = control.SendCommand("SSCN ON");
control.ValidateReply(reply, "200");
FTPReply replyObj = control.SendCommand("PASV");
control.ValidateReply(replyObj, "227");
// The reply to PASV is in the form:
// 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
// where h1..h4 are the IP address to connect and
// p1,p2 the port number
// Example:
// 227 Entering Passive Mode (128,3,122,1,15,87).
// NOTE: Some FTP servers miss the brackets out completely
Regex regEx = new Regex(@"(?<a0>\d{1,3}),(?<a1>\d{1,3}),(?<a2>\d{1,3}),(?<a3>\d{1,3}),(?<p0>\d{1,3}),(?<p1>\d{1,3})");
Match m1 = regEx.Match(replyObj.ReplyText);
FTPReply dreply = dest.control.SendCommand("PORT " + m1);
dest.control.ValidateReply(dreply, "200");
dreply = dest.control.SendCommand("STOR " + filename);
dest.control.ValidateReply(dreply, "150");
reply = control.SendCommand("RETR " + filename);
control.ValidateReply(reply, "150");
}
What am I missing?
Thanks in Advance :)