tumblr tracker

CreateDirectory

Library Reference ›› FTP ››
Parent Previous Next

FTP.CreateDirectory


Namespace: FTP


Creates a directory on the FTP server. The full path is created, meaning if any part of the path is missing it will be automatically created.


retval = FTP.CreateDirectory(FtpClient, Path)


Parameters:

- FtpClient; a handle variable returned from a previous call to CreateFtpClient;

- Path; string constant or variable containing the slash delimited FTP path to create


Returns:

true if creation succeeded or the directory existed already or false otherwise; boolean value.


Example


$FtpClient = FTP.CreateFtpClient("moscripto.com", 21, "moscriptoftpdemo", "demopass");

if (Error.IsError())
{
   MessageBox.ShowError(Error.GetErrorMessage());
   Error.ClearError();
}
Else
{
   FTP.CreateDirectory($FtpClient, "some/path/on/the/server");
   
   If (Error.IsError())
   {
       MessageBox.ShowError(Error.GetErrorMessage());
       Error.ClearError();
   }
   Else {
       MessageBox.ShowInfo("FTP upload succeeded.");  
   }
   
   FTP.DestroyFtpClient($FtpClient);
}