In Command Prompt, use cd .. to move up one folder, cd \ to jump to the root of the current drive, and type a drive letter with a colon, like D:, to switch drives. Mix them up and you land in the wrong place. This guide breaks down the three CMD navigation states so you can move up, reset, or switch drives without guessing. (Wikihow)

How Command Prompt folder navigation works

How Command Prompt folder navigation works
A Command Prompt window appears over a Windows File Explorer screen

What cd does in cmd

In cmd, the cd command changes directories. A directory is another name for a folder. You can move to a nearby folder in the current path, or you can jump straight to a full path if you type the destination exactly.

Use dir first if you need to see the folders in your current location. That gives you the exact names before you move.

Relative paths versus absolute paths

A directory path can be relative or absolute. Relative paths start from your current folder. Absolute paths start from the drive root, such as C:\Users\Alex\Documents. Windows uses backslashes in paths, and folder names with spaces need quotation marks.

That difference matters because cd .. moves relative to where you are now, while a full path tells cmd exactly where to go.

Why drive letters matter

Drive letters are separate navigation states. If you are on C: and want a folder on D:, cd alone will not switch the drive. Type the drive letter and a colon first, then move within that drive. This is the point where many beginners think cmd ignored the path, when the shell was still on the other volume.

What you'll need

  • Command Prompt, or Windows Terminal with cmd open
  • A folder path you want to reach
  • File Explorer to check the target path in the address bar
  • A folder name from the current directory if you plan to use dir first

How do you go back one folder?

Use cd .. to move up one directory in Command Prompt. In Windows, cd.. also works because the space is optional. If you want to confirm where you are before moving again, run dir to list the folders in the current directory.

  1. Type dir and press Enter to see the current subfolders.
  2. Type cd .. and press Enter to move to the parent folder.
  3. Type dir again to confirm the new location.

Suppose you are in C:\Users\Alex\Downloads\Reports. cd .. moves you to C:\Users\Alex\Downloads, not to the drive root. That is the parent folder, one level up.

Use cd.. if needed

If you want the same move without the space, cd.. is accepted in cmd. Both commands go up one folder. The result is the same.

How do you go back multiple folders?

Repeat ..\ segments to climb more than one level. Three levels up looks like cd ..\..\..\. This helps when you are deep inside a project tree and want to jump higher without typing every intermediate folder name.

  1. Count how many folders up you need to go.
  2. Type cd ..\..\..\ for three levels, or repeat ..\ as needed.
  3. Press Enter, then run dir if you want to confirm the new directory.

The command can fail if you start in the wrong place. For example, if you are already near the top of the tree, too many parent jumps can land outside the path you expected. If that happens, switch to a full path instead of stacking more .. segments.

Jump several levels at once

Use repeated parent segments when you know the tree layout. A common case is moving from a nested build folder back to a project root, then into another branch. That saves time compared with stepping up one level at a time.

How do you move to the root or another drive?

How do you move to the root or another drive?
A person points at a screen showing C:\ and command prompt text

Use cd \ to return to the root of the current drive. That takes you to the top of the drive, which is different from going up one level. To change drives, type the drive letter and a colon, such as D:. To enter another folder, add a path after cd.

  1. Type cd \ if you want the root of the current drive.
  2. Type D: or another drive letter to switch drives.
  3. Type cd FolderName or a full path to move into a folder.

Picture a common first-timer mistake: you are on C:, but the target folder is on D:. Typing cd D:\Work will not switch the active drive by itself. Type D: first, then cd \Work, or use the full path after switching.

Use a full path when the folder is elsewhere

A full path is the safest option when the destination is on another drive or buried deep in a folder tree. If the folder name has spaces, put the path in quotation marks. That avoids broken commands caused by Windows splitting the path at the space.

Situation Exact command When it fails
Current folder to parent cd .. Fails only if you are already at a boundary you did not expect.
Multiple parents cd ..\..\..\ Fails if you climb past the folder structure you meant to leave.
Current drive root cd \ Does not move to a different drive; it stays on the current one.
Another folder on the same drive cd \Users\Alex\Projects Fails if the path is typed wrong or the folder does not exist.
Another folder on a different drive D: then cd \Projects Fails if you skip the drive switch and stay on the old volume.
Folder names with spaces cd "C:\Program Files\Example App" Fails if the quotation marks are missing around the spaced name.

Common mistakes

Common mistakes
A command prompt shows directory navigation commands on a black screen

The most common slip is mixing up folder moves with drive switching. cd changes folders. A drive letter with a colon changes the active drive. They are related, but they do different jobs.

  1. Wrong drive active: type the drive letter, such as D:, before entering the folder path.
  2. Missing quotes: wrap paths with spaces in double quotes, like "C:\Program Files\Example App".
  3. Wrong path: use dir to confirm folder names before retyping the command.
  4. Windows Terminal confusion: check whether the tab is running cmd or PowerShell. PowerShell also accepts cd.., but it is not the same shell as Command Prompt.

Another useful check is File Explorer. Open the target folder, read the address bar, and copy the path exactly. You can also drag a folder from File Explorer into Command Prompt to paste its full path. That is often faster than typing a long directory with special characters.

If that didn't work, try this next

  1. Run dir in the current location and confirm the folder name you want exists.
  2. Switch to the correct drive with [drive letter]:, then run the folder command again.
  3. Paste the full path from File Explorer, then wrap it in quotes if it contains spaces.

If The system cannot find the path specified. appears, the path you typed does not match the current drive or folder structure. Use File Explorer’s address bar to copy the exact destination, then retry with the correct drive letter and quotation marks where needed.

Keep the rule simple: parent folder means cd .., drive top means cd \, and another drive means a drive letter first. That split prevents most navigation errors in cmd.

Keep reading

Frequently asked questions

How to go back to root directory in command prompt

Type cd \ to jump to the root of the current drive. That returns you to the top of the drive, not to another volume. If you need a different drive, switch with D:, E:, or the letter that matches your target.

How to go back multiple directories in cmd

Chain parent segments in one command, such as cd ..\..\..\ for three levels up. The command must start from a folder where those parent levels exist. If you are unsure, use dir first and count the folders before moving.

How to change to a different drive in command prompt

Type the drive letter and a colon, such as C: or D:. That switches the active drive immediately. After that, use cd to move within that drive. A full path alone does not replace the drive switch in cmd.