Sunday, September 14, 2025

Learn MS-DOS (Part 9) - Advanced & Rarely Used Commands in MS-DOS

🖥 Introduction

By now, we’ve covered everything from file handling to batch programming. But MS-DOS also came with a set of specialized commands. These were not used every day, but they were extremely powerful in the right hands.

In this part, we’ll cover advanced commands like ATTRIB, DEBUG, SUBST, FC, FIND, SORT, COMP, and more. Think of these as the “expert tools” hidden inside DOS.


🔹 1. ATTRIB – File Attributes

Purpose: Displays or changes file attributes (Read-only, Hidden, System, Archive).

Syntax:

ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [filename]

Examples:

ATTRIB notes.txt

Shows attributes of notes.txt.

ATTRIB +R +H report.txt

Makes report.txt read-only and hidden.


🔹 2. DEBUG – Debugging Tool

Purpose: A powerful low-level tool for testing and editing programs, memory, and disks.

Syntax:

DEBUG [filename]

Examples:

DEBUG

Starts debug mode.

DEBUG program.exe

Loads program.exe into debug.

⚠ Mostly used by programmers and technicians — not for casual use.


🔹 3. EDLIN – Line Editor

Purpose: A simple text editor included with early MS-DOS versions.

Syntax:

EDLIN [filename]

Example:

EDLIN notes.txt

Opens notes.txt in line-edit mode.


🔹 4. SORT – Sort Text Data

Purpose: Sorts input text alphabetically or numerically.

Syntax:

SORT < [filename]

Example:

SORT < names.txt

Sorts contents of names.txt and displays sorted output.


🔹 5. FIND – Search for Text in Files

Purpose: Finds specific text inside files.

Syntax:

FIND "string" [filename]

Examples:

FIND "error" logfile.txt

Searches for the word “error” inside logfile.txt.

TYPE report.txt | FIND "sales"

Searches “sales” inside report.txt.


🔹 6. FC – File Compare

Purpose: Compares two files and shows differences.

Syntax:

FC [file1] [file2]

Example:

FC old.txt new.txt

Compares old.txt and new.txt.


🔹 7. COMP – Compare Binary Files

Purpose: Compares contents of two files or sets of files, byte by byte.

Syntax:

COMP [file1] [file2]

Example:

COMP report1.doc report2.doc

Compares binary contents of two reports.


🔹 8. SUBST – Substitute Drive for a Path

Purpose: Assigns a drive letter to a folder path.

Syntax:

SUBST [drive:] [path]

Examples:

SUBST Z: C:\Projects

Maps C:\Projects as drive Z:.

SUBST Z: /D

Removes substitution.


🔹 9. JOIN – Join Drives

Purpose: Maps a drive to a directory on another drive.

Syntax:

JOIN [drive1:] [drive2:path]

Example:

JOIN D: C:\DATA

Maps drive D into C:\DATA.


🔹 10. SYS – Make a Disk Bootable

Purpose: Transfers system files to a disk, making it bootable.

Syntax:

SYS [drive:]

Example:

SYS A:

Makes floppy disk A bootable.


🧰 Bonus Commands

  • CHKNTFS → Manages NTFS checks (Windows-DOS hybrid, not in classic DOS).

  • FINDSTR → Extended text search (Windows CMD).


✅ Conclusion

These advanced commands may not be used every day, but they show the depth and power of DOS. Whether comparing files, setting attributes, or mapping drives, they gave DOS users advanced control over their system.

👉 Finally, in Part 10, we’ll build a Complete MS-DOS Cheat Sheet — a one-stop summary of all commands we’ve covered.

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...