CreateDirectory

Use the CreateDirectory command to create a specified directory.

The command CreateDirectory succeeds if the specified directory could be created or if the directory already exists. The command only succeeds if the parent directory already exists. Use the script CreatePath to create a directory path with a single command.

Syntax

CreateDirectory
   Dir(<text>)
   Security(<text>);

Parameters

  • Dir: Required. The directory that KCM Core creates.
  • Security: Optional. Directory used to set security attributes on the new directory.

The new directory inherits the compression and encryption attributes from its parent directory. If the Security parameter is used, the directory access rights from that directory are applied to the new directory. If there is no Security parameter specified, Windows NT assigns default access rights to the new directory.

The Security parameter of the command CreateDirectory only works properly for Microsoft Windows 2000 and higher.