Batch, Coding Basics, command line, Developer Tool, Programming, Uncategorized

Mastering the MD Command: A Guide to Creating Directories on the Command Line

The command-line interface (CLI) provides powerful tools for managing files and directories, and one such essential command is md. Standing for “make directory”. The md command in Command Prompt (CMD) allows users to create new directories or folders effortlessly. In this article, we will explore the various features and applications of the md command, highlighting its syntax, options, and practical use cases for effective directory management. you can check the following video to learn about the MD command visually.


The syntax for the md command is quite straightforward. To create a new directory, simply use the following format:

md [directory]

The above command will create a new directory or folder.

creating multiple directories-We can use the MD command to create multiple directories at once. To do this, simply list the names of the directories you want to create, separated by spaces.

md myfolder1 myfolder2

This would create two new directories called “myfolder1” and “myfolder2” in the current directory.

Creating Nested Directories- We can use the MD command to create nested directories, which are directories within other directories. To create a nested directory, include the path to the parent directory, followed by a backslash (“”) and the new directory’s name.

md myfolder1\myfolder3

This would create a new directory called “myfolder3” inside the “myfolder1” directory.


The MD command is an essential tool for managing directories within the Command Prompt environment. By understanding its syntax and options, users can effortlessly create new folders, organize files, and establish directory hierarchies. Whether you are a casual user looking to create a few folders or a system administrator handling complex directory structures, mastering the md command empowers you to efficiently manage your files and navigate the command-line interface with ease. For more articles like this check out the Batch-Man website and Github also follow us on Discord and Youtube.

Leave a Reply