PreviousNextIndex

OS-CREATE-DIR statement

Executes an operating system command from within ABL that creates one or more new directories.

Syntax

OS-CREATE-DIR { dirname | VALUE ( expression ) } ... 

dirname
VALUE ( expression )
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
DEFINE VARIABLE stat     AS INTEGER   NO-UNDO. 
DEFINE VARIABLE dir_name AS CHARACTER NO-UNDO FORMAT "x(64)" 
  LABEL "Enter the name of the directory you want to create.". 
UPDATE dir_name. 
OS-CREATE-DIR VALUE(dir_name). 
stat = OS-ERROR. 
IF stat NE 0 THEN 
  MESSAGE "Directory not created. System Error #" stat. 

Notes
See also

OS-ERROR function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex