Saturday, September 13, 2025

Learn MS-DOS (Part 2) - File & Directory Commands in MS-DOS

📂 Introduction

In Part 1, we learned what MS-DOS is and why it’s important. Now, let’s roll up our sleeves and start using some real commands. The first set of commands you’ll master are file and directory commands. These are the building blocks of working in DOS because everything you do revolves around files and folders.

Think of it like learning the basics of moving around your house — opening doors, creating rooms, and organizing things.


🔹 1. DIR – Display Directory Contents

Purpose: Lists all files and folders in the current directory.

Syntax:

DIR [drive:][path][filename] [/P] [/W]
  • /P → Shows one page at a time.

  • /W → Wide format (more compact view).

Example:

DIR /P

Shows files in the current directory, pausing after each screenful.


🔹 2. CD or CHDIR – Change Directory

Purpose: Moves you into a different folder.

Syntax:

CD [directory]

Example:

CD GAMES

Takes you into the folder named GAMES.

Tip: Typing CD.. moves you one level up (backwards).


🔹 3. MD or MKDIR – Make Directory

Purpose: Creates a new folder.

Syntax:

MD [directory]

Example:

MD PROJECTS

Creates a folder named PROJECTS inside the current directory.


🔹 4. RD or RMDIR – Remove Directory

Purpose: Deletes an empty folder.

Syntax:

RD [directory]

Example:

RD PROJECTS

Removes the PROJECTS folder (if it’s empty).


🔹 5. TREE – Display Directory Structure

Purpose: Shows the folder structure in a “tree-like” view.

Syntax:

TREE [drive:][path] [/F] [/A]
  • /F → Displays file names too.

  • /A → Uses text characters instead of graphical lines.

Example:

TREE C:\ /F

Shows the full folder + file structure of drive C.


🔹 6. PATH – Set or Display Search Path

Purpose: Tells DOS where to look for program files.

Syntax:

PATH [path1;path2;...]

Example:

PATH C:\DOS;C:\UTILS

Instructs DOS to look for commands/programs in C:\DOS and C:\UTILS.


🔹 7. CLS – Clear Screen

Purpose: Clears all text on the screen and shows a clean prompt.

Syntax:

CLS

Example:

CLS

Wipes out all displayed commands and results — a fresh start!


✅ Conclusion

These file and directory commands are like the compass and backpack of your DOS journey. They help you navigate, create, and manage the structure of your computer.

👉 In Part 3, we’ll go deeper into File Operations Commands — how to copy, delete, rename, and move files.

No comments:

Post a Comment

Learn Microsoft Word (Part 1) - Introduction to Microsoft Word

🖥 What is Microsoft Word? Microsoft Word is the world’s most popular word processing program . It’s used to create documents such as lette...