0% found this document useful (0 votes)
51 views4 pages

Understanding DOS Commands

The document provides an introduction to DOS (Disk Operating System) and its command line interface, detailing internal and external commands. It outlines the syntax of commands, including keywords, parameters, and switches, and lists basic DOS commands with their functions. Additionally, it explains how to get help with commands and provides examples of various commands used in DOS.

Uploaded by

gdrivee515
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views4 pages

Understanding DOS Commands

The document provides an introduction to DOS (Disk Operating System) and its command line interface, detailing internal and external commands. It outlines the syntax of commands, including keywords, parameters, and switches, and lists basic DOS commands with their functions. Additionally, it explains how to get help with commands and provides examples of various commands used in DOS.

Uploaded by

gdrivee515
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

10/12/2023

Dr. Dileep Kumar Singh


Head, JLU-SOET
[Link]@[Link]

Problem Solving and Program


Design using C

Dr. Dileep Kumar Singh 1

Problem Solving and Program Design using C

B Tech/B Tech (Hons.) CSE – 1st Sem.

DOS: introduction: External and Internal


commands

Dr. Dileep Kumar Singh 2

DOS
• Stands for "Disk Operating System.
• DOS uses a command line, or text-based interface, that
allows the user to type commands.
• By typing simple command as an instructions, the user
can browse the files on the hard drive, open files, and
run programs.
• The DOS command prompt can be opened in Windows
by selecting "Run..." from the Start Menu and
typing cmd.
Dr. Dileep Kumar Singh 3

Dr. Dileep Kumar Singh 1


10/12/2023

Internal Versus External Commands

• Internal Commands:
– Built into the OS.
– Already in memory if the OS is loaded.
– Available anytime the computer is displaying a command
prompt.
– Generally, the more frequently used commands.
– Examples include: DIR, COPY, PATH, CD, MD, DEL, TIME,
DATE.

Dr. Dileep Kumar Singh 4

Internal Versus External Commands

• External Commands:
– Not a built-in part of the OS.
– Located in another directory.
– Must be loaded into memory as needed by the OS.
– Examples include: DELTREE, FORMAT, DEFRAG, DISKCOPY,
MEMMAKER, and SCANDISK.

Dr. Dileep Kumar Singh 5

Syntax
• Commands have three parts:
– Keyword - A unique word or set of characters that
identifies the action to be performed.
– Parameter - What is acted upon
• Additional directions for the command. Keyword Parameter Switch
• It may specify a directory or file on which to perform
the action.
• It may specify a hardware device.
• It may specify a system setting.
– Switches - How to perform the action
• A special type of parameter that enables or disables
optional functions of the command. Optional
• The /P switch with the DIR command displays the
directory one screen at a time.
• The /W switch with the DIR command displays the
directory in the wide format (five columns wide).

Dr. Dileep Kumar Singh 6

Dr. Dileep Kumar Singh 2


10/12/2023

Getting Help
• Use HELP followed by the command you want to know
about.
OR
• Type the command and then follow it with the switch
/?.

Dr. Dileep Kumar Singh 7

DOS Basic Commands


• dir: view the contents of a directory
• cd: change directory
• dir /p: to view the contents of a directory one screen at a time
• dir /w: to view the contents of a directory in wide format
• cd \: change to the root directory
• cd ..: switch back to the parent directory
• md: create a director
• rd: remove directory
• D: : Will change to the D Drives

Dr. Dileep Kumar Singh 8

DOS Basic Commands


• copy: copy a file. Ex: copy c:\windows\[Link] c:\fruit
• ren: rename a file. Ex: ren [Link] [Link]
• del: deleting a file. Ex: del [Link]
• dir *.old: view all files that end with the extension OLD
• date: display the system date
• time: display the system time
• cls: clear the screen
• exit: Quits from command interpreter

Dr. Dileep Kumar Singh 9

Dr. Dileep Kumar Singh 3


10/12/2023

DOS Basic Commands


• ATTRIB: Displays or changes file attributes.
• CHKDSK : Checks a disk and displays a status report.
• COMP: Compares the contents of two files or sets of files
• DELTREE: Deletes a directory and all the subdirectories and files within it.
• ECHO: Displays messages, or turns command-echoing on or off
• FIND: Searches for a text string in a file or files
• FOR: Runs a specified command for each file in a set of files
• FORMAT: Formats a disk for use with DOS
• HELP: Displays command help
• PATH: Displays or sets a search path for executable files
• SCANDISK: Runs the ScanDisk disk-repair program.

Dr. Dileep Kumar Singh 10

10

THANKS

Dr. Dileep Kumar Singh 11

11

Dr. Dileep Kumar Singh 4

You might also like