Posible to use wodSFTP in .vbs? (wodSFTP / wodSFTP.NET / wodSFTPdll)
Is there a way to use wodSFTP with .vbs (wsh) file? Either the COM or OCX I don't care. A simple example showing how to connect and write to a file would be useful.
Re: Posible to use wodSFTP in .vbs?
Yes, you can. It's important to set Blocking property to true. Here's example code:
[code]Option Explicit
Dim objFTP, lst
Set objFTP = WScript.CreateObject( WeOnlyDo.wodSFTPCom.1 , wod_ )
' please change these lines, from here
WScript.echo Please edit this file and setup Login, Hostname and Password properties
objFTP.Hostname = put.your.host
objFTP.Login = yourlogin
objFTP.Password = yourpass
' to here
objFTP.Blocking = 1
objFTP.Connect
objFTP.ListDir ( / )
lst = objFTP.ListItem
WScript.echo lst
objFTP.Disconnect
Sub wod_Connected(ErrorCode, ErrorText)
WScript.Echo Connected & ErrorText
End Sub
Sub wod_Disconnected()
WScript.Echo Disconnected
End Sub
[/code]