Introduction to MS-DOS
MS-DOS (Microsoft Disk Operating System) is a command-line operating system that was widely used before Windows. It allows users to perform file management, execute programs, and control hardware using text-based commands.
Basic Commands
Command | Description | Example Usage |
DIR | Lists files and directories in the current folder | DIR /P (Displays page by page) |
CLS | Clears the screen | CLS |
CD | Changes directory | CD Documents |
MD | Creates a new directory (folder) | MD NewFolder |
RD | Removes a directory | RD OldFolder |
DEL | Deletes a file | DEL file.txt |
COPY | Copies files from one location to another | COPY file1.txt D:\Backup |
REN | Renames a file | REN oldname.txt newname.txt |
MOVE | Moves a file to a new location | MOVE file.txt D:\Docs |
TYPE | Displays the content of a text file | TYPE notes.txt |
ECHO | Prints text to the screen | ECHO Hello, DOS! |
EXIT | Exits MS-DOS | EXIT |
Advanced Commands
Command | Description | Example Usage |
FORMAT | Formats a disk | FORMAT A: |
CHKDSK | Checks disk errors and displays status | CHKDSK C: |
DISKCOPY | Copies contents of one disk to another | DISKCOPY A: B: |
ATTRIB | Changes file attributes (read-only, hidden, etc.) | ATTRIB +R file.txt |
XCOPY | Copies files and directories | XCOPY C:\Docs D:\Backup /S /E |
DOSKEY | Enables command history and macros | DOSKEY |
LABEL | Changes the disk label | LABEL C: |
VER | Displays the MS-DOS version | VER |
SYS | Transfers system files to make a disk bootable | SYS A: |
FC | Compares two files | FC file1.txt file2.txt |
Networking Commands
Command | Description | Example Usage |
PING | Tests connectivity to a network device | PING 192.168.1.1 |
IPCONFIG | Displays network configuration | IPCONFIG |
NET USE | Connects to a shared network drive | NET USE Z: \\server\share |
Batch File Commands
Batch files (.BAT) allow automation of tasks by executing multiple commands sequentially.
Example Batch File (test.bat)
@ECHO OFF
ECHO This is a batch script
DIR
PAUSE
EXIT
Conclusion
MS-DOS is a powerful operating system for performing file management and system operations via command-line instructions. Mastering these commands enhances efficiency in managing files and system tasks.