How do I navigate to a desktop in Windows CMD?


👤 Diwas Poudel    🕒 Jan 28 2022    📁 Fix    📜 0 comment

CMD is an acronym for Command Prompt officially known as Windows Command Processor. Geeks enjoy Command Prompt because it allows them to perform basic to complex administrative activities and fix various Windows issues.

You'll first learn how to navigate and change directories in the command prompt. The instructor might not show you how to get to your desktop while you're learning. As a result, I've arrived to assist you.

When utilizing the command prompt to get to the desktop, it isn't always easy, and it can be difficult at times. I'll show you how to browse to a desktop in Windows CMD in this tutorial. Let's get started with the many ways to browse in Windows CMD without further ado.

Method 1: Using File Explorer (or Windows Explorer) and Command Prompt

We can easily navigate to the desktop with the help of File Explorer. File Explorer is a file management application that is included with the Windows Operating System that allows you to navigate files, folders, drives present on your computer.

Note that Windows Explorer is not Internet Explorer.

Steps:

1 Goto File Explorer (Press Windows + E )

Alternatively, Type File Explorer in the search bar and click on 'File Explorer from the list

2 Navigate to Desktop folder

3 Goto top where it shows your location in the location bar (like address bar in browser), replace it with cmd and press enter.

This will open a command prompt inside the current user desktop.

Method 2: Using Drag & Drop and Command Prompt

In the command prompt, we can easily drag and drop folders and navigate to them directly.

Steps:

1 Open Command Prompt and type cd 

2 Open File Explorer and Find Desktop icon.

3 Just drag and drop the Desktop icon and paste it in the already opened command prompt.and press Enter

This will navigate inside the desktop.

Method 3: Using Environment Variable and Command Prompt

An environment variable is simply a variable that stores a value. Some of the popular Environment variables are %userprofile%, %temp%, etc.

%userprofile% :%UserProfile% variable is a special system-wide environment variable holding user profile information. The path to your user profile folder is stored in the %userprofile% variable. It's a collection of settings associated with a certain user.

This folder contains the user's identification for operating systems, software, and websites. With the help of the %userprofile% environment variable, you can navigate to the desktop.

Note that %userprofile% is not same as %username%

Steps:

1 Open Command Prompt and 

2 Type

cd /d %userprofile%/desktop

It contains %SystemDrive%\Users\{username}\desktop.This will navigate you to the desktop.

Windows is case insensitive, so you only need to be aware of what you type and not how you type it. You can type Cd, CD, or cd.Use capital letters, lowercase, or any combination of them.

Method 4: Using Direct Method and command prompt

We know that the desktop path for a different version of the windows operating system is at a different path.

For Windows Vista, Windows 7, Windows 8, Windows 10, Windows 11 operating system etc path is :

c:\Users\(username)\Desktop

For Windows 2000, 2003, and XP OS, the path is:

c:\documents and settings\(username)\desktop

For Windows 98, 95, and ME Operating System

c:\windows\desktop

Note: You can get your username by typing echo %username% in the command prompt.

Now, let follow below steps

  • Press Windows + R and type cmd.exe and press Enter
  • Then just type cd followed by the above command.

In my case, I am using Windows 11 and I will just type below:

cd c:\Users\rider\Desktop

where the rider is my username.

This will navigate to you directly inside the desktop path in the command prompt. 

Method 5: By Knowing Desktop Properties

By looking at desktop properties you will get the complete path of the desktop.

Steps:

1 Right-click on 'Desktop'

2 Click on Properties

3 Navigate to the Location tab

4 Then you will get the desktop folder path of the current login user and copy it.

5 Then open the command prompt and just type:

cd copiedtexthere

where copiedtexthere is a text you have just copied

This will open your desktop path in the command prompt in the next line.