- How to create a directory or folder
- Creating a folder in Microsoft Windows
- My Computer or Windows Explorer
- Windows desktop
- Create a new folder using a shortcut key
- Windows command line
- Creating a directory in MS-DOS and the Windows command line
- Related pages
- Create a directory with a batch file
- Creating a directory in Linux, Unix, and their variants
- Creating a folder and directory in Microsoft Windows 3.X
- File Manager
- MS-DOS
- Creating a folder in macOS X
- Desktop folder
- Create a folder in a directory
- Create a new folder
- Create a new folder when saving your document by using the Save As dialog box
- Create a new folder before you save your document by using File Explorer
- How to Create a New Folder in Windows 10
- Method 1: Create a New Folder with a Keyboard Shortcut
- Method 2: Create a New Folder by Right-Clicking
- Method 3: Create a New Folder from the Ribbon Menu
- How to create folders using keyboard shortcuts in Windows?
- Nifty PC tricks: How to create new folders, using shortcut keys
- What are shortcut keys to create new folders in Windows 10?
- A few notes about shortcut keys
- Resolve PC Issues with Auslogics BoostSpeed
- Learn Four Ways to Use PowerShell to Create Folders
- Method 1
- Method 2
- Method 3
- Method 4
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.
Creating a folder in Microsoft Windows
My Computer or Windows Explorer
- Open My Computer or Windows Explorer.
- 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.
- 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
- 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
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.
Related pages
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.
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
- Open File Manager
- 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
- 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’d like 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.
Create a new folder
You can create new folders many different ways, but the two easiest ways are by using the Save As dialog box or File Explorer. This article explains how to do both.
In this article
Create a new folder when saving your document by using the Save As dialog box
With your document open, click File > Save As.
Under Save As, select where you want to create your new folder. You might need to click Browse or Computer, and navigate to the location for your new folder.
In the Save As dialog box that opens, click New Folder.
Type the name of your new folder, and press Enter.
Note: You can’t use slashes, colons, semicolons, dashes, or periods in your folder name.
Click Save. Your document is saved to the new folder.
Create a new folder before you save your document by using File Explorer
Open File Explorer using one of the following methods:
Press the Windows logo key + E.
Find it from the Start menu (Windows 7 or Windows 10).
Click the folder icon in the taskbar.
For Windows 8 or Windows 8.1, swipe in from the right edge of the screen, and tap Search. If you’re using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and click Search. Type File Explorer in the search box, and then tap or click File Explorer.
Navigate to where you want to create the new folder, and click New Folder.
Type the name of your folder, and press Enter.
To save a document to the new folder, open the document, and click File > Save As, and then browse to the new folder, and click Save.
How to Create a New Folder in Windows 10
Do your files and documents need better organization? Group related files into distinct folders on your laptop or desktop and you’ll always easily find what you need. You can also change the icon size to make it more visually pleasing. Here are a few ways to quickly create a new folder in Windows 10, and after you master this, learn how to password protect a folder in Windows 10.
Method 1: Create a New Folder with a Keyboard Shortcut
The fastest way to create a new folder in Windows is with the CTRL+Shift+N shortcut.
1. Navigate to the location where you want to create the folder. You can create a new folder at any location on your hard drive or within another folder (creating a subfolder) in File Explorer. You can also create a new folder on your desktop with this method.
2. Hold down the Ctrl, Shift, and N keys at the same time. Windows will immediately create the new folder with the not-very-imaginative suggested folder name of «New folder.»
3. Enter your desired folder name. It takes just seconds to create a new folder this way, but be sure to immediately begin typing your folder name when the folder first appears, because if you click on the folder or click away from File Explorer, the folder name will be «New folder» and you’ll have to rename it.
Method 2: Create a New Folder by Right-Clicking
If you don’t remember the keyboard shortcut or you prefer using the mouse:
1. Navigate to the location where you want to create the folder.
2. Right-click on a blank space in the folder location. Take care with this: If you right-click on an existing item in the folder, you’ll get the wrong menu.
3. Select New then Folder from the contextual menu. Windows will create the new folder at your current location.
4. Enter your desired folder name to replace «New folder» and hit Enter.
You can create folders on the Desktop using this method too. Right-click on a blank space on the Desktop, then go to New > Folder.
Method 3: Create a New Folder from the Ribbon Menu
Another simple way to create a new folder is to use the New folder button in the File Explorer menu.
Just navigate to the place you want the folder and click or tap «New folder» in the Home tab
In addition to the methods above, you can create a new folder in Windows 10 by using the Command Prompt (navigate to the location you want your folder in and type mkdir foldername, replacing «foldername» with your folder name). These three methods, however, are the simplest and quickest ways to create a new folder, so you can get right to organizing your files.
How to create folders using keyboard shortcuts in Windows?
Nifty PC tricks: How to create new folders, using shortcut keys
For some of us who work mostly with computers, it’s not fun to move and click the mouse at all times. Shortcut keys are a way to speed up your work routine and get better organized in your PC tasks.
The great news is if you’re keen on creating a new folder, all it takes is a few keyboard buttons. Here’s a quick guide on how to create new folders, using shortcut keys.
What are shortcut keys to create new folders in Windows 10?
Normally, we right-click in order to create a new folder. On Desktop, you can create a new folder by right-clicking on an empty area, choosing New, and choosing Folder. But Windows 10, as well as 8 and 7, lets you create folders with a keyboard shortcut. Simply press Ctrl + Shift + N and you can see the new folder automatically created on your Desktop and ready for file storage or renaming.
This shortcut works on File Explorer just as well. Simply open the File Explorer (or location where you want a new folder created), press Ctrl + Shift + N, and the new folder crops up in no time.
How about if you want to create a folder in the File Explorer and you want to create it on your desktop at the same time? It’s simple: press Windows key + D. You’ll find that all folders or programs will be minimized and Desktop is the only one open. Follow the earlier steps we showed you and that’s it.
While this shortcut works in Windows 8 and 7, it won’t do so on Windows XP. If you’re a Windows XP user and you seek to create a new folder on Desktop via keyboard shortcuts, hold the Alt + F keys, and then release them before quickly pressing the W key, followed by F.
A few notes about shortcut keys
Have azlook at a few more shortcut key notes:
- Whenever a shortcut key is listed with a plus sign (+) in the string, such as Ctrl + S, this means that the Ctrl key is held while the letter S is pressed.
- Whenever it’s listed with commas separating the string, such as Alt + F, W, F, note that while the Alt key is held, you press the letter F. Both keys are afterwards released while the W and F keys are pressed one after another.
- Either upper or lower case letters in these shortcut key combinations can work. Uppercase letters are often used as examples for clarity.
If you don’t want to use keyboard shortcuts on your computer anymore, you can turn off hotkeys or disable all the keyboard shortcuts on your PC through the Windows Registry.
Resolve PC Issues with Auslogics BoostSpeed
Besides cleaning and optimizing your PC, BoostSpeed protects privacy, diagnoses hardware issues, offers tips for boosting speed and provides 20+ tools to cover most PC maintenance and service needs.
If you’re coming across PC performance issues, on the other hand, it might be worth exploring the use of tools such as Auslogics BoostSpeed for proper Windows diagnosis, improved computer speed, and proper stability for all your tasks.
That’s it – hope these shortcut keys work for your convenience!
Learn Four Ways to Use PowerShell to Create Folders
February 21st, 2012
Summary: Microsoft Scripting Guy, Ed Wilson, shows four ways to create folders with Windows PowerShell, and he discusses the merits of each approach.
Hey, Scripting Guy! I am trying to find the best way to create a new folder while using Windows PowerShell. I have seen many ways of creating folders in scripts that I have run across on the Internet. They all seem to use something different. Is there a best way to create a new folder?
Hello GW,
Microsoft Scripting Guy, Ed Wilson, is here. This morning on Twitter, I saw a tweet that said “New-TimeSpan tells me that there are 41 days until the 2012 Scripting Games.” Indeed. Even though I have been busily working away on the Scripting Games, it seems awfully soon. I fired up Windows PowerShell and typed the following code:
New-TimeSpan -Start 2/21/12 -End 4/2/12
Sure enough, the returned TimeSpan object tells me that there are indeed 41 days until the 2012 Scripting Games. I decided I would like a cleaner output, so I used one of my Top Ten Favorite Windows PowerShell Tricks: group and dot. The revised code is shown here.
(New-TimeSpan -Start 2/21/12 -End 4/2/12).days
Both of these commands and the associated output are shown in the image that follows.
GW, you are correct, there are lots of ways to create directories, and I will show you four of them…
Method 1
It is possible to use the Directory .NET Framework class from the system.io namespace. To use the Directory class to create a new folder, use the CreateDirectory static method and supply a path that points to the location where the new folder is to reside. This technique is shown here.
When the command runs, it returns a DirectoryInfo class. The command and its associated output are shown in the image that follows.
I do not necessarily recommend this approach, but it is available. See the Why Use .NET Framework Classes from Within PowerShell Hey, Scripting Guy! blog for more information about when to use and not to use .NET Framework classes from within Windows PowerShell.
Method 2
Another way to create a folder is to use the Scripting.FileSystemObject object from within Windows PowerShell. This is the same object that VBScript and other scripting languages use to work with the file system. It is extremely fast, and relatively easy to use. After it is created, Scripting.FilesystemObject exposes a CreateFolder method. The CreateFolder method accepts a string that represents the path to create the folder. An object returns, which contains the path and other information about the newly created folder. An example of using this object is shown here.
$fso = new-object -ComObject scripting.filesystemobject
This command and its associated output are shown in the following image.
Method 3
GW, it is also possible to use native Windows PowerShell commands to create directories. There are actually two ways to do this in Windows PowerShell. The first way is to use the New-Item cmdlet. This technique is shown here.
New-Item -Path c:\test3 -ItemType directory
The command and the output from the command are shown here.
Compare the output from this command with the output from the previous .NET command. The output is identical because the New-Item cmdlet and the [system.io.directory]::CreateDirectory command return a DirectoryInfo object. It is possible to shorten the New-Item command a bit by leaving out the Path parameter name, and only supplying the path as a string with the ItemType. This revised command is shown here.
New-Item c:\test4 -ItemType directory
Some might complain that in the old-fashioned command interpreter, cmd, it was easier to create a directory because all they needed to type was md––and typing md is certainly easier than typing New-Item blah blah blah anyday.
Method 4
The previous complaint leads to the fourth way to create a directory (folder) by using Windows PowerShell. This is to use the md function. The thing that is a bit confusing, is that when you use Help on the md function, it returns Help from the New-Item cmdlet—and that is not entirely correct because md uses the New-Item cmdlet, but it is not an alias for the New-Item cmdlet. The advantage of using the md function is that it already knows you are going to create a directory; and therefore, you can leave off the ItemType parameter and the argument to that parameter. Here is an example of using the md function.
The command and its associated output are shown here.
You can see from the image above that the md function also returns a DirectoryInfo object. To me, the md function is absolutely the easiest way to create a new folder in Windows PowerShell. Is it the best way to create a new folder? Well, it all depends on your criteria for best. For a discussion of THAT topic, refer to my Reusing PowerShell Code—What is Best blog.
GW, that is all there is to creating folders. Join me tomorrow for more Windows PowerShell coolness.