Guide to Windows commands

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

All bookshelves → IT_bookshelf → Windows bookshelf → Guide to Windows commands

This book aims to introduce users of Microsoft Windows to command interpreters on that operating system and to the wide range of command-line tools that are available, which may come as a surprise to those who think of it as purely a graphical user interface operating system.

The Microsoft-supplied command interpreter on Windows NT is cmd.exe. There are other command interpreters available, such as 4NT from JP Software and CMD from the ReactOS project. This book covers them all. First, it describes using command interpreters — how they receive, parse, and process commands from users. Then it describes the various commands available.

[edit]

Guides to DOS commands

This book addresses Win32 command interpreters and commands applicable to the Win32 environment. It does not address commands that are specific to DOS environments and to DOS-based operating systems, such as Windows 95, Windows 98, and Windows Me (whose Microsoft-supplied command interpreters are in fact DOS programs, not Win32 programs).

There are several guides to DOS commands available that are licenced under the GNU Free Documentation License:

The FreeDOS HTML Help at fdos.org is a fully hypertext help system for FreeDOS commands, written in 2003/2004
The FreeDOS Spec at SourceForge is a plaintext specification, written in 1999, for how DOS commands should work in FreeDOS

Contents

1 Guides to DOS commands
2 Using command interpreters

2.1 How a command line is interpreted

2.1.1 Variable substitution

2.1.1.1 Special names in 4NT

2.1.2 Quoting
2.1.3 Syntax
2.1.4 Redirection

2.2 How a command is executed
2.3 Environment variables

2.3.1 COMSPEC
2.3.2 PATH
2.3.3 PATHEXT
2.3.4 PROMPT

2.4 Invoking command interpreters

3 Built-in commands

3.1 ?

3.1.1 Description

3.2 ACTIVATE

3.2.1 Description

3.3 ALIAS

3.3.1 Synopsys
3.3.2 Description

3.4 ASSOC

3.4.1 Description

3.5 ATTRIB

3.5.1 Synopsys
3.5.2 Description

3.6 BATCOMP

3.6.1 Description

3.7 BDEBUGGER

3.7.1 Description

3.8 BEEP

3.8.1 Description

3.9 BREAK
3.10 CALL

3.10.1 Description

3.11 CANCEL

3.11.1 Description

3.12 CD

3.12.1 Synopsys
3.12.2 Description

3.13 CDD

3.13.1 Synopsys
3.13.2 Description

3.14 CHCP

3.14.1 Description

3.15 CHDIR

3.15.1 Description

3.16 CLS

3.16.1 Synopsys
3.16.2 Description

3.17 COLOR

3.17.1 Description

3.18 COPY

3.18.1 Synopsys
3.18.2 Description

3.19 DATE

3.19.1 Description

3.20 DDEEXEC
3.21 DEL

3.21.1 Description

3.22 DELAY

3.22.1 Description

3.23 DESCRIBE

3.23.1 Description

3.24 DETACH
3.25 DIR

3.25.1 Description

3.26 DIRHISTORY
3.27 DIRS

3.27.1 Description

3.28 DO

3.28.1 Description

3.29 DRAWBOX

3.29.1 Description

3.30 DRAWHLINE

3.30.1 Description

3.31 DRAWVLINE

3.31.1 Description

3.32 ECHO

3.32.1 Synopsys
3.32.2 Description

3.33 ECHOERR

3.33.1 Description

3.34 ECHOS

3.34.1 Description

3.35 ECHOSERR

3.35.1 Description

3.36 ENDLOCAL
3.37 ERASE

3.37.1 Description

3.38 ESET

3.38.1 Description

3.39 EVENTLOG

3.39.1 Description

3.40 EXCEPT
3.41 EXIT

3.41.1 Description

3.42 FFIND

3.42.1 Description

3.43 FOR

3.43.1 Description

3.44 FREE

3.44.1 Description

3.45 FTYPE

3.45.1 Description

3.46 FUNCTION
3.47 GLOBAL

3.47.1 Description

3.48 GOSUB

3.48.1 Description

