ComponentPro UltimateFtp

      Automatic ASCII file type classification

      Language Filter: AllSend comments on this topic to ComponentPro

      By default, the data is transferred in binary mode without any processing. However, when transferring text data between platforms which use different end-of-line sequences (Windows use <CR><LF>, Unix uses <LF>), it's essential to have the sequences automatically converted by setting the transfer mode to ASCII.

      In a multi-file transfer, to determine whether a file should be transferred in ASCII or Binary mode, Ultimate FTP uses the AsciiFileSearchConditions property to check against the processing file. If a file matches that criteria, the file will be transferred in ASCII mode; otherwise, binary mode is used.

      client.AsciiFileSearchConditions = new SearchCondition[] { new NameSearchCondition("*.txt") };
      // Upload TXT files. 
      // TXT will be transferred in ASCII mode, all other files will be transferred in Binary mode
      client.Upload(@"c:\data\*.txt", "/data");