| Line 1: |
Line 1: |
| − | [[CMD-on-Win7.jpg|thumbnail|Command Prompt in Windows 7]] | + | [[File:CMD-on-Win7.jpg|350px|thumbnail|Command Prompt in [[Windows 7]]]] |
| | '''Command Prompt''' is the name for the program provided with the [[Windows]] [[operating system]] which allows the user to access the [[computer shell]], that is, a text-based (command-line) control system. | | '''Command Prompt''' is the name for the program provided with the [[Windows]] [[operating system]] which allows the user to access the [[computer shell]], that is, a text-based (command-line) control system. |
| | | | |
| Line 5: |
Line 5: |
| | | | |
| | ==About Commands== | | ==About Commands== |
| − | These commands are applicable in [[Windows 7]] [[operating system]]s and later | + | These commands are generally applicable in [[Windows 7]] [[operating system]]s and later |
| | | | |
| | {| class="wikitable" | | {| class="wikitable" |
| Line 17: |
Line 17: |
| | | BREAK|| Sets or clears extended CTRL+C checking.|| | | | BREAK|| Sets or clears extended CTRL+C checking.|| |
| | |- | | |- |
| − | | BCDEDIT|| Sets properties in boot database to control boot loading.|| | + | | BCDEDIT|| Sets properties in boot database to control boot loading.|| Edit the computer's bootloader |
| | |- | | |- |
| | | CACLS|| Displays or modifies access control lists (ACLs) of files.|| | | | CACLS|| Displays or modifies access control lists (ACLs) of files.|| |
| | |- | | |- |
| − | | CALL|| Calls one batch program from another.|| | + | | CALL|| Calls one batch program from another.|| Similar to "Start," except the called file is run in the same window |
| | |- | | |- |
| | | CD|| Displays the name of or changes the current directory.|| | | | CD|| Displays the name of or changes the current directory.|| |
| Line 29: |
Line 29: |
| | | CHDIR|| Displays the name of or changes the current directory.|| | | | CHDIR|| Displays the name of or changes the current directory.|| |
| | |- | | |- |
| − | | CHKDSK|| Checks a disk and displays a status report.||Sometimes used instead of the [[Graphic User Interface| GUI]] check-disk option since it provides information about problems found, and which ones where fixed (if /R is used) | + | | CHKDSK|| Checks a disk and displays a status report.||Sometimes used instead of the [[Graphic User Interface|GUI]] check-disk option since it provides information about problems found, and which ones where fixed (if /R is used) |
| | |- | | |- |
| | | CHKNTFS|| Displays or modifies the checking of disk at boot time.|| | | | CHKNTFS|| Displays or modifies the checking of disk at boot time.|| |
| Line 51: |
Line 51: |
| | | DEL|| Deletes one or more files.||Same as the ERASE command | | | DEL|| Deletes one or more files.||Same as the ERASE command |
| | |- | | |- |
| − | | DIR|| Displays a list of files and subdirectories in a directory.||For a more organized layout, use TREE | + | | DIR|| Displays a list of files and sub-directories in a directory.||For a more organized layout, use TREE |
| | |- | | |- |
| | | DISKCOMP|| Compares the contents of two floppy disks.|| | | | DISKCOMP|| Compares the contents of two floppy disks.|| |
| Line 75: |
Line 75: |
| | | FIND|| Searches for a text string in a file or files.||For more options, try FINDSTR (below) | | | FIND|| Searches for a text string in a file or files.||For more options, try FINDSTR (below) |
| | |- | | |- |
| − | | FINDSTR|| Searches for strings in files.|| | + | | FINDSTR|| Searches for strings in files.||Useful for retrieving information saved to a file and setting it to a variable. Unlike PRINT, the retrieved data is readily usable |
| | |- | | |- |
| | | FOR|| Runs a specified command for each file in a set of files.|| | | | FOR|| Runs a specified command for each file in a set of files.|| |
| Line 103: |
Line 103: |
| | | MKDIR|| Creates a directory.||Same as MD | | | MKDIR|| Creates a directory.||Same as MD |
| | |- | | |- |
| − | | MKLINK|| Creates Symbolic Links and Hard Links||Same as MD | + | | MKLINK|| Creates Symbolic Links and Hard Links|| |
| | |- | | |- |
| | | MODE|| Configures a system device.|| | | | MODE|| Configures a system device.|| |
| Line 119: |
Line 119: |
| | | POPD|| Restores the previous value of the current directory saved by PUSHD.|| | | | POPD|| Restores the previous value of the current directory saved by PUSHD.|| |
| | |- | | |- |
| − | | PRINT|| Prints a text file (to screen).|| | + | | PRINT|| Prints a text file (to screen).||Retrieved data must be piped to be used as a variable. If anything other than simple output is required, see FINDSTR |
| | |- | | |- |
| | | PROMPT|| Changes the Windows command prompt.|| | | | PROMPT|| Changes the Windows command prompt.|| |
| Line 168: |
Line 168: |
| | |- | | |- |
| | | TIME|| Displays or sets the system time.||In older [[Windows]] versions, the /d switch would show the date | | | TIME|| Displays or sets the system time.||In older [[Windows]] versions, the /d switch would show the date |
| | + | |- |
| | + | | TIMEOUT|| Waits a set amount of time before continuing||By default, a key may be pressed to skip the delay. However, the /NOBREAK switch may be used to force the delay without a skip option. Also, using -t -1 is the same as PAUSE |
| | |- | | |- |
| | | TITLE|| Sets the window title for a CMD.EXE session.|| | | | TITLE|| Sets the window title for a CMD.EXE session.|| |
| Line 175: |
Line 177: |
| | | TYPE|| Displays the contents of a text file.|| | | | TYPE|| Displays the contents of a text file.|| |
| | |- | | |- |
| − | | VER|| Displays the Windows version.|| | + | | VER|| Displays the Windows version.|| This information is also shown when Command Prompt is opened. |
| | |- | | |- |
| − | | VERIFY|| Tells Windows whether to verify that your files are written correctly to a disk.|| | + | | VERIFY|| Tells Windows whether to verify that your files are written correctly to a disk.|| On most computers, the default is ''off'' |
| | |- | | |- |
| | | VOL|| Displays a disk volume label and serial number.|| | | | VOL|| Displays a disk volume label and serial number.|| |
| Line 188: |
Line 190: |
| | | | |
| | For almost any command, one may enter and forward slash followed by a question mark (/?) after a base command to see additional information, generally including a description, syntax, and switches (with a description of each) | | For almost any command, one may enter and forward slash followed by a question mark (/?) after a base command to see additional information, generally including a description, syntax, and switches (with a description of each) |
| | + | |
| | + | ==Variables== |
| | + | Variables are locations where data may be temporally stored on the [[Random-access memory|RAM]] for use within a program or in this case, batch file or CMD session. When variable are set in CMD, the name is listed by it self (like <code>set variable=10</code>) When referenced, however, percent signs are placed on each side (like <code>echo The value is %variable%</code>) |
| | | | |
| | ==References== | | ==References== |
| | {{reflist}} | | {{reflist}} |
| | | | |
| − | ==External Links== | + | ==See also== |
| − | [http://ss64.com/nt More complete command list on ss64.com] | + | [[Conhost.exe]] |
| | + | |
| | + | ==External links== |
| | + | * [http://ss64.com/nt More complete command list on ss64.com] |
| | + | |
| | + | |
| | + | [[Category:Command-Line]] |
| | + | [[Category:Software]] |