Post a reply

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

Arshia

File Data looking jumbled after the file is ftp'd to windows

Hi,

I got the solution for the above posted issue. I used ASCII m ode instead of BINARY. Now on windows file data looks aligned.

Thanks,
Arshia

File Data looking jumbled after the file is ftp'd to windows

Hi ,

I have a .txt file on windows which is being ftp'd to windows folder. File looks aligned (line by line ) on the server.
But the same file data looks jumbled once ftp'd. Can some one please tell me how to get over this?

Ex of files that I am seeing on server and windows

On server :

a|b|c|d
e|f|g|h

On windows :

a|b|c|d|e|f|g|h

Each line is a record and we would like to see it (in windows) the way it is on server. I tried using binary option but it is still the same.
doughtsh

Thank you both. My initial reasoning was that if I'm sending a text file, the transfer mode should be ASCII but reading the suggested page in the manual explained why that was wrong, so I've learned something which is more generally useful.

Scott
Freitag

Use binary transfer mode instead of ascii and the translation should stop.

The manual setting of mode should also circumvent any automatic text mode, but you might have to remove the rule for that file type if it does not.
doughtsh

CR/LF being replaced with LF during scripted transfer

Using v4.1.8 on Windows Server 2003
I'm using WinSCP in a SQL Server 2005 Integration Services package (Execute Process task) as follows

Executable: C:\Program Files\WinSCP\WinSCP.exe
Arguments: -script=\\dcf\data$\shared_sh\mirror.txt

Contents of mirror.txt (redacted)

option batch on
option confirm off
open sftp://username:password@server.IP.address:22
option transfer ascii
put \\dcf\data$\Shared_SH\mgnfin_leg_dignity_6_0409.csv
put \\dcf\data$\Shared_SH\mgnfin_leg_dignity_6_0409.sum
close
exit

The two files being transferred are plain text with CR/LF line delimiters (I've doublechecked this with a hex editor!). The files transfer fine but I've had a message back from the recipient that CR/LF has been replaced with LF in the file. I have no idea what software is running at the other end. I can't see an option in the help for setting the line delimiter in a script. If it's relevant, I have to use UNC names as mapped drives are not available to the domain account which runs the process.

Any tips?

Thanks
Scott