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 "true" to create an intermediary directory if it does not exist
b=true
 
// Use the MKDIR function to create the new directory, including the intermediary 
// directory DatQuality, if it does not exist.
d mkdir(dir,b)