| Author | Message |
|---|---|
|
doughtsh
Joined: 06 May 2009
Posts: 2 |
Posted: 6 May 2009 13:31
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 |
| Advertisements |
|
|
Freitag
Joined: 25 Oct 2007
Posts: 29 |
Posted: 6 May 2009 18:17
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. |
|
prikryl
Site Admin
Joined: 10 Dec 2002
Posts: 11779 Location: Prague, Czech republic |
Posted: 7 May 2009
Exactly. Use "option transfer binary".
See documentation to understand transfer modes. _________________ Martin Prikryl |
|
doughtsh
Joined: 06 May 2009
Posts: 2 |
Posted: 7 May 2009 09:14
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 |
| Advertisements |
|
You can post new topics in this forum
WinSCP is an open source SFTP client and FTP client for Windows. Its main function is the secure file transfer between a local and a remote computer. Beyond this, WinSCP offers basic file manager functionality. It uses Secure Shell (SSH) and supports, in addition to Secure FTP, also legacy SCP protocol. [More]
WinSCP is also available as a plugin to two file managers, FAR and Altap Salamander.
WinSCP is free, open-source software, and is distributed under the GNU General Public License (GPL). [More]
Site design by Black Gate