3.49 GOTO

3.49.1 Description

3.50 HEAD
3.51 HELP

3.51.1 Description

3.52 HISTORY
3.53 IF

3.53.1 Description

3.54 IFF

3.54.1 Description

3.55 IFTP
3.56 INKEY

3.56.1 Description

3.57 INPUT

3.57.1 Description

3.58 KEYBD
3.59 KEYS
3.60 KEYSTACK

3.60.1 Description

3.61 LIST

3.61.1 Description

3.62 LOADBTM

3.62.1 Description

3.63 LOG

3.63.1 Description

3.64 MD

3.64.1 Description

3.65 MEMORY

3.65.1 Description

3.66 MKDIR

3.66.1 Description

3.67 MKLNK

3.67.1 Description

3.68 MOVE

3.68.1 Description

3.69 MSGBOX

3.69.1 Description

3.70 ON
3.71 OPTION

3.71.1 Description

3.72 PATH

3.72.1 Description

3.73 PAUSE

3.73.1 Description

3.74 PDIR

3.74.1 Description

3.75 PLAYAVI
3.76 PLAYSOUND
3.77 POPD

3.77.1 Description

3.78 PRINT
3.79 PROMPT

3.79.1 Description

3.80 PUSHD

3.80.1 Description

3.81 QUERYBOX

3.81.1 Description

3.82 QUIT

3.82.1 Description

3.83 RD

3.83.1 Description

3.84 REBOOT

3.84.1 Description

3.85 RECYCLE

3.85.1 Description

3.86 REN

3.86.1 Description

3.87 RENAME

3.87.1 Description

3.88 REM

3.88.1 Description

3.89 RETURN

3.89.1 Description

3.90 RMDIR

3.90.1 Description

3.91 SCREEN

3.91.1 Description

3.92 SCRPUT

3.92.1 Description

3.93 SELECT

3.93.1 Description

3.94 SENDMAIL

3.94.1 Description

3.95 SET

3.95.1 Description

3.96 SETDOS

3.96.1 Description

3.97 SETLOCAL
3.98 SHIFT

3.98.1 Description

3.99 SHORTCUT

3.99.1 Description

3.100 SHRALIAS

3.100.1 Description

3.101 SMPP
3.102 SNPP
3.103 START
3.104 SWITCH
3.105 TAIL
3.106 TASKEND
3.107 TASKLIST

3.107.1 Description

3.108 TCTOOLBAR
3.109 TEE

3.109.1 Description

3.110 TEXT

3.110.1 Description

3.111 TIME

3.111.1 Description

3.112 TIMER

3.112.1 Description

3.113 TITLE

3.113.1 Description

3.114 TOUCH

3.114.1 Description

3.115 TREE

3.115.1 Description

3.116 TRUENAME

3.116.1 Description

3.117 TYPE

3.117.1 Description

3.118 UNALIAS

3.118.1 Description

3.119 UNFUNCTION

3.119.1 Description

3.120 UNSET

3.120.1 Description

3.121 VER

3.121.1 Description

3.122 VERIFY
3.123 VOL

3.123.1 Description

3.124 VSCRPUT

3.124.1 Description

3.125 WHICH

3.125.1 Description

3.126 WINDOW

3.126.1 Description

3.127 Y

3.127.1 Description

4 External commands

4.1 4NT

4.1.1 Synopsys
4.1.2 Description

4.2 CMD

4.2.1 Synopsys
4.2.2 Description

4.3 FIND
4.4 IPCONFIG

4.4.1 Synopsys
4.4.2 Description

4.5 MORE

4.5.1 Synopsys
4.5.2 Description

4.6 NET

4.6.1 Synopsys
4.6.2 Description

4.7 PING

4.7.1 Synopsys
4.7.2 Description

4.8 XCOPY

[edit]

Using command interpreters

(...)

[edit]

How a command line is interpreted

The parsing of a command line into a sequence of commands is complex, and varies subtly from command interpreter to command interpreter. There are, however, four main components:

Variable substitution
A command line is scanned for variable specifications, and any found are replaced with the contents of those variables.
Quoting
Special characters can be quoted, to remove their special meanings.
Syntax
Command lines are devolved into a sequence of commands according to a syntax.
Redirection
Redirection specifications are applied, and removed from the command line, before an individual command in a sequence is executed.

[edit]

Variable substitution

Command lines can contain variable specifications. These comprise a % character followed by a name.

In Microsoft's CMD, the name is ended by a second % character, except in special cases such as the batch file parameters %1, %2, and so forth.
In 4NT, the name is ended either by a second % character or a "pseudo-whitespace" character (i.e. any character that the old COMMAND interpreter for MS-DOS version 2 considered to be "whitespace" for the purposes of parsing), with special cases for batch file parameters and for platform-neutral metacharacters.

Variable specifications are replaced with values. The value used to replace a variable specification is as follows:

(4NT only) For the variable specifications %+ and %=, the expansion is the current value of a particular metacharacter, for %+ being the metacharacter for command separator and for %= being the metacharacter for quoting. The reason for this is that 4NT allows the metacharacters to be changed with the SETDOS and OPTION commands. The special %+ and %= specifications allow batch file writers to write batch files that will work irrespective of what the current metacharacters may actually have been set to by the user; whereas a batch file written assuming that & is the command separator metacharacter will not work correctly if the command separator metacharacter is changed.
For variable specification names that match the names of environment variables, the replacement is the value of the named environment variable. For example: %PATH% is replaced by the value of the PATH environment variable.
For variable specifications that name batch file parameters (i.e. that are non-negative decimal numbers), the replacement is the value of the parameter taken from the arguments with which the batch file was invoked (subject to any subsequent modifications by the SHIFT command). For example: %2 is replaced by the value of the second batch file parameter.
(4NT only) For variable specification names that do not match the names of environment variables, but that do match various "special" names, the replacement is a special value (usually constructed on the fly) that the name represents.

[edit]

Special names in 4NT

This is a list of the special names in 4NT and what they expand to:

name | replacement value used
_CWD | the current working directory, not ending in a slash character if it is not the root directory of the current drive
_CWDS | the current working directory, guaranteed to end in a slash character

This table is incomplete. You can help Wikibooks by expanding it.

[edit]

Quoting

To prevent the metacharacters that control command syntax and redirection from having their special meanings, quoting is used. This takes two forms:

Although they don't process quotation marks, in command arguments, specially themselves, but simply pass them along as-is to the commands executed, command interpreters do recognise when quotation marks (") surround metacharacters. The & metacharacter does not have its usual effect on command syntax if it is within a pair of quotation marks.

e.g. The command line echo "&" will invoke the ECHO command passing it the three characters "&" as its command tail, rather than split the command line in twain at the & character as would occur if the character were not within quotation marks.

