Skip to main content

CompTIA A+View full course outline

Command Prompt Navigation with cd and dir(OBJ.1.5)

By Jonathon Eades Founder & IT InstructorUpdated

8 min read

Basic command-line navigation sounds simple, yet it shows up in real support work more than people expect.

When a user says, "My file is missing," you often need proof, not guesses. Command Prompt helps you find folders fast, confirm what exists, and check where logs landed. That's hard to do if you can't move around with confidence.

This article explains the cd and dir commands, a few high-value switches, and quick troubleshooting habits. The goal is practical skill, the kind you can use during a ticket, not just on an exam.

Understand where you are and how Windows stores files

Command Prompt always operates from a current working directory. Think of it like standing in a hallway. Every step you take depends on where you're already standing. If you forget your location, even correct commands can point to the wrong place.

Windows also uses drive letters. Your main drive is usually C:, while a second disk or USB might be D: or E:. Each drive has its own folder tree. As a result, being "in the right folder" also means being on the right drive.

Paths come in two common forms:

  • Absolute paths start from a known anchor, usually the root of a drive. For example, cd \Users (from anywhere on the same drive) moves you into the Users folder at the drive root.
  • Relative paths start from where you are now. For example, if you're already in C:\Users\Kai, then cd Downloads moves into that subfolder without typing the full path.

Three symbols matter every day:

  • \ points to the root when it appears at the start of a path.
  • . means "this folder" (for example, cd . does nothing, but it's helpful when scripts build paths).
  • .. means "parent folder" (for example, cd .. moves up one level).

Paths are like street addresses. If you omit an apartment number (a folder level), you may arrive at the wrong door.

Command Prompt is case-insensitive, so cd \users works like cd \Users. Still, spelling must match, and spaces need care. Get in the habit of wrapping any path that contains a space in quotes, such as "C:\Program Files". The cd command happens to accept an unquoted C:\Program Files, but dir, copy, robocopy, and most other commands split the path at the first space and fail.

Paths and shortcuts you should recognize right away

Most support tasks use a small set of patterns. The root of a drive looks like C:\. Moving into a folder often reads like cd \Windows or cd \Users\Public. Moving up one level is cd .., which is handy after you check a log folder and need to back out.

Quoted paths matter when a name includes spaces. For example, dir "C:\Program Files" lists the folder, while dir C:\Program Files looks for a folder called C:\Program and then a file called Files. Quotes keep the name together as one argument.

Switching drives is also simple, but easy to forget. If your prompt shows C:\> and your files are on D:, type D: and press Enter. Then run cd \ if you want the root of that drive.

Common mistakes that break navigation (and how to avoid them)

A few errors cause most failed attempts:

Forgetting quotes is the classic one. Most commands treat a space as the end of one argument and the start of the next, so dir C:\Program Files or robocopy C:\Program Files\App D:\Backup reads C:\Program as the path and everything after the space as a separate argument. cd is the one exception: it treats the whole rest of the line as the folder name, so cd C:\Program Files works without quotes. Do not rely on that. Quote every path with a space and you never have to remember which command forgives it.

Exam tip: cd C:\Program Files succeeds.

This lesson is part of ExamWizardz Pro

Unlock every lesson, unlimited practice tests, and the AI tutor.

See Pro pricing

or start with a free account

Test yourself on this topic: free Microsoft Command-line Tools practice questions — no account needed.