Exercise 4

Following exercises include to DOS and computer structure. If there is rush around the model-computer start doing exercises included to DOS. Exercises are ment to do by using Windows 2000 Command Prompt. So the surroundings isn`t real DOS- surroundings. All commands which work on DOS don´t work on Command Prompt.

Computer structure

  1. If you want to know more about DOS you can find useful links from address http://appro.mit.jyu.fi/english/prope.html You can also use Internet and search more material from there. For example use Altavista search engine and search words included to DOS.
  2. Get aqcuainted with opened computer and try to remember following components: processor, main memory, card locations, controller cards and connectors for key board, mouse, screen and printer. If you don´t recognize some component ask it from your exercise-tutor.
  3. Check also locations of disk drive, hard disk, CD-ROM-disk and power source. If you don´t find some component ask it from your exercise-tutor.
  4. Attach devices near by the model-computer to central processor. There may be devices with various versions of connectors so look accurately connectors of the model-computer. Because spikes of the connectors will bend very easily be careful when you attach devices to computer. Connectors go to place only in right pose! Don´t use extra force because it will only cause damage.

DOS

  1. For example some WINNT-directory contents printed with command DIR may look like following:
     Volume in drive C has no label.
     Volume Serial Number is 307D-5363
    
     Directory of C:\WINNT
    
    06.09.2000  13:03       <DIR>          .
    06.09.2000  13:03       <DIR>          ..
    31.07.2000  18:54       <DIR>          Config
    31.07.2000  18:53       <DIR>          Connection Wizard
    01.08.2000  11:14       <DIR>          Corel
    11.10.1999  04:01               41 984 CTREGRUN.EXE
    15.08.2000  10:40       <DIR>          Cursors
    03.09.2000  12:35       <DIR>          Debug
    02.08.2000  08:33                    0 netscape.INI
    07.12.1999  15:00               50 960 NOTEPAD.EXE
    13.09.2000  14:36               86 000 nsreg.dat
    14.08.2000  14:38               15 256 ocgen.log
    14.08.2000  14:38                1 098 ockodak.log
    03.09.2000  12:44                  881 ODBC.INI
    01.08.2000  13:59                4 450 ODBCINST.INI
    10.08.2000  09:36                2 553 OEWABLog.txt
    31.07.2000  16:10       <DIR>          Offline Web Pages
    
    
    

    Find out which are subdirectory names and which are file names in previous list. What other information you can get of listing? What strange things you can find from listing? Ask explications from your exercise-tutor if needed.

  2. Next we get to know of Command Promt (finn. Komentokehote) guides. You can get guide of the command when you first write the command and then slant-mark (/) and question mark. For example you`ll get guide of command DIR by writing DIR /?. Guide of command looks like next.
    Displays a list of files and subdirectories in a directory.
    
    DIR [drive:][path][filename] [/P] [/W] [/D] [/A[[:]attributes]]
      [/O[[:]sortorder]] [/T[[:]timefield]] [/S] [/B] [/L] [/N] [/X] [/C]
    
      [drive:][path][filename]
                  Specifies drive, directory, and/or files to list.
    
      /P          Pauses after each screenful of information.
      /W          Uses wide list format.
      /D          Same as wide but files are list sorted by column.
      /A          Displays files with specified attributes.
      attributes   D  Directories                R  Read-only files
                   H  Hidden files               A  Files ready for archiving
                   S  System files               -  Prefix meaning not
      /O          List by files in sorted order.
      sortorder    N  By name (alphabetic)       S  By size (smallest first)
                   E  By extension (alphabetic)  D  By date & time (earliest first)
                   G  Group directories first    -  Prefix to reverse order
      /T          Controls which time field displayed or used for sorting
      timefield   C  Creation
                  A  Last Access
                  W  Last Written
      /S          Displays files in specified directory and all subdirectories.
      /B          Uses bare format (no heading information or summary).
      /L          Uses lowercase.
      /N          New long list format where filenames are on the far right.
      /X          This displays the short names generated for non-8dot3 file
                  names.  The format is that of /N with the short name inserted
                  before the long name. If no short name is present, blanks are
                  displayed in its place.
      /C          Display the thousand separator in file sizes.  This is the
                  default.  Use /-C to disable display of separator.
    
    Switches may be preset in the DIRCMD environment variable.  Override
    preset switches by prefixing any switch with - (hyphen)--for example, /-W.
    
    Conclude with the help of guide how you can stop directory listing of command DIR after every screen? How you can get only directory names into listing? Check it from your exercise-tutor.
  3. Let´s get to know of computer´s directory structure by two different ways. Open Start (finn. Käynnistä)-menu and then open Windows Explorer (finn. Resurssienhallinta) and Command Prompt (engl. Komentokehote ). Use command DIR and check what directory is opened in DOS-space. Try to find the same directory from Windows Explorer. Compare the visual display of directories and files in DOS and in Windows Explorer. Use command CD and go also to other directories. Compare directories contents in DOS-space with contents displayed in Windows Explorer.
  4. Following exercises are done in Windows 2000 Command Prompt (finn. Komentokehote) if there isn`t other mention. Go to U:-disk. U:-disk is work directory for the users of Agoranet so you can save your works only to it. Create a correct directory structure to U-disk and you´ll find your works easily if needed. Because the disk space is very limited you are not allowed to save your works too long. You should check directory stucture in Command Prompt (finn. Komentokehote and in Windows Explorer (finn. Resurssienhallinta) alike in following exercises.
  5. Create a directory called PROPE into U:-disk. Then create a subdirectory called DOS into PROPE-directory by using command MD. Go to the DOS-directory and make a text file by using EDIT -text editor. Write your name and address into file and save it as NAME.TXT.
  6. Find out what´s the difference between Absolute and Comparative reference.
  7. Copy file NAME.TXT from U:\PROPE\DOS- directory to your flobby disk´s (A-disk) main directory by using absolute reference and command copy. If you don´t have flobby disk with you create a subdirectory A under the U:\PROPE\-directory and use it instead of flobby disk. Next there is an example of using absolute reference. The command will copy JUTTU.TXT from D-disk´s subdirectory OMAT to the A:-disk´s root directory.
    COPY D:\OMAT\JUTTU.TXT   A:\JUTTU.TXT
    
    When you copy files you can also change the file name. Next command will copy file JUTTU.TXT to other disk with other name.
    COPY D:\OMAT\JUTTU.TXT   A:\TOINENJUTTU.TXT
    
  8. Find out what´s inside your flobby disk´s root directory. What has been copied into it? Try to copy so that you change the directory name into another.
  9. Create a directory called TEMP into PROPE- directory located under the U:-disk. Copy NIMENI.TXT from DOS-directory to the TEMP-directory by using the comparative reference. Next there is an example of using comparative reference. In the example user´s default directory is root of D-disk and under that there is OMAT-directory and DOKUT-directory alike. There is copied JUTTU.TXT from OMAT-directory to DOKUT-directory.
    COPY  .\OMAT\JUTTU.TXT   .\DOKUT\JUTTU.TXT
    
    A change in the example's default directory causes also changes in the command. When you move to the OMAT-directory into directory structure with relative reference the copy command is like next.
    COPY  .\JUTTU.TXT   ..\DOKUT\JUTTU.TXT
    
    Check the success of copying by checking contents of directories. How the change of directory will change the copy command affliated with absolute reference. Check it from your exercise-tutor.
  10. Change DOS-directory as your default directory. Change location of NIMENI.TXT and name it by using relative references and command MOVE. Move it into TEMP-directory and rename it as OTHERNAME.TXT.
  11. Delete NIMENI.TXT from TEMP-directory with command DEL. Make sure that file has been deleted. At the end try using joker-marks in deleting operation. By using joker-mark (*) you can delete all files from default directory. The joker-mark is very effective but it can also cause big damage.
  12. At the end delete directories TEMP and DOS by using command RD.
  13. Translate-exercise DOS-England: decode following DOS-commands. What they do and mean? If you are not sure what some command is try it on action or ask more information directly from DOS. Give command and selector /?. For example DIR /?. Or use the link given in the start of the page.
         DIR
         DIR *.TXT
         DIR \*.TXT
         DIR A:
         DIR A:*.TXT /W
         DIR \*.TXT /S
         COPY VANHA.TXT UUSI.TXT
         COPY VANHA.TXT UUSI.*
         COPY VANHA.TXT \JUTUT
         COPY VANHA.TXT \JUTUT\*.OLD
         COPY *.TXT *.ASC
         COPY A:\JUTTU.WP C:
         COPY B:*.TXT
         TYPE TARINA.TXT
         MORE < TARINA.TXT
         REN APILA.BMP KUKKA.BMP
         MOVE KUVA.BMP \KARTAT\SUOMI
         MOVE KUVA.BMP \KARTAT\MAA.BMP
         TREE
         TREE \ /F
         TREE A:\
         DEL *.TMP
         DEL *.*
    
  14. Translate-exercise on the contrary, England-DOS. Write alalogs of following commands which DOS will understand.
  15. Which of the following are allowed disk drive- directory - or file references in Windows 2000 Command Prompt?
         TARINA.TXT
         KOE.1.DAT
         UUSI
         \A\B
         D:/KURSSI/AINE.TXT
         AINEISTO.DAT
         :\JUTUT
         /AUTO.DAT
         .OSA
         LUKU-2.W
         #
         A:
         LUKU-2
         C:\
         E:KUORO\LAULU.C
         \
         B:\MATKA\KARTTA.BITMAP
    

http://appro.mit.jyu.fi /2001/kevat/propedeuttinen/demot/demo4/index.html
© Tommi Lahtonen ()<URL: http://www.iki.fi/hazor/>
5.01.2001 11:04:50