| Commands available in XP
Command Line |
| |
| For more information on a
specific command, type HELP command-name |
| |
| ASSOC |
Displays or modifies file extension
associations. |
| AT |
Schedules commands and programs to run on a
computer. |
| ATTRIB |
Displays or changes file attributes. |
| BREAK |
Sets or clears extended CTRL+C checking. |
| CACLS |
Displays or modifies access control lists (ACLs)
of files. |
| CALL |
Calls one batch program from another. |
| CD |
Displays the name of or changes the current
directory. |
| CHCP |
Displays or sets the active code page
number. |
| CHDIR |
Displays the name of or changes the current
directory. |
| CHKDSK |
Checks a disk and displays a status report. |
| CHKNTFS |
Displays or modifies the checking of disk
at boot time. |
| CLS |
Clears the screen. |
| CMD |
Starts a new instance of the Windows
command interpreter. |
| COLOR |
Sets the default console foreground and
background colors. |
| COMP |
Compares the contents of two files or sets
of files. |
| COMPACT |
Displays or alters the compression of files
on NTFS partitions. |
| CONVERT |
Converts FAT volumes to NTFS. You cannot
convert the current drive. |
| COPY |
Copies one or more files to another
location. |
| DATE |
Displays or sets the date. |
| DEL |
Deletes one or more files. |
| DIR |
Displays a list of files and subdirectories
in a directory. |
| DISKCOMP |
Compares the contents of two floppy disks. |
| DISKCOPY |
Copies the contents of one floppy disk to
another. |
| DOSKEY |
Edits command lines, recalls Windows
commands, and creates macros. |
| ECHO |
Displays messages, or turns command echoing
on or off. |
| ENDLOCAL |
Ends localization of environment changes in
a batch file. |
| ERASE |
Deletes one or more files. |
| EXIT |
Quits the CMD.EXE program (command
interpreter). |
| FC |
Compares two files or sets of files, and
displays the differences between them. |
FC
FC
/B
/A
/B
/C
/L
/LBn
/N
/OFF[LINE]
/T
/U
/W
/nnnn
|
[/A] [/C]
[/L] [/LBn] [/N]
[/OFF[LINE]] [/T] [/U] [/W]
[/nnnn][drive1:][path1]filename1
[drive2:][path2]filename2
[drive1:][path1]filename1
[drive2:][path2]filename2
Displays only first and last lines for each set of differences.
Performs a binary comparison.
Disregards the case of letters.
Compares files as ASCII text.
Sets the maximum consecutive mismatches to the specified number of lines.
Displays the line numbers on an ASCII comparison.
Do not skip files with offline attribute set.
Does not expand tabs to spaces.
Compare files as UNICODE text files.
Compresses white space (tabs and spaces) for comparison.
Specifies the number of consecutive lines that must match after a
mismatch.
[drive1:][path1]filename1
Specifies the first file or set of files to compare.
[drive2:][path2]filename2
Specifies the second file or set of files to compare. |
| FIND |
Searches for a text string in a file or
files. |
| FINDSTR |
Searches for strings in files. |
| FOR |
Runs a specified command for each file in a
set of files. |
| FORMAT |
Formats a disk for use with Windows. |
| FTYPE |
Displays or modifies file types used in
file extension associations. |
| FTYPE |
[fileType[=[openCommandString]]]
fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching files
of this type.
Type FTYPE without parameters to display the current file types that have
open command strings defined. FTYPE is invoked with just a file type, it
displays the current open command string for that file type. Specify
nothing for the open command string and the FTYPE command will delete the
open command string for the file type. Within an open command string %0 or
%1 are substituted with the file name being launched through the
association. %* gets all the parameters and %2 gets the 1st parameter, %3
the second, etc. %~n gets all the remaining parameters starting with the
nth parameter, where n may be between 2 and 9, inclusive. For example:
ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*
would allow you to invoke a Perl script as follows:
script.pl 1 2 3
If you want to eliminate the need to type the extensions, then do the
following:
set PATHEXT=.pl;%PATHEXT%
and the script could be invoked as follows:
script 1 2 3 |
| GOTO |
Directs the Windows command interpreter to
a labeled line in a batch program. |
| GRAFTABL |
Enables Windows to display an extended
character set in graphics mode. |
| HELP |
Provides Help information for Windows
commands. |
| IF |
Performs conditional processing in batch
programs. |
| LABEL |
Creates, changes, or deletes the volume
label of a disk. |
| MD |
Creates a directory. |
| MKDIR |
Creates a directory. |
| MODE |
Configures a system device. |
| MORE |
Displays output one screen at a time. |
| MOVE |
Moves one or more files from one directory
to another directory. |
| PATH |
Displays or sets a search path for
executable files. |
| PAUSE |
Suspends processing of a batch file and
displays a message. |
| POPD |
Restores the previous value of the current
directory saved by PUSHD. |
| PRINT |
Prints a text file. |
| PROMPT |
Changes the Windows command prompt. |
| PUSHD |
Saves the current directory then changes
it. |
| RD |
Removes a directory. |
| RECOVER |
Recovers readable information from a bad or
defective disk. |
| RECOVER |
[drive:][path]filename
Consult the online Command Reference in Windows XP Help
before using the RECOVER command. |
| REM |
Records comments (remarks) in batch files
or CONFIG.SYS. |
| REN |
Renames a file or files. |
| RENAME |
Renames a file or files. |
| REPLACE |
Replaces files. |
REPLACE
REPLACE
|
[drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]
[drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]
[drive1:][path1]filename Specifies the source file or files.
[drive2:][path2] Specifies the directory where files are to be
replaced.
/A Adds new files to destination directory. Cannot use with /S or /U
switches.
/P Prompts for confirmation before replacing a file or adding a source
file.
/R Replaces read-only files as well as unprotected files.
/S Replaces files in all subdirectories of the destination directory.
Cannot use with the /A switch.
/W Waits for you to insert a disk before beginning.
/U Replaces (updates) only files that are older than source files. Cannot
use with the /A switch. |
| RMDIR |
Removes a directory. |
| SET |
Displays, sets, or removes Windows
environment variables. |
| SETLOCAL |
Begins localization of environment changes
in a batch file. |
| SHIFT |
Shifts the position of replaceable
parameters in batch files. |
| SORT |
Sorts input. |
| START |
Starts a separate window to run a specified
program or command. |
| SUBST |
Associates a path with a drive letter. |
| TIME |
Displays or sets the system time. |
| TITLE |
Sets the window title for a CMD.EXE
session. |
| TREE |
Graphically displays the directory
structure of a drive or path. |
| TYPE |
Displays the contents of a text file. |
| VER |
Displays the Windows version. |
| VERIFY |
Tells Windows whether to verify that your
files are written correctly to a disk. |
| VOL |
Displays a disk volume label and serial
number. |
| XCOPY |
Copies files and directory trees. |
|
XCOPY |
source [destination] [/A | /M]
[/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I]
[/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
[/EXCLUDE:file1[+file2][+file3]...]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set, doesn't change the
attribute.
/M Copies only files with the archive attribute set, turns off the archive
attribute.
/D:m-d-y Copies files changed on or after the specified date. If no date
is given, copies only those files whose source time is newer than the
destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string should be in
a separate line in the files. When any of the strings match any part of
the absolute path of the file to be copied, that file will be excluded
from being copied. For example, specifying a string like \obj\ or .obj
will exclude all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file, assumes
that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does not
support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not include
empty directories or subdirectories. /T /E includes empty directories and
subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an existing
destination file.
/-Y Causes prompting to confirm you want to overwrite an existing
destination file.
/Z Copies networked files in restartable mode.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.
|