windows cmd cld

Important and Basic Commands of Windows Command Prompt

In this article, you are going to learn about some commands and their working in the command prompt.

What are Commands?

Command are pre-defined words which hai some specific task to do in command prompt. These commands are operated by simply typing the right statement and just pressing the Enter key. these commands can then do their specific task.

In the previous article, you have learned how to open the Command Prompt. After opening this now we have to type some commands to perform the tasks.

About Opening of Command Prompt

Windows often starts you at your user directory. In the example below, the user is Laptop Land. So, C:\Users\Laptop Land>is our prompt.

This prompt shows that we’re in the C: drive (default hard drive letter) and currently in the Laptop Land directory, a subdirectory of the Users directory.

windows-10 command 

Dir Command

Type dir at the prompt to list files in the current directory. You need to find output like the example picture below. Without using any dir alternatives, this is the way dir output appears. As shown, you Are given plenty of helpful information such as the creation time and date, Directories (<DIR), as well as the title of the file or directory.

windows cmd dir

Every command in the command line includes choices, which are additional switches and commands which could be added after the command. For instance, using the dir command, you can type dir /p to list the directories and files in the current directory one page at a time. This switch is helpful to view all of the directories and files in a directory which has hundreds or dozens of files.

Further Reading:  Updates of Windows

The dir command may also be used to look for certain directories and files using wildcards. For example, to list files or directories that start with the letter”A” you can type dir a * to list just the AppData directory

 CD command

To move into a directory, we use the cd command, so to move into the Desktop type cd desktop and press Enter. Once you’ve moved into a new directory, the prompt changes. So, in our example, the prompt is now C:\Users\Laptop Land\Desktop>. We are currently on desktop and by typing Dir Command we can see the files present on the desktop.

windows cmd cd

 

CD.. Command

When this command is executed, you’ll draw out of the Desktop directory and back into the user directory. To go back to the root directory type cd\ to get to the C:\> prompt. If you know the name of the directory you want to move into, you can also type cd\ and the directory name. For example, to move into C:\Windows> type cd\windows at the prompt.

windows cmd cd.. 

MKDIR Command

To create a directory in the current directory, use the mkdir command. For example, create a directory called “Pictures” by typing mkdirlaptop1 at the prompt. If created successfully, you are returned to the prompt with no error message. After the directory is created, move into that directory with the cd command.

windows cmd mkdir

RENAME Command

Use the rename command to rename directory into an alternate name. Type rename document new at the prompt to rename the file to “new” Now, when using the dir command, you see “new” directory.

Further Reading:  How to Take a Screenshot on your PC

windows cmd rename

 

DEL Command

Delete the file with the del command. Type del new.doc to delete the new.doc file. If successful, you are returned to the prompt with no errors, and the dir command shows no files in the current directory.

RMDIR Command

Remove the newt directory by using the rmdir command. At the prompt, type rmdir new to remove the new directory.

windows cmd RMDIR

CLS Command

If you want to clear your screen of command prompt you can use the cls command. This command can erase all the data which is being shown on your screen. It can only clear the screen not delete the data.

windows cmd cld

The result:

windows cmd cls