Wildcards, Pipes, and Redirection

In addition to the various command-line parameters used by each of the commands documented in this chapter (and the components documented in Chapter 4), there are certain symbols used on the command line that have special meaning. Table 6-1 shows these special symbols and what they do. They must be used in conjunction with other commands (they don’t stand alone) and can be used in the Command Prompt window, in Start Run, and in any Address Bar.

Table 6-1. Special symbols on the command line

Symbol

Description

*

Multiple-character wildcard, used to specify a group of files.

?

Single-character wildcard, used to specify multiple files with more precision than *.

.

One dot represents the current directory; see “cd or chdir”.

..

Two dots represent the parent directory; see “cd or chdir”.

... (three dots)

Three dots represent the grandparent directory; see “cd or chdir”.

\

Separates directory names, drive letters, and filenames. By itself, \ represents the root directory of the current drive.

>

Redirects a command’s text output into a file instead of the console window; existing files will be overwritten.

>>

Redirects a command’s text output into a file instead of the console window, appending existing files.

<

Directs the contents of a text file to a command’s input; use in place of keyboard entry to automate interactive command-line applications.

|

Redirects the output of a program or command to a second program ...

Get Windows XP in a Nutshell, Second Edition 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.