Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Illegal characters in SFTP File upload

$
0
0
Im reading a text file from Windows into a file stream, then uploading it to openVMS.

The file uploads but when I look at it in openVMS each line has some sort of linebreak on the end that looks like a []

Is there a way I can stop these getting input?

Here is my code:
            PasswordAuthenticationMethod authMethod = new PasswordAuthenticationMethod("Buck", "Rogers");
            ConnectionInfo connectionInfo = new ConnectionInfo("space", "Buck", authMethod);

            SftpClient client = new SftpClient(connectionInfo);

           client.Connect();
           var fs = File.OpenRead(@"C:\temp\thistest.txt");
            client.ChangeDirectory("DSA31:[COMPANY.AUTOMATION31]");

            client.UploadFile(fs, "thistest.COM");


            client.Disconnect();

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>