# MAKEDIRQQ

Portability Function: Creates a new directory with a specified name.

## Module

USE IFPORT

result = MAKEDIRQQ (dirname)

dirname | (Input) Character*(*). Name of directory to be created.

## Results

The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE..

MAKEDIRQQ can create only one directory at a time. You cannot create a new directory and a subdirectory below it in a single command. MAKEDIRQQ does not translate path delimiters. You can use either slash (/) or backslash (\) as valid delimiters.

If an error occurs, call GETLASTERRORQQ to retrieve the error message. Possible errors include:

- ERR$ACCES - Permission denied. The file's (or directory's) permission setting does not allow the specified access.

- ERR$EXIST - The directory already exists.

- ERR$NOENT - The file or path specified was not found.

## Example

    USE IFPORT
    LOGICAL(4) result
    result = MAKEDIRQQ('mynewdir')
    IF (result) THEN
       WRITE (*,*) 'New subdirectory successfully created'
    ELSE
       WRITE (*,*) 'Failed to create subdirectory'
    END IF
    END

Parent topic: M to N

## See Also

DELDIRQQ
CHANGEDIRQQ
GETLASTERRORQQ