          ADVANCED DOS HINTS & TIPS

---------------------------------------------

                   DRIVE Z

This tip allows you to have up to 26 virtual
disk drives ranging from A: to Z:.  These can
use actual space on your hard disk, on a RAM
disk or on a floppy.

1. In your CONFIG.SYS file, add the line:
   LASTDRIVE=Z

2. Make sure SUBST.EXE (comes with MS-DOS)
   is in your root directory

3. In your AUTOEXEC.BAT file, or from the
   DOS prompt, type:

SUBST Z: C:\SUB-DIRECTORY\SUB-SUB-DIRECTORY

   where z: is any letter between A and Z
   which is not an actual drive. C: is the
   drive which contains the files and the
   sub-directory(ies) is the current path.

4. Simply use the new drive as if it were
   another disk drive.

---------------------------------------------

                  SHORTCUT

This tip speeds up file operations at the
DOS prompt with MS-DOS 3.0 or newer.  Instead
of the wildcard specifier *.* which means
"all files" simply type a period.  The
following statements work on all files within
a directory:

DEL .      - Deletes all files in directory
COPY . A:  - Copies all files in directory
             to A:
DIR ./W    - Lists all files in directory
             in wide format.

---------------------------------------------

                FORCE FORMAT

Do you want to format a 1.44 meg floppy as
720k, or format a 1.2 meg disk as 360k?  Here
are the commands:

   format /f:720
       or
   format /f:360

---------------------------------------------

              PRINTING GRAPHICS

MS-DOS comes with a small TSR program called
GRAPHICS.COM which allows you to print a
graphic mode screen image to paper.  Simply
type GRAPHICS and press [Enter] from within
your root or DOS directory, then run your
graphics program.  When you have something
on the screen which you want to print, hold a
[Shift] key and simultaneously press the
[Print Screen] key.  On older versions of
MS-DOS this only works in CGA graphics.

---------------------------------------------

               MIXED VERSIONS

You can use programs which came with older
versions of MS-DOS with Version 5 or greater
by using SETVER.EXE first.  See your MS-DOS
manual.  An example is the KEYBDV.COM which
came only with MS-DOS version 3.20.  This
changed the positions of the characters on
the keyboard to the more efficient (but hard
to learn) Dvorak configuration.  Now you can
use it with Ver 5.0 or greater.

---------------------------------------------

                    XCOPY

If you have a 3.5" drive and a 5.25" drive,
you may wish for a more efficient way to copy
all files from one to the other than COPY
*.*. This is especially annoying if the
floppies have sub-directories.  Use XCOPY.EXE
which comes with MS-DOS.  XCOPY will copy
all files on one disk onto another even if
the disks are of different type.  With the
most recent version you even sub-directories
are faithfully preserved. Here are some
examples of XCOPY:

XCOPY A: B: - Will copy everything in root
   directory of disk in A: to the disk in B:

XCOPY C:\STUFF A: - Will copy everything in
   STUFF sub-directory to A:

XCOPY B: A:/S - Recent version only - will
   copy entire B: disk, complete with
   sub-directories onto A: disk, and
   replicate the sub-directories.

---------------------------------------------

          MAKE YOUR OWN MENU SYSTEM

Writing circular batch files is quite easy
and makes fancy "menu maker" programs look
silly.  With this technique, your computer
will automatically show a menu, then allow
the you to pick a program simply by pressing
a number. For this example, we'll pretend
that you use a word processor called
WORDX.EXE, a game called AQUALUNG.EXE, and
The 21st Century Almanac.  We'll put these
programs in their own fictitious
sub-directories.

1.  Make a menu with any editor or word
processor which produces standard ASCII
files.  The menu is a text file with less
than 25 lines of text.  Let's call the menu
"MENU.TXT." Our example looks like this:

                MY MAIN MENU
                ^^^^^^^^^^^^
   (Type  1, 2 or 3, then press [Enter].)

                  1. WORDX
                 2. AQUALUNG
           3. WHAT'S IN THAT BOX?


2. Put these lines at the end of your
   AUTOEXEC.BAT file:

         CLS
         TYPE MENU.TXT

   The first line, CLS, simply CLears the
   Screen. The second line uses the DOS
   command TYPE to present the menu.

3. Make a batch file called 1.BAT with your
   word processor (in ASCII mode).  It will
   contain these lines:

         CD \WORDPROC
         WORDX
         CLS
         TYPE MENU.TXT

    The first line Changes the Directory to
    the one containing your word processing
    program.  The second line actually runs
    the WORDX program.  When you are done
    with word processing, the next line is
    executed, which Clears the Screen and
    again displays the menu.

