Topic "Scripted upload adds empty lines to csv-file"

Author Message
bakker_be
[View user's profile]

Joined: 2014-12-05
Posts: 2
Hi there, I'm trying to automate the upload of a csv file through FTP, but for some strange reason this command
Code:
c:\program files\winscp\winscp.com "/script=C:\Data\PLANNING\PLANNING_20141228.txt"
adds a blank line after each line in my csv.
Content of the script file:
Code:

open ftp://user:pwd@ftp
cd /data
put C:\Data\PLANNING\PLANNING_20141228.csv
close
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
How do you display the file to see that the blank line was added?
I would assume the CSV file has Windows line endings. Viewer expects Unix line endings and interprets the Windows line ending as an additional new line.
Try to use text transfer mode.
https://winscp.net/eng/docs/transfer_mode
_________________
Martin Prikryl
bakker_be
[View user's profile]

Joined: 2014-12-05
Posts: 2
Hi Martin,
I open the file with Notepad++ or Programmer's Notepad, both display additional lines which weren't visible in the original file. I'll look into text-transfer.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License