Product Site

8.45. SysMkDir

Windows:

Unix-like systems:

Creates the specified directory. This function will only create the final directory in the path, all intermediate directories must already exist.

Parameter:
dirspec

The directory to be created. The directory name does not support wildcard characters. On Unix-like systems, if the first character is a ~ (tilde) character optionally followed by a username, it is replaced by the current or specified user's home directory.
mode (Unix-like systems only)

The file permission bits of the new directory as a decimal number between 0 (octal 000) and 511 (octal 777). If not specified, mode defaults to 511 (octal 777).

Any mode restrictions specified by umask will always be taken into account.

Return codes:
0

Directory creation was successful.
Other

An operating system error code. On Windows, this may be one of the following, but could be others.
2

File not found.
3

Path not found.
5

Access denied.
26

Not a DOS disk.
87

Invalid parameter.
108

Drive locked.
183

Directory already exists.
206

File name exceeds range.
Example 8.35. RexxUtil — SysMkDir
call SysMkDir "backup"