Microsoft DOS Basics II

download Microsoft DOS Basics II

of 17

Transcript of Microsoft DOS Basics II

  • 8/10/2019 Microsoft DOS Basics II

    1/17

    Microsoft DOS II(Command Prompt)

    Microsoft DOS or MS-DOS is a command prompt shell window. DOS controls thecomputers hardware and provides an environment for programs such as Windows to run.

    This system program must always be present when working with computers that have aOperating System Installed.

    Handout Objectives:

    1. Understanding the importance of DOS

    2. Setting Date and Time

    3. Navigating through long Directories.4. How to recall DOS commands

    5. How to view single and groups files.6. List Files with the Same Extensions

    7. How to clear cluttered dos screen

    8.

    How to create a file using DOS9. How to edit a created file10.How to display a created file on DOS

    11.How to use the copy command12.How to rename a single file

    13.How to rename a group of files14.How to Create and work with Subdirectories

    1. Understanding the importance of DOS

    There are multiple reasons as to why we need DOS.

    a. Controls the flow of information between you and the computer Translator

    b. Allows the user to store information on the computer.

    c. Allows the user to retrieve information stored on the computer.

  • 8/10/2019 Microsoft DOS Basics II

    2/17

    2

    d. Interprets and translates software applications installed on the computer.

    e. Provides the user to access all important function such as saving, copying, and printing.

    2. Setting Date and Time

    What most of us dont know is that with DOS we have the ability to control the system

    date and time. We are mostly familiar with our Windows Clock which is located at thelower right hand corner or the desktop taskbar.

    To gain access to the Datesimply type Datein the DOS command prompt and pressEnter. The System Date will display with the additional option to edit directly from theprompt.

  • 8/10/2019 Microsoft DOS Basics II

    3/17

    3

    Follow format given and type desired date (mm-dd-yy) ex. Type 12-15-2010. PressEnterand Type Dateagain the change is instant. Then do the same to change back tocorrect date settings.

    The Time portion works the same way as the date. Type in Time and press Enter.

    The system clock is based on a 24 hour time format (Military Time) 16:05:09 isconsidered to be 4:05pm and 9.65 seconds. This setting can be changed the same way,

    just type in format and press Enter.

    3. Navigating through long Directories.

    Directories are also known as folders, in each folder there are many files that can belisted on the screen. For example: The Windows directory contains many files and

    folders. Viewing the contents of the directory happens very quickly causing us to miss afile that we might be looking for.

  • 8/10/2019 Microsoft DOS Basics II

    4/17

    4

    In the Command prompt type cd\..press Entertype cd windowspressEnterand thentype DIRand Enter. The screen will run through all files and folders till it reaches theend. This happens very quickly and we find ourselves having to scroll back to look for aspecific object.

    There is Pausecommand that allows us to see the list part by part.

    To do so Type dir/p and Enter, this command freezes the screen after it has filled thescreen just before the point of creating a scroll point. Pressing the Space bar after each

    pause allows us to continue listing the files. This goes on until you Enterback to theC:\> prompt.

  • 8/10/2019 Microsoft DOS Basics II

    5/17

    5

    4. How to recall DOS commands

    Sometimes when typing commands we find ourselves typing the same command overand over. To save time DOS has a feature that will allow us to re-enter a previous

    command so that we do not need to have to retype it. Working with DOS can take some

    time to enter documents so finding shortcuts comes in handy when doing tasks.

    Pressing F3(Function 3) on the keyboard will insert the previously typed command.Pressing the Up Arrowkey allows us to scroll through a list of previously typedcommands

    Pressing the Right ArrowKey allows us to type out each letter from our last command.

    5. How to view Single and Group Files

    To check for a single file Instead of using the directory command to look for one

    particular file, you can type the name of the file after the DIR command at the C:\>

    prompt.

    Steps:

    1. Make sure that you are at your C:\>prompt.

    2. Type: dir autoexec.bat(filename.extension) and press Enter.

    3. The screen will display a listing of the file or a file not found message (if it has notbeen found it means it might be in another directory).

  • 8/10/2019 Microsoft DOS Basics II

    6/17

    6

    To check for a groups of files the*symbol is referred to as a wildcard and stands for anycharacter or group of characters. This is helpful when you want to list files that start with

    a particular letter or group.

    Steps:

    1. Type: dir p*and press Enter.

    2. All filenames that begin with the letter p will be listed.

    3. Press theF3 key.

    4. Backspace twiceand replace p* with z* and pressEnter.

    5. All filenames if any that begin with the letter z will be listed.

  • 8/10/2019 Microsoft DOS Basics II

    7/17

    7

    6. List Files with the Same Extensions

    You can also use the wildcard character *to look for a group of files with the sameextension.

    Steps:

    1. Type: dir *exeand pressEnter.

    2. All files with the .exeif any extension will be listed.

    3. Press the F3 key.

    4. Backspace three timesand replace the .exe extension with the .batextension andpressEnter. All files with the .batextension should now be listed.

  • 8/10/2019 Microsoft DOS Basics II

    8/17

    8

    7. How to clear cluttered dos screen

    After typing and retrieving info on the DOS screen it might tend to become cluttered andconfusing. Typing CLS in the command prompt will clear all data on screen and start

    from the top.

  • 8/10/2019 Microsoft DOS Basics II

    9/17

    9

    8. Creating a File using DOS

    Steps:

    1. Type: copy con dos.noteand press Enter.

    2. Type this message in the following format:

    Good Morning

    Welcome to our DOS II workshop

    3. Press the F6 function key (^Z) and press Enter.

    4. DOS gives you a message that 1 File(s) has been copied.

    5. Type: dir d* and press Enter. Now you can see in the list of files beginning with the

    letter d, the letter that we have just created in DOS.

  • 8/10/2019 Microsoft DOS Basics II

    10/17

    10

    9. How to edit created file.

    The editcommand can be used to launch an editor that will allow us to make changes tofiles that we have created. Type edit dos.noteand pressEnter. Simply save oncechanges have been made.

    10.How to display file on DOS

    If you need to check the contents of a particular DOS file, you will need to use the TYPEcommand.

    Steps:

    1. Type: type dos.noteand pressEnter.

    2. DOS will display the contents of the file on the screen.

  • 8/10/2019 Microsoft DOS Basics II

    11/17

    11

    11.How to use the copy command

    The copy command can be used to copy one file to another.

    Steps:

    1. Type: copy dos.note dos2.note and press Enter.

    2. DOS will tell you one file has been copied.

    3. Type: dir d* and pressEnter.

    4. You should have two files listed with different names.

    The copy command also allows us to copy a file with a new extension name

    Steps:

    1. Type: copy dos.note dos.fil and press Enter.

    2. Type: dir d* and press Enter.

    3. Three files should be listed one with a different extension.

  • 8/10/2019 Microsoft DOS Basics II

    12/17

    12

    12.How to Rename a File

    The rename command allows us to change the name of the previously created file with anew name..

    Steps:

    1. Type: ren dos.note class.note and press Enter.

    2. Type: dir *.note and press Enter.

    3. DOS will list only two files that have the .note extension: dos.note and class.note

  • 8/10/2019 Microsoft DOS Basics II

    13/17

    13

    13.How to Rename a Group of Files

    With the wildcard character *, you can also use the RENAME command to change agroup of files.

    Steps:

    1. Type: ren *.note *.notand press Enter.

    2. Type: dir *.not and press Enter.

    3. You should have two files listed with a .not extension.

    4. Type: dir *.note and press Enter.

    5. There should be no files found with .note extensions.

  • 8/10/2019 Microsoft DOS Basics II

    14/17

  • 8/10/2019 Microsoft DOS Basics II

    15/17

    15

    Set the DOS Prompt

    You can set or change the standard system prompt to display the name of the directory orsubdirectory you are currently working in.

    Steps:

    1. Type: prompt $p $g and press Enter.

    2. The DOS prompt tells you that you are working in the C directory (drive) and in theInfo subdirectory.

    3. Type: dir and pressEnter.The single dot stands for the current directory. The doubledots stand for the parent directory (root). The dots are often referred to as place markers.

    In order to go into the parent directory DOS commands allow us to quickly move back

    and forth.

    Steps:

    1. Type: cd.. and press Enter.

    2. You will Enterback to the C:\> prompt.

    Now that we have a subdirectory lets copy a file into it.

    Steps:

    1. Type: copy class.not \infoand press Enter.

  • 8/10/2019 Microsoft DOS Basics II

    16/17

    16

    2. Type: dir \info and press Enter.We are able to see that a copy of class.not is copiedinto the subdirectory Info. The original file is also in the root directory.

    Files that are not needed anymore can be deleted. Using the delete command will removethe files

    Steps:

    1. Type: cd.. and press Enter.

    2. The prompt shows you that you are back in the root directory.

    3. Type: del dos2.notand press Enter.

    4. Type: dir dos2.notand press Enter.

    5. dos.not is no longer listed because it has been deleted.

  • 8/10/2019 Microsoft DOS Basics II

    17/17

    17

    Deleting a Subdirectory

    If a subdirectory exists that needs to be deleted by using the rd command.

    Steps:

    1. Type: cd.. and press Enter.

    2. You should be back in the root directory.

    3. Type: rd \data and pressEnter.

    4. Type: dir *. and press Enter.Notice that the data subdirectory is no longer listed.

    Navigating through dos is a process that takes practice, the more practice the better.We are fortunate that this type of Operating System now runs in the backgroundand we control it from the Graphical User Interface portion.