Why Are Command Line Interpreters Used?: Slide 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Page 1 of 3

SLIDE 2:
DOS commands are available in MS-DOS that are used to interact with the operating system and
other command line based software.
Unlike in Windows, DOS commands are the primary way in which you use the operating system.
Windows and other modern OSs use a graphics-based system designed for touch or a mouse.
DOS Commands in Windows: If you use Windows (like Windows 10, 8, 7, etc.) then you have no need for
DOS commands because you don't have MS-DOS. The commands in Windows are available from
the Command Prompt and are called Command Prompt commands or CMD commands, but they are not DOS
commands.
SLIDE 3:
Command Line Interpreter:
A command line interpreter is any program that allows the entering of commands and then executes those
commands to the operating system. It's literally an interpreter of commands.
Unlike a program that has a graphical user interface (GUI) like buttons and menus that are controlled my
a mouse, a command line interpreter accepts lines of text from a keyboard as the commands and then converts
those commands into functions that the operating system understands

Why Are Command Line Interpreters Used?

If a computer can be controlled through easy-to-use applications that have a graphical interface, you
might wonder why anyone would want to instead enter commands through command line. There are
three main reasons...

The first is that you can automate the commands. There are many examples, but one is a script to
always shut down certain services or programs when the user first logs in. Another can be used
to copy files of a similar format out of a folder so you don't have to sift through it yourself. These
things can be done fast and automatically by using commands.

Another benefit to using a command line interpreter is that you can have direct access to the
functions of the operating system. Advanced users may prefer the command line interface because of
that concise and powerful access that it gives them.

SLIDE 4:
COMMAND LINE PROMPT

In Windows operating systems, the primary command line interpreter is Command Prompt.

In Windows XP and Windows 2000, a special diagnostic tool called Recovery Console also acts as a
command line interpreter to perform various troubleshooting and system repair tasks.

LAUNCHING THE CMD LINT INTERPRETER:


Demo:
Page 2 of 3

SLIDE 5:
we will now have a hands-on DOS
Our first command is:

cd
When you are using a MS-DOS command window, it works on one directory at a time. The "current"
directory is indicated as part of the command prompt.
1.

Use the cd command to make a different directory the "current" directory ("cd" is short for "change directory").

The command can be typed as either:

cd directory

or

cd drive:directory

For example, "cd \myfolder" will make "\ myfolder " the current directory.

To get to the "root" (top level directory) of your c: drive, type cd \

cls
To clear the window and move the command prompt to the top of the window.

No files can be changed by the cls command.

The window display is merely cleared.

dir
Use the dir command to display a listing of the contents of the current directory. Information about the files
and subdirectories of the current directory will be displayed.
dir my documents

dir my*

Displays a listing of all files that start with the pattern you specify; in this example, "my".
Page 3 of 3

Displays a listing of all the .txt files located in the current (or specified) directory.

PLZ FEEL FREE TO EXPLORE OTHER ATTRITBUTES OF


DIR
HELP:
type help and you will see a list of available commands with a brief description of each command.

To display detailed help information about command command, you can type

help dir

YOU CAN THE EXHAUSTIVE LIST OF VARIATIONS


ASSOCIATED WITH DIR COMMAND

NOTEPAD
Use the notepad command to run the Windows Notepad text editor program
notepad
This command will open the Windows Notepad text editor program to be run.
notepad filename
This command will open the file named filename to be opened by the Notepad. For example, notepad
mynotepad.txt would open the mynotepad.txt file in the CURRENT DIRECTORY.

If the file filename does not exist, Notepad will ask you if you want to create a new file with that name.

That will be all for now.

In the next video we will practise some more DOS commands.

Thank you

You might also like