No announcement yet.

Why would one particular file change sizes when transferred by SFTP?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Why would one particular file change sizes when transferred by SFTP?

    I have a folder of HTML and stuff, and a particular web host which I sometimes access by SFTP in BC 4.0 (not the latest version -- updates are out of my control). There are a bunch of files which mainly contain HTML, and in most cases when I upload the file via SFTP it shows as identical on both sides, but there's this one .html file which always shows as smaller after upload on the remove server (Linux) than it does on the local machine (Windows 10).

    This seems like the sort of thing that would happen in the old days if you transferred files in text mode and it stripped the carriage returns, but I didn't think SFTP would do that, and if it did, I don't know why other files are not being affected. I don't see any option that can make this file transfer in a more exact binary manner.

    I'm not sure, but I think the issue correlates with the file's name: if it ends in ".html" it misbehaves, but with other name extensions it doesn't get affected.

    What's going on?
    Last edited by paulkienitz; 19-Mar-2019, 05:44 PM.

  • #2
    On another machine I managed to download it binarily, and verified that the affected files are indeed losing their carriage returns.


    • #3

      BC4 can alter the line ending characters for text files when uploading to an FTP to match the destination OS style. To update this, go to the Tools menu -> Profiles dialog, select your SFTP profile, and in the Transfer tab, switch from AUTO to Binary transfer type. Then restart BC4, and re-attempt the transfer. How does this work for you?

      You can also update the <default> profile, or any other previously saved profiles, to update their settings as needed.
      Aaron P Scooter Software