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 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.
Andres Gomez

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();
}