Windows 10 Command Prompt Guide: How to Create Files, Clean PC Using This Windows Feature

By Staff Reporter , Updated Aug 23, 2021 07:42 AM EDT
Close
COMMAND PROMPT
(Photo: Photo by Pixabay)

Windows 10, much like its Windows preceding operating systems (OS), has its very own Command Prompt utility. The said tool can run any command that its user types in it as long as it is the correct command.

Because of this, they can use the Command Prompt in almost every task in their PC, ranging from disk checking and cleaning to creating and organizing files.

How to Create, Organize Files using Command Prompt

File organizing, as well as creating one, can be a trivial task that users perform on their PC almost every day. Most of the time, they rely on the graphical interface and tend to use the tedious process of left-clicking and right-clicking folders and locations, making it more time-consuming and inefficient.

However, according to Techpp.com, if a user is proficient at Command Line Interface or CLI, then creating and organizing files using the Command Prompt will be much easier than using the graphical interface.

READ ALSO: Windows Print Spooler Flaw Detected: How to Prevent 'PrintNightmare' Ransomware Attacks

There are four ways that they can do these tasks using the Command Prompt. First in the echo Command. To do this, they will first open up the said tool, then enter the following command syntax: echo your_text_here > filename.extension.

They can also verify that it has been created successfully by entering this command syntax: type filename.extansion.

Aside from the echo command, users can also use the copy con command in creating a file in the Command Prompt by entering the following command syntax: copy con filename.extension.

The said command syntax will transport them in another Command Prompt, where they can add their desired content in the created file. They can save the said file by using the Ctrl + Z shortcut keys in their keyboard or Ctrl + C when they want to edit said file.

If they want to create files that has longer texts and paragraphs, they can use the Notepad. For this method, users must enter the following command syntax: notepad filename.extension. The said Command will open up the Notepad.

If the Notepad is asking them to create a new file, they need to click Yes before proceeding on creating and adding content to the said file. Much like the normal Notepad, players must use the Ctrl + S keyboard shortcut in saving the file, and Ctrl + W if they want to close the file.

If they want to create multiple files, they can use the for loop in the Command Prompt by entering the following command syntax: for /1 %a in (1 1 10) do type nul > "%a.txt," where (1 1 10) will tell the Command Prompt to perform the said task in the sequence from 1, in steps of 1, up to 10.

This means that this single command syntax can create up to 10 files. Users can modify the said command to how many files that they want to create. For example, if they want to create 20 files, instead of (1 1 10), they will enter (1 1 20) in the same command syntax.

If they want to add a common name to the start of every file and every file followed will have the same exact name, they will type in the following command syntax: for /1 %a in (1 1 10) do type nul > "filename %a.txt."

How to Clean the PC using Command Prompt

Aside from creating files, Command Prompt can used for cleaning up the PC, particularly its software. According to Gamespec.tech, while cleaning the hardware can make their PC run smoothly, as well as expanding its lifespan, cleaning the software, including the memory, can save if from crashing.

Aside from that, it will keep their PCs fresh while terminating the possibility of lagging or slowing down.

There many ways to do this on their Command Prompt. One of which is by using the cleanmgr command by entering the following syntax: C: \Windows\system32 > Cleanmgr. After entering the syntax, the Disk Cleanup box will pop up and will let users to clean the target disk.

They can also use the cleanmgr/ sageset command by typing the following syntax: clean/ sageset: numerid_id, or the cleanmgr/ sagerun command by typing cleanmgr/ sagerun: id.

If their PC is running in low disk space, they can use the cleanmgr/ lowdisk command. To do this, they must type in the following command syntax: cleanmgr/lowdisk/d{driver-latter of your disk}.

READ ALSO: 5 Best PDF to Word Converter, Compression Sites for Free 2021

© 2020 Game & Guide All rights reserved. Do not reproduce without permission.

Join the Conversation

Real Time Analytics