List of DOS commands: Difference between revisions

Content deleted Content added
m EDIT: This entire section is terribly worded and needs an overhaul, but I at least added a period to clarify a statement.
m Reverted edit by 109.38.233.140 (talk) to last version by 199.192.1.63
 
(8 intermediate revisions by 5 users not shown)
Line 1:
{{Short description|None}}
{{Use dmy dates|date=May 2019|cs1-dates=y}}
This article lists notable [[command (computing)|commands]] provided by the [[MS-DOS]] compatible [[disk operating system]]s (DOS), especially as used on an [[IBM PC compatible]]s [[computer]]. ManyOther unrelatedDOS diskvariants operatingas systemswell as the uselegacy [[Windows]] [[shell (computing)|shell]], [[Command Prompt]] (cmd.exe), provide many of these commands. Many other DOS variants [[List of disk operating systems called DOS|theare DOSinformally acronymcalled ''DOS'']], andbut are not partincluded ofin the scope of thisthe list. The highly related variant, [[IBM PC DOS]], is included. The list is not intended to be exhaustive, but does include commands covering the various releases.
 
SomeEach commandscommand areis implemented either as [[shell builtin|built-in]] to the [[command-line interpreter|command interpreter]], while[[COMMAND.COM]], othersor areas an external [[applicationcomputer softwareprogram|applicationsprogram]]. OverAlthough multipleprevailing generations,style commandsis wereto addedwrite forcommand additionalnames functions.in Inall [[Windows]]caps, the legacy shell [[Command Prompt]] provides manyinterpreter ofmatches theseignoring commandscase.
 
{{Horizontal TOC|nonum=yes}}
 
==Commands==
==Command processing==
The command interpreter for DOS runs when no application programs are running. When an application exits, if the transient portion of the command interpreter in memory was overwritten, DOS will reload it from disk. Some commands are internal—built into COMMAND.COM; others are external commands stored on disk. When the user types a line of text at the operating system command prompt, COMMAND.COM will parse the line and attempt to match a command name to a built-in command or to the name of an executable program file or [[batch file]] on disk. If no match is found, an error message is printed, and the command prompt is refreshed.
 
External commands were too large to keep in the command processor, or were less frequently used. Such utility programs would be stored on disk and loaded just like regular application programs but were distributed with the operating system. Copies of these utility command programs had to be on an accessible disk, either on the current drive or on the command [[PATH (variable)|path]] set in the command interpreter.
 
In the list below, commands that can accept more than one file name, or a filename including wildcards (* and ?), are said to accept a ''<kbd>[[filespec]]</kbd>'' (file specification) parameter. Commands that can accept only a single file name are said to accept a ''<kbd>filename</kbd>'' parameter. Additionally, command line switches, or other parameter strings, can be supplied on the command line. Spaces and symbols such as a "/" or a "-" may be used to allow the command processor to parse the command line into filenames, file specifications, and other options.
 
The command interpreter preserves the case of whatever parameters are passed to commands, but the command names themselves and file names are case-insensitive.
 
Many commands are the same across many DOS systems, but some differ in command syntax or name.
 
==DOS commands==
A partial list of the most common commands for [[MS-DOS]] and [[IBM PC DOS]] follows below.
 
===APPEND===
Line 162 ⟶ 150:
Deletes a directory along with all of the files and subdirectories that it contains. Normally, it will ask for confirmation of the potentially dangerous action. Since the RD (RMDIR) command can not delete a directory if the directory is not empty (except in Windows NT & 10), the DELTREE command can be used to delete the whole directory.
 
The <code>deltree</code> command is included in certain versions of [[Microsoft Windows]] and [[MS-DOS]] [[operating system]]s. It is specifically available only in versions of [[MS-DOS]] 6.0 and higher,<ref name="RUNNINGMSDOS" /> and in [[Windows 9x|Microsoft Windows 9x]]. In Windows NT, the functionality provided exists but is handled by the command {{mono|rd}} or {{mono|rmdir}} which has slightly different syntax. This command is not present in Windows 7 and 8. In Windows 10, the command switch is {{kbd|RD /S}} or {{kbd|RMDIR /S}}.
 
===DIR===
Line 378 ⟶ 366:
The command is available in MS-DOS versions 3.1 and later and IBM PC DOS releases 3 and later.<ref name="RUNNINGMSDOS" />
 
=== '''LASTDRIVE''' ===
Used in the CONFIG.SYS file to set the maximum number of drives that can be accessed.
 
Line 530 ⟶ 518:
{{See also|Prompt (computing)}}
 
The {{mono|PROMPT}} command allows the user to change the prompt in the command screen. The default prompt is {{mono|$p$g}} (i.e. {{kbd|PROMPT $p$g}}), which displays the drive, andthe current path, and a greater than sign ">" as the prompt, but can be changed to anything. {{kbd|PROMPT $d}}, displays the current system date as the prompt. Type {{kbd|PROMPT /?}} in the cmd screen for help on this function.
 
The command is available in MS-DOS versions 2 and later and IBM PC DOS releases 2.1 and later.<ref name="RUNNINGMSDOS" />
Line 770 ⟶ 758:
== See also ==
* [[:Category:Windows commands]]
* [[COMMAND.COM]]
* [[cmd.exe]] – command-line interpreter in various Windows and OS/2 systems
* [[Command-line interface]]
* [[List of CONFIG.SYS directives]]
* [[Timeline of DOS operating systems]]