Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to create new text file to FTP using WinSCP and write data into newly created file

Sorry, but this is not a code writing service.
Start with some of the many examples available:
https://winscp.net/eng/docs/library_examples
If you have any specific problem, ask a specific question.
Pvision

How to create new text file to FTP using WinSCP and write data into newly created file

Hi All,

I need help in C# to
1. Connect to FTP site using WinSCP.
2. Check whether the specified named file is present on that FTP path .
3. If the mentioned named file not present then create a new text file and write one by
one string(having data in List<String>) to the newly created file.
For example, the newly crated file on FTP will be "sample.txt" and can have content like :
SampleData1
SampleData2
SampleData3
SampleData4 and so on. Each string will be on new line..
4. close the connection.