HELPLIB.HLB  —  CREATE  /DIRECTORY
    Creates one or more new directories or subdirectories. The
    /DIRECTORY qualifier is required.

    Requires write (W) access to the master file directory (MFD) to
    create a first-level directory. On a system volume, generally
    only users with a system user identification code (UIC) or the
    SYSPRV (system privilege) or BYPASS user privileges have write
    (W) access to the MFD to create a first-level directory.

    Requires write (W) access to the lowest level directory that
    currently exists to create a subdirectory.

    Format

      CREATE/DIRECTORY  directory-spec[,...]

1  –  Parameter

 directory-spec[,...]

    Specifies the name of one or more directories or subdirectories
    to be created. The directory specification optionally can be
    preceded by a device name (and colon [:]). The default is the
    current default directory. Wildcard characters are not allowed.
    When you create a subdirectory, separate the names of the
    directory levels with periods (.).

    Note that it is possible to create a series of nested
    subdirectories with a single CREATE/DIRECTORY command. For
    example, [a.b.c] can be created, even though neither [a.b] nor
    [a] exists at the time the command is entered. Each subdirectory
    will be created, starting with the highest level and proceeding
    downward.

2  –  Description

    The CREATE/DIRECTORY command creates new directories as well
    as subdirectories. Special privileges are needed to create
    new first-level directories. (See the restrictions noted
    above.) Generally, users have sufficient privileges to create
    subdirectories in their own directories. Use the SET DEFAULT
    command to move from one directory to another.

3  –  Qualifiers

3.1    /ALLOCATION

       /ALLOCATION=n

    Specifies the initial number of blocks to be allocated to each of
    the specified directories. The default allocation is 1 block.

    This qualifier is useful for creating large directories, for
    example MAIL.DIR;1. It can improve performance by avoiding the
    need for later dynamic expansion of the directory.

    This qualifier does not apply to Files-11 ODS-1, ODS-3, or ODS-4
    volumes.

3.2    /LOG

       /LOG
       /NOLOG (default)

    Controls whether the CREATE/DIRECTORY command displays the
    directory specification of each directory after creating it.

3.3    /OWNER_UIC

       /OWNER_UIC=option

    Requires SYSPRV (system privilege) privilege for a user
    identification code (UIC) other than your own.

    Specifies the owner UIC for the directory. The default is your
    UIC. You can specify the keyword PARENT in place of a UIC to mean
    the UIC of the parent (next-higher-level) directory. If a user
    with privileges creates a subdirectory, by default, the owner
    of the subdirectory will be the owner of the parent directory
    (or the owner of the MFD, if creating a main level directory).
    If you do not specify the /OWNER_UIC qualifier when creating a
    directory, the command assigns ownership as follows: (1)  if you
    specify the directory name in either alphanumeric or subdirectory
    format, the default is your UIC (unless you are privileged, in
    which case the UIC defaults to the parent directory); (2)  if you
    specify the directory in UIC format, the default is the specified
    UIC.

    Specify the UIC by using standard UIC format as described in the
    OpenVMS User's Manual.

3.4    /PROTECTION

       /PROTECTION=(ownership[:access][,...])

    Specifies protection for the directory.

    o  Specify the ownership parameter as system (S),  owner (O),
       group (G),  or world (W).

    o  Specify the access parameter as read (R),  write (W), execute
       (E),  or delete (D).

    The default protection is the protection of the parent directory
    (the next-higher level directory, or the master directory for
    top-level directories) minus any delete (D) access.

    If you are creating a first-level directory, then the next-
    higher-level directory is the MFD. (The protection of the MFD
    is established by the INITIALIZE command.)

    For more information on specifying protection code, see the VSI
    OpenVMS Guide to System Security.

3.5    /VERSION_LIMIT

       /VERSION_LIMIT[=n]

    Sets the maximum number of versions that files in the directory
    can have. If you do not set a version limit, a value of 0 is used,
    indicating that the number of file versions is limited only to the
    Files-11 architectural limit of 32,767.

    If you change the version limit for a directory, the new version
    limit applies only to files created after the change has been made.
    When creating a file, if the total number of versions of that file
    name exceeds the specified version limit, then the file with the
    lowest version number is deleted from the directory without
    notification to the user.

    The version limit set on a directory has no effect on the version
    limit set on a particular file in that directory. To set a
    version limit on a particular file in a directory, use the
    SET FILE/VERSION_LIMIT[=n] command.

    To view the version limit on a directory, use the DIRECTORY/FULL
    command on a directory file and look at the File Attributes
    field of the output.

3.6    /VOLUME

       /VOLUME=n

    Requests that the directory file be placed on the specified
    relative volume of a multivolume set. By default, the file is
    placed arbitrarily within the multivolume set.

4  –  Examples

    1.$ CREATE/DIRECTORY/VERSION_LIMIT=2 $DISK1:[ACCOUNTS.MEMOS]

      In this example, the CREATE/DIRECTORY command creates a
      subdirectory named MEMOS in the ACCOUNTS directory on $DISK1.
      No more than two versions of each file can exist in the
      directory.

    2.$ CREATE/DIRECTORY/PROTECTION=(SYSTEM:RWED,OWNER:RWED,GROUP,WORLD) -
      _$[KONSTANZ.SUB.HLP]

      In this example, the CREATE/DIRECTORY command creates a
      subdirectory named [KONSTANZ.SUB.HLP]. The protection on the
      subdirectory allows read (R), write (W), execute (E), and
      delete (D) access for the system and owner categories, but
      prohibits all access for the group or world categories.

    3.$ CREATE/DIRECTORY DISK2:[GOLDSTEIN]

      In this example, the CREATE/DIRECTORY command creates a
      directory named [GOLDSTEIN] on the device DISK2. Special
      privileges are required to create a first-level directory.

    4.$ CREATE/DIRECTORY [HOFFMAN.SUB]
      $ SET DEFAULT [HOFFMAN.SUB]

      In this example, the CREATE/DIRECTORY command creates a
      subdirectory named [HOFFMAN.SUB]. This directory file is placed
      in the directory named [HOFFMAN]. The command SET DEFAULT
      [HOFFMAN.SUB] changes the current default directory to this
      subdirectory. All files subsequently created are cataloged in
      [HOFFMAN.SUB].

    5.$ CREATE/DIRECTORY [BOAEN.SUB1.SUB2.SUB3]

      In this example, the CREATE/DIRECTORY command creates a
      top-level directory ([BOAEN]) and three subdirectories
      ([BOAEN.SUB1], [BOAEN.SUB1.SUB2], and [BOAEN.SUB1.SUB2.SUB3]).
Close Help