Efficiently Organizing Your PC: A Step-by-Step Guide to Creating Folders & Text Files with CMD in Windows
Efficiently Organizing Your PC: A Step-by-Step Guide to Creating Folders & Text Files with CMD in Windows
Quick Links
- Before You Begin: Copy the Folder Path and Launch Command Prompt
- Create a Single Folder
- Create a Folder Inside Another Folder (Subfolder)
- Create Multiple Folders at Once
- Create a File with Command Prompt
Key Takeaways
- To create a folder with Command Prompt, use the mkdir command followed by the folder name.
- Mkdir can also be used to create nested folders, multiple folders simultaneously, or a combination of both.
- If you want to create a file, enter type in Command Prompt, followed by nul > filename.ext, replacing “.ext” with the file type you want.
Whether you’re looking to create a script, make several folders at once, or you simply prefer command-line methods over graphical ones, it’s quick and easy to make folders or files using Command Prompt. We’ll show you how to do it on your Windows 11 or Windows 10 PC.
Before You Begin: Copy the Folder Path and Launch Command Prompt
To use the following methods, you must first copy the path of the folder where you’ll create new folders or files, and then run the Command Prompt utility.
To copy a folder’s full path, launch File Explorer using Windows+E and find your folder. Hold down the Shift key on your keyboard, right-click your folder, and choose “Copy as Path.”
To open Command Prompt , click the Start button, search for command prompt, then click the relevant result or press Enter. While making folders, if you encounter an error, run Command Prompt as an admin by right-clicking the utility and choosing “Run as Administrator.” Make sure to select “Yes” in the User Account Control prompt.
After opening Command Prompt, type cd, press Spacebar, paste the folder path you copied by pressing Ctrl+V, and press Enter. This makes your chosen folder the current working directory in the tool. Each command you run will perform the specified action in this directory.
Create a Single Folder
To make a single folder, type the following command, replacing “FolderName” with the name you want to assign to your folder. Then, press Enter.
mkdir FolderName
For example, to make a folder named “Mahesh”, use the following command:
mkdir Mahesh
To create a folder that has spaces in its name, enclose the name with double quotes like this:
mkdir “Mahesh Makvana”
Create a Folder Inside Another Folder (Subfolder)
One way to make a folder inside another folder is to make that other folder the current working directory. To do that, type cd, press Spacebar, enter the name of the folder in which you want to create a new folder, and press Enter. Then, type the following command, replace “MyFolder” with the name you want to give to your new folder, and press Enter.
mkdir MyFolder
Another way to create a folder inside a folder is to specify the other folder right in the mkdir command itself. For example, if you have a subfolder named “Photos” and you want to create a new folder named “Personal” inside it, use the following command:
mkdir Photos\Personal
Create Multiple Folders at Once
To make several folders at once , add the required folder names to the mkdir command.
For example, to create three separate folders named Documents, Photos, and Videos, use the following command:
mkdir Documents Photos Videos
Make sure to enclose the folder name with double quotes if its name has spaces.
Create a File with Command Prompt
Command Prompt allows you to create empty files, which you can then use with appropriate apps. The syntax for creating a new file is as follows:
type nul > name.ext
Here, “name” is the name of the file you want to create and “ext” is the extension of the file .
For example, to make a text file named document.txt, you’ll use the following command:
type nul > document.txt
To create a text file and add some actual text to it, use the following command. Replace “Welcome to How-To Geek” with the text you want to add and “howtogeek” with the name you want to use for the file.
echo Welcome to How-To Geek > howtogeek.txt
When you open howtogeek.txt in a text editor you’ll find it has “Welcome to How-To Geek” written in it.
And that’s how you make folders and files without using graphical tools on your Windows machine.
Also read:
- [New] In 2024, How to Harness YouTube's Creative Commons in Video Making
- [Updated] In 2024, The Entrepreneur's Handbook Quick Channel Creation on the Go with Mobile Devices
- [Updated] Quick Acting Impression Review for 2024
- Comment Résoudre Le Problème De Non-Reconnaissance Du SSD NVMe Dans Windows 11 ?
- Download Latest Drivers for Insignia NS-PCY5BMA2: Supported by Windows 11, 10 & Earlier Versions
- Expert Advice for Mastering Full Screen in PPro
- Fast & Simple Download for AMD Ryzen 5 2600 Driver Update
- Get Your Latest AMD Radeon Professional W5700 Drivers for Windows Versions - Update Now
- How to Swiftly Update Your Intel Iris Plus Graphics 640 Software
- In 2024, Top 15 Augmented Reality Games Like Pokémon GO To Play On Lava Yuva 3 | Dr.fone
- Latest Update Released for Logitech Extreme 3D
- Mastering the Fix: Overcoming Divison 2'S Startup Issues
- Quick Steps to Download & Update Microsoft Drivers on Windows 11, 8 or 7
- Resolving Common Errors with the Samsung Universal Print Driver for Windows Users
- Rootjunky APK To Bypass Google FRP Lock For Vivo Y77t
- Secure Your Print Jobs with Updated Brother HL-L2350DW Printer Drivers - Download Today!
- Step-by-Step Guide: Downloading & Updating Razer Software for Win 10/8/7/XP/Vista
- Steps to Install the Latest Version of Intel HD Graphics 5500 Drivers
- Unlock Audience Attention Top 6 Video Styles
- Title: Efficiently Organizing Your PC: A Step-by-Step Guide to Creating Folders & Text Files with CMD in Windows
- Author: David
- Created at : 2024-10-13 17:03:21
- Updated at : 2024-10-20 17:42:49
- Link: https://win-dash.techidaily.com/efficiently-organizing-your-pc-a-step-by-step-guide-to-creating-folders-and-text-files-with-cmd-in-windows/
- License: This work is licensed under CC BY-NC-SA 4.0.