You are on page 1of 9

Introduction to MS-DOS

MS-DOS for Microsoft Disk Operating System is an operating system for x86-
based personal computers. It was the most commonly used member of the DOS
family of operating systems, and was the main operating system for IBM PC
compatible personal computers during the 1980s to the mid 1990s, until it was
gradually superseded by operating systems offering a graphical user interface
(GUI), in particular by various generations of the Microsoft Windows operating
system.
In the personal computer operating systems MS-DOS and PC DOS, a number of
standard system commands were provided for common tasks such as listing files
on a disk or moving files. Some commands were built-in to the command
interpreter; others existed as transient commands loaded into memory when
required. Over the several generations of MS-DOS, commands were added for the
additional functions of the operating system. In the current Microsoft Windows
operating system a text-mode command prompt window can still be used. Some
DOS commands carry out functions equivalent to those in a UNIX system but
always with differences in details of the function.

Windows command prompt

Microsoft Windows supports a number of commands which may be invoked by


typing them in a command window; they are usually similar to their MS-DOS
equivalents. Typing help followed by a carriage return at a command prompt will
list the commands. File and path names used as arguments may be long, unlike
MS-DOS names in "8.3" form, and may contain embedded spaces; names with
spaces must be enclosed between a pair of double-quote character (").

MS DOS Commands- Commands are the basic modes through which we can
communicate with the computer.

There are two types of Command.

1. Internal Command
 These are those Commands which are frequently used by the user.
 The Internal Commands are stored in the COMMAND.COM File.
 Example: COPY , MD , CLS , DIR, etc.
2. External Command
 These are those Commands which are not frequently used by user.
 These Commands are not part of COMMAND.COM File.
 Example: PRINT COPY CON , MOVE , FORMAT, etc

Internal Commands

 CLS
 VOL
 VER
 PATH
 DEL
 TYPE
 MD
 REN
 PROMPT
 COPY
 TIME
 DATE
 PAUSE
 DIR

Basic Command CLS (Clean Screen)


 CLS will clear the contents of the screen.
 Example:
D:\>CLS
Will clear all the instructions and screen will become blank.

Basic Command DIR

 DIR will display the contents of the folder.


Syntax:
DIR [Drive:][Path][File(s) or Directory(ies)]
Example:
D:\>DIR
Will display all the details in the directory
Basic Command COPY

 Copy will copy the file from one location to another.


Syntax:
COPY [Path][Drive:]<Source file> <[Drive:][Path]>
Example:
D:\>COPY A:\file.txt D:\
Will copy the file A:\ to D:\

Basic Command DEL

DEL will delete a file or on empty directory from the drive.


Syntax:
DEL [Drive:][Path]<Filename>
Example:
D:\>DEL Newfile.txt
Will delete the file named newfile.txt from D: drive

Basic Command REN

 REN Command change the name of an already existing file to a new name.
Syntax:
REN [Drive:][Path]<OldFilename> <new filename>
Example:
D:\>REN E:file.txt myfile.txt
Will rename the file.txt to myfile.txt
Basic Command CD (Change Directory)

 CD command change the directory location

 Change current working directory. Displays the current working directory


when used without a path parameter
 CD: displays the current working directory on the current drive.

E.g. CD

 CD directory: changes the working directory on the current drive to


directory.
E.g. CD D:\Ahmed\introduction to Computer

CD.. : Changes the working directory to the parent directory (up one directory
level).
e.g. CD..

 CD\: changes the working directory to the root (top level) directory of the
current drive.
e.g. CD\

Syntax:
CD [Drive:][Path] <Directory name>
Example:
D:\>CD Personal
Will change the directory to Personal
To move backward use
Basic Command MD (Make Directory)

 MD is used to make a directory (folder) in MS DOS.


Syntax:
MD [Drive:][Path] <Directory name>

Example:
D:\>MD myfolder
Will make a folder called myfolder in current directory.

Basic Command RD (Remove Directory)


 RD is used to remove a directory (folder)in MS DOS.

Syntax:
RD [Drive:][Path] <Directory name>
Example:
D:\>RD myfolder
Will remove a folder called myfolder in current directory.
Basic Command Date

 Displaying and /or changing the current date .

Example:
D:\>Date
Will display current date.

Basic Command Time

 Displaying and /or changing the current Time.

Example:
D:\>Time
Will display current Time.

How to Open MS-DOS


 To start MS DOS ,click on the start button and choose RUN.
 In the RUN dialog box , type CMD Command. Which is the EXE file for
MS DOS.
 Click on the OK button
External Commands
 BACKUP
 RESTORE
 CHKDSK
 TREE
 DISKCOPY
 DISKCOMP
 PRINT
 COPY CON
 MOVE
 FORMAT
 DELTREE

FORMAT Command

 Process of creating tracks and sectors on a disk is called formatting .


Example:
D:\>FORMAT A:
Will format the drive A:

ATTRIB Command

 ATTRIB Command changes or displays the attributes of a file.

Syntax:

ATTRIB [Mode] [[Drive:][Path] filename]

Example:

D:\>ATTRIB
OR
D:\>ATTRIB+R*.DOC
Will make the file with extension .doc read only

MOVE Command

 MOVE will move the file or directory from one location to another.
Syntax:
MOVE [Path] [Drive:]<Source file> <[Drive:][Path]>

Example:

D:\>MOVE A:\File.txt D:\file.txt


Will move the file to the D:\ drive

BREAK Command

 BREAK command can be used to stop on activity (example- sorting of file)


Syntax:
BREAK [on/off]
D:\> BREAK OFF

PRINT Command

 PRINT Command is used to print the text file.


Syntax:

D:\>PRINT mynotes.txt

Will give the command to print the content in mynotes.txt file

.
Autoexec.bat & Config.sys
The autoexec.bat and the config.sys were files created for MS-DOS and Windows
3.x to load device and operating system files to properly run. These files are
required for later revisions of MS-DOS and Windows 3.x to load. However, with
newer versions of Windows are no longer needed.

 How to edit the files.

 Remarking information.

 Getting additional memory.

 Autoexec.bat layout.

 Config.sys layout.

 Technical support.

You might also like