Ftp Object : Site Method |
Sends the ftpSite command.
If Timeout is greater than 0, this method blocks until a reply is received from the server or a ptTimeout error occurs. If Timeout is 0, this method immediately returns and the Progress event fires with FtpCmd = ftpSite when the reply is received. The Result parameter is used to capture the data so it must not go out of scope while the command completes (it must have file or global scope).
This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):
Private Sub Command1_Click() On Error Goto OnError ' use intrinsic error handling Dim Result As String ' local scope allowed because Timeout > 0 Ftp1.Timeout = 1000 ' get help on the SITE command Ftp1.Site "Help", Result Text1.Text = Result ' show to user Exit Sub OnError: ' Any error jumps here Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description End Sub