home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / SKIP002.ZIP / SKIPMISC.002
Encoding:
Text File  |  1988-03-08  |  43.9 KB  |  846 lines

  1.  
  2.                           SKIP'S COMPUTER MISCELLANEA
  3.     
  4.                                       #2
  5.  
  6.                              (C) Copyright 1988 by
  7.                            C. F. "Skip" Mowery, Jr.
  8.                              Colonel, USAF (Ret.)
  9.                            406 Van Reed Manor Drive
  10.                                Brandon FL 33511
  11.                                  813-689-4212
  12.     
  13.     "Skip's Computer Miscellanea" is copyrighted material and  remains  the
  14.     property  of  the  author,  who reserves all rights to its publication,
  15.     reproduction and distribution, with the following single exception:  it
  16.     may  be  freely  copied and distributed electronically via computer for
  17.     personal non-commercial use, provided that the content is not modified,
  18.     that  it is not copied to or distributed on any form of print media and
  19.     that it is not copied or distributed by or for  any  type  of  business
  20.     endeavor without the prior written permission of the author.
  21.  
  22.                                      *****
  23.  
  24.     Your comments about this material and questions  about  any  aspect  of
  25.     computing  are  welcome.    This  material  originates  on the Computer
  26.     Archives BBS in Tampa, Florida, at 813-968-6220.
  27.  
  28.                                      *****
  29.  
  30.  
  31.  
  32.                 Part 2 of "Getting Organized With a Hard Disk"
  33.  
  34.  
  35.                    Hard Disk Organizational Tools and Terms
  36.     
  37.          In order to facilitate the organization of  your  hard  disk,  you
  38.     should  become  familiar with a few tools and terms that will make this
  39.     relatively easy job even easier.  You don't have to be an expert -- all
  40.     you'll need is the knowledge that these tools exist and a general  idea
  41.     of what they do.  Some are equally significant for floppy-based systems
  42.     and you may already be familiar with them.  Here they are:
  43.  
  44.               AUTOEXEC.BAT -- This is a file that  contains  commands  that
  45.     you  want  the computer to execute every time you boot.  I'll be giving
  46.     you some ideas about what to put in it.
  47.  
  48.               PATH -- This is something you will put  in  the  Autoexec.Bat
  49.     file  to  tell the system where to look for files.  It's just a list of
  50.     drives and directories in the order that you want the system to  search
  51.     them  when  looking  for  a  file.  I'll tell you exactly how to do it.
  52.     Whenever in this article I refer to PATH (in upper case), I'm referring
  53.     to  this command.  We'll also discuss path (lower case in this article)
  54.     as one of the elements in a command line:  the element that  tells  the
  55.     system the route to follow to get to a directory or file name  referred
  56.     to in the command.  The distinction between PATH and a path will become
  57.     clear as you read along.
  58.  
  59.               CONFIG.SYS -- As the name implies, this is a file that  tells
  60.     the  system  how  to configure itself for your applications.  I'll show
  61.     you how to create it and what to put in it.
  62.  
  63.               Batch Files -- These are text files that you create, with the
  64.     extension .BAT, that usually include several commands for the system to
  65.     execute and that save you having to type in  certain  command  combina-
  66.     tions that you use frequently.  I'll give you some specific examples.
  67.  
  68.               Directories -- You can read your DOS manual's description  of
  69.     these,  but  all  you  really need to know is that directories are like
  70.     file dividers or category designators.   Imagine  setting  up  a  paper
  71.     filing  system  in  one  file  drawer.   You break down your files into
  72.     general categories, each file divider has the name of a  category,  and
  73.     you  put  all  files  related to one category behind that file divider.
  74.     For example, you might have  a  category  called  "Correspondence"  and
  75.     another  called "Bills".  In the same way, your hard disk will have the
  76.     files stored behind file dividers with category names -- except that we
  77.     call the dividers/categories by the name "directories".  (Depending  on
  78.     how  well  organized  your  floppies  are,  you  could  also consider a
  79.     directory as the equivalent of a floppy disk, but without  the  storage
  80.     limits of the floppy.)
  81.  
  82.               Subdirectory -- Continuing the  comparison  to  a  one-drawer
  83.     filing  system,  once  you have general categories established, you may
  84.     want to divide some of them into smaller  sub-categories,  which  on  a
  85.     disk  we  call  subdirectories.    For  example,  the  "Correspondence"
  86.     directory may have subdirectories named "Personal" and "Business".  The
  87.     "Business"  subdirectory  might  then have its own subdirectories named
  88.     according to the companies that the correspondence applies to.
  89.  
  90.               Root Directory -- This concept is easier to  understand  than
  91.     it  is  to  explain.   I have compared directories to the dividers in a
  92.     filing system.  The root directory might be compared to  the  label  on
  93.     the  front  of  the  file drawer, or a list in the front of the drawer,
  94.     that tells you what categories of files are included  in  that  drawer.
  95.     (You might even consider the root directory as the drawer itself.) Your
  96.     DOS manual will compare directories and subdirectories to  an  inverted
  97.     tree (hence the term "root"), and many directory-listing utilities will
  98.     refer to the list as a "Tree".  I prefer to think of the root directory
  99.     as the top box on an organizational chart.  At the top is the office of
  100.     the chief executive; under  that  are  the  various  divisions  of  the
  101.     organization (directories);  and  under  each  division  there  may  be
  102.     subdivisions (subdirectories).  If you want to think in terms of floppy
  103.     disk  organization,  the root directory might be considered the equiva-
  104.     lent of your system disk -- the one you boot from and  that  has  other
  105.     key programs on it.  More about this later.
  106.  
  107.               MD -- This command  (Make  Directory)  tells  the  system  to
  108.     create  a new directory or subdirectory.  [Every formatted disk, floppy
  109.     or hard, already has a root directory (which is why I said  above  that
  110.     you could compare it to the file drawer itself) and does  not  need  to
  111.     have one created via MD.]
  112.  
  113.               CD -- This command (Change Directory)  tells  the  system  to
  114.     devote its attention to a different directory or subdirectory. 
  115.     
  116.               Current Directory  --  We  usually  refer  to  being  "in"  a
  117.     directory.   The current directory is the one you are currently in, the
  118.     one the system is currently devoting its attention to.  If you  are  in
  119.     one directory and want to be in a different one, you use CD (see above)
  120.     to move from one to the other.
  121.  
  122.               Default Directory -- The current directory is  also  referred
  123.     to as the default directory, i.e. the one you're in.  For  example,  if
  124.     you  enter  a  command  to  run  a  program and don't specify where the
  125.     program file is, the system will look for it in the  current  directory
  126.     (i.e. the program location will "default" to the current directory).
  127.  
  128.               RD -- This command (Remove Directory)  tells  the  system  to
  129.     delete  a  directory  or subdirectory.  You can't delete a directory or
  130.     subdirectory unless it's empty, i.e. has no files in it.
  131.  
  132.               RENDIR.COM -- This is a small program that can be  downloaded
  133.     from a BBS that will enable you to rename a  directory  or  subdirecto-
  134.     ry.    It's  not essential to have this, but it's a lot easier than the
  135.     DOS procedure, which would be to create (CD) a new directory, copy  all
  136.     the  files  from the old directory to the new, and then remove (RD) the
  137.     old directory name.  For some  reason,  the  authors  of  DOS  did  not
  138.     include  a  rename-directory command in the system.  (Some file-manager
  139.     programs and other utilities also include directory-renaming as one  of
  140.     their functions.)
  141.  
  142.               \ (Reverse Slash) -- The reverse  slash  is  the  symbol  the
  143.     system  uses  to  identify  the root directory, to separate directories
  144.     from subdirectories and/or to separate directory names from file names.
  145.     Standing by itself in a command (e.g.  CD \), the \ stands for the root
  146.     directory.  On my keyboard, the reverse slash is  in  the  bottom  row,
  147.     between  the  Alt key and the space bar.  (In other words, it's usually
  148.     hidden under my left hand, which sometime makes it a pain in  the  tush
  149.     to use.)
  150.  
  151.                            A Brief Tutorial on Paths
  152.     
  153.          When you're organizing your hard disk with directories and  subdi-
  154.     rectories  and  copying  files to them, you have to be able to tell the
  155.     system where to find things.  Suppose you want to  copy  a  file  named
  156.     TEST.DAT from a directory named SOURCE on a floppy disk in drive A:  to
  157.     a subdirectory named TARGET on your hard disk, which  we'll  assume  is
  158.     drive  C:,  and  that  TARGET is a subdirectory under a directory named
  159.     DATA.
  160.  
  161.                       Drive A:                Drive C:
  162.                          |                       |
  163.                    Root Directory          Root Directory
  164.                          |                       |
  165.                   SOURCE Directory         DATA Directory
  166.                          |                       |
  167.                    TEST.DAT File         TARGET Subdirectory
  168.                                                  |
  169.                                         (Destination of File)
  170.  
  171.          The COPY command requires two parameters:    the  source  and  the
  172.     target.  The source parameter tells the system the location of the file
  173.     to be copied and what the file's name is, and the  target  tells  where
  174.     you want the file copied to and, optionally, what  name  you  want  the
  175.     file to have when it's copied to that location.
  176.  
  177.          In order to avoid discussing defaults and wildcards at this point,
  178.     we're going to assume also that you are currently in drive B:  and that
  179.     you want TEST.DAT renamed to WORKING.DAT  when  it  is  copied  to  the
  180.     subdirectory  named  TARGET  on your hard disk.  Hence, we will have to
  181.     tell the system about drive A:    (the  source)  and  drive  C:    (the
  182.     target),  and  we will have to provide the full file names for both the
  183.     source and the target.
  184.  
  185.          If we didn't have directories involved, our copy  command  (inclu-
  186.     ding the renaming of the file) could look like this:
  187.  
  188.               COPY A:TEST.DAT C:WORKING.DAT
  189.     
  190.     But both the source and the target in our example have directories and,
  191.     hence,  we  have to tell the system where to find the file to be copied
  192.     and where to put the copy.  That's  the  job  of  the  path.    A  path
  193.     specification  will  tell the system what route to follow to get to the
  194.     source and another path  specification  will  tell  the  route  to  the
  195.     target.  (When no path is included, the system will look for the source
  196.     either in the current directory or, if you include a drive designation,
  197.     in  the  root  directory  of  the  designated  drive, and the same rule
  198.     applies to the source.)
  199.  
  200.          Thus, in our example, both the source and  the  target  specifica-
  201.     tions  must  tell  the system three things:  the drive designation, the
  202.     path and the file name.  You already know about drive designations  and
  203.     file names.  The reverse slash (\) will  help  us  and  the  system  to
  204.     identify the path.
  205.  
  206.          COPY A:\SOURCE tells the system to go to drive A:  and look in the
  207.     directory  named  SOURCE.    Then we use another \ to identify the file
  208.     name:  COPY A:\SOURCE\TEST.DAT.  That takes care of the command and the
  209.     source  parameter  for our copying example.  (Hold your questions until
  210.     later.  I hope eventually to cover everything  you  have  doubts  about
  211.     now.)
  212.  
  213.          For the target parameter in our example, things get a little  more
  214.     complicated  because of the subdirectory, but you should already have a
  215.     pretty good idea of what we need to do.  Here's the full comand:
  216.  
  217.               COPY A:\SOURCE\TEST.DAT C:\DATA\TARGET\WORKING.DAT
  218.                ^   ^    ^       ^     ^   ^     ^       ^
  219.     command ---^   ^    ^       ^     ^   ^     ^       ^-------- file name
  220.     source drive --^    ^       ^     ^   ^     ^-------- subdirectory path
  221.     directory path -----^       ^     ^   ^----------------- directory path
  222.     file name ------------------^     ^----------------------- target drive
  223.  
  224.          Note that we had to tell the system exactly what route  to  follow
  225.     to  get to the subdirectory in the target.  One reason for this is that
  226.     you may have two or more subdirectories with the same names  but  under
  227.     directories with different names, and the system wouldn't know which of
  228.     those subdirectories you were referring to if you  didn't  include  its
  229.     parent directory in the path.  (The directory under which a subdirecto-
  230.     ry is placed is called the parent of that subdirectory.)
  231.  
  232.          Now let's get to your questions.  What if a subdirectory  has  its
  233.     own  subdirectories?  Are they called sub-subdirectories?  And if there
  234.     are lower levels, are they called sub-sub-subdirectories,  etc.?    You
  235.     can call them that if you want to, but my preference is either to refer
  236.     to the major directories (the ones listed in  the  root  directory)  as
  237.     directories and anything else as a subdirectory, or just to call all of
  238.     them directories, whether they are at the top or bottom or in  between.
  239.     This  possible  confusion is one reason why you should avoid having too
  240.     many levels of subdirectories.  Another reason is  that  it  takes  the
  241.     system longer to find sub-sub-sub-...directories.
  242.  
  243.          Next question:  Why did we include the  first  \  in  our  copying
  244.     example  above  --  wouldn't the system know that SOURCE is a directory
  245.     name?  In this case, the answer is yes, the system would  know  without
  246.     the  first  \.    However, in other cases, it depends on what directory
  247.     your are in when you compose a command and the nature of the command.
  248.  
  249.          To avoid a lot  of  complications,  let  me  suggest  two  things.
  250.     First,  understand  the  distinction between a full path and a relative
  251.     path.  A full path always begins with a \ and includes the entire  path
  252.     specification,  beginning at the root directory.  A relative path never
  253.     begins with a \ and is used to refer to directories below  the  current
  254.     directory (i.e. the one you're in).  Second, I virtually always use the
  255.     full path in order not to have to worry about where I am and whether  I
  256.     can use a relative path, and I suggest you do the same.
  257.  
  258.          Using the full path avoids a lot of confusion.  Assume for example
  259.     that  you are in a directory named WORKING, and that it has a subdirec-
  260.     tory named WORK3.  How would  you  copy  the  file  TEST.DAT  from  the
  261.     WORKING  directory  to  its  WORK3  subdirectory?    If  you enter COPY
  262.     TEST.DAT \WORK3, you will wind up with the TEST.DAT file renamed to  be
  263.     WORK3  and  residing in your root directory!
  264.  
  265.          Thus, if the target is a subdirectory of  the  current  directory,
  266.     you have two choices:
  267.  
  268.               COPY TEST.DAT \WORKING\WORK3
  269.                    or
  270.               COPY TEST.DAT WORK3
  271.  
  272.     The first example avoids all confusion by including the full path.   In
  273.     the  second example, using a relative path, the system assumes that you
  274.     know what you're doing and shows how smart it is, which brings  up  and
  275.     answers another question (and explains the second example).
  276.  
  277.          Is it possible to have a file and a  subdirectory  with  the  same
  278.     name  in  the same directory?  No.  In the command COPY TEST.DAT WORK3,
  279.     you might have intended just to make a copy of TEST.DAT with a new name
  280.     (WORK3) in the current directory.  But that would require the system to
  281.     issue an error because you can't have a file and  a  subdirectory  with
  282.     the  same  name  in the same directory.  So, the system tries to find a
  283.     way to comply with the command without issuing an error message, and it
  284.     does  so  by  copying  the file to the WORK3 subdirectory.
  285.  
  286.          In this and other commands,  DOS  is  smart  enough  to  make  the
  287.     distinction between directory and file names by reading all elements of
  288.     the command in context and trying to find some way to make the  command
  289.     work  before  issuing an error message.  In this regard, i.e. confusing
  290.     file names with directory names, you will make  more  errors  than  DOS
  291.     will.
  292.  
  293.          If the command were CD instead of COPY, the system  wouldn't  have
  294.     to  make  a  decision  because  the only parameter that CD accepts is a
  295.     directory name and there can't be any confusion with file names.  Thus,
  296.     if you're in WORKING and want to change to WORK3, you can enter:
  297.  
  298.               CD WORK3 (relative path)
  299.                    or
  300.               CD \WORKING\WORK3 (full path)
  301.  
  302.          Confused?  I don't blame you -- and I haven't even  mentioned  the
  303.     use of two dots to designate the parent directory of a subdirectory.  I
  304.     don't use the dots (CD ..).  For any command, I always use a \ before a
  305.     directory  name and include the full path, rather than take the time to
  306.     figure out what the command requires, where I am and whether I need the
  307.     \  or  not.   And to change directories, I virtually always use my file
  308.     manager program and  thereby  avoid  having  to  type  in  slashes  and
  309.     directory names and, again, I suggest you do the same.
  310.  
  311.          In the command COPY \WORKING\TEST.DAT WORK3, how does DOS know  if
  312.     TEST.DAT is a directory or a file name?  It's not because of the period
  313.     and extension, since you could use that name for a directory.    (We'll
  314.     discuss that issue another time.)   No, it's because DOS won't let  you
  315.     copy a directory, so DOS assumes that TEST.DAT is a file name.  You can
  316.     only create a directory using MD.
  317.  
  318.          Here's a side issue.  I said that you can only create a  directory
  319.     with  the  MD  command.    But  if you've ever used PKMOVE, a shareware
  320.     utility by Phil Katz, you may know that his utility enables you to move
  321.     a  file  to  a  directory  that  doesn't yet exist.  PKMOVE creates the
  322.     directory in this case, a very handy feature.  Because of that feature,
  323.     PKFIND  does sometimes get confused about whether the last entry in the
  324.     move command is a file or a directory name.  In that case, the  program
  325.     asks  you  which  it  is.   This is just one of many examples of astute
  326.     programmers coming up with utilities with features that DOS should have
  327.     had in the first place.
  328.  
  329.                         Hard Disk Organizational Steps
  330.     
  331.          Up to this point, we've discussed a lot of preliminary  considera-
  332.     tions  (and  more  why's  than I had intended) prior to organizing your
  333.     hard disk.  Now let's get to the main event:  organizing the hard disk.
  334.     I'm going to make a real effort to avoid any why's  that  aren't  abso-
  335.     lutely necessary, stick to the how's, and avoid  alternatives  whenever
  336.     possible.    If  you  want  alternatives,  you'll  have to find another
  337.     article or read your DOS manual (ugh!).
  338.  
  339.     1.  A Single DOS Partition.
  340.     
  341.          When you configure and format your hard disk, make the entire disk
  342.     a  single  DOS (bootable) partition.  Just follow the instructions that
  343.     come with the hard disk or in your  DOS  manual  and,  when  the  issue
  344.     arises, set it up so that the whole disk is one DOS partition.
  345.  
  346.          Also, if you have a choice, configure your system  so  that,  when
  347.     you  turn  it on, it automatically boots from the hard disk.  (This may
  348.     require you to change a switch setting inside the  computer  itself  --
  349.     check  the computer manual.)  On my Heath/Zenith HS-148, when I turn on
  350.     the computer, it looks for a disk in drive A and  tries  to  boot  from
  351.     there.    If  there is no disk in drive A, it boots from the hard disk.
  352.     This procedure requires an extra moment or  two  for  booting,  but  it
  353.     makes  it  easy to boot from a floppy if I ever have a problem with the
  354.     hard disk.
  355.  
  356.     2.  Create Directories
  357.     
  358.          It's important to limit the content of your root directory to your
  359.     major  directory  names and certain key files.  You shouldn't have more
  360.     than 40-50 entries in  your  root  directory.    I  have  35  in  mine.
  361.     Therefore,  prior  to  creating  any  directories,  it's a good idea to
  362.     review your software collection and determine ahead of time some of the
  363.     major directories you will create.  You don't need to think of them all
  364.     -- some will occur to you as you are copying files from your  floppies,
  365.     and  also  you  will  probably  want to change some of them during file
  366.     copying.
  367.  
  368.          If you aren't already in the root  directory  of  your  hard  disk
  369.     (which I'm going to assume is drive C:), enter CD C:\ and that will put
  370.     you there.  Then begin creating your major directories with the command
  371.     MD <directoryname>.  For example:  MD BAT will create a directory named
  372.     BAT.  The following are  some  examples  of  major  directories  to  be
  373.     located in the root directory (you may  want  to  give  them  different
  374.     names):
  375.  
  376.               BAT -- This directory will hold all your batch (.BAT)  files.
  377.                      More about batch files later.
  378.  
  379.               BIN -- This is the place for all your miscellaneous .COM  and
  380.                      .EXE programs, including those from your DOS distribu-
  381.                      tion disks.  (BIN stands for binary, but I think of it
  382.                      as  a  storage  bin  where I keep all executable files
  383.                      that don't apply to any other specific category/direc-
  384.                      tory.)  Why this directory is a good idea  will become
  385.                      clear  when  we  discuss  the  PATH  command  in  your
  386.                      Autoexec.Bat file.
  387.  
  388.          CODEWRKS -- This is an example of a specific major directory in my
  389.                      root directory.  I've done some free-lance programming
  390.                      and writing for a small magazine  called  "CodeWorks".
  391.                      The CODEWRKS directory has 3 subdirectories:  LETTERS,
  392.                      PROGRAMS and TXT-DOC.  The content of  the  first  two
  393.                      should   be  self-explanatory.    The  third  contains
  394.                      articles and the documentation files for the programs.
  395.  
  396.          COMPILER -- I keep all programs related to the Basic  Compiler  in
  397.                      one directory, except LINK.EXE, which is in BIN.
  398.  
  399.           CORRESP -- All  miscellaneous  correspondence  created  on    the
  400.                      computer  could  be  kept  in  this  directory and its
  401.                      subdirectories.  I use subdirectories for past  years'
  402.                      correspondence.    Correspondence  related  to  other,
  403.                      specific directories would  be  kept  in  those  other
  404.                      directories, for example in a LETTERS subdirectory.
  405.  
  406.          DESKTOPS -- This is where you could keep desktop utilities,  using
  407.                      subdirectories under this directory for each one (e.g.
  408.                      Sidekick, Perks-PC, RHM, etc.).
  409.  
  410.             GAMES -- This is the place for individual game programs.  Major
  411.                      game systems that include more than one program and/or
  412.                      several data files could go in subdirectories  or,  if
  413.                      you use them regularly, in major directories.
  414.  
  415.            MODEMS -- This is where I keep my communications software.   The
  416.                      program  I use most often is in this directory and the
  417.                      others are in their own subdirectories.
  418.  
  419.          MY-PROGS -- This is where I keep the programs that I have written.
  420.                      Systems of  programs  (e.g. WIN$BIG)  have  their  own
  421.                      subdirectories  under this one and they may be further
  422.                      subdivided into BAS, EXE and DOC sub-subdirectories.
  423.  
  424.              TEXT -- I use this directory for all  non-correspondence  text
  425.                      files,  except  text files clearly applicable to other
  426.                      specific directories (such as program DOC files).
  427.  
  428.           WORKING -- I use this directory and  its  subdirectories,  WORK1,
  429.                      WORK2,  WORK3  and  WORK4,  for  all  types of work in
  430.                      progress, i.e. programming and writing projects.
  431.                      
  432.     Those should be enough examples to give you an idea  of  the  types  of
  433.     major  directories  you will want to have in the root directory of your
  434.     hard disk.
  435.  
  436.     3.  Creating and Copying Files for the Directories
  437.     
  438.          You'll find yourself faced with decisions as to where  some  items
  439.     should go.  For example, does the FORD simulator go in a major directo-
  440.     ry or in a subdirectory someplace?  Base your decision on  two  princi-
  441.     ples:  limit the major directories to those you will  access  regularly
  442.     and/or  keep  the  number  of  major  directories as small as possible.
  443.     (FORD is currently a major directory on my hard disk, but it will  soon
  444.     be  relocated to a subdirectory, probably under GAMES, when the novelty
  445.     wears off.)
  446.  
  447.          If you find that you want to  re-organize,  before  having  copied
  448.     files  to  the  directories,  remember:    RD  <directoryname>  deletes
  449.     (removes)  a  directory  name,  CD  <directoryname>  creates  one,  and
  450.     RENDIR.COM and other utilities are available to rename a directory.
  451.  
  452.          Let's start with the root directory's essential files.  You should
  453.     have  in  your  root  directory:    the  COMMAND.COM  file from the DOS
  454.     distribution disk, an AUTOEXEC.BAT file, a  CONFIG.SYS  file,  and  any
  455.     other  files  with  the  SYS extension, such as ANSI.SYS and VDISK.SYS,
  456.     from your DOS  distribution  disks.    (IO.SYS  and  MS-DOS.SYS  should
  457.     already  be  hidden  in  the root directory from when you formatted the
  458.     hard disk.)  It's not necessary to put  in  the  root directory  system
  459.     files  that you will never use, but I find it just as convenient, given
  460.     the huge amount of space available, to have ALL my software on my  hard
  461.     disk.    Therefore, all my SYS files are in the root directory.
  462.     
  463.     Here's what to do about Config.Sys and Autoexec.Bat:
  464.  
  465.     CONFIG.SYS
  466.     
  467.          This file can be created with a text editor or by simply  entering
  468.          COPY CON CONFIG.SYS and then entering the lines shown below.    If
  469.          you  use  the latter procedure, end the file by entering Ctrl-Z or
  470.          by pressing the F6 key.  Then use TYPE CONFIG.SYS to  verify  that
  471.          it's  the way you want it.  If you use a text editor, make sure it
  472.          saves the file in  straight  ASCII,  with  no  special  formatting
  473.          codes.
  474.  
  475.          Here's what to put in the CONFIG.SYS file (see your DOS manual for
  476.          an explanation of each item):
  477.  
  478.               BUFFERS=15
  479.               FILES=20
  480.               BREAK=ON
  481.               
  482.          If you want to have a 64K RAM disk, include also:
  483.               
  484.               DEVICE=VDISK.SYS
  485.  
  486.          (If you have the shareware RAMDISK program, which is more flexible
  487.          and  easy  to use, include DEVICE=RAMDRV.COM instead of the above,
  488.          and include the RAMDRV.COM file in  the  root  directory  and  the
  489.          RAMDISK.COM file in the BIN directory.)
  490.  
  491.          If you will be using ANSI.SYS regularly (not recommended unless  a
  492.          regularly-used application specifies it), include:
  493.  
  494.               DEVICE=ANSI.SYS
  495.  
  496.          If you have DOS version 3, you could also include:
  497.  
  498.               SHELL=C:\COMMAND.COM C:\ /P /E:20
  499.  
  500.          That's an undocumented feature of DOS 3.x that  will  expand  your
  501.          environment  to enable you to have more space for a longer PATH, a
  502.          more complicated prompt, and other items included in the  environ-
  503.          ment  strings.  I'm told that it will not work under all types and
  504.          versions of DOS (e.g.  PC-DOS 3.0 on an IBM-AT), but it does  work
  505.          under Zenith MS-DOS version 3.10 -- provided that it is  the  LAST
  506.          entry  in  the Config.Sys file.  The 20 can be anything from 10 to
  507.          64.
  508.  
  509.     AUTOEXEC.BAT
  510.               
  511.          You create this the same way  you  created  the  CONFIG.SYS  file,
  512.          since  both  are simply ASCII text files.  It will contain all the
  513.          items that you want set  up  automatically  each  time  you  boot.
  514.          Rather  than  try to explain all the possible items that you could
  515.          include, I'm going to list some of the lines  in  my  Autoexec.Bat
  516.          file and explain each one briefly.
  517.  
  518.          ECHO OFF
  519.          CLS
  520.          ECHO Max. Environment size expanded to 320 bytes via SHELL
  521.          ECHO in CONFIG.SYS file.  For default size (160 bytes), delete
  522.          ECHO `SHELL' line and reboot.  To change size, edit last para-
  523.          ECHO meter of `SHELL' (20) to be anything from 10 to 64.
  524.          CLS
  525.  
  526.               The  ECHO  OFF  command  avoids  having  all  the  subsequent
  527.               commands  printed  on the screen when they are executed.  The
  528.               second line clears the screen.  The ECHO command may be  used
  529.               to  print  on  the  screen  any comments that you want to see
  530.               while this file is executing.  In this case, I used ECHO  for
  531.               a  note  to remind myself how to change environment size.  It
  532.               only stays on the screen for a second because of  the  subse-
  533.               quent CLS, but it's enough for the reminder that I want.
  534.  
  535.          PATH C:\;C:\BAT;C:\BIN;C:\COMPILER;C:\MACE;C:\SPEAK
  536.          CLS
  537.  
  538.               This should be one of the first entries in your  Autoexec.Bat
  539.               file.    The  PATH command tells the system where to look for
  540.               programs if you don't specify where they are when  you  enter
  541.               the program name.  This is very handy and is the reason why I
  542.               said to put all your miscellaneous COM and  EXE  programs  in
  543.               one directory, which I named BIN, and all your batch files in
  544.               a directory named BAT, etc.  Once you  have  all  your  files
  545.               where  you want them and then set up the PATH command proper-
  546.               ly, you can forget where you put everything  and  the  system
  547.               will  find  things  for you.  All you have to remember is the
  548.               program name.  Proper use of PATH will  make  your  computing
  549.               easier and faster.
  550.  
  551.               The PATH line is easy to compose.  All  you  have  to  do  is
  552.               enter  each drive and/or directory in the order that you want
  553.               the system to search them, and separate  each  entry  with  a
  554.               semicolon (;).
  555.               
  556.               My path, as shown above, starts with the  root  directory  of
  557.               the hard disk (C:\), followed by the BAT, BIN, COMPILER, MACE
  558.               and SPEAK directories.   I  included  the  drive  designation
  559.               before  each  directory  name (e.g.  C:\BIN) so that the PATH
  560.               will be effective even when I'm in drive A: or B:.
  561.  
  562.               A good example of how this works is when I am writing a Basic
  563.               program  and I want to compile it.  Regardless of which drive
  564.               or directory I am in, I can simply  enter  COMPILE  <program-
  565.               name>  to begin compiling.  (I renamed my compiler to COMPILE
  566.               for convenience.)  The system then searches  for  COMPILE  in
  567.               each  of  the  locations  specified  by  PATH  and  finds it,
  568.               together  with  all  other  compiler-related  files  in   the
  569.               COMPILER  directory  (the  fourth  entry  in the PATH command
  570.               line).
  571.  
  572.               Note that I use CLS after each new command in the  Autoexec.-
  573.               Bat  file  to  clear  the screen of anything displayed by the
  574.               command being executed.  It also makes the Autoexec.Bat  file
  575.               easier to read when you want to edit it.
  576.  
  577.          MODE ,L
  578.          CLS
  579.  
  580.               The MODE command moves my display one  column  to  the  left.
  581.               I've never been able to figure  out  why  virtually  all  PC-
  582.               compatible  displays  are  skewed to the right of the screen.
  583.               In any case, this solves that problem.
  584.  
  585.          SETCLOCK C
  586.          CLS
  587.  
  588.               This sets the system clock from a battery-driven clock on one
  589.               of my expansion boards.
  590.               
  591.          SNIPPER
  592.          CLS
  593.  
  594.               This is a memory-resident program that permits me to save  or
  595.               print any part or all of the screen display at any time.
  596.  
  597.               The best way to handle all of your  memory-resident  programs
  598.               is  to  toss  them in the BIN, call them in your Autoexec.Bat
  599.               file like this, and let PATH figure out where they are.
  600.  
  601.          SCRDIM 5
  602.          CLS
  603.               
  604.               This  memory-resident  program  clears  the  screen  after  5
  605.               minutes with no activity.
  606.  
  607.          OLIVETTI
  608.          CLS
  609.  
  610.               This is  the  graphics  driver  for  my  not-compatible-with-
  611.               anything printer.  The driver is for the Shift-PrtSc function.
  612.  
  613.          TIMEPARK 5
  614.          CLS
  615.  
  616.               This memory-resident utility parks the head of my  hard  disk
  617.               in a safe place after 5 minutes without activity.
  618.  
  619.          BLINKER
  620.          CLS
  621.  
  622.               This memory-resident utility shows an asterisk in  the  upper
  623.               right  corner of the monitor screen whenever the hard disk is
  624.               accessed.  It's the only way I  have  of  knowing  when  disk
  625.               access  occurs  because  the  hard  disk is on a board buried
  626.               inside the computer.
  627.  
  628.          PROMPT $_$t  $d$_$sDirectory $p$_$_$sCommand --$g $
  629.          CLS
  630.          
  631.               This sets up my customized prompt.  Here's  what  the  prompt
  632.               looks like:
  633.  
  634.                         8:20:46.05  Mon  3-07-1988
  635.                         Directory C:\WORKING
  636.  
  637.                         Command -->
  638.     
  639.               Your DOS manual will explain how to use the  PROMPT  command,
  640.               but  feel  free  to use mine if you like it.  (By the way, it
  641.               only took me a few seconds, using  SNIPPER,  to  capture  the
  642.               prompt display at the DOS level, save it in a file and insert
  643.               it (via the text editor) above this paragraph.
  644.  
  645.          COPYSAFE
  646.          CLS
  647.          
  648.               This memory-resident utility warns me if I try to copy a file
  649.               to a location that already has a file with the same name.
  650.  
  651.          CACHE 128 /c /t
  652.          CLS
  653.          
  654.               This is one of the MACE Utilities.   It  establishes  a  128K
  655.               disk cache that speeds up hard disk access significantly.
  656.  
  657.          M
  658.  
  659.               This last entry in my Autoexec.Bat file calls  a  batch  file
  660.               that  I created named M.BAT that prints a menu of commands on
  661.               the screen.
  662.  
  663.          That completes my  suggestions  for  what  to  keep  in  the  root
  664.     directory  of  your  hard  disk  and  what goes in the Autoexec.Bat and
  665.     Config.Sys files.  Some of your application programs will require  that
  666.     you  have  additional  files  in your root directory.  That's fine, but
  667.     keep the number of files in the root directory as  small  as  possible.
  668.     In  some  cases, you will be able to use the SET command (preferably in
  669.     the Autoexec.Bat  file)  to  direct  an  application  program  to  some
  670.     location other than your root directory for the files needed.  Usually,
  671.     the application program will suggest this when it's possible.  (See SET
  672.     in your DOS manual.)
  673.  
  674.          As for copying files from your floppies to other directories,  the
  675.     procedure  is  already  familiar  to you.  In most cases, you should be
  676.     able to use wildcards (?  and *).  Here's a hint:  use CD to go to  the
  677.     directory  to which you are about to copy files.  Then, if you're going
  678.     to copy all the files from a disk in drive  A:,  you  can  just  enter:
  679.  
  680.               COPY A:*.*
  681.  
  682.     Note that you don't have to  specify  the  target  drive  or  directory
  683.     because  the  current drive and directory are the defaults for the COPY
  684.     command.  (Ain't DOS grand?!)
  685.     
  686.     4.  Items for the BAT Directory
  687.     
  688.          Batch files can be a tremendous help, especially when they're  all
  689.     together in one directory where they can be found by the system via the
  690.     PATH established in the Autoexec.Bat file.  Batch files  save  a  whole
  691.     lot of typing (not to mention thinking and remembering).
  692.  
  693.          For programs that you use  regularly,  it's  a  simple  matter  to
  694.     rename them to something easier to remember.  For example, I renamed my
  695.     text editor so that all I have to enter is E.  (It's  in  the  BIN  and
  696.     PATH tells the system to look for it there.) But some programs can't be
  697.     renamed for a variety of  reasons  and  others  may  be  located  in  a
  698.     directory  that's  not  part  of  your PATH.  (Skipping the why's here,
  699.     Boss.) You can still rename such programs, and/or avoid having to enter
  700.     the  path along with the program name, by creating a batch file, giving
  701.     it the name you want to give the program, and including  in  the  batch
  702.     file the path and name of the program.  Batch files  are  simply  ASCII
  703.     text files with the .BAT extension.  They are created the same way that
  704.     I described above for the Autoexec.Bat and Config.Sys files.
  705.  
  706.          For example, suppose that you have a game  named  FUN$-6PQ.EXE  in
  707.     the  WEIRD  subdirectory of your GAMES directory, and assume that GAMES
  708.     is not listed in the PATH command in your Autoexec.Bat file.    If  you
  709.     play  that  game  often, you could make your life simpler by creating a
  710.     batch file named FUN.BAT with the following lines:
  711.  
  712.               ECHO OFF
  713.               CLS
  714.               \GAMES\WEIRD\FUN$-6PQ.EXE
  715.     
  716.     Then you could play the game from any directory by just entering FUN.
  717.     
  718.          To give you some ideas, the following are some of the batch  files
  719.     and their contents from my BAT directory.
  720.     
  721.          M.BAT
  722.     
  723.               ECHO OFF
  724.               CLS
  725.               CD \
  726.               TYPE MENU
  727.  
  728.               ------------------------------------------------------------
  729.               Note:  M is the last entry in my Autoexec.Bat  file  and  the
  730.                      result  is  that,  when  the system finishes, I have a
  731.                      command menu on the screen.  Here's what the MENU text
  732.                      file contains:
  733.  
  734.               Custom Commands     Purposes  (Enter M for this Menu)
  735.               ~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736.               B                   Load GW-BASIC Interpreter
  737.               E                   Load PTP Text Editor
  738.               CB                  Split-screen Comm. for CIS CB @ 1200 baud
  739.               EQ                  Run Schwab Equalizer stock portfolio program
  740.               FM                  Run File Manager Program
  741.               FY                  Run Fontasy fonts and graphics program
  742.               MK                  Load Masterkey Utilities (includes Unerase)
  743.               COMM                Load Access Modem Communications Program
  744.               GAMES               Display Games Menu
  745.               CLOCK               Display World-Time Clock
  746.               BACKDAY             Backup New/Updated Files to Drive B
  747.               DIRNOTES            Display or write comments about each file
  748.               WHEREIS fname       Find Named File
  749.               SPELL <filename>    Run Spelling-Checker on named file
  750.               CIS300 or CIS1200   Connect to CompuServe at 300 or 1200 Baud
  751.  
  752.                      This is also a good example of using one batch file to
  753.                      call  another  batch file.  For example, I end many of
  754.                      my batch files with M, with the result that everything
  755.                      ends in the root directory with the menu displayed.
  756.               ------------------------------------------------------------
  757.  
  758.          BACKALL.BAT
  759.                    
  760.               ECHO OFF
  761.               CLS
  762.               CD \
  763.               ECHO Hard Disk Full-Backup Routine to Drive A:
  764.               ECHO ...
  765.               BACKUP *.* A:/E:IO.SYS+MSDOS.SYS+COMMAND.COM/G/N/R
  766.               CLS
  767.  
  768.               ------------------------------------------------------------
  769.  
  770.          BACKDAY.BAT
  771.  
  772.               ECHO OFF
  773.               CLS
  774.               C:
  775.               CD \
  776.               ECHO DAILY Hard Disk Backup Routine
  777.               ECHO Copying to Drive B all files dated today ...
  778.               BACKUP C:*.* B:/A/G/N/R/T/Q
  779.               ECHO Copying to Drive B all files changed since last backup ...
  780.               BACKUP C:*.* B:/A/G/N/R/W/Q
  781.               M
  782.  
  783.               ------------------------------------------------------------
  784.  
  785.          LINK.BAT
  786.  
  787.               C:\BIN\LINK %1,,NUL.MAP,C:\COMPILER\BRUN20G.LIB;
  788.  
  789.               ------------------------------------------------------------
  790.  
  791.          TAMPABBS.BAT
  792.                      
  793.               ECHO OFF
  794.               CLS
  795.               CD \MODEMS
  796.               ACCESS2 TAMPABBS
  797.               CD \
  798.               CLS
  799.               M
  800.  
  801.               ------------------------------------------------------------
  802.  
  803.          CLOSE.BAT
  804.  
  805.               ECHO OFF
  806.               CLS
  807.               ECHO Squeezing directories (eliminating deleted files space) ...
  808.               SQZD C:
  809.               CLS
  810.               CD \
  811.               ECHO Enter PARK and press Return ...
  812.  
  813.               ------------------------------------------------------------
  814.               Note:  This is the batch file I call when I  finish  for  the
  815.                      day, after having performed the daily backup.  SQZD is
  816.                      one of the MACE utilities.
  817.               ------------------------------------------------------------
  818.  
  819. 5.  Backing Up the Hard Disk
  820.     
  821.          Once you've completed the organization  of  your  hard  disk  with
  822.     directories and subdirectories full of files, the final step is to make
  823.     a full backup copy on floppies.  DOS has  a  BACKUP  program  for  that
  824.     purpose  and  there are several shareware programs that will do the job
  825.     and may do it better.
  826.  
  827.          Before doing the backup, however, consider this:  it takes a  long
  828.     time and, the more files you have, the longer it takes.  Why not reduce
  829.     that time by reducing the number  of  files  and,  at  the  same  time,
  830.     providing  more  free  space  on  the  hard disk?  How?  Use an archive
  831.     utility (PKX35A35.ARC is available  on  most  BBS's)  to  compress  and
  832.     combine  files  that  you  seldom if ever use.  For example, DOS has 12
  833.     KEYBxxx.COM files that you will rarely use.  Archive them into KEYB.ARC
  834.     with  a  space  savings  of  32% and a reduction of 11 in the number of
  835.     files that have to be backed up.  I'm sure you can find other  examples
  836.     for this type of time and space savings.
  837.  
  838.          That's about all I have to say on the subject of getting organized
  839.     with  a  hard  disk.  I hope you found it useful.  For some ideas as to
  840.     what types of programs and utilities it might be convenient to have  on
  841.     your  hard disk, in addition to those mentioned above, read my software
  842.     reviews in other issues of "Skip's Computer Miscellanea" and in "Skip's
  843.     Download Reviews" available on this and other BBS's.
  844.  
  845.                                 *****-30-*****
  846.