1) For the FTP protocol, it is possible to use the
CopyToAnotherServer method on some FTP servers. It utilizes the FXP functionality, which should be supported by the source FTP server software.
// connect to the source server
Ftp session1 = new Ftp();
// connect to the destination server
Ftp session2 = new Ftp();
// copy a single file from server1 to server2
session1.CopyToAnotherServer(session2, sourcePath, destinationPath);
Please note that even if the FTP server supports the server-to-server transfers (FXP), it is usually disabled by default.
2) For the SFTP protocol, there is unfortunately nothing like the FXP technology.