Putfile truncates file? (wodFTPServer)
Hello,
I'm seeing strange behavior when using the putfile() function of wodsftp. The file on the sftp server is smaller than the original file, and appears to be truncated mid-line. I've tested the behavior from different environments, to different sftp servers, and with different files, so I think the problem is isolated to wodsftp. The resulting file size is not consistent either.
Option Explicit
Dim objFTP, lst
Set objFTP = WScript.CreateObject( WeOnlyDo.wodSFTPCom.1 , wod_ )
objFTP.Hostname = my.sftpserver.com
objFTP.Login = username
objFTP.Password = password
objFTP.Blocking = 1
objFTP.LicenseKey = MyLicenseKey
objFTP.Connect
objFTP.putfile d: est.txt , /ImportFiles/ServerSide/dirname/test.txt
msgbox lastError: & objFTP.LastError
objFTP.Disconnect
Sub wod_Connected(ErrorCode, ErrorText)
WScript.Echo Connected & ErrorText
End Sub
Sub wod_Disconnected()
WScript.Echo Disconnected
End Sub
The original file is about 3.3mb, and the resulting files are anywhere from 2.5mb to 3 mb. Occasionally the entire file is written, but there is no consistent pattern.
Thanks for your help,
-Dave
Re: Putfile truncates file?
David,
this usage looks so simple that it cannot cause truncation like that. There must be something else involved. Do you have most up-to-date wodSFTP? Is transfer mode set to ASCII perhaps (instead of binary)?
Can you provide us with something we could duplicate?
Kreso