Intel® Fortran Compiler 17.0 Developer Guide and Reference
Portability Function: Creates a new directory with a specified name.
USE IFPORT
result = MAKEDIRQQ (dirname)
dirname |
(Input) Character*(*). Name of directory to be created. |
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.
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