How do I specify text or binary mode for file transfer with SFTP?

By default, SFTP uses binary mode.

Text mode is supported by SFTP protocol versions 4 and later. To ensure that the connection is established using SFTP 4 or later, you need to enable SFTP 4, 5 and 6 and disable SFTP 1, 2 and 3 using Versions property of ElSimpleSftpClient or ElSftpClient components. See the documentation for information about how to set Versions property.

To use Text mode for data transfer using Upload*() and Download*() methods of ElSimpleSFTPClient, use ASCIIMode property of ElSimpleSFTPClient component.

ElSimpleSFTPClient emulates ASCII mode for protocol versions of 3 and lower. However, this emulation is not reliable if you don't know what EOL (end-of-line) character(s) the server uses.

Ready to get started?

Learn more about SecureBlackbox or download a free trial.

Download Now