Changes current directory on remote FTP server.
Syntax
object.ChangeDirectory( Path )
Parameters
- Path
- A string value which specifies the directory on the server.
Return Value
A value of zero is returned if the method succeeds. Otherwise,
a non-zero error code is returned which indicates the cause of the
failure.
Remarks
The ChangeDirectory method changes the current working
directory on the server. This method updates the
ServerDirectory property to reflect the new path.
Example
Private Sub cmdChgDir_Click()
Dim nError As Long
nError = FileTransfer1.ChangeDirectory(Trim(txtServerDirectory.Text))
If nError > 0 Then
MsgBox "ChangeDirectory error: " & nError
End If
txtServerDirectory.Text = FileTransfer1.ServerDirectory
End Sub
See Also
ServerDirectory
Property
|