Windows cmd create folder

Все о реестре Regedit / All about registry

Как создать папку в командной строке? / How create folder in command prompt?

Начиная осваивать командную строку, создавая . bat или . cmd файлы все интересуются достаточно простыми вопросами через некоторое время, составляют большие сценарии в скриптах.

Сегодня мы рассмотрим простой пример создания папки в командной строке.

Для создания папки в командной строке:

Зайдите в командную строку, нажав для этого сочетание клавиш Win + R – в окне Выполнить напечатайте cmd и нажмите Enter

Окно командной строки .

Кстати ! Открыв окно командной строки, вы увидите путь C :\ Users \Имя вашего пользователя

Для перемещения по папкам необходимо воспользоваться командой CD .

Если необходимо перейти в корень диска наберите следующую команду:

CD \

Окно с примером как это выглядит в командной строке ниже:

В данном примере рассмотрен переход из папки C:\ Program Files в корень диска C :

Данная команда позволяет выйти из любой папки или папок в корень диска.

Рассмотрим обратный пример перемещения в интересующую нас папку.

Для этого , необходимо напечатать:

CD Имя папки

В данном примере мы перемещаемся из корня диска C : в папку С:\ Program Files

При перемещении в папку, печатая первые буквы названия этой папки, вы можете воспользоваться кнопкой TAB и если папка существует, то система предложит вариант.

Вот так бывает. В статье — «Как создать папку через командную строку ?» мы еще освоили навигацию по папкам в cmd .

Думаю, что будет полезно.

Для навигации по дискам в командной строке необходимо набрать букву диска и поставить после нее двоеточие и нажать кнопку Enter . Пример перехода на диск D : показан ниже:

Теперь рассмотрим пример создания папки.

Для создания папки используется команда mkdir

Переместившись в нужный Вам каталог напечатайте:

Mkdir Имя вашей папки

На изображении – создание папки Test на диске C :

Можно создать папку и вложенные в нее папки:

Mkdir » Имя вашей папки\Имя вложенной папки»

На изображении указан пример создания папки 1 на диске C : с двумя вложенными папками 2 и 3

Результат будет выглядеть как на изображении ниже

Также, присутствует возможность создания папки из любой в которой вы находитесь папки без перемещения и навигации по папкам.

Пример :

Находясь в папке c :\1\2\3 мы создаем папку на диске C : с именем New Test

Кавычки при создании папок с пробелом обязательны. Если кавычки отсутствуют, то создается папка с первым словом до пробела, в нашем случае New . Попробуйте поэкспериментировать .

Справка по команде mkdir можно получить по ключу /?

Starting to master the command line or creation .bat,.cmd files are all interested in fairly simple questions moving from the basics and after a while composing large scripts.

Читайте также:  Windows 10 разрешение диска

Today, we will look at a simple example of creating a folder on the command line.

To create a folder on the command line:

Go to the command prompt by pressing Win+R in the Run window type cmd and press Enter

Command prompt window.

Attention! When you open a command prompt window, you will see the path C:\Users\You user login

To move through the folders, use the CD command.

If you want to go to the root of the disk, type the following command:

CD \

A window with an example of how it looks in the command line below:

In this example the transition from the folder C:\Program Files in the root of drive C:

This command allows you to exit any folder or folders in the root of the disk.

To move to the folder you need to type:

CD folder Name

The example below:

In this example, we move from the root of the C: drive to the folder C:\Program Files

When moving to a folder, typing the first letters of the folder name, you can use the TAB button and if the folder exists, the system will offer the option.

Just like this. In the article how to create a folder via the command line, we have mastered folder navigation in cmd.

I think it will be useful.

To navigate through the disks in the command line, type the letter of the disk and put a colon after it and press Enter. An example of this transition on the D: drive are shown below:

Now! Let’s look at an example of creating a folder.

To create a folder, use the mkdir command

After moving to the desired directory, type:

mkdir name of your folder

Below is an example:

In this image we are create a Test folder on drive C:

You can create a folder and its subfolders:

mkdir «your folder Name\subfolder Name»

This image shows an example of creating folder 1 on disk C: with two subfolders 2 and 3

The result will look like the image below:

There is also the ability to create a folder from any folder in which you are without moving and navigating through the folders.

Located in the folder С :\1\2\3 we create a folder on the C: drive named New Test

Quotes are required when creating folders with spaces. If there are no quotes, a folder with the first word before the space is created, in our case, New. Try to experiment.

Help for the mkdir command can be obtained with the /? key.

How to create a directory or folder

There are multiple ways to create or add a folder, subfolder, directory, and subdirectory on a computer. The methods depend on the operating system or where the directory is being created. Select a link below for steps on how to create a directory and folder in each major operating system.

Читайте также:  Код ошибки 0xc004f050 windows 10 как исправить

