New FTP service removes Hex 0D from the file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf New FTP service removes Hex 0D from the file

  • Creator
    Topic
  • #51524
    Sergey Sevastyanov
    Participant

      Hi all

      A week ago we switched to a new file server that had different FTP service. It took a while to fix problems related to the fact that the new file structure (that was supposed to be a copy of the old one) was case sensitive (vs case insensitive old one), so we had to change a lot of existing FTP scripts.

      But now when I though that we are all set I found that new FTP service removes Hex 0D’s from the text files.

      I am using FTP threads to transfer messages to that file server and I just found out that the messages do not have 0D’s – it’s just one line. That breaks my parsing process that tries to read segments line by line.

      Any suggestions how to make the new FTP service keep 0D’s? For now I probably will have to switch to binary mode but I didn’t have to do it before.

      Any help will be appreciated.

      Thanks

    Viewing 4 reply threads
    • Author
      Replies
      • #70620
        David Harrison
        Participant

          Is the new file server the same o/s as the previous one? I’m just thinking that Microsoft uses 0D0A as the end of line delimiter and unix uses 0A.

        • #70621
          Sergey Sevastyanov
          Participant

            I’m not sure what OS it’s running. When I log into FTP manually it displays:

            Quote:

            UNIX Type: L8

            On the other hand we are Microsoft shop so I doubt they would change to Unix server – we just don’t have anybody to support Unix.

          • #70622
            Chris Williams
            Participant

              This has come up in a number of other threads. The ASCII v BINARY option in FTP is only important when sending between different operating systems. With BINARY, the destination file will be identical to the source file. With ASCII, the line delimiters (CR, CRLF, LF) used inside the file will be converted to the appropriate line delimiter character(s) for the destination system. Some FTP packages have a third option “AUTO” which allows it to decide on its own whether to select ASCII or BINARY based on each file’s extension.

            • #70623
              Sergey Sevastyanov
              Participant

                Yes, I changed it to Binary instead of ASCII because both systems are Windows and it works for now.

                I also made a little test. I took a text file with a message and transferred it to the old server and to the new server using exactly the same commands (including explicit mode as ASCII) and then compared results. The file on the old server came with all Hex 0D’s in place while the file on the new server doesn’t have them.

                Binary works for me now as both systems are Win

                Thank you, all, for your help

              • #70624
                Chris Williams
                Participant

                  Sounds like the new server is Unix, particularly since it responded “UNIX Type: L8”   🙂

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.