Re: Data in file sent through SFTP are being trunc - WeOnlyDo Discussion board

Re: Data in file sent through SFTP are being trunc (General questions)

by Tomek, Monday, May 11, 2009, 16:14 (5676 days ago) @ wodDamir

Hi Damba,

Just tried this:
[code]

Set sftp1 = WScript.CreateObject( WeOnlyDo.wodSFTPCom.1 , wod_ )

sftp1.HostName = hostname
sftp1.Login = UName
sftp1.Password = pass
sftp1.Blocking = True
sftp1.Resume = True
sftp1.Connect

sftp1.PutFile Book1.csv , /u/

sftp1.GetFile e:Book.csv , /u/Book1.csv

sftp1.Disconnect

[/code]

and still not working. This is my Book1.csv

Before:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

After:
<- first one is blank and in second row number 7 is the first one
7
8
9
10
11
12
13
14
15
16
17

Tomek,

I just tried this:

[code]sftp1.HostName = your_host
sftp1.Login = your_login
sftp1.Password = your_password
sftp1.Blocking = True
sftp1.Resume = True
sftp1.Connect

sftp1.PutFile C:Book1.csv , /home/weonlydo/

sftp1.GetFile C:Book.csv , /home/weonlydo/Book1.csv [/code]

And it worked like a charm. Can you please try that code?

Regards,
Damba


Complete thread: