Guide to Forming Folders/Files in Your PC Using Command Prompt Techniques
Guide to Forming Folders/Files in Your PC Using Command Prompt Techniques
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] Broadcasting Showdown Deciding Between OBS and Twitch Studio for 2024
- [New] In 2024, Download Free MCB Logo Templates
- [Updated] 2024 Approved Navigating TikTok Web Efficiently as a Mac User
- [Updated] In 2024, Bringing the Web to Reality Embedding YouTube Videos in Slides
- [Updated] In 2024, Clubbing Essentials Top-Rated DJ Template Vids
- [Updated] In 2024, FrameCraft VideoCutter
- [Updated] In 2024, Innovative Approaches to Record & Archive Roblox Gameplay on Apple Systems
- [Updated] Timestamping Your YouTube Videos Desktop & Mobile Guide
- 2024 Approved From Stillness to Stirring Tips for Bouncing Text
- 2024 Approved YouTube's Iconic Counter-Based Awards System
- 6 Solutions to Unlock Oppo Phones If You Forgot Password, PIN, Pattern
- In 2024, 2 Ways to Monitor Infinix Smart 8 Activity | Dr.fone
- Starting Out on YouTube - Top Gear Essentials for 2024
- Supercharge YouTube Traffic with Key Hash Tags for 2024
- The Ultimate Strategy for Profitable DVD Sales on Amazon
- Ultimate Walkthrough: Creating a New Account for Your Oculus Quest or Quest 2
- Zero-Cost Expertise in Analyzing YouTube Videos Frame by Frame for 2024
- Title: Guide to Forming Folders/Files in Your PC Using Command Prompt Techniques
- Author: Jeffrey
- Created at : 2024-11-22 16:19:59
- Updated at : 2024-11-28 18:06:42
- Link: https://eaxpv-info.techidaily.com/guide-to-forming-foldersfiles-in-your-pc-using-command-prompt-techniques/
- License: This work is licensed under CC BY-NC-SA 4.0.