How to Use "CD" Command in Command Prompt Window

Techwalla may earn compensation through affiliate links in this story.

The command prompt tool on Microsoft Windows computers gives you direct access to key operating system functions without having to click through all the tiles or windows that make up the regular user interface. The simple tool lets you enter text commands to perform advanced administrative procedures and troubleshoot specific Windows issues. The "CD" command stands for "change directory" and this allows you to open different directories or folders on your hard drive.


Step 1

Press the "Windows-R" keys on your keyboard, type "CMD" in the Open field in the Run box, and then select "OK" to open a command prompt window.

Video of the Day

Step 2

Type "CD/" and press "Enter" to navigate to the root directory of the C drive. "CD/" will always return you to the root directory.


Step 3

Type "CD" and the name of the directory you want to open, and press "Enter" to navigate to that directory in the command prompt window. For example, to open the Program Files folder, you would type "CD Program Files".

Step 4

Navigate through the directory by using the "CD" command, along with the name of a subdirectory. If you know the exact file path to which you wish to navigate, you can type it after the "CD" command. For example, to open the Windows Help directory, type "CD Windows\Help" and press "Enter."

Step 5

Type "CD.." and press "Enter" to return to the previous directory.


Enter all commands without quotation marks.

You must type folder names exactly with correct spacing or the command won't work.

Type "DIR" and press "Enter" to see a list of the folders within a directory.


Many commands won't work unless you're using the tool in administrator mode. Open an elevated command prompt by adding a shortcut to the tool to your desktop. Right-click the shortcut and choose the "Run as administrator" option from the jump menu.