Command Prompt

Command Prompt
Command Prompt
Command prompt icon (windows).png
A component of Microsoft Windows
Command prompt on windows vista.png
Command Prompt in Windows 7
Details
Type Command-line interpreter
Included with Windows NT
Windows CE
OS/2
Replaces COMMAND.COM
Related components
Windows PowerShell
Batch file

Command Prompt (executable name cmd.exe) is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems (including Windows 2000, XP, Vista, 7, Server 2003 and Server 2008). It is the analog of COMMAND.COM in MS-DOS and Windows 9x (where it is called MS-DOS Prompt) systems, or of the Unix shells used on Unix-like systems.

Contents

Versions

Therese Stowell developed the initial version of cmd.exe for Windows NT.[1] Although some old DOS commands are unsupported or have been changed (ex: the functionality of deltree was rolled into rd in the form of the /s parameter), cmd.exe still has a greater number of built-in commands.

Both the OS/2 and the Windows NT versions of cmd.exe have more detailed error messages than the blanket "Bad command or file name" (in the case of malformed commands) of command.com. In the OS/2 version of cmd.exe, errors are reported in the current language of the system, their text being taken from the system message files. The help command can then be issued with the error message number to obtain further information.

cmd.exe remains part of Windows Vista, Windows Server 2008, and Windows 7.

Technical information

Unlike COMMAND.COM, which is a DOS program, cmd.exe is a native program for the platform. This allows it to take advantage of features available to native programs on the platform that are otherwise unavailable to DOS programs. For example, since cmd.exe is a native text-mode application on OS/2, it can use real pipes in command pipelines, allowing both sides of the pipeline to run concurrently. As a result, it is possible to redirect the standard error in cmd.exe, unlike COMMAND.COM. (COMMAND.COM uses temporary files, and runs the two sides serially, one after the other.)

In reality, cmd.exe is a Windows program that acts as a DOS-like command line interpreter. It is generally compatible, but provides extensions which address some of the limitations of COMMAND.COM:

  • SETLOCAL/ENDLOCAL commands limit the scope of changes to the environment
  • internal CALL and GOTO labels lessen the need for individual batch files to perform parts of a task.
  • filename-parsing extensions to the SET command are comparable to C shell.
  • an expression-evaluation extensions is also provided in the SET command.
  • an expansion of the FOR command to support parsing files and arbitrary sets in addition to filenames.
  • use of arrow keys to scroll through command history (provided by DOSKey in COMMAND.COM)
  • off-by-default path completion capabilities similar to bash tab completion
  • a directory stack accessible with the PUSHD and POPD commands
  • IF can perform case-insensitive comparisons and numeric equality and inequality comparisons in addition to case-sensitive string comparisons
  • the ability to escape reserved characters by using the caret character (^)

The extensions can be disabled, providing a stricter compatibility mode.

See also

References

  1. ^ Zachary, G. Pascal (1994). Showstopper! The Breakneck Race to Create Windows NT and the Next Generation at Microsoft. Warner Books. ISBN 0-02-935671-7. 

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Command prompt — may refer to: a feature of the command line interface, see Command line interface#Command prompt Command line interpreter, a kind of text based user interface Command Prompt, the command line interpreter in Windows operating systems This… …   Wikipedia

  • Command Prompt —   [engl.], Eingabeaufforderung …   Universal-Lexikon

  • Command Prompt (Windows) — Infobox Windows component name = Command Prompt logo size = 64px caption = Command Prompt in Windows Vista| included with = Windows NT Windows CE OS/2 replaces = COMMAND.COM replaced by = related components = Windows PowerShell Batch filecmd.exe… …   Wikipedia

  • command prompt — noun (computer science) a symbol that appears on the computer screen to indicate that the computer is ready to receive a command • Syn: ↑prompt • Topics: ↑computer science, ↑computing • Hypernyms: ↑electronic communication …   Useful english dictionary

  • Command prompt — Interface en ligne de commande Une interface en ligne de commande est une interface homme machine dans laquelle la communication entre l utilisateur et l ordinateur s effectue en mode texte : l utilisateur tape du texte au clavier pour… …   Wikipédia en Français

  • command prompt —    A symbol (character or group of characters) on the screen that lets you know that the operating system is available and ready to receive input …   Dictionary of networking

  • COMMAND.COM — Developer(s) Seattle Computer Products, Microsoft Corporation, IBM, Novell and several others. Operating system DR DOS, FreeDOS, MS DOS, Novell DOS, OpenDOS, PC DOS, PTS DOS, ROM DOS, 86 DOS, Microsoft Windows (Windows 95 Wi …   Wikipedia

  • Prompt — is an adjective meaning quick or on time , or a verb meaning to lead someone .* Command prompt, in computing, one or more characters in a command line interface to indicate that the computer is ready to accept typed input * Prompt (theatre) or… …   Wikipedia

  • Command-line interface — Screenshot of a sample Bash session. GNOME Terminal 3, Fedora 15 …   Wikipedia

  • Command-line completion — Example of command line completion in Bash. Command line completion (also tab completion) is a common feature of command line interpreters, in which the program automatically fills in partially typed commands. Command line interpreters are… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”