How to Navigate in CMD and Explore/Change Directories

The command prompt or popularly known as cmd in Windows PC comes with a plethora of features and options that one should explore. Starting from how to navigate in cmd to create new files/folder/network test/file transfer. You name it, and there is a shortcut available in cmd to achieve it.

In this article, we will talk in detail about some of the most popular command prompt features, technique and how to navigate in it in more details. Catch us after the jump!

An Overview of Command Prompt: 

Microsoft introduced cmd since they launched their first OS called MS-DOS.

From that day till now, Microsoft has added more features, and updated old cmd commands those were not supported.

As working from cmd gives more programmer like feeling and is used mostly by tech guy. Thus, they love working on from Terminal, especially those who are a fan of Mac or Linux OS.

Now let’s talk about some of the most popular command prompt commands that you can use on a day-to-day basis:

  • cmd – launch command quick window
  • cd – current directory
  • mkdir – make a directory or folder
  • chdir – displays the current directory
  • cls – clears the content from screen
  • ver – displays the current version of cmd prompt
  • exit – close the command prompt window
  • ping – check the status of network packets
  • scan disk – run and scans disk health from a command prompt
  • type – displays what is inside of a file
  • debug – starts to debug feature within cmd prompt
  • edit – used to edit files from cmd prompt

How to Navigate in cmd:

This is an exciting part where we will discuss how to use the commands mentioned above and navigate in command prompt.

Let’s start with the basic command prompt by launching a command prompt from Windows start by typing in the search box as “cmd.

Cmd is used to launch command prompt window on Windows-based PC. It can be Window XP/Vista/7/8/10.

In the open command prompt window, it will display the current version of cmd along with the current directory we are.

By default, it will open as C:\Users\ [Username] and a blinking cursor waiting for commands to execute.

cd

cd

As we know, cd stands for the current directory, and it displays the current working directory in which you are working.

Cd Command In Cmd

To change the directory and access a file, you can type as below:

cd ..

(to move out of current directory)

and to move into a directory enter:

cd foldername

mkdir

mkdir

mkdir stands for make directory or folder in Windows. This command helps to create a new folder name on the location where you want.

For example, when we launched the command prompt, it opened in default location as Desktop, but I wanted to create a sysprobs folder in my pictures folder to save important images.

Thus, I did cd… to move out of Desktop and move into pictures folder, and then I created a folder sysprobs.

Advance user can also create a folder at any location without moving out of the current directory by just inserting the valid path of the place where they want to make the file or folder.

Mkdir
Created Folder

dir

dir is a useful command to view the files and folders inside the particular folder. Once you verified that you are in the correct location, enter:

dir
Dir Command

If the folder contains lots of files and folders, then you can use below commands to filter the results.

  • List the files/folders name starting with particular letters:
dir ubuntu*
  • Display the file/folder name ending with certain letters.
dir *ubuntu
  • This command will display the files and folders name contain particular letters.
dir *linux*
  • To navigate from one location to another drive, you can simply type the drive letter with :, as shown below.
Quick Navigation In Windows 10 Cmd

We mentioned some of the useful commands to navigate disks, folders and files in CMD. As you must aware, you can find the useful switches with every command by typing the /? as shown below.

dir /?
Useful Help Switches

copy con filename.txt

To create a text file in the folder we just created, you can try below command:

copy con filename.txt 

then enter key. Once above command is executed it will provide you with blank space on command prompt to enter any information that you want to add into the file.

For example, I tried “I love sysprobs”, and press enter. And it will be saved to the file we created above.

To get out of the command line interface press CTRL+Z to break the chain.

Enter Texts In Command Prompt

Here is the text file created from command prompt with the content we entered.

With Texts

chdir

Chdir displays the current working directory, the location in which you are currently working.

In other words, any information created or saved will be in that particular location.

To access the current working directory, a user can try typing chdir, and it will display the location of the current directory.

chdir
Chdir Command To Navigate In Cmd

Cls

Cls command stands for clear. To remove any typed information from the command prompt screen, user can type in cls, and it will clear the complete cmd screen.

cls

Ver

Ver stands for version, and it is used to display the current version of Windows command prompt utility.

As Microsoft keeps adding new useful commands and updates old one with more features hence having an idea of the current build of command is a good have to feature.

The version of command can be located using Ver and enter, as shown below:

ver

Exit:

Exit command helps to close the command prompt.

When you want to close the cmd screen and move out, you can type exit and enter. The command will close the Window.

exit

Other Useful Commands

Ping

Ping is a handy command that tells you the information related to network connectivity.

The ping command is used to check the status of network connectivity based on send and received packets of data.

For example: If I want to check my internet connectivity, then I will use the ping command to check whether I can access the WorldWideWeb.

Let’s get to a practical example to understand in detail:

To check network connectivity, I need to either enter an IP address that I am trying to access or FQDN address like google.com/bing.com etc.

For convenience, I will use google.com for my ping test.

Ping google.com

The ping process will start and will run for some time and will automatically show you the summary report of the ping, as shown below:

Ping Command

Scan disk

Scan disk (chkdsk) is another impressive command-line utility that scans and repair any issue related to hard disk.

It can be accessed by running a command prompt with admin rights.

User can try below command to run scan disk:

chkdsk
Chkdsk Command

Conclusion:

Just like commands we have shared above, there are many such available that a user can use as per their conveniences like debug/type/scan disk and many more.

Do let us know which is your favourite command prompt command that you frequently use in the comment section below.

Abhishek is a software engineer by profession, have worked with Fortune 50 companies globally. He holds many renowned certifications from Google, Microsoft, Adobe & many more.

Leave a Comment

Pin It on Pinterest

Shares