mkdir Function

Creates a directory.

Category: String
Returned data type: Boolean

Syntax

mkdir(string<, create-intermediary-directories>)

Required Argument

string

specifies the text string that contains the directory to create

Optional Argument

create-intermediary-directories

specifies whether to create intermediary directories if they do not exist, using these values:

 

TRUE specifies to create the intermediary directories.

 

FALSE specifies not to create intermediary directories.

Examples

Example 1

// Declare a string variable to contain the path to the directory to be created

string dir

dir="C:\DataQuality\my_data"

 

// Declare a Boolean variable for the MKDIR function call

boolean d

 

// Use the MKDIR function to create the C:\DataQuality\my_data directory

d mkdir(dir)

Example 2

// Declare a string variable to contain the path to the directory to be created

string dir

dir="C:\DataQuality\my_data"

 

// Declare Boolean variables for the MKDIR function call and the optional condition

boolean b

boolean d

 

// Set the condition for Boolean b to "true"

b=true

 

// Use the MKDIR function to create the new directory, recursively based on the value of Boolean b

d mkdir(dir,b)