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 creating a directory and folder in each major operating system.
Creating a folder in Microsoft Windows
My Computer or Windows Explorer
- Open My Computer or Windows Explorer.
- Open the drive or folder where you want 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 your chosen location.
- In Windows 11, click the New option in the menu bar and select Folder in the drop-down menu.
In Windows 8 and 10, on the Home tab, click the New folder icon.
In Windows 7 and earlier, in the file menu bar, click File and select Folder in the drop-down menu.
In all versions of Windows, you can also right-click on a blank portion of the folder, select New, and then Folder in the drop-down menu.
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.
- Navigate to the Windows desktop.
- Right-click any blank portion of the desktop.
- In the menu that appears (like that shown in the picture), click New and then Folder.
- 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
Windows command line
See the following MS-DOS and Windows command line user section to create 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.
You can also create multiple new directories in the current directory 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
If you want to create a directory with spaces, you need to 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 to 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 to 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 and move to that directory.
To make a directory in another drive without moving to that drive, use a similar command example to the example below. This command creates an "example" directory on the F: drive. The drive letter "f:" can be substituted for any drive letter.
Create a directory with a batch file
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.
Once the directory is created, you can use the cd command to change and move to that directory.
Creating a folder and directory in Microsoft Windows 3.X
- Open File Manager
- Open the folder where you want to place the new folder, and on the top menu of File Manager, select File and then the new folder.
See the MS-DOS user section above for information about creating a directory in MS-DOS.
Creating a folder in macOS X
- Navigate to the macOS desktop.
- Right-click (tap two fingers on the mouse) any blank space on the desktop.
- Select New Folder from the drop-down menu that appears.
- Name the folder and then press Return.
Create a folder in a directory
- Open Finder and navigate to the directory where you want to create the folder.
- Click File in the upper-left corner of the screen.
- Select New Folder in the drop-down menu that appears.
- 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.