Skip to content

DIR_CREATE

DIR_CREATE creates a new directory.

Syntax

leo-grammar
CC "AdoScript" DIR_CREATE path:strValue

#--> RESULT ecode:intValue .
CC "AdoScript" DIR_CREATE path:strValue

#--> RESULT ecode:intValue .

Parameters

  • path (strValue) - the path to the directory to be created

Returns

  • ecode (intValue) - Contains the error code or 0 in case of success.

Details

Mind the masking of backslashes (\ has to be written for one backslash).

DIR_CREATE can create only one new directory per call, so only the last component of path can name a new directory. Relative paths relate to the current working directory (CWD).

The return variable ecode has the value 0 if no error occurred and a value different than 0 otherwise.

See Also

GET_CWD
SET_CWD

Examples

asc
CC "AdoScript" DIR_CREATE path:"c:\\temp\\testdir"
IF (ecode = 0) {
    CC "AdoScript" INFOBOX "Directory successful created."
} ELSE {
    CC "AdoScript" INFOBOX "Directory could not be created."
}
CC "AdoScript" DIR_CREATE path:"c:\\temp\\testdir"
IF (ecode = 0) {
    CC "AdoScript" INFOBOX "Directory successful created."
} ELSE {
    CC "AdoScript" INFOBOX "Directory could not be created."
}

Creates the directory 'testdir' in the temp folder

Versions and Changes

Available since ADOxx 1.3