MkDir Command

Purpose

creates a directory.

Syntax

MkDir path$ [Like template$]

path$:sexp; directory name

Description

MkDir path$ (make directory) creates a directory with name path$.

MkDir path$ Like template$ creates a new directory with a specified path that retains the attributes of a specified template directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory. The new directory retains the other attributes of the specified template directory.

Example

MkDir "C:\TEST"

Creates a directory called TEST on drive C

Remarks

The MkDir...Like command uses the API function CreateDirectoryEx, which allows you to create directories that inherit stream information from other directories. This function is useful, for example, when dealing with Macintosh directories, which have a resource stream that is needed to properly identify directory contents as an attribute.

Some file systems, such as NTFS, support compression or encryption for individual files and directories. On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent directory.

See Also

RmDir

{Created by Sjouke Hamstra; Last updated: 18/10/2014 by James Gaite}