Creating a folder in Microsoft Windows

My Computer or Windows Explorer

  1. Open My Computer or Windows Explorer.
  2. Open the drive or folder where you’d like to create the new folder; for example, the C: drive. If you do not want to create a folder in the root directory, browse to the location of your choosing.
  3. In Windows 10 on the Home tab, click the New folder icon. In Windows 7 and earlier on the file menu bar, select File and then Folder.

In all versions of Windows, you can also right-click with your mouse on a blank portion of the folder, select New and then Folder.

If you’re using Windows 7 or earlier and do not see the file menu bar at the top of Windows Explorer, press the Alt key and it should become visible.

Windows desktop

  1. Navigate to the Windows desktop.
  2. Right-click any blank portion of the desktop.
  3. In the menu that appears (like that shown in the picture), click New and then Folder.
  4. A new folder appears. Type the name of the folder you want to use and then press Enter .

Create a new folder using a shortcut key

While in Windows Explorer, you can press Ctrl + Shift + N to create a new folder without using the mouse.

Windows command line

See the following MS-DOS and Windows command line user section for information about creating a directory in the Windows command line.

Creating a directory in MS-DOS and the Windows command line

It is more appropriate to use «directory» instead of «folder» when referring to the command line.

To create a directory in MS-DOS or the Windows command line (cmd), use the md or mkdir MS-DOS command. For example, below we are creating a new directory called «hope» in the current directory.

You can also create multiple new directories in the current directory with the md command. In the next example, we are creating three new directories, called «user1,» «user2,» and «user3,» in the current directory.

If you want to create a directory with spaces, you need to surround the directory name with quotes. In the example below, we are creating a directory called «my example directory» in the current directory.

To create a directory in the parent directory, without first moving into that directory, you can use the command below. This example moves back one directory to create the «example» directory.

To create a subdirectory in a different directory without moving it, use a command similar to the example below. This command creates a «test» directory in the hope directory.

Once a directory is created, you can use the cd command to change the directory and move into that directory.

To make a directory in another drive without moving into that drive, use a command similar to the example below. This command creates an «example» directory on the F: drive. The drive letter «f:» can be substituted from any drive letter.

Create a directory with a batch file

A batch file is a series of commands that can be entered in the command line. Therefore, you can use any of the examples from the section above in the batch file to create a new folder.

Читайте также:  Максимальное количество принтеров windows

Creating a directory in Linux, Unix, and their variants

It is more appropriate to use «directory» instead of «folder» when in a command line.

You must have the permissions to create a directory outside of your home directory.

To create a directory in Linux, Unix, or any variant, use the mkdir Linux and Unix command. For example, below we are creating a new directory called hope in the current directory.

Once the directory is created, you can use the cd command to change the directory and move into that directory.

If you want to change the permissions of a directory after its been created, use the chmod command.

Creating a folder and directory in Microsoft Windows 3.X

File Manager

  1. Open File Manager
  2. Open the folder where you’d like to place the new folder and on the top menu of File Manager, select File and then new folder.

MS-DOS

See the above MS-DOS user section for information about creating a directory in MS-DOS.

Creating a folder in macOS X

Desktop folder

  1. Navigate to the macOS desktop.
  2. Right-click (tap two fingers on the mouse) any blank space on the desktop.
  3. Select New Folder from the drop-down menu that appears.
  4. Name the folder, and then press Return .

Create a folder in a directory

  1. Open Finder and navigate to the directory where you’d like to create the folder.
  2. Click File in the upper-left corner of the screen.
  3. Select New Folder in the drop-down menu that appears.
  4. Name the folder, and then press Return .

Users may also press the shortcut key combination Command + Shift + N to create a new folder.

To create a directory in the Terminal command line, see the Linux steps.

Windows: Create Folders From Command Line

Posted on August 13, 2019 by Mitch Bartlett 7 Comments

The command line is still a powerful thing to use in Microsoft Windows. You may need to learn how to create a directory from the command line if you’re writing a script, or want a simpler way to create multiple folders. Here’s how it’s done.

  1. Select the “Start” button,type cmd then choose “Command Prompt” in the list that appears.
  2. To switch to another drive, simply type the drive letter followed by a colon, then press “Enter“.
  3. To switch to another directory, type cd followed by the path to the directory, then press “Enter“.
  4. Type mkdir followed by the name of the folder you wish to create, then press “Enter“.
    Example: mkdir mynewfolder

Example showing switching to the G drive, then to the test folder and the creation of a folder called “mynewfolder”.

Creating multiple folders is easier from the command line. You can type mkdir followed by the names of each folder, separated by a space to do this.

mkdir mynewfolder1 mynewfolder2 testfolder1

Note: Alternately, you can use the md command in place of mkdir. They do the same thing.

You Might Also Like

Filed Under: Windows Tagged With: Windows 10

Оцените статью