This article presents a list of commands used by MS-DOS compatible operating systems , especially as used on IBM PC compatibles . Many unrelated disk operating systems use the DOS acronym and are not part of the scope of this list.
32-517: In MS-DOS, many standard system commands are provided for common tasks such as listing files on a disk or moving files. Some commands are built into the command interpreter; others exist as external commands on disk. Over multiple generations, commands were added for additional functions. In Microsoft Windows , a command prompt window that uses many of the same commands, cmd.exe , can still be used. The command interpreter for DOS runs when no application programs are running. When an application exits, if
64-409: A command is a directive to a computer program to perform a specific task. It may be issued via a command-line interface or as input to a network service as part of a network protocol , or as an event triggered in a graphical user interface . Specifically, the term command is used in imperative programming languages. The name arises because statements in these languages are usually written in
96-411: A command-line interpreter ( Unix shell ). The following command changes the user's working position in the directory tree to the directory /home/pete . The utility program is cd and the argument is /home/pete : The following command prints the text Hello World on the standard output stream, which, in this case, just prints the text on the screen. The program name is echo and the argument
128-461: A directory is a file system cataloging structure which contains references to other computer files , and possibly other directories. On many computers, directories are known as folders , or drawers , analogous to a workbench or the traditional office filing cabinet . The name derives from books like a telephone directory that lists the phone numbers of all the people living in a certain area. Files are organized by storing related files in
160-578: A command with a question mark. This command was formerly called ync (yes-no-cancel). The CLS or CLRSCR command clears the terminal screen . The command is available in MS-DOS versions 2 and later. Start a new instance of the command interpreter. The command is available in MS-DOS versions 1 and later. Show differences between any two files, or any two sets of files. The command is available in MS-DOS versions 3.3 through 5 and IBM PC DOS releases 1 through 5. Makes copies of existing files. The command
192-524: A different drive. It can also display drive assignments or reset all drive letters to their original assignments. The command is available in MS-DOS versions 3 through 5 and IBM PC DOS releases 2 through 5. Lists connections and addresses seen by Windows ATM call manager. Attrib changes or views the attributes of one or more files. It defaults to display the attributes of all files in the current directory. The file attributes available include read-only, archive, system, and hidden attributes. The command has
224-423: A filesystem, which does not have a parent of its own, is called the root directory. The freedesktop.org media type for directories within many Unix-like systems – including but not limited to systems using GNOME , KDE Plasma 5 , or ROX Desktop as the desktop environment – is "inode/directory". This is not an IANA registered media type . Historically, and even on some modern embedded systems ,
256-517: A hierarchical file system design for the Electronic Recording Machine, Accounting (ERMA) Mark 1 published in 1958 as well as by Xerox Star , is used in almost all modern operating systems ' desktop environments. Folders are often depicted with icons which visually resemble physical file folders. There is a difference between a directory , which is a file system concept, and the graphical user interface metaphor that
288-439: A manner similar to the imperative mood used in many natural languages . A statement in an imperative programming language would then be a sentence in a natural language, and the command would be the predicate . Many programs allow specifically formatted arguments , known as flags or options, which modify the default behaviour of the program, while further arguments may provide objects, such as files, to act on. As an analogy to
320-628: A natural language, the flags are adverbs, while the other arguments are objects . The meaning of command is highly dependent on context. For example, some authors refer to conditionals as commands while they are called expressions in Python or Bash and statements in JAVA. Similarly, writing to stdout is done in Bash with the builtin command printf , while it is done with the built-in function print() in Python. Here are some commands given to
352-432: A program request. The command is available in MS-DOS versions 2 and later. Starts a batch file from within another batch file and returns when that one ends. The command is available in MS-DOS versions 3.3 and later. The CHDIR (or the alternative name CD) command either displays or changes the current working directory . The command is available in MS-DOS versions 2 and later. The command either displays or changes
SECTION 10
#1732765144875384-438: A structured list of document files and folders are stored on the computer. The distinction can be due to the way a directory is accessed; on Unix systems, /usr/bin/ is usually referred to as a directory when viewed in a command line console , but if accessed through a graphical file manager , users may sometimes call it a folder. Operating systems that support hierarchical filesystems (practically all modern ones) implement
416-411: A type of file. Caveats include not being able to write to a directory file except indirectly by creating, renaming and removing file system objects in the directory and only being able to read from a directory file using directory-specific library routines and system calls that return records, not a byte-stream. The name folder , presenting an analogy to the file folder used in offices, and used in
448-411: A volume. The command is available in MS-DOS versions 1 and later. The CHOICE command is used in batch files to prompt the user to select one item from a set of single-character choices . Choice was introduced as an external command with MS-DOS 6.0; Novell DOS 7 and PC DOS 7.0. Earlier versions of DR-DOS supported this function with the built-in switch command (for numeric choices) or by beginning
480-461: Is "Hello World". The quotes are used to prevent Hello and World being treated as separate tokens: The following commands are equivalent. They list files in the directory /bin . The program is ls , having three flags ( l , t , r ), and the argument is the directory /bin : The following command displays the contents of the files ch1.txt and ch2.txt . The program name is cat , having two file name arguments: Here are some commands for
512-679: Is available in MS-DOS versions 1 and later. Defines the terminal device (for example, COM1) to use for input and output. The command is available in MS-DOS versions 2 and later. Displays the system date and prompts the user to enter a new date. Complements the TIME command. The command is available in MS-DOS versions 1 and later. (Not a command: This is a batch file added to DOS 6.X Supplemental Disks to help create DoubleSpace boot floppies.) A disk compression utility supplied with MS-DOS version 6.0 (released in 1993) and version 6.2. A very primitive assembler and disassembler. The command has
544-402: Is found, an error message is printed, and the command prompt is refreshed. External commands were too large to keep in the command processor, or were less frequently used. Such utility programs would be stored on disk and loaded just like regular application programs but were distributed with the operating system. Copies of these utility command programs had to be on an accessible disk, either on
576-445: Is used to represent it (a folder ). For example, Microsoft Windows uses the concept of special folders to help present the contents of the computer to the user in a fairly consistent way that frees the user from having to deal with absolute directory paths, which can vary between versions of Windows, and between individual installations. Many operating systems also have the concept of "smart folders" or virtual folders that reflect
608-620: The BASIC programming language for PCs. Implementing BASIC in this way was very common in operating systems on 8- and 16-bit machines made in the 1980s. IBM computers had BASIC 1.1 in ROM, and IBM's versions of BASIC used code in this ROM-BASIC, which allowed for extra memory in the code area. BASICA last appeared in IBM PC DOS 5.02, and in OS/2 (2.0 and later), the version had ROM-BASIC moved into
640-475: The DOS , OS/2 and Microsoft Windows command prompt processor. The following command displays the contents of the file readme.txt . The program name is type and the argument is readme.txt . The following command lists the contents of the current directory. The program name is dir , and Q is a flag requesting that the owner of each file also be listed. Directory (file systems) In computing ,
672-516: The ability to analyze the file fragmentation on a disk drive or to defragment a drive. This command is called DEFRAG in MS-DOS/PC DOS and diskopt in DR-DOS . The command is available in MS-DOS versions 6 and later. DEL (or the alternative form ERASE) is used to delete one or more files. The command is available in MS-DOS versions 1 and later. System command In computing ,
SECTION 20
#1732765144875704-458: The active code page used to display character glyphs in a console window . Similar functionality can be achieved with MODE CON: CP SELECT= yyy . The command is available in MS-DOS versions 3.3 and later. CHKDSK verifies a storage volume (for example, a hard disk , disk partition or floppy disk ) for file system integrity. The command has the ability to fix errors on a volume and recover information from defective disk sectors of
736-487: The capability to process whole folders and subfolders of files and also process all files. The command is available in MS-DOS versions 3 and later. These are commands to backup and restore files from an external disk. These appeared in version 2, and continued to PC DOS 5 and MS-DOS 6 (PC DOS 7 had a deversioned check). In DOS 6, these were replaced by commercial programs (CPBACKUP, MSBACKUP), which allowed files to be restored to different locations. An implementation of
768-463: The command line. Spaces and symbols such as a "/" or a "-" may be used to allow the command processor to parse the command line into filenames, file specifications, and other options. The command interpreter preserves the case of whatever parameters are passed to commands, but the command names themselves and file names are case-insensitive. Many commands are the same across many DOS systems, but some differ in command syntax or name. A partial list of
800-445: The current drive or on the command path set in the command interpreter. In the list below, commands that can accept more than one file name, or a filename including wildcards (* and ?), are said to accept a filespec (file specification) parameter. Commands that can accept only a single file name are said to accept a filename parameter. Additionally, command line switches, or other parameter strings, can be supplied on
832-505: The file systems either had no support for directories at all or had only a "flat" directory structure , meaning subdirectories were not supported; there were only a group of top-level directories, each containing files. In modern systems, a directory can contain a mix of files and subdirectories. A reference to a location in a directory system is called a path . In many operating systems , programs have an associated working directory in which they execute. Typically, file names accessed by
864-490: The most common commands for MS-DOS and IBM PC DOS follows below. Sets the path to be searched for data files or displays the current search path. The APPEND command is similar to the PATH command that tells DOS where to search for program files (files with a .COM, . EXE, or .BAT file name extension). The command is available in MS-DOS versions 3.2 and later. The command redirects requests for disk operations on one drive to
896-524: The program are assumed to reside within this directory if the file names are not specified with an explicit directory name. Some operating systems restrict a user's access only to their home directory or project directory, thus isolating their activities from all other users. In early versions of Unix the root directory was the home directory of the root user , but modern Unix usually uses another directory such as /root for this purpose. In keeping with Unix philosophy , Unix systems treat directories as
928-449: The program code. Microsoft released GW-BASIC for machines with no ROM-BASIC. Some OEM releases had basic.com and basica.com as loaders for GW-BASIC.EXE. BASIC was dropped after MS-DOS 4, and PC DOS 5.02. OS/2 (which uses PC DOS 5), has it, while MS-DOS 5 does not. This command is used to instruct DOS to check whether the Ctrl and Break keys have been pressed before carrying out
960-404: The results of a file system search or other operation. These folders do not represent a directory in the file hierarchy. Many email clients allow the creation of folders to organize email. These folders have no corresponding representation in the filesystem structure. If one is referring to a container of documents , the term folder is more appropriate. The term directory refers to the way
992-426: The same directory. In a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles a tree ), a directory contained inside another directory is called a subdirectory . The terms parent and child are often used to describe the relationship between a subdirectory and the directory in which it is cataloged, the latter being the parent. The top-most directory in such
List of DOS commands - Misplaced Pages Continue
1024-448: The transient portion of the command interpreter in memory was overwritten, DOS will reload it from disk. Some commands are internal—built into COMMAND.COM; others are external commands stored on disk. When the user types a line of text at the operating system command prompt, COMMAND.COM will parse the line and attempt to match a command name to a built-in command or to the name of an executable program file or batch file on disk. If no match
#874125