wodSFTP --vbs --Retry the Connection - WeOnlyDo Discussion board

wodSFTP --vbs --Retry the Connection (General questions)

by openpc, Wednesday, April 12, 2006, 09:39 (6800 days ago)


I have used the .vbs sample like the following 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

The problem is I am trying to Retry the
Connection when the first connect is failing.
What can I do?
Put the Retry code into the 'wod_Connected()' events ?

*either 'on error...'or 'objFTP.LastError' can not get a string representation of the Connected error.


Complete thread: