Re: Posible to use wodSFTP in .vbs? - WeOnlyDo Discussion board

Re: Posible to use wodSFTP in .vbs? (General questions)

by wodSupport, Tuesday, February 21, 2006, 03:40 (6850 days ago) @ Burma

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]


Complete thread: