ComponentPro UltimateFtp

      Transfer statistics

      Language Filter: AllSend comments on this topic to ComponentPro

      The result of a multiple file operation can be accessed through a FileSystemTransferStatistics object. It provides useful information shown below:

      // Upload "*.dat" files from "C:\data" to "/content" remote directory on the FTP server. 
      // Existing files will be skipped.
      FileSystemTransferStatistics stat = client.Upload(@"C:\data\*.dat", "/content", false, FileOverwriteMode.Skip);
      
      Console.WriteLine("Total files: {0}. Total dirs: {1}", stat.TotalFiles, stat.TotalDirectories);
      Console.WriteLine("Total files skipped: {0}", stat.FilesSkipped);
      Console.WriteLine("Total size: {0}", stat.TotalBytes);