Dart Ftp Control
MakeDirectory Method
Specifies the desired absolute or relative directory path.
Description
Create a directory.
Syntax
Visual Basic
Public Sub MakeDirectory( _
   ByVal PathName As String _
) 
Parameters
PathName
Specifies the desired absolute or relative directory path.
Remarks

Sends the ftpMakeDirectory command.

If Timeout is greater than 0, MakeDirectory blocks until a reply is received from the server or a ptTimeout error occurs. If Timeout is 0, MakeDirectory immediately returns and the Progress event fires with FtpCmd = ftpMakeDirectory 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