Home » How To » How To Open a Folder in Command Prompt

How To Open a Folder in Command Prompt

To list or open files and change directories, you can open a folder in the Command Prompt itself. Here’s how you can do it.

When you first open the Command Prompt, it will open in the user’s home folder. i.e, “C:\Users\Username\” folder. If you open the Command Prompt as an admin then it will open in the “C:\Windows\system32\” folder. For executing general commands, the initial directory is of no consequence. For example, to clear the DNS cache, you don’t need to be in a specific folder. However, if you want to open a specific file or to execute a command that requires access to a specific folder, you have to first open that folder in that the Command Prompt.

The good thing is, you can easily open any folder you want in the Command Prompt window. In fact, there are multiple ways to do it.

In this simple and straightforward guide, let me show you the steps to open a folder in Command Prompt and how to change the directory in Command Prompt.

Open a Folder in Command Prompt

To open a folder in the Command Prompt, you have to use the “cd” command. The ‘cd’ command allows you to change directories in the Windows command-line interface. Here’s how you can do it.

1. First, open the Command Prompt window. To do that, search for “cmd” in the Start menu or execute the “cmd” command in the Run dialog box (Win + R).

open command prompt

2. After opening the Command Prompt window, type cd followed by a space and the folder path. If the folder path has a space in it, enclose the entire path in quotes. This is how the command to open a folder in Command Prompt looks like.

cd C:\dummy\myFolder

open folder in command prompt

If the folder path has a space in it, you should enclose it in quotes. This is how it looks like.

cd "C"\dummy\My Folder"

Change drive or partition in command prompt

If the folder you want to open is in a different drive then you first need change the drive or partition in the Command Prompt and then open the folder. Here’s how you do it.

1. First, open the Command Prompt window. You can do that by searching for it in the Start menu,

2. In the Command Prompt window, type the below command to change the drive. Replace “DriveLetter” with the actual drive letter. For example, if you want to open the D drive, type D: and press Enter.

DriveLetter:

change drive or partition in command prompt

As soon as you execute the above command, Command Prompt will change the drive you are in. From there, type the below command to open the folder you want. Of course, change the dummy folder path with the actual folder path.

cd "D:\dummy\Folder name"

open folder in a different drive in command prompt

That is all. It is that simple to open a folder in Command Prompt and change the drive in Command Prompt.

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, check out how to open a file in Command Prompt.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top