Remove a directory on the remote FTP server.
Syntax
object.RemoveDirectory( DirectoryName )
Parameters
- DirectoryName
- A string value which specifies the name of the directory to
remove 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 RemoveDirectory method removes an existing directory on
the server. You must have the appropriate permission to remove
the directory, or an error will occur. Note that most systems will not
allow you to remove a directory if it contains files.
Example
Private Sub cmdRmdir_Click()
Dim nError As Long
nError = FileTransfer1.RemoveDirectory(Trim(txtDirectory.Text))
If nError > 0 Then
MsgBox "RemoveDirectory error: " & nError
End If
End Sub
See Also
ChangeDirectory Method,
MakeDirectory Method
|