The "escape" character (always a ^ in Microsoft's CMD, by default a ^ unless changed in 4NT) used in front of a metacharacter also prevents that metacharacter from having its usual effect on command syntax. The "escape" character itself is stripped from the command line before it is passed to the command actually being invoked.

e.g. The command line echo ^& will invoke the ECHO command passing it the character & as its command tail, rather than split the command line in twain at the & character as would otherwise occur.

[edit]

Syntax

Command lines are devolved into a sequence of commands according to a syntax. In that syntax, simple commands may be combined to form pipelines, which may in turn be combined to form compound commands, which finally may be turned into parenthesized commands.

A simple command is just a command name, a command tail, and some redirection specifications. An example of a simple command is dir *.txt > somefile.

A pipeline is several simple commands joined together with the "pipe" metacharacter (properly known as the "vertical bar"). The standard output of the simple command preceding each vertical bar is connected to the standard input of the simple command following it, via a pipe. The command interpreter runs all of the simple commands in the pipeline in parallel. An example of a pipeline (comprising two simple commands) is dir *.txt | more.

A compound command is a set of pipelines separated by conjunctions. The pipelines are executed sequentially, one after the other, and the conjunction controls whether the command interpreter executes the next pipeline or not. An example of a compound command (comprising two pipelines, which themselves are just simple commands) is move file.txt file.bak && dir > file.txt.

The conjunctions are:

&
The simplest conjunction. The next pipeline is always executed after the current one has completed executing.
&&
A positive conditional conjunction. The next pipeline is executed if the current one completes executing with a zero exit status.
||
A negative conditional conjunction. The next pipeline is executed if the current one completes executing with a non-zero exit status.

A parenthesized command is a compound command enclosed in parentheses (i.e. ( and )). From the point of view of syntax, this turns a compound command into a simple command, whose overall output can be redirected.

For example: The command line ( pushd temp & dir & popd ) > somefile causes the standard output of the entire compound command ( pushd temp & dir & popd ) to be redirected to somefile.

[edit]

Redirection

Redirection specifications are applied, and removed from the command line, before an individual command in a sequence is executed. Redirection specifications control where the standard input, standard output, and standard error file handles for a simple command point. They override any effects to those file handles that may have resulted from pipelining. (See the preceding section on command syntax.)

The redirection specifications are:

< filename
Redirect standard input to read from the named file.
> filename
Redirect standard output to write to the named file, overwriting its previous contents.
>& filename
Join standard output and standard error together and redirect them to write to the named file, overwriting its previous contents.
>> filename
Redirect standard output to write to the named file, appending to the end of its previous contents.
>>& filename
Join standard output and standard error together and redirect them to write to the named file, appending to the end of its previous contents.

[edit]

How a command is executed

(...)

[edit]

Environment variables

The environment variables of the command interpreter process are inherted by the processes of any (external) commands that it executes. A few environment variables are used by the command interpreter itself. Changing them changes its operation.

Environment variables are affected by the SET, UNSET, ESET, PATH, and PROMPT commands.

The special variable names in 4NT are not environment variables. They merely have the appearance of them when it comes to variable substitution. They cannot be effected by the aforementioned commands. However, it is possible to create environment variables with the same names as the special variables. In which case the environment variables take precedence during variable substitution. (Creating such environment variables is not recommended. An environment variable named %_CWD% is likely to cause confusion and unexpected behaviour in batch files, for example.)

The command interpreter inherits its initial set of environment variables from the process that created it. In the case of command interpreters invoked from desktop shortcuts this will be Windows Explorer, for example.

Command interpreters generally have textual user interfaces, not graphical ones, and so do not recognize the Windows message that informs applications that the environment variable template in the Registry has been changed. Changing the environment variables in Control Panel will cause Windows Explorer to update its own environment variables from the template in the Registry, and thus change the environment variables that any subsequently invoked command interpreters will inherit. However, it will not cause command interpreters that are already running to update their environment variables from the template in the Registry.

[edit]

COMSPEC

The COMSPEC environment variable contains the full pathname of the command interpreter program file.

In the case of Microsoft's CMD, this is just inherited from the parent process, and is thus indirectly derived from the setting of COMSPEC in the environment variable template in the Registry.
In the case of 4NT, each command interpreter process explicitly sets COMSPEC to name its own program file at startup. So even if the COMSPEC environment variable derived from the template in the Registry names the program file of another command interpreter, from within 4NT, and from within any external commands that it invokes, COMSPEC will always name the program file of 4NT.

[edit]

PATH

The value of the PATH environment variable comprises a list of directory names, separated by semi-colon characters. This is the list of directories that are searched, in order, when locating the program file of an external command to execute.

[edit]

PATHEXT

The value of the PATHEXT environment variable comprises a list of filename extensions, separated by semi-colon characters. This is the list of filename extensions that are applied, in order, when locating the program file of an external command to execute.

[edit]

PROMPT

The value of the PROMPT environment variable controls the text that is emitted whenever the command interpreter displays the prompt (i.e. whenever prompting for a new command line in interactive mode, or whenever echoing a batch file line in batch file mode).

Various special character sequences in the value of the PROMPT environment variable cause varios special effects when the prompt is displayed, as in the following table:

Characters | Microsoft's CMD | 4NT | Effect
$$ | Yes | Yes | causes the $ character itself to be written out
$A | Yes | Yes | causes a & symbol to be written out (This is a convenience measure, since it is difficult, because it involves quoting, to place a literal & in the value of the PROMPT environment variable using the SET command.)
$B | Yes | Yes | vertical bar (pipe symbol) to be written out
$C | Yes | Yes | Left parenthesis '('
$D | Yes | Yes | Prints current date
$E | Yes | Yes | ESC (ASCII code 27)
$F | Yes | Yes | Right parenthesis ')'
$G | Yes | Yes | Prints greater-than symbol '>'
$H | Yes | Yes | Backspace... useless
$L | Yes | Yes | Prints less-than symbol '<'
$N | Yes | Yes | Prints current drive letter
$P | Yes | Yes | Prints current drive letter and full path
$Q | Yes | Yes | Prints '=' (equals sign)
$S | Yes | Yes | Prints ' ' (space character)
$T | Yes | Yes | Prints current system time
$V | Yes | Yes | Prints Windows XP version number
$_ | Prints <CR> (carriage return character)
$+ | Yes* | | If command extensions are enabled, prints a number of '+' characters to represent the number of levels pushed on the PUSHD directory stack
$

This table is incomplete. You can help Wikibooks by expanding it.

[edit]

Invoking command interpreters

[edit]

Built-in commands

These commands are all built in to the command interpreter itself, and cannot be changed. Sometimes this is because they require access to internal command interpreter data structures, or modify properties of the command interpreter process itself.

[edit]

?

ReactOS CMD, 4NT

[edit]

Description

This command displays the list of built-in commands.

[edit]

ACTIVATE

4NT

[edit]

Description

This command activates a given window.

[edit]

ALIAS

4NT

[edit]

Synopsys

ALIAS /?
ALIAS
ALIAS name
ALIAS name=value

[edit]

Description

This command displays or sets aliases. In the second form, it writes the current list of aliases (in "name=value" form) to standard output. In the third form, it writes the value (only) of the named alias to standard output. In the fourth form, it modifies or creates the alias name assigning it the value value.

[edit]

ASSOC

4NT

[edit]

Description

This command displays or sets Windows associations between file types and commands.

[edit]

ATTRIB

4NT

[edit]

Synopsys

ATTRIB /?
ATTRIB
ATTRIB search-wildcards
ATTRIB modifications search-wildcards

Modification instructions:

To add an attribute attach a '+' in front of it.
To remove an attribute attach a '-' in front of it
Attributes include

A - Archived
H - Hidden
S - System
R - Read-only

[edit]

Description

This command displays or sets file attributes. With no arguments, it displays the attributes of all files in the current directory. With no attribute modification instructions, it displays the attributes of the files and directories that match the given search wildcard specifications.

Compare chmod.

[edit]

BATCOMP

4NT

[edit]

Description

This command compresses batch files into a pre-tokenized form.

[edit]

BDEBUGGER

4NT

[edit]

Description

This command invokes the batch-file debugger.

[edit]

BEEP

4NT

[edit]

Description

This command generates a beep on the PC speaker.

[edit]

BREAK

4NT

[edit]

CALL

CMD 4NT

[edit]

Description

This command invokes a nested batch file from within a batch file.

[edit]

CANCEL

4NT

[edit]

Description

This command cancels the execution of all batch files.

[edit]

CD

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Synopsys

CD /?
CD
CD drive
CD path
CD drive:path
CD /D drive:path

[edit]

Description

This command displays or sets the current directory (and thus the current directory that all external commands will inherit). In the second form, it writes the current directory of the current drive to standard output. In the third form, it writes the current directory of the specified drive to standard output. In the fourth form, it changes the current directory on the current drive to path. In the fifth form, it changes the current directory on the specified drive to path. In the sixth form, it changes the current directory on the specified drive to path, and changes the current drive to that drive.

[edit]

CDD

ReactOS CMD, 4NT

[edit]

Synopsys

CDD /?
CDD path
CDD drive:path

[edit]

Description

This command sets the current drive and the current directory of the command interpreter process (and thus the current directory that all external commands will inherit). In the second form, it changes the current directory on the current drive to path. In the third form, it changes the current directory on the specified drive to path, and changes the current drive to that drive.

[edit]

CHCP

4NT

[edit]

Description

This command displays or sets the current code page.

[edit]

CHDIR

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This is an alternative spelling of CD.

[edit]

CLS

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Synopsys

CLS /?
CLS

[edit]

Description

This command clears the screen.

[edit]

COLOR

4NT

[edit]

Description

This command sets the current screen colours.

[edit]

COPY

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Synopsys

COPY /?
COPY
COPY search-wildcard
COPY search-wildcards substitution-wildcard

[edit]

Description

This command copies files.

[edit]

DATE

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays or sets the current date.

[edit]

DDEEXEC

4NT

[edit]

DEL

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command deletes files and (in 4NT) directories.

[edit]

DELAY

4NT

[edit]

Description

This command pauses execution for a specified period.

[edit]

DESCRIBE

4NT

[edit]

Description

This command displays or sets file descriptions.

[edit]

DETACH

4NT

[edit]

DIR

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays the contents of directories.

[edit]

DIRHISTORY

4NT

[edit]

DIRS

ReactOS CMD, 4NT

[edit]

Description

This command displays the directory stack, maintained by the PUSHD and POPD commands.

[edit]

DO

4NT

[edit]

Description

This command causes execution to loop.

[edit]

DRAWBOX

4NT

[edit]

Description

This command draws a box on the screen.

[edit]

DRAWHLINE

4NT

[edit]

Description

This command draws a horizontal line on the screen. DRAWHLINE

[edit]

DRAWVLINE

4NT

[edit]

Description

This command draws a vertical line on the screen.

[edit]

ECHO

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Synopsys

ECHO /?
ECHO ON
ECHO OFF
ECHO message

[edit]

Description

This command turns the display of the prompt on and off, or writes a message to standard output with a newline afterwards.

[edit]

ECHOERR

4NT

[edit]

Description

This command writes a message to standard error with a newline afterwards.

[edit]

ECHOS

4NT

[edit]

Description

This command writes a message to standard output, without adding a newline afterwards.

[edit]

ECHOSERR

4NT

[edit]

Description

This command writes a message to standard error, without adding a newline afterwards.

[edit]

ENDLOCAL

4NT

[edit]

ERASE

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This is an alternative spelling of DEL.

[edit]

ESET

4NT

[edit]

Description

This command allows the user to interactively edit and set environment variables.

[edit]

EVENTLOG

4NT

[edit]

Description

This command adds entries to the Windows event log.

[edit]

EXCEPT

4NT

[edit]

EXIT

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command terminates the command interpreter process.

[edit]

FFIND

4NT

[edit]

Description

This command finds files, or searches files for text strings.

[edit]

FOR

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command iterates over a series of values, executing a commamd.

[edit]

FREE

4NT

[edit]

Description

This command displays the free space on a drive.

[edit]

FTYPE

4NT

[edit]

Description

This command displays or sets Windows associations between filename extensions and file types.

[edit]

FUNCTION

4NT

[edit]

GLOBAL

4NT

[edit]

Description

This command searches for directories and executes a command with the current directory set to each directory.

[edit]

GOSUB

4NT

[edit]

Description

This command transfers control to a subroutine within a batch file, so that control can later be transferred back by RETURN.

[edit]

GOTO

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command jumps to another point within a batch file.

[edit]

HEAD

4NT

[edit]

HELP

4NT

[edit]

Description

This command invokes the on-line help.

[edit]

HISTORY

ReactOS CMD, 4NT

[edit]

IF

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command conditionally executes a command.

[edit]

IFF

4NT

[edit]

Description

This command conditionally executes one or more commands, spread across multiple lines.

[edit]

IFTP

4NT

[edit]

INKEY

4NT

[edit]

Description

This command waits for a key to be pressed.

[edit]

INPUT

4NT

[edit]

Description

This command prompts the user for input.

[edit]

KEYBD

4NT

[edit]

KEYS

4NT

[edit]

KEYSTACK

4NT

[edit]

Description

This command sends keyboard input to other processes on the same desktop.

[edit]

LIST

4NT

[edit]

Description

This command displays the contents of files using a full-screen interactive text user interface.

[edit]

LOADBTM

4NT

[edit]

Description

This command controls whether batch files are completely loaded into memory before execution.

[edit]

LOG

4NT

[edit]

Description

This command controls command logging.

[edit]

MD

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command creates directories.

[edit]

MEMORY

4NT

[edit]

Description

This command displays information about available memory.

[edit]

MKDIR

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This is an alternative spelling of MD.

[edit]

MKLNK

4NT

[edit]

Description

This command creates NTFS hard links.

[edit]

MOVE

4NT

[edit]

Description

This command moves files.

[edit]

MSGBOX

4NT

[edit]

Description

This command displays a message box to the user.

[edit]

ON

4NT

[edit]

OPTION

4NT

[edit]

Description

This command invokes the interactive configuration utility or allows configuration options to be altered non-interactively.

[edit]

PATH

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays or sets the value of the PATH environment variable.

[edit]

PAUSE

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command prompts the user and waits for a line of input to be entered.

[edit]

PDIR

4NT

[edit]

Description

This command lists directories in a user-controlled format.

[edit]

PLAYAVI

4NT

[edit]

PLAYSOUND

4NT

[edit]

POPD

ReactOS CMD, 4NT

[edit]

Description

This command removes directories from the directory stack and changes directory.

[edit]

PRINT

4NT

[edit]

PROMPT

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command sets the value of the PROMPT environment variable.

[edit]

PUSHD

ReactOS CMD, 4NT

[edit]

Description

This command adds the current directory to the directly stack and changes directory.

[edit]

QUERYBOX

4NT

[edit]

Description

This command displays a query box to the user, prompting for input.

[edit]

QUIT

4NT

[edit]

Description

This command terminates the execution of the current batch file.

[edit]

RD

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command removes directories.

[edit]

REBOOT

4NT

[edit]

Description

This command logs out the current user, and optionally then shuts down, powers off, or reboots the machine.

[edit]

RECYCLE

4NT

[edit]

Description

This command empties the recycle bin.

[edit]

REN

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command renames files and directories.

[edit]

RENAME

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This is an alternative spelling of REN.

[edit]

REM

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command does nothing. It is used for remarks in batch files.

[edit]

RETURN

4NT

[edit]

Description

This command returns control from a subroutine in a batch file, returning to the place whence the subroutine was called.

[edit]

RMDIR

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This is an alternative spelling of RD.

[edit]

SCREEN

4NT

[edit]

Description

This command moves the cursor to a specified position on the screen, optionally then writing text there.

[edit]

SCRPUT

4NT

[edit]

Description

This command writes text to the screen at a specified position without moving the cursor.

[edit]

SELECT

4NT

[edit]

Description

This command allows the user to interactively select a set of files, and then executes a command against those files.

[edit]

SENDMAIL

4NT

[edit]

Description

This command sends mail.

[edit]

SET

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays or sets environment variables.

[edit]

SETDOS

4NT

[edit]

Description

This command sets command interpreter control flags.

[edit]

SETLOCAL

4NT

[edit]

SHIFT

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command shifts the batch file arguments along.

[edit]

SHORTCUT

4NT

[edit]

Description

This command creates shortcuts for Windows Explorer.

[edit]

SHRALIAS

4NT

[edit]

Description

This command controls global alias sharing.

[edit]

SMPP

4NT

[edit]

SNPP

4NT

[edit]

START

4NT

[edit]

SWITCH

4NT

[edit]

TAIL

4NT

[edit]

TASKEND

4NT

[edit]

TASKLIST

4NT

[edit]

Description

This command displays the Windows task list.

[edit]

TCTOOLBAR

4NT

[edit]

TEE

4NT

[edit]

Description

This command copies what it receives on its standard input to a set of files and to its standard output. It is a "T-piece" for a command pipeline.

[edit]

TEXT

4NT

[edit]

Description

This command displays in-line text contained in batch files.

[edit]

TIME

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays or sets the current time.

[edit]

TIMER

4NT

[edit]

Description

This command starts, stops, or displays the current value of one of several stopwatches.

[edit]

TITLE

4NT

[edit]

Description

This command controls the console window title.

[edit]

TOUCH

4NT

[edit]

Description

This command alters the date and time stamps of files and directories.

[edit]

TREE

4NT

[edit]

Description

This command displays the tree structure of directories and files.

[edit]

TRUENAME

4NT

[edit]

Description

This command displays the true name of a file or directory.

[edit]

TYPE

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays the contents of files.

[edit]

UNALIAS

4NT

[edit]

Description

This command deletes aliases.

[edit]

UNFUNCTION

4NT

[edit]

Description

This command deletes functions.

[edit]

UNSET

4NT

[edit]

Description

This command deletes environment variables.

[edit]

VER

Microsoft's CMD, ReactOS CMD, 4NT

[edit]

Description

This command displays the version number of the command interpreter and the version of Windows.

[edit]

VERIFY

4NT

[edit]

VOL

4NT

[edit]

Description

This command displays volume labels.

[edit]

VSCRPUT

4NT

[edit]

Description

This command writes text to the screen at a specified position without moving the cursor.

[edit]

WHICH

4NT

[edit]

Description

This command displays the locations of other commands.

[edit]

WINDOW

4NT

[edit]

Description

This command alters the size of the console window.

[edit]

Y

4NT

[edit]

Description

This command reads its standard input and a set of files, writing what it reads to its standard output. It is a "Y-piece" for a command pipeline.

[edit]

External commands

These commands are separate executable program files, supplied with the operating system by Microsoft, or bundled as standard with the third-party command interpreters. By replacing the program files, the meanings and functions of these commands can be changed.

Many, but not all, external commands support the "/?" convention, causing them to write on-line usage information to their standard output and then to exit with a status code of 0.

[edit]

4NT

4NT

[edit]

Synopsys

4NT /?
4NT
4NT /C command

[edit]

Description

Invoke (another instance of) 4NT.

[edit]

CMD

Microsoft, ReactOS

[edit]

Synopsys

CMD /?
CMD
CMD /C command

[edit]

Description

Invoke (another instance of) either Microsoft's CMD or the ReactOS CMD.

[edit]

FIND

Microsoft

[edit]

IPCONFIG

Microsoft

[edit]

Synopsys

Displays Windows IP Configuration. Shows configuration by connection and the name of that connection (i.e. Ethernet adapter Local Area Connection) Below that the specific info pertaining to that connection is displayed such as DNS suffix and ip address and subnet mask.

IPCONFIG /?
IPCONFIG

(...)

[edit]

Description

(...)

[edit]

MORE

Microsoft

[edit]

Synopsys

MORE /?
MORE [/E]
MORE [/E] filename

[edit]

Description

(...)

[edit]

NET

Microsoft

[edit]

Synopsys

NET /?
NET

(...)

[edit]

Description

(...)

[edit]

PING

Microsoft

[edit]

Synopsys

PING /?
PING address
PING hostname

[edit]

Description

Send ICMP/IP "echo" packets over the network to the designated address (or the first IP address that the designated hostname maps to via name lookup) and print all responses received.

[edit]

XCOPY

Microsoft

Retrieved from "http://en.wikibooks.org/wiki/Guide_to_Windows_commands"

Views

Module
Discussion
Edit this page
History

Personal tools

Log in / create account

Navigation

Main Page
Wikijunior
Wikiversity
Books by subject
Books alphabetically

Community

Staff lounge
Community portal
Donations

Tools

Recent changes
Module cleanup

Search

Toolbox

What links here
Related changes
Upload file
Special pages
Printable version
Permanent link

This page was last modified 22:27, 30 January 2006.
All text is available under the terms of the GNU Free Documentation License (see Copyrights for details).

Privacy policy
About Wikibooks
Disclaimers