MakeDirectory Method  
 

Create a new directory on the remote FTP host.

Syntax

object.MakeDirectory( NewDirectory )

Parameters

NewDirectory
A string value that specifies the name of the directory to create 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 MakeDirectory method creates a new directory on the server. The user must have the appropriate permissions to create a directory or an error will occur.

Example

Private Sub cmdMakeDir_Click()
    Dim nError As Long
    
    nError = FileTransfer1.MakeDirectory(Trim(txtNewDirectory.Text))
    If nError > 0 Then
        MsgBox "MakeDirectory error: " & nError
    End If
End Sub

See Also

ChangeDirectory Method, RemoveDirectory Method