Guides:Shells/COMMAND.COM-CMD.EXE/DOS Commands
From CoderGuide
Return to: Guides:Shells/COMMAND.COM-CMD.EXE
DOS Commands
Commands in DOS and Windows are not case sensitive, unlike Unix. That means "DOS" "DoS" and "dos" are all treated as being the same.
If no DOS version is given, then the command is at least known to work in version 3.0 and later.
Built-in commands
These commands are part of COMMAND.COM/CMD.EXE
Since MS-DOS 5.0, most of these commands will give a help statement if you type /? after the command name. Alternatively, you can try "help (command name)"
| Command | Description | DOS Ver. |
|---|---|---|
| VER | Prints the operating system version. | 1.0 |
| COPY | copies one file to another | 1.0 |
| DEL, ERASE | removed a file or files | 1.0 |
| CD, CHDIR | change the current directory, or print the current working directory | 2.0 |
| RD, RMDIR | remove a directory | 2.0 |
| MD, MKDIR | create a directory | 2.0 |
| RENAME, REN | rename a file (does not rename directories in DOS and earlier Windows versions) | |
| ECHO | prints text to the screen. Also will turn off echoing commands executed in a batch file, or will print the echo status. | |
| CLS | clear the screen | |
| FOR | Perform a command on a series of files given in for loop | |
| IF | performs a logical test | |
| GOTO | go to a section in a batch file | |
| EXIT | exits command shell (does not work for startup shell) | |
| CALL | runs a another batch file without stopping current script/command. | |
| PROMPT | Changes the command prompt | |
| SET | Sets an environment variable, or displays currently set environment variables (similar to export command in the Bourne shells). | |
| DIR | Displays the contents of a directory, or the current directory if none is given. | |
| LH, LOADHIGH | Loads a program into high memory. Mainly used for TSRs (Terminate and Stay Resident) programs. Works only with high memory manager loaded (himem.sys) | 5.0 |
| PAUSE | Prints a prompt asking the user to press enter. Used to halt a batch file's execution. | |
| REM | Doesn't do anything. It's used to add comments to a batch file. BASIC uses the same statement (can be used in CONFIG.SYS, but will produce error messages). | |
| TYPE | Types the contents of a file (see MORE below |
Utilities
Command line utilities. Note: Some of these utilities were dropped after later versions of Windows.
| Command | Description | DOS Ver. |
|---|---|---|
| XCOPY | Improved and faster copy. Also allows copying of subdirectories, which COPY does not do. | 3.0 |
| MODE | Changes the current mode of a device, such as the screen resolution and COM port speed | |
| print spooler | ||
| DOSKEY | Nice utility to allow better editing of the command line, and remembers old commands. | |
| FORMAT | formats a drive (write file system to disk) | 1.0 |
| CHKDISK | Checks the integrity of a FAT file system, and allows for fixing of a corrupt file system. You don't want to use this on a Win 95/98 or above system. Use SCANDISK instead. | |
| SCANDISK | Performs better checking of a FAT (and later NTFS) filesystem. | 6.x |
| DEFRAG | Defragments a hard drive. Same command is used on the latest version of windows (other disk defragmentors existed before this one, many were faster) | DOS 6.x |
| EDIT | Edit or create a text document using a nice text editor (part of QBASIC program) | 5.0 |
| EDLIN | Line text editor. This is the smallest, simplest, plainest, and arcane text editor DOS ever had. Boy was it fun using :-) | Dropped after DOS 5.0 |
| SORT | Sorts the text given to the proram | |
| FIND | Finds text in a file | |
| DEBUG | Allows for editing and creating binary files. Also has a debugger and assembler for making changes to programs, or writing your own in assembler. | Not Found in WinXP |
| MORE | Pauses output so that a human has a chance to read it before it scrolls off the screen. | |
| FDISK | Partition hard drive, and repair Master Boot Record (MBR) | |
| Shells/COMMAND.COM-CMD.EXE/DOS_Commands/ | ||
| Shells/COMMAND.COM-CMD.EXE/DOS_Commands/ | ||
| Shells/COMMAND.COM-CMD.EXE/DOS_Commands/ | ||
| Shells/COMMAND.COM-CMD.EXE/DOS_Commands/ |

