Chapter 5. The Command Prompt
The premise of the Command Prompt is simple enough: commands are typed, one at a time, at a blinking cursor. The commands are then issued when you press the Enter key. After the command has completed, a new prompt is shown, allowing you to type additional commands. To run the Command Prompt, type cmd
at Start Search or in the Address Bar of Windows Explorer.
Some commands are fairly rudimentary, requiring only that you type their names. Other commands are more involved and can require several options (sometimes called arguments or command-line parameters). For example, you use the del
command (discussed later in this chapter) to delete one or more files; it requires that you specify the name of the file after the command, like this:
del /p myfile.txt
Here, myfile.txt is the filename to be deleted and /p
is an extra option used to modify the behavior of del
(it requires confirmation before it will delete each file). The fact that this usage is not limited to internal command prompt commands (such as del
) is what makes the command line (but not necessarily the Command Prompt application) such an important part of Windows Vista’s design. For example:
notepad myfile.txt
is what Windows executes behind the scenes, by default, when you double-click the myfile.txt icon in Explorer. Notepad is effectively a “command” here. If you type the filename of any existing file at the Command Prompt, it instructs Windows to launch that file. This works for applications, Windows ...
Get Windows Vista Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.