Your best friend for file transfer.

Fetch application logoFetch

Uploaded files not translating CR character on AIX (8 posts)

  • Started 16 years ago by vcocco
  • Latest reply 16 years ago from Scott McGuire
  • vcocco Member

    Hello All,
    On my OS X system I'm saving MS Excel spreadsheets as formatted text (space delimited) text files and then using Fetch to upload them to our AIX (Unix) box.

    What I'm seeing on the AIX side is a 20 line spreadsheet appearing as one LONG line on AIX because AIX does not know that to do with the OS X style carriage return.

    I've tried the different upload options in Fetch - Automatic, Text, Binary but the uploads still appear as one line on AIX, with the carriage returns being replaced by '^M' characters (read: control-V return<enter key> ).

    Is there a solution to my problem?

    Any help would be most appreciated.

    TIA

    Posted 16 years ago #

  • Scott McGuire Administrator

    Hi,

    We'd like some more information to help figure out the problem.

    Are you connecting to the server using SFTP or FTP?

    And are you just having a problem with this particular file, or all text files that you transfer to this server?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 16 years ago #

  • vcocco Member

    Hi,
    We're connecting to the server using SFTP. And we are having the same problem with all MS Excel (OS X .xls files) saved as text files.
    When you save the Excel file as a space delimited text file Excel puts a '.prn' extension at the end of it. I've changed the extension to '.txt' but the same thing happens.

    Posted 16 years ago #

  • vcocco Member

    Hello again,

    This morning I created a simple text file using TextEdit and uploaded it to our sever via Fetch. The CR characters translated OK.

    Posted 16 years ago #

  • Scott McGuire Administrator

    Hi,

    Thanks for the additional information.

    Here's what's happening - when files are uploaded using FTP, line endings in text files are automatically translated by the server to the server's standard line ending.

    However, SFTP does not translate line endings on upload, so if the file did not start with the correct line endings for the server, they will still be incorrect after uploading.

    The file created using TextEdit has Unix line endings (a single line feed character), which are what AIX expects; it sounds like the Excel file has Mac OS 9-style line endings (a single carriage return).

    The good news is there is a hidden Fetch preference for forcing SFTP uploads to convert line endings to a certain style. The instructions for setting this preference are here: Converting line endings when uploading with SFTP . You want to set it to force the line endings to be converted to line feeds.

    Let us know if this fixes the problem or not for you, or if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 16 years ago #

  • vcocco Member

    Hi,
    Just adding to what I wrote this morning regarding the text file upload.
    The simple text file uploads OK, tranlating the carriage returns; so it must be an issue with how Excel saves the file on OS 10.

    Posted 16 years ago #

  • vcocco Member

    Hello Scott,

    Thanks for the solution. This worked for me:
    defaults write com.fetchsoftworks.Fetch SFTPUploadTextEOLStyle -int 3

    Do I have to do this everytime I run Fetch?

    Posted 16 years ago #

  • Scott McGuire Administrator

    Hi,

    No, you do not need to set it every time you run Fetch - Fetch will remember the setting until you change it again, like any other preference.

    I am a little surprised "3" worked; I would have guessed that "2" would have been the correct choice for you. But if it's doing the correct thing now, it doesn't matter!

    Best,

    Scott McGuire
    Fetch Softworks

    Posted 16 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.