4. Make another batch file, this one called
   2.BAT, which will run AQUALUNG if the user
   types 2. It will contain these lines:

         CD \GAMES
         AQUALUNG
         CLS
         TYPE MENU.TXT

5. And make 3.BAT, which will look like
   this:

         CD \WBOX
         WBOX
         CLS
         TYPE MENU.TXT

    As you can guess, this third batch file
    will run the Universal Converter when you
    type 3 at the DOS prompt.

    And your menu system is all finished.
When the computer starts, the menu is
displayed on the screen.  It contains three
choices. At the bottom of the menu is the DOS
prompt.  You can type anything (as usual) at
the prompt, but are invited to type 1, 2 or
3.  Doing so will start one of the three
batch files, and the program of your choice
will run.  When done with that program, the
menu reappears.

---------------------------------------------

                RENAME A FILE

There are many ways to rename a file, but
the easiest at the DOS prompt is to use the
DOS command REN like this:

    REN LIZARDS.TXT TOADS.DOC';

This renames the file called LIZARDS.TXT so
it will now be known as TOADS.DOC. This works
equally well with .EXE and .COM files, but
they must have the same extension when
renamed or they won't run.

---------------------------------------------

                EASY PRINTING

What's the fastest way to print a text file
to paper? At the DOS prompt type:

     COPY FILENAME.EXT PRN

To print text displayed on your monitor at
any time, if your printer is ready, simply
hold a [Shift] key and simultaneously press
the [Print Screen] key.

---------------------------------------------

              CLEAR THE SCREEN

If you've been fooling around at the command
line on company time, when the boss comes
around type CLS and press [Enter].  This
blanks the screen.

---------------------------------------------

              FOR TOUCH TYPISTS

If you are a touch-typist, you may not like
the long stretch the the [Esc] key or other
non-alphanumeric keys.  Here are some
substitutions which work in most programs:

[Pause] = [Ctrl] + [S]
[Esc] =   [Ctrl] + [/]
[Break] = [Ctrl] + [C]
[Bksp] = [Ctrl] + [H]

and [Ctrl] + [P] at the DOS prompt will turn
on the printer to faithfully reproduce
everything you do at the DOS prompt until you
press [Ctrl] + [P] again.

---------------------------------------------

              VARIATIONS OF DIR

You probably know the DOS DIR command to
display files. Here are some variations:

DIR *.* /P - Shows everything in the current
             directory, but waits for you to
             press a key, if there are more
             files than will fit on the
             screen at one time.

DIR A: /W  - Similar to above, but shows all
             files in current directory of
             A: drive, and displays files in
             columns so many more can fit on
             the screen.

DIR FILENAME.EXE - Shows only one file, the
             one you have specified, and
             it's size, date, etc.

DIR *.DOC - Shows all files in current
            directory which have extension
            of .DOC.

DIR /?  -   Only available in MS-DOS version
            5.0 and later.  This lists
            several more DIR options.
            Notice in particular /O which
            will display files in a sorted
            order.

---------------------------------------------

             EDIT THE DOS PROMPT

You can do neat things with the DOS prompt
itself.  To edit the prompt, type PROMPT
followed by a space, then one or more of the
following codes:

  $P   Current drive and path
  $T   Current time
  $D   Current date
  $N   Current drive
  $G   >
  $L   <

Type these lines at your DOS prompt or
within your AUTOEXEC.BAT file and get the
following effects:

PROMPT $P$G - This is the most common
    variation.  It shows the current
    directory as well as the current drive.

PROMPT $T$G$G$G$G - Tells time of day
    followed by >>>>

PROMPT YES! $P$G - As you can see, text can
    be inserted verbatim.

PROMPT - followed by no parameters restores
    default prompt.

---------------------------------------------

              CHANGE TEXT COLOR

You can change the color of text at the DOS
prompt and in many programs on CGA, EGA and
VGA systems with the PROMPT command.  For
this to work, ANSI.SYS, NANSI.SYS, TANSI.SYS
or something similar must be installed in
your CONFIG.SYS file. Type this command
(make sure not to use capital letters):

    prompt $e[35m$p$g';

but you can substitute 35 for one of these
numbers: 33 for amber, 34 for blue, 36 for
gray, 32 for green, 35 for purple, 31 for
red, or 37 for white.  For example, to
type in amber text, type this at your DOS
prompt before you start a program:

    prompt $e[33m$p$g

This will not work for all programs, because
some take over screen colors when they start.

_____________________________________________
                                 end of file.
