There are multiple ways lớn create or add a thư mục, subfolder, directory, and subdirectory on a computer. The methods for doing so sánh depend on the operating system or where the directory is being created. Select a liên kết below for steps on creating a directory or thư mục in each major operating system.
Creating a thư mục in Microsoft Windows
There are a few ways lớn create a thư mục in Microsoft Windows, generally depending on where you want the new thư mục lớn be placed. To proceed, select a method from the list below or kiểm tra out each section individually.
- My Computer or Windows Explorer
- Windows desktop
- Create a new thư mục using a keyboard shortcut
- Windows command line
My Computer or Windows Explorer
- Press the Windows key+E lớn open Windows Explorer.
- On the left side of the window, select the drive or thư mục where you want lớn create the new folder; for example, the C: drive. Or, you can create a thư mục in the root directory.
- In Windows 11, click the New option in the thực đơn bar and select Folder in the drop-down thực đơn.
In Windows 8 and 10, on the Home tab, click the New folder icon.
In Windows 7 and earlier, in the tệp tin thực đơn bar, click File and select Folder in the drop-down thực đơn.
Tip
In all versions of Windows, you can also right-click on a blank portion of the thư mục, select New, and then Folder from the drop-down thực đơn.
Note
If you're using Windows 7 or earlier, and vì thế not see the tệp tin thực đơn bar at the top of Windows Explorer, press Alt lớn make it visible.
Windows desktop
- Navigate lớn the Windows desktop. You can quickly vì thế this with the keyboard shortcut Windows key+D.
- Right-click any blank portion of the desktop.
- In the thực đơn (like that shown in the picture), click New and then Folder.
- Once the new thư mục appears, type a name for it and press Enter.
Create a new thư mục using a keyboard shortcut
While in Windows Explorer, press Ctrl+Shift+N lớn create a new thư mục without using the mouse.
Windows command line
See the following MS-DOS and Windows command line user section lớn create a directory in the Windows command line.
Creating a directory in MS-DOS and Windows Command Prompt
Tip
It is more appropriate lớn use the term "directory" instead of "folder" when referring lớn the command line.
To create a directory in MS-DOS or the Windows Command Prompt (cmd), use the md or mkdir MS-DOS command. For example, below, we are creating a new directory called "hope" in the current directory.
mkdir hope
You can also create multiple new directories in the current one with the md command. In the following example, we are creating three new directories, called "user1," "user2," and "user3," in the current directory.
md user1 user2 user3
To create a directory with spaces, you must surround the directory name with quotes. In the example below, we create a "my example directory" in the current directory.
md "my example directory"
To create a directory in the parent directory without first moving lớn that directory, you can use the command below. The example below moves back one directory lớn create the "example" directory.
md ..\example
To create a subdirectory in a different directory without moving lớn it, use a command similar lớn the example below. This command creates a "test" directory in the hope directory.
mkdir hope\test
Tip
Once a directory is created, you can use the cd command lớn change and move lớn that directory.
To make a directory in another drive without moving lớn that drive, use a similar command lớn the example below. The following command creates an "example" directory on the F: drive. (The drive letter "f" should be substituted for the actual drive letter of the disk where you're creating the folder: "c", "d", etc.)
md f:\example
- How lớn use the Windows command line (DOS).
- How lớn get lớn an MS-DOS prompt or Windows command line.
Create a directory with a batch file
A batch tệp tin consists of one or more commands that are entered into the command line. Therefore, you can use any examples from the section above in a batch tệp tin lớn create a new thư mục.
Creating a directory in Linux, Unix, and their variants
Tip
It's traditional lớn gọi it a "directory" instead of "folder" in the command line, but both terms refer lớn the same thing.
To create a directory in Linux, Unix, or any variant, use the mkdir command. For example, below, we are creating a new directory called "hope" in the current directory.
mkdir hope
Tip
To explicitly specify that the new directory should be located in the current directory, you can prefix its name with a dot-slash ("./"):
mkdir ./hope
To create a directory whose parent directories vì thế not yet exist (creating the parent directories in the process), use the -p option with mkdir:
mkdir -p hope/files/documents
Tip
Once the new directory is created, you can use the cd command lớn change and move lớn that directory. To remove the directory (if it is empty), use the rmdir command. To change the permissions of a directory after it is created, use the chmod command.
- Linux and Unix shell tutorial
Creating a thư mục and directory in Microsoft Windows 3.X
File Manager
- Open File Manager
- Open the thư mục where you want lớn place the new thư mục, and on the top thực đơn of File Manager, select File and then new folder.
MS-DOS
See the MS-DOS user section above for information about creating a directory in MS-DOS.
Creating a thư mục in macOS
Desktop folder
- Navigate lớn the macOS desktop.
- Right-click (tap two fingers on the trackpad or multi-touch mouse) any blank space on the desktop.
- Select New Folder from the drop-down thực đơn.
- Type a name for the thư mục and press Return.
Create a thư mục in a directory
- Open Finder and navigate lớn the directory where you want lớn create the thư mục.
- Click File in the upper-left corner of the screen.
- Select New Folder in the drop-down thực đơn.
- Type a name for the thư mục and press Return.
Tip
Users may also press the keyboard shortcut Command+Shift+N lớn create a new thư mục.
Tip
To create a directory in the Terminal command line, see the Linux steps.