banner



winscp command line option transfer binary

Pennie
Joined:
Posts:
1
Location:
USA

WE have a customer pushing files from their LINUX server to our Windows server. They are using winscp sftp and since the default is BINARY mode, it is dropping the CR from the CR/LF in the file on fashion to our Windows server. Can you provide an example of the command to switch the mode from BINARY to ASCII? I found on your site the switch -transfer is available, but I am non certain where they should place it in their code and also what more at that place is to information technology. Is it -transfer ASCII or what? Thank you so much. Pennie

Reply with quote

martin◆
Site Admin
martin avatar
Joined:
Posts:
36,863
Location:
Prague, Czechia

They are using winscp sftp and since the default is BINARY mode, it is dropping the CR from the CR/LF in the file on way to our Windows server.

Binary style does non drop anything. Binary fashion transfers the file every bit is, without whatever alter.
And so if there's no CR in a file uploaded using binary mode, it was non in the original file in the first place.

Anyway to answer your question:

Can you provide an instance of the command to switch the mode from BINARY to ASCII? I found on your site the switch -transfer is available, but I am non sure where they should identify it in their code and also what more at that place is to it. Is it -transfer ASCII or what?

                put                -transfer=ascii                "C:\local\path\file.ext"                "/remote/path/file.ext"              

See https://winscp.cyberspace/eng/docs/scriptcommand_put

Though as bulk of SFTP servers actually do not back up ascii way, it is false by WinSCP. For that, WinSCP needs to know, what EOL sequence does the server utilise. If you lot want to add together CR, change your open control as:

                open up                sftp://.../                -rawsettings                EOLType=1

See:
https://winscp.internet/eng/docs/scriptcommand_open
https://winscp.internet/eng/docs/rawsettings#eoltype

WinSCP can generate a script template with all these options for you:
https://winscp.net/eng/docs/ui_generateurl#script

Respond with quote

Source: https://winscp.net/forum/viewtopic.php?t=28939

Posted by: throwershichis78.blogspot.com

0 Response to "winscp command line option transfer binary"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel