MkDir: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Created and added new Syntax diagram)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''MkDir''' [[:Category:Commands|command]] creates a subdirectory on a specified disk. Subdirectories make files easier to organize and maintain. You may also simply use the first 2 letters of the command - '''MK'''. For a complete list of abbreviations, visit the [[Keyword Abbreviation]] page
The '''MkDir''' [[:Category:Commands|command]] creates a subdirectory in the current directroy or on a specified drive in a specified directory. You may also simply use the first 2 letters of the command - '''MK'''. For a complete list of abbreviations, visit the [[Keyword Abbreviation]] page


==Syntax==
==Syntax==
MKDIR [<[[drive]]>:\] [<path>\] [-N] <new directory>
[[Image:MkDir.png]]
[[Image:MkDir.png]]


==Default==
==Defaults==
Use the current default drive.
Use the current drive.


==Parameters==
==Parameters==
The syntax of the MKDIR command allows you to choose one of two possible syntactical routes.


In the top route, the optional '''drive''' parameter indicates the drive letter of the disk on which you wish to create a subdirectory. It must be followed by a colon.
The optional '''drive''' parameter indicates the drive letter of the disk on which you wish to create a subdirectory. It must be followed by a colon and a backslash.


'''Path''' indicates the path of directory names that lead to the subdirectory to be created. If the specified path does not begin with a backslash, Business Rules automatically precedes it with the current default directory path.
'''Path''' indicates the path of directory names that lead to the subdirectory to be created.  
 
If the specified path does not begin with a backslash, BR automatically precedes it with the current directory path.
 
If the specified path begins with a backslash, BR creates the subdirectory in the root directory.


==Comments and Examples==
==Comments and Examples==
The MKDIR command can create a subdirectory of either the root directory or the default directory. The number of subdirectories you can create is limited only by the operating system and the amount of available disk space. Two files or subdirectories can have the same name as long as they are located in different directories.
 
The MKDIR command can create a subdirectory of either the root directory or the current directory. The number of subdirectories you can create is limited only by the operating system and the amount of available disk space. Two files or subdirectories can have the same name as long as they are located in different directories.


Subdirectory names use the same format as file names and accept all the same characters.
Subdirectory names use the same format as file names and accept all the same characters.


In the following example, the first command changes the default directory to ACCTNG.FIL. The MKDIR command then creates YEAREND as a subdirectory of ACCTNG.FIL:
In the following example, the first command changes the current directory to ACCTNG.FIL. The MKDIR command then creates YEAREND as a subdirectory of ACCTNG.FIL:
  CHDIR ACCTNG.FIL
  CHDIR ACCTNG.FIL
  MKDIR YEAREND
  MKDIR YEAREND


If the current drive and directory reference is C:\\EQUIP\\MFG, the following command would create the subdirectory C:\\EQUIP\\MFG\\MAINT:
If the current drive and directory reference is C:\EQUIP\MFG, the following command would create the subdirectory C:\EQUIP\MFG\MAINT:


  MKDIR MAINT
  MKDIR MAINT


The following command creates a new subdirectory of the C:WANDIR directory, even when the system is currently accessing another directory on drive C:
The following command creates a new subdirectory of the C:\WANDIR directory, even when the system is currently accessing another directory on drive C:


  MKDIR C:\\WANDIR\\CLASSACT
  MKDIR C:\WANDIR\CLASSACT


<noinclude>
<noinclude>

Latest revision as of 17:00, 8 May 2014

The MkDir command creates a subdirectory in the current directroy or on a specified drive in a specified directory. You may also simply use the first 2 letters of the command - MK. For a complete list of abbreviations, visit the Keyword Abbreviation page

Syntax

MKDIR [<drive>:\] [<path>\] [-N] <new directory>

Defaults

Use the current drive.

Parameters

The optional drive parameter indicates the drive letter of the disk on which you wish to create a subdirectory. It must be followed by a colon and a backslash.

Path indicates the path of directory names that lead to the subdirectory to be created.

If the specified path does not begin with a backslash, BR automatically precedes it with the current directory path.

If the specified path begins with a backslash, BR creates the subdirectory in the root directory.

Comments and Examples

The MKDIR command can create a subdirectory of either the root directory or the current directory. The number of subdirectories you can create is limited only by the operating system and the amount of available disk space. Two files or subdirectories can have the same name as long as they are located in different directories.

Subdirectory names use the same format as file names and accept all the same characters.

In the following example, the first command changes the current directory to ACCTNG.FIL. The MKDIR command then creates YEAREND as a subdirectory of ACCTNG.FIL:

CHDIR ACCTNG.FIL
MKDIR YEAREND

If the current drive and directory reference is C:\EQUIP\MFG, the following command would create the subdirectory C:\EQUIP\MFG\MAINT:

MKDIR MAINT

The following command creates a new subdirectory of the C:\WANDIR directory, even when the system is currently accessing another directory on drive C:

MKDIR C:\WANDIR\CLASSACT