Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: Carriage returns with scripted winscp.com

Please post logs from both scenarios (manual and script).
pfarrugia

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.