login about faq

How is it possible to convert CRLF line endings to LF line-endings when uploading a file from Windows to Linux/Unix?

asked Jan 20 '14 at 11:27

chilkat's gravatar image

chilkat ♦♦

One possibility is to add ", textMode" to the createDisposition argument of the sftp.OpenFile method. For example:

bool success = sftp.OpenFile("something.txt","readWrite","openOrCreate, textMode");

This assumes the server pay attention to the "textMode" disposition and implements it. Otherwise, the solution is to convert the CRLF to LF line endings prior to upload.


answered Jan 20 '14 at 11:30

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 20 '14 at 11:27

Seen: 3,134 times

Last updated: Jan 20 '14 at 11:30

powered by OSQA