ComponentPro UltimateFtp

      ASCII and binary transfer modes

      Language Filter: AllSend comments on this topic to ComponentPro

      Ultimate SFTP supports two transfer mode: Binary (default) and ASCII. In binary mode (by setting the TransferType property to Binary), data is transferred as is without any processing. When text data is transferred between platforms that use different end-of-line sequences (Windows use <CR><LF> Unix uses <LF>), the transferred text data is unchanged and may be unfriendly presented to the user. It's essential to have the library convert the sequences automatically. To achieve that, set the TransferType property to Ascii.

      // Set transfer type to ASCII
      client.TransferType = FileTransferType.Ascii;
      // Upload TXT files.
      client.Upload(@"c:\data\*.txt", "/data");
      
      In multi-file transfers, the AsciiFileSearchConditions property can be set before a transfer to classify Text files that will be transferred in ASCII mode.