Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.MakeDir Method

Creates a directory on the FTP server.

Pascal
procedure MakeDir(
    const ADirName: string
);
Parameters 
Description 
ADirName 
Directory to create

MakeDir is a procedure used to create a directory on the FTP server. 

ADirName is a String that identifies the directory to be created on the FTP server. ADirName must conform to the file naming conventions for the FTP server, or an FTP error response code and message will be returned. 

MakeDir causes the directory specified in ADirName to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative). 

Please note that some FTP servers may not allow the user to create new directories based on permissions set when authentication is performed in the Login method. 

Use RemoveDir to remove a specified directory using its absolute or relative path name. 

Use ChangeDir to change the current directory on the remote FTP server to a specific absolute or relative path. 

Use RetrieveCurrentDir to determine the present working directorty on the remote FTP server file system.

[Delphi]

  AFtp.MakeDir('/public/MyFiles');
  AFtp.MakeDir('/public/MyOtherFiles');

  AFtp.ChangeDir('/public');
  AFtp.ChangeDir('MyFiles');
  AFtp.ChangeDirUp;
  AFtp.ChangeDir('MyOtherFiles');
  AFtp.ChangeDir('/');
  AFtp.RemoveDir('/public/MyOtherFiles');
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.