Dart Ftp Control
RemoveDirectory Method
Specifies the absolute or relative path of the directory to remove.
Description
Removes a directory.
Syntax
Visual Basic
Public Sub RemoveDirectory( _
   ByVal PathName As String _
) 
Parameters
PathName
Specifies the absolute or relative path of the directory to remove.
Remarks

Sends the ftpRemoveDirectory 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 = ftpRemoveDirectory when the reply is received.

Error Codes

This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):

Example
Private Sub cmdDirectoryTest_Click()
' this shows directory manipulation using the Ftp Control
' login to the ftp server
Ftp1.Login "www.testserver.com", "Administrator", "123456"
' print current directory, should be '/'
Debug.Print Ftp1.Directory
' create a new directory
Ftp1.MakeDirectory "tempdir"
' set directory to newly created dir
Ftp1.Directory = "tempdir"
' print current directory, should be '/tempdir'
Debug.Print Ftp1.Directory
' change back to parent dir
Ftp1.ChangeDirectoryUp
' print current directory, should be '/'
Debug.Print Ftp1.Directory
' delete directory
Ftp1.RemoveDirectory "tempdir"
' attempt to change to deleted dir will result in error
Ftp1.Directory = "tempdir" ' !error
End Sub
See Also

Ftp Object  | Ftp Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic