ComponentPro UltimateFtp

      Server-to-server transfers (FXP)

      Language Filter: AllSend comments on this topic to ComponentPro

      Some FTP servers support transfer files from one to another directly, without copying them to the client. To utilize that advanced feature, use the RemoteCopy method.

      using System;
      using System.Collections.Generic;
      using System.Text;
      using ComponentPro.Net;
      using ComponentPro.IO;
      
      ...
      
      // Create a new class instance.
      Ftp ftp1 = new Ftp();
      
      // Connect to the FTP server.
      ftp1.Connect("myserver");
      
      // Authenticate.
      ftp1.Authenticate("userName", "password");
      
      // ... 
       
      // Create a new class instance.
      Ftp ftp2 = new Ftp();
      
      // Connect to the FTP server.
      ftp2.Connect("myserver2");
      
      // Authenticate.
      ftp2.Authenticate("userName", "password");
      
      // ... 
       
      // Copy "/myfile.x" file from the first FTP server to the second one.
      ftp1.RemoteCopy(ftp2, "/myfile.x", "/myfile.x");
      
      
      // Disconnect.
      ftp1.Disconnect();
      
      ftp2.Disconnect();