Carriage Return lost during SFTP
Hi,
Source - Windows 2016
Target - Windows 2018 R2 Standard
Client - WinSCP - 5.13.3
Script commands -
start /wait xxxx/WinSCP.exe /log="%logpath%%logfile%" /command "option batch on" "option confirm off" "open sftp://%uname%@%hostip%:%portnum% -hostkey=""%hostkeynum%"" -rawsettings KEX=dh-group1-sha1 -privatekey=%privatekeyloc%" "option transfer ascii" "cd %remotedir%" "lcd %localdir%" "put -delete -nopreservetime %filetype%" "exit"
Issue :
Files generated in the source server has "Carriage Return" but after FTP the "Carriage Return" was lost and left with "LineFeed"
Resolution -
change the mode of transfer from ascii to binary
Found similar article but the server OS and the client WinScP version is not the same though.
Appreciate your advice
Many tks
Source - Windows 2016
Target - Windows 2018 R2 Standard
Client - WinSCP - 5.13.3
Script commands -
start /wait xxxx/WinSCP.exe /log="%logpath%%logfile%" /command "option batch on" "option confirm off" "open sftp://%uname%@%hostip%:%portnum% -hostkey=""%hostkeynum%"" -rawsettings KEX=dh-group1-sha1 -privatekey=%privatekeyloc%" "option transfer ascii" "cd %remotedir%" "lcd %localdir%" "put -delete -nopreservetime %filetype%" "exit"
Issue :
Files generated in the source server has "Carriage Return" but after FTP the "Carriage Return" was lost and left with "LineFeed"
Resolution -
change the mode of transfer from ascii to binary
Found similar article but the server OS and the client WinScP version is not the same though.
Appreciate your advice
Many tks