Saturday, September 13, 2025

Learn MS-DOS (Part 5) - Disk & Storage Commands in MS-DOS

🖥 Introduction

So far, we’ve learned how to navigate directories, work with files, and check system information. But computers run on disks — hard drives, floppy disks (in the old days), and now USBs. MS-DOS includes several commands to format, copy, compare, and manage disks.

⚠ Be careful: disk commands can erase data permanently. Always double-check before using them, especially commands like FORMAT and FDISK.


🔹 1. FORMAT – Format a Disk

Purpose: Prepares a disk for use by erasing all data and setting up a file system.

Syntax:

FORMAT [drive:] [/S] [/Q] [/U]

Options:

  • /S → Transfers system files, making the disk bootable.

  • /Q → Quick format (erases file system info only).

  • /U → Unconditional format (wipes data completely).

Examples:

FORMAT A: /S

Formats floppy disk A: and makes it bootable.

FORMAT D: /Q

Quick formats drive D.

Warning: All files will be lost after formatting!


🔹 2. DISKCOPY – Copy an Entire Disk

Purpose: Copies the contents of one disk to another (boot sector, files, and all).

Syntax:

DISKCOPY [drive1:] [drive2:]

Example:

DISKCOPY A: B:

Copies the entire disk in drive A to drive B.


🔹 3. DISKCOMP – Compare Two Disks

Purpose: Compares the contents of two floppy disks to check if they are identical.

Syntax:

DISKCOMP [drive1:] [drive2:]

Example:

DISKCOMP A: B:

Compares the contents of disk A and disk B sector by sector.


🔹 4. LABEL – Create or Change Disk Label

Purpose: Assigns or changes the volume label (name) of a disk.

Syntax:

LABEL [drive:] [label]

Examples:

LABEL C:

Prompts you to enter a new label for C drive.

LABEL D: BACKUP

Names drive D as BACKUP.


🔹 5. FDISK – Partition a Disk

Purpose: Creates, deletes, or manages disk partitions.

Syntax:

FDISK

Example:

FDISK

Launches an interactive menu to create or delete partitions.

Warning: Changing partitions usually erases all data on the disk. Use with extreme caution!


🔹 6. BACKUP – Backup Files to Another Disk

Purpose: Copies files from one location to another for safekeeping.

Syntax:

BACKUP [source] [destination] [/S]

Example:

BACKUP C:\WORK A:

Backs up all files from C:\WORK to floppy disk A.


🔹 7. RESTORE – Restore Files from Backup

Purpose: Restores files that were saved using the BACKUP command.

Syntax:

RESTORE [drive1:][path][filename] [drive2:][path] [/S]

Example:

RESTORE A: C:\WORK

Restores files from floppy disk A into C:\WORK.


🔹 8. SCANDISK – Scan and Repair Disk

Purpose: Checks a disk for errors and repairs them.

Syntax:

SCANDISK [drive:]

Example:

SCANDISK C:

Scans drive C for errors and fixes them.


🔹 9. UNDELETE – Recover Deleted Files

Purpose: Recovers files deleted by the DEL command (if not overwritten).

Syntax:

UNDELETE [filename]

Example:

UNDELETE report.txt

Tries to recover report.txt if space hasn’t been reused.


🔹 10. UNFORMAT – Recover a Formatted Disk

Purpose: Attempts to restore a disk that was accidentally formatted.

Syntax:

UNFORMAT [drive:]

Example:

UNFORMAT D:

Tries to recover data from formatted drive D.


🧰 Bonus Tips

  • Always run SCANDISK before using backup or restore on old disks.

  • DISKCOPY and DISKCOMP are mostly historical (used for floppies).

  • UNDELETE and UNFORMAT don’t guarantee recovery — modern recovery tools are more reliable.

  • For modern Windows systems, CHKDSK has replaced most of these functions.


✅ Conclusion

Disk & storage commands are the most powerful DOS tools. They can create, copy, repair, and even destroy data. Used carefully, they’re essential for system maintenance and data management.

👉 Next in Part 6, we’ll dive into Configuration & Environment Commands — commands that let you customize DOS itself.

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