|
Command |
Description |
Example |
|---|---|---|
|
DIR |
Displays list of files and folders in current directory. |
DIR C:\ |
|
CD |
Changes the current directory. |
CD Documents |
|
CD.. |
Moves one directory up. |
CD.. |
| MD / MKDIR |
Creates a new directory. |
MD MyFolder |
| RD / RMDIR |
Deletes a directory (if empty). |
RD OldFolder |
|
CLS |
Clears the screen. |
CLS |
|
COPY |
Copies one or more files to another location. |
COPY file.txt D:\Backup |
|
XCOPY |
Copies files and folders (including subfolders). |
XCOPY C:\Data D:\Backup /S |
|
MOVE |
Moves files from one location to another. |
MOVE report.txt D:\Work |
|
DEL / ERASE |
Deletes one or more files. |
DEL test.txt |
|
REN / RENAME |
Renames a file or folder. |
REN oldname.txt newname.txt |
|
TYPE |
Displays contents of a text file. |
TYPE readme.txt |
|
EDIT |
Opens the MS-DOS text editor. |
EDIT notes.txt |
|
ECHO |
Displays messages or controls command echoing. |
ECHO Hello World! |
|
DATE |
Displays or sets the system date. |
DATE |
|
TIME |
Displays or sets the system time. |
TIME |
|
VER |
Shows current MS-DOS version. |
VER |
|
VOL |
Displays disk volume label and serial number. |
VOL C: |
|
LABEL |
Creates or changes disk label. |
LABEL D: MYDISK |
|
PATH |
Displays or sets command search path. |
PATH C:\Windows\System32 |
|
PROMPT |
Changes the command prompt text. |
PROMPT $P$G |
|
HELP |
Displays help for DOS commands. |
HELP COPY |
|
EXIT |
Exits from the command prompt. |
EXIT |
|
ATTRIB |
Changes file attributes (read-only, hidden, etc.). |
ATTRIB +R myfile.txt |
|
CHKDSK |
Checks a disk and displays status report. |
CHKDSK C: |
|
FORMAT |
Formats a disk drive. |
FORMAT D: |
|
DISKCOPY |
Copies entire floppy disk to another. |
DISKCOPY A: B: |
|
COPY CON |
Creates a file from console input. |
|
|
TREE |
Displays directory structure in tree format. |
TREE C:\ |
|
FIND |
Searches for a string in a file. |
FIND "hello" myfile.txt |
|
SORT |
Sorts input and displays the sorted output.Content |
SORT < names.txt |
|
MORE |
Displays output one screen at a time. |
`TYPE long.txt |
|
FC |
Compares two files and shows differences. |
FC file1.txt file2.txt |
|
SCANDISK |
Checks and repairs disk errors. |
SCANDISK C: |
|
DELTREE |
Deletes a directory and all subdirectories. |
DELTREE C:\OldFiles |
|
UNDELETE |
Restores previously deleted files. |
UNDELETE file.txt |
|
UNFORMAT |
Restores a formatted disk (if possible). |
UNFORMAT D: |
|
SYS |
Transfers system files to make disk bootable. |
SYS A: |
|
SET |
Displays or sets environment variables. |
SET PATH=C:\DOS |
|
COMMAND |
Starts a new command interpreter instance. |
COMMAND |
|
DEBUG |
Debugs programs or examines memory. |
DEBUG |
|
DOSKEY |
Recalls commands, edits lines, and defines macros. |
DOSKEY /HISTORY |
|
MEM |
Displays system memory usage. |
MEM |
|
DEFRAG |
Rearranges files for faster disk access. |
DEFRAG C: |
|
BACKUP |
Creates backup copies of files. |
BACKUP C:\DATA D:\BACK |
|
RESTORE |
Restores files from a backup. |
RESTORE D:\BACK C:\DATA |
|
|
Prints a text file. |
PRINT doc.txt |
|
MODE |
Configures system devices (COM ports, printers). |
MODE COM1:9600,N,8,1 |
|
FDISK |
Manages disk partitions. |
FDISK |
|
CHKDSK /F |
Checks and fixes disk errors automatically. |
CHKDSK C: /F |