Published on: July 2026 | By: Lovejeet Singh, CodeSardar
Hello friends! 👋
If you're learning Windows Command Prompt (CMD), one of the first and most important commands you'll use is the cd (Change Directory) command.
However, many beginners get confused between Absolute Path and Relative Path. They often wonder:
Why does one command work while another doesn't?
When should I type the full path?
What does
..actually mean?What's the difference between
cd FolderNameandcd C:\FolderName?
Don't worry! In this guide, I'll explain Absolute Path and Relative Path in the simplest way possible with real-world examples, diagrams, and practical CMD commands.
💡 My Experience
When I first started using CMD, I memorized commands without understanding how paths actually worked. As a result, I frequently saw errors like "The system cannot find the path specified." Once I understood the difference between absolute and relative paths, navigating folders became much easier. Mastering this concept is one of the biggest steps toward becoming comfortable with the Windows Command Prompt.
What Is the cd Command?
The cd command stands for Change Directory.
It is used to move from one folder (directory) to another inside the Command Prompt.
Basic Syntax
cd [folder_name]
Example:
cd Documents
This changes the current directory to the Documents folder (if it exists in the current location).
What Is a Path?
A path is the address of a file or folder on your computer.
Just like every house has an address, every folder in Windows has its own path.
Example:
C:\Users\Lovejeet\Documents\Projects
This tells Windows exactly where the folder is located.
Types of Paths
There are two main types:
Absolute Path
Relative Path
Understanding these two concepts is essential for using CMD efficiently.
What Is an Absolute Path?
An Absolute Path always starts from the root of the drive, such as **C:*, **D:*, or **E:**.
It gives the complete location of a folder.
Example:
cd C:\Users\Lovejeet\Documents
No matter where you are in CMD, this command always attempts to go directly to:
C:\Users\Lovejeet\Documents
Characteristics of Absolute Paths
Starts with a drive letter.
Gives the complete folder location.
Works from almost any current location (when used correctly with drive changes).
Easy to understand.
What Is a Relative Path?
A Relative Path starts from your current folder instead of the root drive.
Example:
Current folder:
C:\Users\Lovejeet
Command:
cd Documents
CMD moves to:
C:\Users\Lovejeet\Documents
Notice that you didn't type the entire path.
Absolute Path vs Relative Path
| Feature | Absolute Path | Relative Path |
|---|---|---|
| Starts From | Drive root | Current folder |
| Drive Letter | Required | Not required |
| Length | Longer | Shorter |
| Depends on Current Location | No (if the correct drive is selected or /d is used) | Yes |
| Best For | Direct navigation | Moving nearby folders |
Visual Diagram
Suppose your folder structure looks like this:
C:\
│
├── Users
│ ├── Lovejeet
│ │
│ ├── Documents
│ │ ├── JavaScript
│ │ ├── HTML
│ │ └── CSS
│ │
│ └── Downloads
Current location:
C:\Users\Lovejeet
Relative Path:
cd Documents
Absolute Path:
cd C:\Users\Lovejeet\Documents
Both commands reach the same folder.
Using cd ..
The command:
cd ..
moves one folder back.
Example:
Current:
C:\Users\Lovejeet\Documents
After:
cd ..
Result:
C:\Users\Lovejeet
Using cd \
cd \
This command jumps directly to the root of the current drive.
Example:
Before:
C:\Users\Lovejeet\Documents
After:
C:\
Changing Drives
Many beginners make this mistake:
cd D:\Movies
If you're currently on the C: drive, this may not switch to the D: drive by itself.
Instead use:
cd /d D:\Movies
The /d option changes both:
Drive
Folder
at the same time.
Using Quotes for Folder Names
If a folder contains spaces:
Wrong:
cd Program Files
Correct:
cd "Program Files"
Always use quotation marks when folder names contain spaces.
Common cd Commands
| Command | Purpose |
|---|---|
cd | Display current directory (or change directory depending on usage) |
cd Folder | Open a folder inside the current location |
cd .. | Move back one folder |
cd \ | Go to the root of the current drive |
cd /d D:\Folder | Change both drive and directory |
cd "Folder Name" | Open folders containing spaces |
Real-Life Examples
Example 1: Relative Path
Current:
C:\Users\Lovejeet
Command:
cd Downloads
Result:
C:\Users\Lovejeet\Downloads
Example 2: Absolute Path
Current:
C:\Windows
Command:
cd /d C:\Users\Lovejeet\Downloads
Result:
C:\Users\Lovejeet\Downloads
Example 3: Moving Back
Current:
C:\Users\Lovejeet\Downloads
Command:
cd ..
Result:
C:\Users\Lovejeet
Common Errors
"The system cannot find the path specified."
Possible causes:
Folder name is incorrect.
Wrong spelling.
Folder doesn't exist.
Missing quotation marks.
Incorrect drive selected.
💡 My Recommendation
For beginners, practice using Relative Paths first because they're shorter and easier to understand. Once you're comfortable navigating folders, start using Absolute Paths when you need to jump directly to a specific location or create batch scripts.
💡 Pro Tip
Before typing a long path manually, type:
dir
to view the folders in your current location. You can also press the Tab key to auto-complete folder names, which saves time and helps avoid typing mistakes.
⚠️ Note
Windows Command Prompt is not case-sensitive, so Documents, documents, and DOCUMENTS are treated the same. However, the spelling and folder names must still be correct.
Image Suggestions
Include screenshots of:
CMD showing the current directory.
Absolute Path example.
Relative Path example.
cd ..demonstration.cd \demonstration.cd /dexample.Folder structure diagram.
Quick Summary Table
| Command | Description |
|---|---|
cd | Display or change the current directory |
cd FolderName | Open a folder in the current directory |
cd .. | Move up one directory |
cd \ | Go to the root directory |
cd /d Path | Change drive and directory together |
cd "Folder Name" | Open folders with spaces |
Common Beginner Mistakes
Avoid these mistakes:
Forgetting quotation marks around folder names with spaces.
Confusing Absolute Path with Relative Path.
Typing incorrect folder names.
Forgetting to switch drives when needed.
Using
cd D:\Folderinstead ofcd /d D:\Folder.Trying to enter folders that don't exist.
Ignoring the current working directory before using a relative path.
Interesting Facts
cdstands for Change Directory.Every folder in Windows has a unique path.
Relative paths depend on your current location, while absolute paths always point to a fixed location.
The Tab key can automatically complete folder names in Command Prompt.
Understanding paths is essential for learning CMD, PowerShell, batch scripting, Git, and many programming tools.
Why Is This Concept Important?
Understanding Absolute Paths and Relative Paths helps you:
Navigate folders faster.
Write batch files more efficiently.
Use Git and programming tools with confidence.
Work comfortably in PowerShell and Terminal.
Avoid common "Path Not Found" errors.
This is one of the most important concepts every Windows user and programmer should master.
Conclusion
The cd command is much more than a simple navigation tool—it's the foundation of working in the Windows Command Prompt. Once you understand the difference between Absolute Paths and Relative Paths, navigating folders becomes faster, easier, and far less confusing.
Practice these commands regularly, experiment with different folder structures, and use the examples in this guide until they become second nature. A strong understanding of paths will also make learning PowerShell, batch scripting, Git, and programming much easier.
Frequently Asked Questions (FAQs)
1. What does the cd command do?
The cd command (Change Directory) is used to navigate between folders in the Windows Command Prompt.
2. What is an Absolute Path?
An Absolute Path is the complete address of a folder, starting from the root of a drive (for example, C:\Users\Lovejeet\Documents).
3. What is a Relative Path?
A Relative Path starts from your current working directory instead of the root of the drive.
4. What does cd .. mean?
It moves you one level up from the current directory to its parent folder.
5. Why should I use cd /d?
The /d option allows you to change both the drive and the directory in a single command, which is useful when switching between drives.
6. Why do I need quotation marks for some folder names?
If a folder name contains spaces (such as Program Files), quotation marks ensure that CMD treats the entire name as a single path.
7. Is the cd command case-sensitive?
No. Windows Command Prompt is generally case-insensitive, but you must still type the correct folder names and paths.