OS-CREATE-DIR statement
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Executes an operating system command from within ABL that creates one or more new directories.
Syntax
|
- dirname
- A CHARACTER or LONGCHAR expression containing the name of a directory to create. If the directory already exists, no error is generated. If a file with this name exists, an error is generated. The name can be a pathname or a simple name. The directory name can contain Unicode characters. See Internationalize ABL Applications for more information about Unicode.
If dirname is not a fully qualified directory name, ABL prepends the current working directory to dirname.
- VALUE ( expression )
- A CHARACTER or LONGCHAR expression that returns the name of a directory to create. Expression can contain constants, field names, and variable names. The directory name can contain Unicode characters.
Example
The following procedure prompts the user for the name of a directory, then creates it. If the name you give is not fully qualified, the directory is created in your current directory.
r-os-dir.p
|
Notes
- The directory name must conform to the naming conventions of the underlying operating system.
- If a specified directory cannot be created, ABL returns an error code.
- Although an error can occur during execution of this statement, the
statement does not generate an error message, raise an error condition, or affect the
program's flow in any way. Check for an execution error by using the
OS-ERRORfunction and evaluating the return.