Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Extra line breaks while uploading the file on ftp server

Extra line breaks while uploading the file on ftp server

Scheduled Pinned Locked Moved Visual Basic
csharpasp-netsysadminlinux
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MAP Tiger
    wrote on last edited by
    #1

    Hi I am uploading a text file on a Linux server but after uploading when I download the same file again (to download again I am using CuteFTP) and open it then I see that there are an extra line breaks after each line. I am using FtpWebRequest method to upload the file while UseBinary is set to true. Can you please help me out asap? Regards,

    MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

    C 1 Reply Last reply
    0
    • M MAP Tiger

      Hi I am uploading a text file on a Linux server but after uploading when I download the same file again (to download again I am using CuteFTP) and open it then I see that there are an extra line breaks after each line. I am using FtpWebRequest method to upload the file while UseBinary is set to true. Can you please help me out asap? Regards,

      MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

      C Offline
      C Offline
      Chinners
      wrote on last edited by
      #2

      This sounds like it could be a problem with the editor you are using. Linux (and most unix like os) use LF (linefeed, chr(&h0a)) to signify a new line. Windows uses CRLF (Carriage Return+Line Feed, chr(&h0d)+chr(&h0a)) I suspect that some editor you have used has converted from the Linux newline format to the windows newline format. If you could do a hex dump of the file at all stages, and check for the line breaks you should be able to see where this is happening. (oh, and CuteFTP is also set to use Binary for the specific file format you are using isnt it? ;) )

      M 1 Reply Last reply
      0
      • C Chinners

        This sounds like it could be a problem with the editor you are using. Linux (and most unix like os) use LF (linefeed, chr(&h0a)) to signify a new line. Windows uses CRLF (Carriage Return+Line Feed, chr(&h0d)+chr(&h0a)) I suspect that some editor you have used has converted from the Linux newline format to the windows newline format. If you could do a hex dump of the file at all stages, and check for the line breaks you should be able to see where this is happening. (oh, and CuteFTP is also set to use Binary for the specific file format you are using isnt it? ;) )

        M Offline
        M Offline
        MAP Tiger
        wrote on last edited by
        #3

        Hi Thanks for the reply. Well I figured out that it was due to binary mode set to true so I just switched off binary mode and switched on passive mode and my problem solved. :) Problem was due to Linux server as it was manipulating the file if uploaded through binary mode and the file was huge too, and passive mode just did the trick so I am happy now. Regards,

        MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups