DOS Commands
DOS Commands
DOS
Short for Microsoft Disk Operating System, MS-DOS is a non-graphical command
line operating system derived from 86-DOS that was created for IBM compatible
computers. MS-DOS originally written by Tim Paterson and introduced by
Microsoft in August 1981 and was last updated in 1994 when MS-DOS 6.22 was
released. MS-DOS allows the user to navigate, open, and otherwise manipulate files
on their computer from a command line instead of a GUI like Windows.
DOS Commands
Get to a Command Prompt in Windows
1. Click start
Type cmd & press enter.
Internal Commands:
1) CLS (Clear Screen)
Running the cls command at the command prompt would clear your screen of all
previous text and only return the prompt. It does not clear the user's history of
commands.
CLS
2) DATE
The date command can be used to look at the current date of the computer as well
as change the date to an alternate date.
DATE
3) TIME
Time command is used to display and set the current system time of
the operating system.
TIME
4) VER (Version)
VER will tell you what version of DOS you are using.
VER
5) VOL (Volume)
Displays the volume information about the designated drive.
VOL
6) DIR (Directory)
The dir command allows you to see the available files and directories in the
current directory. The dir command also shows the last modification date and
time, as well as the file size.
DIR drivename:
If you want to create new .txt file in C:\ using CMD then type
dir> filename.txt
7) Copy con
Copy con is an MS-DOS and Windows command line command that allows the
creation of a file through the command prompt.
After this command is typed, you'll be returned to a blank line, which is the
start of your file. Enter the lines you want to insert into the file and, when
done, press Ctrl + Z to create the file. If you want to cancel the creation of
the file, press Ctrl + C.
8) TYPE
Allows the user to see the contents of a file. To edit the files, the user would
need to use either edit or copy con.
Type [drive:][path]filename
9) MKDIR
Allows you to create your own directories in MS-DOS.
MKDIR [drive:]path
MD [drive:]path
chdir..
11) RMDIR
Removes an empty directory in MS-DOS.
rmdir dirname
12) RENAME
Used to rename files and directories from the original name to a new name.
13) DEL
Del is a command used to delete files from the computer.
14) MOVE
Allows you to move files or directories from one folder to another, or from
one drive to another.
15) COPY
Allows the user to copy one or more files to an alternate location.
16) DOSKEY
Option keys
17) PATH
Path is used to specify the location where MS-DOS looks when using a
command. Typing "path" by itself shows the current path information.
External Commands:
1) ATTRIB
Attrib allows a user to change the attributes of a file or files.
R Read-only file attribute.
2) FORMAT
Format is used to erase information off of a computer diskette or fixed drive.
3) CHKDSK
Chkdsk is a utility that checks the computer's hard drive status for any cross-
linked or any additional errors with the hard drive.
4) SCANDISK
Microsoft ScanDisk was first introduced with MS-DOS 6.2 and is a software
utility capable of checking the hard drive and floppy diskette drive for any
disk errors.
5) TREE
Allows the user to view a listing of files and folders in an easy to read listing.
Drive:\Path Drive and directory containing disk for display of directory
structure.
/F Displays file names in each directory.
/A ext characters used for linking lines, instead of graphic
characters. /a is used with code pages that do not support graphic
characters and to send output to printers that do not properly
interpret graphic characters.
6) XCOPY
Xcopy is a powerful version of the copy command with additional features;
has the capability of moving files, directories, and even whole drives from
one location to another.