How to increase the number of columns to transfer a file from Windows to MCP

Advertisement

Andres Gomez
Guest

How to increase the number of columns to transfer a file from Windows to MCP

Hello, I am trying to transfer a file .txt by SFTP. It has more than 150 columns, the problem is that in column 80 is giving a line jump
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = "10.0.0.7",
    PortNumber = 2222,
    UserName = "user",
    Password = "password",
    SshHostKeyFingerprint = "ssh-rsa 2048 xxxxx"
};
 
using (Session session = new Session())
{
    // Connect
    session.Open(sessionOptions);
 
    // Upload files
 
    TransferOptions transferOptions = new TransferOptions
    { TransferMode = TransferMode.Automatic, };
 
    session.PutFiles(@"C:\Temp\LOTE1808.035", "/public/test2/", false, transferOptions).Check();
}

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
38,408
Location:
Prague, Czechia

Re: How to increase the number of columns to transfer a file from Windows to MCP

Your code should be using binary transfer mode. So WinSCP should not be modifying the file anyhow. If you file is modified anyway, it is unlikely a WinSCP issue. Either the file was modified before or after the transfer by other systems. If you want us to check anyway, post a session log file.

Reply with quote

Advertisement

You can post new topics in this forum