Professional Documents
Culture Documents
CMD Commands
CMD Commands
ASSOC [.ext[=[fileType]]]
.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension
cd \winnt\profiles\username\programs\start menu
cd "\winnt\profiles\username\programs\start menu"
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination - Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/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.
/L If the source is a symbolic link, copy the link to the target
instead of the actual file the source link points to.
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
MKDIR [drive:]path
MD [drive:]path
mkdir \a\b\c\d
mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d
To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2
PATH [[drive:]path[;...][;%PATH%]
PATH ;
Type PATH ; to clear all search-path settings and direct cmd.exe to search
only in the current directory.
Type PATH without parameters to display the current path.
Including %PATH% in the new path setting causes the old path to be
appended to the new setting.
14) PAUSE - Suspends processing of a batch program and displays the message
Press any key to continue . . .
PROMPT [text]
Prompt can be made up of normal characters and the following special codes:
$A & (Ampersand)
$B | (pipe)
$C ( (Left parenthesis)
$D Current date
$E Escape code (ASCII code 27)
$F ) (Right parenthesis)
$G > (greater-than sign)
$H Backspace (erases previous character)
$L < (less-than sign)
$N Current drive
$P Current drive and path
$Q = (equal sign)
$S (space)
$T Current time
$V Windows version number
$_ Carriage return and linefeed
$$ $ (dollar sign)