Carriage returns with scripted winscp.com

Advertisement

pfarrugia
Joined:
Posts:
1

Carriage returns with scripted winscp.com

Hi,
If I manually ftp a file using command line winscp.com from Linux host to Windows client in ascii mode a carriage return is added at the end of each line. However if I script the same action the carriage return (required for Windows VBA) is not added.

The command used for this is winscp.com /script file shown below:

Script 1
open ftp://user:pw@server
cd remote directory
lcd "local directory"
ascii
get "filename.csv"
bye
or
Script 2
open ftp://user:pw@server
cd remote directory
lcd "local directory"
get -transfer=ASCII "filename.csv"
bye
For both script files above the transfers show ASCII mode in the command console launched with VBA code where scripts and batch file are created. However carriage returns are not added to the files being transferred.

I am using WinSCP Version 5.21.1

Any assistance would be greatly appreciated.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum