Changes

2,547 bytes added ,  20:51, February 2, 2016
m
finished page (for now) add or edit at will!
Line 1: Line 1: −
'''Command Prompt''' is the name for the [[Windows]] program 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.
   −
==Some Commands==
+
One can open the Command Prompt window by clicking the Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.<ref>http://windows.microsoft.com/en-US/windows-vista/Open-a-Command-Prompt-window</ref>  Alternatively, "cmd.exe" can be entered into the Run/Search box to start it immediately.
 +
 
 +
==About Commands==
 
These commands are applicable in [[Windows 7]] [[operating system]]s and later
 
These commands are applicable in [[Windows 7]] [[operating system]]s and later
   −
ASSOC          Displays or modifies file extension associations.
+
{| class="wikitable sortable"
−
ATTRIB        Displays or changes file attributes.
+
|-
−
BREAK         Sets or clears extended CTRL+C checking.
+
! Command !! Function!!Notes
−
BCDEDIT       Sets properties in boot database to control boot loading.
+
|-
−
CACLS         Displays or modifies access control lists (ACLs) of files.
+
| ASSOC||         Displays or modifies file extension associations.
−
CALL           Calls one batch program from another.
+
|-
−
CD             Displays the name of or changes the current directory.
+
| ATTRIB||         Displays or changes file attributes.
−
CHCP           Displays or sets the active code page number.
+
|-
−
CHDIR         Displays the name of or changes the current directory.
+
| BREAK||          Sets or clears extended CTRL+C checking.
−
CHKDSK         Checks a disk and displays a status report.
+
|-
−
CHKNTFS       Displays or modifies the checking of disk at boot time.
+
| BCDEDIT||        Sets properties in boot database to control boot loading.
−
CLS           Clears the screen.
+
|-
−
CMD           Starts a new instance of the Windows command interpreter.
+
| CACLS||          Displays or modifies access control lists (ACLs) of files.
−
COLOR         Sets the default console foreground and background colors.
+
|-
−
COMP           Compares the contents of two files or sets of files.
+
| CALL||            Calls one batch program from another.
−
COMPACT       Displays or alters the compression of files on NTFS partitions.
+
|-
−
CONVERT       Converts FAT volumes to NTFS.  You cannot convert the
+
| CD||              Displays the name of or changes the current directory.
−
              current drive.
+
|-
−
COPY           Copies one or more files to another location.
+
| CHCP||            Displays or sets the active code page number.
−
DATE           Displays or sets the date.
+
|-
−
DEL           Deletes one or more files.
+
| CHDIR||          Displays the name of or changes the current directory.
−
DIR           Displays a list of files and subdirectories in a directory.
+
|-
−
DISKCOMP       Compares the contents of two floppy disks.
+
| 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)
−
DISKCOPY       Copies the contents of one floppy disk to another.
+
|-
−
DISKPART       Displays or configures Disk Partition properties.
+
| CHKNTFS||        Displays or modifies the checking of disk at boot time.
−
DOSKEY         Edits command lines, recalls Windows commands, and  
+
|-
−
              creates macros.
+
| CLS||            Clears the screen.
−
DRIVERQUERY   Displays current device driver status and properties.
+
|-
−
ECHO           Displays messages, or turns command echoing on or off.
+
| CMD||            Starts a new instance of the Windows command interpreter.
−
ENDLOCAL       Ends localization of environment changes in a batch file.
+
|-
−
ERASE         Deletes one or more files.
+
| COLOR||          Sets the default console foreground and background colors.
−
EXIT           Quits the CMD.EXE program (command interpreter).
+
|-
−
FC             Compares two files or sets of files, and displays the  
+
| COMP||            Compares the contents of two files or sets of files.
−
              differences between them.
+
|-
−
FIND           Searches for a text string in a file or files.
+
| COMPACT||        Displays or alters the compression of files on NTFS partitions.
−
FINDSTR       Searches for strings in files.
+
|-
−
FOR           Runs a specified command for each file in a set of files.
+
| CONVERT||        Converts FAT volumes to NTFS.  You cannot convert the current drive.
−
FORMAT         Formats a disk for use with Windows.
+
|-
−
FSUTIL         Displays or configures the file system properties.
+
| COPY||            Copies one or more files to another location.||For more options, see XCOPY
−
FTYPE         Displays or modifies file types used in file extension  
+
|-
−
              associations.
+
| DATE||            Displays or sets the date.
−
GOTO           Directs the Windows command interpreter to a labeled line in  
+
|-
−
              a batch program.
+
| DEL||            Deletes one or more files.||Same as the ERASE command
−
GPRESULT       Displays Group Policy information for machine or user.
+
|-
−
GRAFTABL       Enables Windows to display an extended character set in  
+
| DIR||            Displays a list of files and subdirectories in a directory.||For a more organized layout, use TREE
−
              graphics mode.
+
|-
−
HELP           Provides Help information for Windows commands.
+
| DISKCOMP||        Compares the contents of two floppy disks.
−
ICACLS         Display, modify, backup, or restore ACLs for files and  
+
|-
−
              directories.
+
| DISKCOPY||        Copies the contents of one floppy disk to another.
−
IF             Performs conditional processing in batch programs.
+
|-
−
LABEL         Creates, changes, or deletes the volume label of a disk.
+
| DISKPART||        Displays or configures Disk Partition properties.
−
MD             Creates a directory.
+
|-
−
MKDIR         Creates a directory.
+
| DOSKEY||          Edits command lines, recalls Windows commands, and creates macros.
−
MKLINK         Creates Symbolic Links and Hard Links
+
|-
−
MODE           Configures a system device.
+
| DRIVERQUERY||    Displays current device driver status and properties.
−
MORE           Displays output one screen at a time.
+
|-
−
MOVE           Moves one or more files from one directory to another  
+
| ECHO||            Displays messages, or turns command echoing on or off.
−
              directory.
+
|-
−
OPENFILES     Displays files opened by remote users for a file share.
+
| ENDLOCAL||        Ends localization of environment changes in a batch file.
−
PATH           Displays or sets a search path for executable files.
+
|-
−
PAUSE         Suspends processing of a batch file and displays a message.
+
| ERASE||          Deletes one or more files.||Same as the DEL command
−
POPD           Restores the previous value of the current directory saved by  
+
|-
−
              PUSHD.
+
| EXIT||            Quits the CMD.EXE program (command interpreter).
−
PRINT         Prints a text file.
+
|-
−
PROMPT         Changes the Windows command prompt.
+
| FC||              Compares two files or sets of files, and displays the differences between them.
−
PUSHD         Saves the current directory then changes it.
+
|-
−
RD             Removes a directory.
+
| FIND||            Searches for a text string in a file or files.||For more options, try FINDSTR (below)
−
RECOVER       Recovers readable information from a bad or defective disk.
+
|-
−
REM           Records comments (remarks) in batch files or CONFIG.SYS.
+
| FINDSTR||        Searches for strings in files.
−
REN           Renames a file or files.
+
|-
−
RENAME         Renames a file or files.
+
| FOR||            Runs a specified command for each file in a set of files.
−
REPLACE       Replaces files.
+
|-
−
RMDIR         Removes a directory.
+
| FORMAT||          Formats a disk for use with Windows.
−
ROBOCOPY       Advanced utility to copy files and directory trees
+
|-
−
SET           Displays, sets, or removes Windows environment variables.
+
| FSUTIL||          Displays or configures the file system properties.
−
SETLOCAL       Begins localization of environment changes in a batch file.
+
|-
−
SC             Displays or configures services (background processes).
+
| FTYPE||          Displays or modifies file types used in file extension associations.
−
SCHTASKS       Schedules commands and programs to run on a computer.
+
|-
−
SHIFT         Shifts the position of replaceable parameters in batch files.
+
| GOTO||            Directs the Windows command interpreter to a labeled line in a batch program.
−
SHUTDOWN       Allows proper local or remote shutdown of machine.
+
|-
−
SORT           Sorts input.
+
| GPRESULT||        Displays Group Policy information for machine or user.
−
START         Starts a separate window to run a specified program or command.
+
|-
−
SUBST         Associates a path with a drive letter.
+
| GRAFTABL||        Enables Windows to display an extended character set in graphics mode.
−
SYSTEMINFO     Displays machine specific properties and configuration.
+
|-
−
TASKLIST       Displays all currently running tasks including services.
+
| HELP||            Provides Help information for Windows commands.||This is where most or all of this list came from
−
TASKKILL       Kill or stop a running process or application.
+
|-
−
TIME           Displays or sets the system time.
+
| ICACLS||          Display, modify, backup, or restore ACLs for files and directories.
−
TITLE         Sets the window title for a CMD.EXE session.
+
|-
−
TREE           Graphically displays the directory structure of a drive or  
+
| IF||              Performs conditional processing in batch programs.
−
              path.
+
|-
−
TYPE           Displays the contents of a text file.
+
| LABEL||          Creates, changes, or deletes the volume label of a disk.
−
VER           Displays the Windows version.
+
|-
−
VERIFY         Tells Windows whether to verify that your files are written
+
| MD||              Creates a directory.||Same as MKDIR
−
              correctly to a disk.
+
|-
−
VOL           Displays a disk volume label and serial number.
+
| MKDIR||          Creates a directory.||Same as MD
−
XCOPY         Copies files and directory trees.
+
|-
−
WMIC           Displays WMI information inside interactive command shell.
+
| MKLINK||          Creates Symbolic Links and Hard Links||Same as MD
 +
|-
 +
| MODE||            Configures a system device.
 +
|-
 +
| MORE||            Displays output one screen at a time.||Auto-applies the PAUSE command when the screen fills
 +
|-
 +
| MOVE||            Moves one or more files from one directory to another directory.||XCOPY offers more options
 +
|-
 +
| OPENFILES||      Displays files opened by remote users for a file share.
 +
|-
 +
| 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 (to screen).
 +
|-
 +
| PROMPT||          Changes the Windows command prompt.
 +
|-
 +
| PUSHD||          Saves the current directory then changes it.||Change the working directory
 +
|-
 +
| RD||              Removes a directory.||Use the "/s" switch if it has sub-directories, or this will fail.  Same function as RMDIR
 +
|-
 +
| RECOVER||        Recovers readable information from a bad or defective disk.
 +
|-
 +
| REM||            Records comments (remarks) in batch files or CONFIG.SYS.
 +
|-
 +
| REN||            Renames a file or files.||Same as RENAME (below)
 +
|-
 +
| RENAME||          Renames a file or files.||Same as REN (above)
 +
|-
 +
| REPLACE||        Replaces files.
 +
|-
 +
| RMDIR||          Removes a directory.||Use the "/s" switch if it has sub-directories, or this will fail.  Same function as RD
 +
|-
 +
| ROBOCOPY||        Advanced utility to copy files and directory trees
 +
|-
 +
| SET||            Displays, sets, or removes Windows environment variables.
 +
|-
 +
| SETX||            Set environment variables||Somewhat similar to SET
 +
|-
 +
| SETLOCAL||        Begins localization of environment changes in a batch file.
 +
|-
 +
| SC||              Displays or configures services (background processes).
 +
|-
 +
| SCHTASKS||        Schedules commands and programs to run on a computer.
 +
|-
 +
| SHIFT||          Shifts the position of replaceable parameters in batch files.
 +
|-
 +
| SHUTDOWN||        Allows proper local or remote shutdown, restart, or logoff
 +
|-
 +
| SORT||            Sorts input.
 +
|-
 +
| START||          Starts a separate window to run a specified program or command.
 +
|-
 +
| SUBST||          Associates a path with a drive letter.
 +
|-
 +
| SYSTEMINFO||      Displays machine specific properties and configuration.
 +
|-
 +
| TASKLIST||        Displays all currently running tasks including services.
 +
|-
 +
| TASKKILL||        Kill or stop a running process or application.||Use TASKLIST if you need to check the exact name.  Always include the program file extension, like ".exe"
 +
|-
 +
| TIME||            Displays or sets the system time.||In older [[Windows]] versions, the /d switch would show the date
 +
|-
 +
| TITLE||          Sets the window title for a CMD.EXE session.
 +
|-
 +
| TREE||            Graphically displays the directory structure of a drive or path.||Similar in function to DIR
 +
|-
 +
| 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.||Can be used for move or copy, and offers a lot of options.
 +
|-
 +
| WMIC||            Displays WMI information inside interactive command shell.
 +
|}<ref>[[Windows 7]] Command Prompt - "help" command</ref>
 +
''Most of these and/or other commands specific to your system can be viewed by entering the word "help" into the command-line''
 +
 
 +
For almost any command, one may enter and forward slash followed by a question mark (/?) after a base command to see addition information, generally including a description, syntax, and switches (with a description of each)
 +
 
 +
 
 +
==References==
 +
{{reflist}}
   −
''These or other commands specific to your system can be viewed by entering the word "help" into the commanldline''
+
==External Links==
 +
[http://ss64.com/nt More complete command list on ss64.com]
Block, SkipCaptcha, Upload, Automoderated users, Check users, delete, edit, Moderators, move, oversight, protect, ratelimit-exempt, rollback
19,940

edits