home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / 4os225b.zip / TOUR.DOC < prev    next >
Text File  |  1994-10-12  |  60KB  |  1,331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                        4DOS
  13.  
  14.                                        4OS2
  15.  
  16.                                 4DOS for Windows NT
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                                     Guided Tour
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                                    Published By
  31.  
  32.                                  JP Software Inc.
  33.                                    P.O. Box 1470
  34.                              East Arlington, MA 02174
  35.                                       U.S.A.
  36.  
  37.                                   (617) 646-3975
  38.                                 fax (617) 646-0904
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.         Copyright 1993 - 1994, JP Software Inc., All Rights Reserved.  4DOS
  49.         is a registered trademark and 4OS2, JP Software, and the JP
  50.         Software logo and product logos are trademarks of JP Software Inc.
  51.         Other product and company names are trademarks of their respective
  52.         owners.
  53.  
  54.                                                                       10-94
  55.                                                           Starting The Tour
  56.         -------------------------------------------------------------------
  57.  
  58.  
  59.  
  60.         A GUIDED TOUR OF 4DOS, 4OS2, and 4DOS/NT
  61.  
  62.  
  63.         This booklet will acquaint you with some of the features of 4DOS,
  64.         4OS2, and 4DOS/NT.  It isn't a substitute for the other manuals,
  65.         but it will help you understand how familiar our products seem if
  66.         you are used to the traditional command prompt, and it will
  67.         introduce you to many of our most popular features and
  68.         enhancements.  By the time you finish this guided tour, you will
  69.         have a feeling for how easy and friendly 4DOS, 4OS2, and 4DOS/NT
  70.         are compared to the traditional command processor.
  71.  
  72.         This tour is interactive.  Sit down at your computer with this
  73.         booklet.  Each time an example is shown, try it.  The tour will
  74.         create all of the files it uses;  it won't modify or change your
  75.         existing files and subdirectories at all.  Each section of the tour
  76.         is self-contained so you can skip any sections you wish and return
  77.         to them later.
  78.  
  79.         In this tour we won't attempt to cover all the details of each
  80.         feature we introduce.  If you want complete information about any
  81.         command or topic discussed in the tour, see the online help or the
  82.         Reference Manual.  If you come across terms or concepts that you
  83.         are unsure about, refer to the General Concepts chapter, the
  84.         Glossary, or the Index in the Reference Manual.
  85.  
  86.  
  87.         Starting The Tour
  88.  
  89.              Before you can start the tour, you need to install your new
  90.              command processor.  If you haven't done so yet, see the
  91.              Introduction and Installation Guide for instructions.  Select
  92.              "Tour Installation" from the INSTALL menu to copy the
  93.              necessary files to your disk without making any modifications
  94.              to your system configuration files.  If you have already done
  95.              a full installation and 4DOS, 4OS2, or 4DOS/NT is running on
  96.              your system, just skip the step below where the command
  97.              "4DOS", "4OS2", or "4NT" is entered.
  98.  
  99.              During the course of the tour, we'll ask you to enter several
  100.              commands.  Your entries are shown in lower case, but you can
  101.              type in either upper or lower case.
  102.  
  103.              The display may look slightly different on your system,
  104.              depending on how your prompt is set up, what disk drive you're
  105.              using, and what files are in your installation directory.
  106.              Don't worry about any minor differences.
  107.  
  108.  
  109.  
  110.  
  111.         -------------------------------------------------------------------
  112.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          1
  113.                                                           Starting The Tour
  114.         -------------------------------------------------------------------
  115.  
  116.  
  117.              In some cases, the computer's output will be too long to fit
  118.              on a line of this booklet and remain readable.  We've
  119.              truncated those lines and placed three dots [...] at the end
  120.              to show you that the actual line displayed on your screen will
  121.              be longer.  Some commands create more lines of output than we
  122.              need to display here to show how they work.  We've put a line
  123.              of nine dots [... ... ...] in those locations to indicate that
  124.              additional information will be shown on your screen.
  125.  
  126.              We've written the tour as if you were using 4DOS, because it's
  127.              our most popular product.  The few minor differences in 4OS2
  128.              and 4DOS/NT are noted in the text.
  129.  
  130.              To start the tour, first change to the directory where 4DOS,
  131.              4OS2, or 4DOS/NT was installed, using the CD command.  For
  132.              example, if you've used the directory C:\4DOS, enter the
  133.              following command:
  134.  
  135.                   C:\> cd 4dos
  136.                   C:\4DOS>
  137.  
  138.              Now start 4DOS by typing:
  139.  
  140.                   C:\4DOS> 4dos
  141.  
  142.              This starts 4DOS in "test drive" mode -- it isn't permanently
  143.              installed, but you can use it for the tour or other testing.
  144.              If you are using 4OS2, type 4OS2;  if you are using 4DOS/NT,
  145.              type 4NT.  If you have already performed a full installation,
  146.              skip this step.
  147.  
  148.              You'll see a sign-on message that looks similar to this,
  149.              followed by a prompt:
  150.  
  151.                   4DOS EMS swapping initialized (128K)
  152.                   4DOS 5.5   DOS 6.2
  153.                   Copyright 1988-1994  Rex Conn & JP Software Inc.
  154.                      ... ... ...
  155.  
  156.                   c:\4dos>
  157.  
  158.              Depending on how your prompt was previously defined, you may
  159.              now see it in lower case, which most people find easier to
  160.              read.  A lower case prompt is the default, and we'll show the
  161.              prompt that way throughout the tour.  Once you have 4DOS,
  162.              4OS2, or 4DOS/NT fully installed you can use the PROMPT
  163.              command to change it to upper case if you prefer.
  164.  
  165.              If you started 4DOS, 4OS2, or 4DOS/NT in "test drive" mode and
  166.              want to exit at any time, just type the command EXIT at the
  167.  
  168.  
  169.         -------------------------------------------------------------------
  170.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          2
  171.                                                              Basic Commands
  172.         -------------------------------------------------------------------
  173.  
  174.  
  175.              prompt and press Enter.  This will return you to the
  176.              traditional DOS, OS/2, or Windows NT command line:
  177.  
  178.                   c:\4dos> exit
  179.                   C:\4DOS>
  180.  
  181.  
  182.         Basic Commands
  183.  
  184.              We'll begin the tour by demonstrating some of the most common,
  185.              and most familiar, commands.  We'll also show you some of the
  186.              enhancements that we've added to those commands to make your
  187.              computing easier.
  188.  
  189.              First, enter the single-character command ?.  You'll see a
  190.              display like this:
  191.  
  192.                   c:\4dos> ?
  193.  
  194.                   ?         ALIAS     ATTRIB    BEEP      ...
  195.                   CD        CDD       CHCP      CHDIR     ...
  196.                   CTTY      DATE      DEL       DELAY     ...
  197.                        ... ... ...
  198.                   UNSET     VER       VERIFY    VOL       ...
  199.  
  200.              The ? command displays a list of all the commands built into
  201.              your new command processor.  You certainly don't have to
  202.              memorize them all -- we'll show you how to get help with any
  203.              command in a few moments.  Nor are we going to demonstrate all
  204.              of these commands in this tour.  If you want complete
  205.              information about a command, see the online help or the
  206.              Command Reference chapter in the Reference Manual.
  207.  
  208.              Now try a DIR command to see a list of files in the current
  209.              directory.  DIR displays a list of file names, sizes, dates,
  210.              and times:
  211.  
  212.                   c:\4dos> dir
  213.  
  214.                    Volume in drive C is JPS_TEST    Serial number ...
  215.                    Directory of  c:\4dos\*.*
  216.  
  217.                   .            <DIR>     10-14-94  14:21
  218.                   ..           <DIR>     10-14-94  14:21
  219.                   4dos.com       148264  11-23-94   5:50 4DOS 5.5 ...
  220.                   4dos.doc       345005  11-23-94   5:50 4DOS 5.5 ...
  221.                   4dos.ico          766  11-23-94   5:50 Color ...
  222.                   4dos.pif          545  11-23-94   5:50 PIF file ...
  223.                        ... ... ...
  224.                   tour2.btm        2765  11-23-94   5:50 Guided ...
  225.  
  226.  
  227.         -------------------------------------------------------------------
  228.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          3
  229.                                                              Basic Commands
  230.         -------------------------------------------------------------------
  231.  
  232.  
  233.                   updat55.doc     37946  11-23-94   5:50 Informat ...
  234.                     833,056 bytes in 19 files and 2 dirs  851,968 ...
  235.                    18,651,136 bytes free
  236.  
  237.              The DIR display should look familiar.  But, unlike the
  238.              traditional DIR display, you'll see the file names in lower
  239.              case and in alphabetical order.  We also give you some totals
  240.              at the end of the display that help you see how much space
  241.              your files are using.  The text at the right end of each line
  242.              is a file description -- it will be there if you installed
  243.              4DOS from diskette (as opposed to a downloaded copy).  We'll
  244.              discuss descriptions later in the tour.
  245.  
  246.              By using some of DIR's options, you can make the display even
  247.              easier to read.  The directory display you just saw probably
  248.              didn't fit on your screen.  You can tell DIR to pause at the
  249.              end of each page by using the command DIR /P.  The /P is an
  250.              example of a switch or option which modifies the behavior of a
  251.              command.  Enter the DIR /P command now:
  252.  
  253.                   c:\4dos> dir /p
  254.  
  255.              You'll see the same display, but with a pause at the end of
  256.              each page.
  257.  
  258.              You might prefer to display directories in 2 columns.  DIR
  259.              will do that if you include the /2 option.  If you add the /V
  260.              option, it will perform a vertical sort, with file names
  261.              running alphabetically down the first column and then down the
  262.              second column.  (We've left the display out of this booklet,
  263.              because the second column doesn't fit on the page.  You'll be
  264.              able to see it on the screen.)
  265.  
  266.                   c:\4dos> dir /2/v
  267.  
  268.                   [The 2-column directory display will appear here.]
  269.  
  270.              DIR has many other formatting and file selection options; all
  271.              of them are explained under the DIR command in your Reference
  272.              Manual.
  273.  
  274.              Next, you'll use a simple batch file called TOUR1.BTM to
  275.              create a dummy file.  (A .BTM batch file is similar to a
  276.              traditional .BAT or .CMD batch file, but faster.)  To run
  277.              TOUR1.BTM, enter the command:
  278.  
  279.                   c:\4dos> tour1
  280.  
  281.              This batch file creates a small file called FILE1 in your
  282.              current directory.  The contents of the file aren't important;
  283.  
  284.  
  285.         -------------------------------------------------------------------
  286.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          4
  287.                                                              Basic Commands
  288.         -------------------------------------------------------------------
  289.  
  290.  
  291.              we're simply using it to demonstrate some file-handling
  292.              capabilities.  You can verify that FILE1 has been created by
  293.              using DIR again.
  294.  
  295.              Now use the COPY command to copy the contents of FILE1 to a
  296.              new file, FILE2:
  297.  
  298.                   c:\4dos> copy file1 file2
  299.                   c:\4dos\file1 => c:\4dos\file2
  300.                        1 file copied
  301.  
  302.              The copy was performed just like the traditional COPY command,
  303.              but the output is friendlier:  COPY tells you exactly what
  304.              file it copied, where it copied the file to, and a count of
  305.              files at the end.
  306.  
  307.              Now try renaming a file.  If you've used the traditional
  308.              RENAME command or its synonym REN, this will look familiar:
  309.  
  310.                   c:\4dos> ren file1 file3
  311.                   c:\4dos\file1 -> c:\4dos\file3
  312.                        1 file renamed
  313.  
  314.              Like COPY, the REN command tells you just what it did.  You
  315.              now have two files, FILE2 and FILE3, in the current directory.
  316.              You can use another enhancement to add the extension .TST to
  317.              both of them:
  318.  
  319.                   c:\4dos> ren file2 file3 *.tst
  320.                   c:\4dos\file2 -> c:\4dos\file2.tst
  321.                   c:\4dos\file3 -> c:\4dos\file3.tst
  322.                        2 files renamed
  323.  
  324.              Unlike the traditional REN command, our enhanced version lets
  325.              you rename multiple files with a single command.  All file
  326.              processing commands like COPY, DEL, MOVE, and RENAME accept
  327.              multiple file names, so you can combine several file
  328.              operations instead of using a separate command for each file.
  329.  
  330.              Now delete the files you have just created.  You could use a
  331.              simple command like DEL *.TST, but that would delete any other
  332.              .TST files in the current directory also.  To protect against
  333.              erasing files that you might want to keep, add a /P option to
  334.              DEL so that it will prompt you before it deletes each file.
  335.              Answer Y to the prompts shown below to delete your test files:
  336.  
  337.                   c:\4dos> del *.tst /p
  338.                   Delete c:\4dos\file3.tst (Y/N/R)? y
  339.                   Delete c:\4dos\file2.tst (Y/N/R)? y
  340.                        2 files deleted          4,096 bytes freed
  341.  
  342.  
  343.         -------------------------------------------------------------------
  344.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          5
  345.                                            Command Line Editing and History
  346.         -------------------------------------------------------------------
  347.  
  348.  
  349.              (The R response listed in the prompt means "process the rest
  350.              of the files."  You can use it to skip further prompting
  351.              during a command.)
  352.  
  353.              To verify all these actions, you can do a DIR or DIR /P to
  354.              look at what files are left in the directory.  All the files
  355.              you've just created (FILE1, FILE2, FILE3, FILE2.TST, and
  356.              FILE3.TST) should be gone.
  357.  
  358.              The features we've demonstrated here -- traditional commands
  359.              with enhancements that make your work easier -- are present
  360.              throughout 4DOS, 4OS2, and 4DOS/NT.  If you want more details,
  361.              pick a traditional  command that you're familiar with and look
  362.              up the corresponding command in the Reference Manual or online
  363.              help to get an idea of what's new and improved.  (Remember
  364.              that 4DOS, 4OS2, and 4DOS/NT only replace internal commands
  365.              like COPY and DIR, not external commands like DISKCOPY and
  366.              FORMAT.)
  367.  
  368.  
  369.         Command Line Editing and History
  370.  
  371.              This section demonstrates features which make it easy to
  372.              correct typing mistakes at the system prompt, to repeat
  373.              previous commands, and to get help with any command.
  374.  
  375.              We can't show you exact examples here as easily as we can in
  376.              the other sections of the tour, since the display depends on
  377.              the exact keystrokes you type and we want you to experiment a
  378.              little.  So we'll guide you through what you can do, and
  379.              you'll see the results on your screen.
  380.  
  381.              First, create a typing error, with an incorrect DIR command:
  382.  
  383.                   c:\4dos> dur /2
  384.  
  385.              Traditionally, you would have had to use the Backspace key to
  386.              erase most of the line in order to correct this error, or
  387.              press Esc and start over.  Command line editing makes
  388.              corrections much easier.  Press the Home key followed by the
  389.              right arrow.  The cursor will move to the start of the line
  390.              and then right one space to the "u" in "dur".  Type an "i" and
  391.              the command should be correct.  To execute it, press Enter;
  392.              if you'd rather not, press Esc.
  393.  
  394.              That's a simple example of command line editing.  You can use
  395.              the left and right arrow keys, Home and End, and Backspace and
  396.              Del to move around and modify your command line at any time,
  397.              just like you do in your word processor or editor.  Other keys
  398.              let you move the cursor a word at a time, delete words, change
  399.  
  400.  
  401.         -------------------------------------------------------------------
  402.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          6
  403.                                            Command Line Editing and History
  404.         -------------------------------------------------------------------
  405.  
  406.  
  407.              between overstrike and insert modes, and perform many other
  408.              operations.  Esc always clears the line and lets you start
  409.              over.
  410.  
  411.              4DOS, 4OS2, and 4DOS/NT remember the commands you type in a
  412.              command history.  We'll use the HISTORY command to display the
  413.              commands that you have used so far during this tour:
  414.  
  415.                   c:\4dos> history
  416.                   ?
  417.                   dir
  418.                     ... ... ...
  419.                   dir /2
  420.  
  421.              You normally have room for about 1000 characters of history,
  422.              but you can reduce or enlarge this amount to suit your own
  423.              needs.
  424.  
  425.              Now press the up-arrow key once.  The last command in the
  426.              HISTORY display (DIR /2 in the example above) will appear at
  427.              the prompt.  You can use the editing keys to modify this
  428.              command, which is usually much easier than retyping it.  To
  429.              execute the command again, whether or not you've modified it,
  430.              press Enter.  To clear the line, press Esc.
  431.  
  432.              If you'd like to see more commands, first press Esc to clear
  433.              the command line. (To see all commands in the history, you
  434.              should always start with an empty command line.)  Now press
  435.              up-arrow several times.  Each time you press it, you will back
  436.              up one more line in the command history.  Once you find the
  437.              line you're looking for, you can modify it if you like and
  438.              then press Enter to execute it.
  439.  
  440.              Now imagine that you have been working for a while.  An hour
  441.              ago you did a complex DIR command and you need to do it again.
  442.              You could scroll through an hour's worth of command history.
  443.              But another feature called command completion will save you
  444.              time.
  445.  
  446.              First, type the beginning of the command -- DI, or DIR.  Now
  447.              press the up-arrow.  This will recall the newest command in
  448.              the history that starts with the characters you typed (if
  449.              there are no matches, you'll hear a beep).  Press up-arrow
  450.              again to retrieve the command before that, still matching to
  451.              the characters you originally typed.
  452.  
  453.              You can try this feature now using DI or DIR, because you've
  454.              put several DIR commands into the command history during this
  455.              tour.
  456.  
  457.  
  458.  
  459.         -------------------------------------------------------------------
  460.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          7
  461.                                                           Command Line Help
  462.         -------------------------------------------------------------------
  463.  
  464.  
  465.              Perhaps you would prefer to look at a list of commands that
  466.              you have entered and choose from the list.  First press the
  467.              Esc key to clear the command prompt.  Then press the PgUp key.
  468.              You will see a history window in the upper right corner of
  469.              your screen showing the commands you've recently typed.  You
  470.              can move around in this window with the up-arrow and down-
  471.              arrow keys.  PgUp and PgDn scroll the display a page at a
  472.              time.  When you find the command you want, press Enter to re-
  473.              execute it as is, or press Ctrl-Enter to move the line to the
  474.              prompt where you can edit it as usual.
  475.  
  476.  
  477.         Command Line Help
  478.  
  479.              You can get help for 4DOS, 4OS2, and 4DOS/NT any time you need
  480.              it from the command prompt -- just press the F1 key.
  481.  
  482.              If you're using 4DOS, you'll see a display of all the HELP
  483.              topics when you press F1.  If you would like some help with
  484.              COPY, move the cursor bar to COPY, or just type COPY and 4DOS
  485.              will move the bar for you.  Press Enter to see help on the
  486.              topic;  once you're there, scroll through the help using the
  487.              vertical arrows or PgUp and PgDn keys.  The highlighted items
  488.              within a topic are cross-references to other topics;  select
  489.              one with the horizontal arrow keys and press Enter to view it.
  490.              Press Esc to back up, or F1 to return to the topic list.
  491.  
  492.              For more help using the 4DOS help system, see the Help topic
  493.              at the beginning of the topic list.  If you have a mouse, see
  494.              the Mouse topic.
  495.  
  496.              Under 4OS2, F1 will start VIEW.EXE, OS/2's standard help file
  497.              viewer.  If you aren't familiar with VIEW, click on the Help
  498.              button on the menu bar for additional information.  You can
  499.              navigate through the help system with the mouse or keyboard,
  500.              using standard OS/2 conventions.
  501.  
  502.              Under 4DOS/NT, F1 will start the standard Windows NT help
  503.              program.  Use the Help button on the menu bar for additional
  504.              information.  You can navigate through the help system with
  505.              the mouse or keyboard, using standard Windows conventions.
  506.  
  507.              Now exit the help system (double click on the "close" box in
  508.              the upper left corner of the window, or use the Esc key in
  509.              4DOS).   Then start entering a command:
  510.  
  511.                   c:\4dos> copy *.doc a: /
  512.  
  513.              After that "/" you want to use the option that tells COPY to
  514.              prompt you before replacing an existing file, but you can't
  515.  
  516.  
  517.         -------------------------------------------------------------------
  518.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          8
  519.                                                            More About Files
  520.         -------------------------------------------------------------------
  521.  
  522.  
  523.              remember what it is.  Just leave the command as it is and
  524.              press F1.  The help system will display help on COPY, and
  525.              you'll see that the option you want is /R.  Exit the help
  526.              system and you'll be right back on the command line.  You can
  527.              type the R and press Enter to execute the command -- or press
  528.              Esc to clear the line without executing it.
  529.  
  530.              There are many more features that can help you at the command
  531.              line.  Most of them are described in Chapter 3 / Using 4DOS,
  532.              4OS2, and 4DOS/NT, in your Reference Manual.
  533.  
  534.  
  535.         More About Files
  536.  
  537.              This section of the tour explores some additional features
  538.              that will help you manage files and directories.  You're about
  539.              to use another batch file, TOUR2.BTM, to create some files
  540.              with which you can experiment.  First, take a look at the
  541.              batch file with the LIST command:
  542.  
  543.                   c:\4dos> list tour2.btm
  544.  
  545.              As you can see on your screen, LIST is a full screen file
  546.              viewer.  You can scroll and page through the text.  You may
  547.              notice that some lines near the end of the file extend beyond
  548.              the edge of your screen.  To make the off-screen text visible
  549.              use the left and right arrows to scroll the display
  550.              horizontally, or press W to turn line wrapping on and off.
  551.              LIST also lets you search for text, print the file you're
  552.              viewing, and display the file in "hexadecimal" mode,
  553.              capabilities that we won't demonstrate on this tour.  The file
  554.              TOUR2.BTM is simply a batch file that creates other files,
  555.              using the ECHO command.  You don't have to worry about how it
  556.              works;  we just used it to show you LIST.  Press Esc to exit
  557.              List and return to the command line.
  558.  
  559.              Now run TOUR2.BTM:
  560.  
  561.                   c:\4dos> tour2
  562.  
  563.                   Please wait ...
  564.  
  565.                   File creation completed
  566.  
  567.              TOUR2 creates three files called FILE1, FILE2, and FILE3.  The
  568.              contents of the files aren't important since we're just using
  569.              them for demonstration purposes.  You'll be deleting and
  570.              recreating them several times during the rest of the tour.
  571.  
  572.  
  573.  
  574.  
  575.         -------------------------------------------------------------------
  576.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                          9
  577.                                                            More About Files
  578.         -------------------------------------------------------------------
  579.  
  580.  
  581.              Now try the SELECT feature.  SELECT lets you choose files for
  582.              any command from a full-screen list.  We'll use it here to
  583.              delete one of the files that TOUR2 created.  Enter the
  584.              command:
  585.  
  586.                   c:\4dos> select del (file*)
  587.  
  588.              This lets you select from files that begin with the characters
  589.              "file", and pass the name of each selected file to the DEL
  590.              command for action.
  591.  
  592.              The display on your screen includes a two-line header and then
  593.              the list of files, just as they'd look in a directory display.
  594.              Press the spacebar to "mark" the first file -- a triangular
  595.              mark will appear to the left of the file name.  You can scroll
  596.              around in the display and mark and unmark files with the
  597.              spacebar as you like.  When you hit Enter, the command will be
  598.              executed, deleting the files you've marked.  For now, mark
  599.              FILE1 and leave the other files unmarked, so that FILE2 and
  600.              FILE3 are not deleted.  You'll use them in the next step.
  601.  
  602.              SELECT is also handy if you want to copy a group of files to a
  603.              floppy disk, perhaps to take your work home for the night or
  604.              to make a quick backup.  If you'd like to try it, put a floppy
  605.              disk in drive A (it should be formatted, with at least 4K
  606.              bytes free).  Then enter this command:
  607.  
  608.                   c:\4dos> select copy (file*) a:
  609.  
  610.              Mark one or both of the files in the SELECT display, and the
  611.              marked file(s) will be copied to the floppy disk when you hit
  612.              Enter.
  613.  
  614.              SELECT is a "prefix" command:  it goes before another command
  615.              and modifies what that second command does.  Another useful
  616.              prefix command is EXCEPT, which lets you do something except
  617.              to one or more files.  Before you try EXCEPT, create new
  618.              copies of FILE1, FILE2, and FILE3 (TOUR2 will overwrite any
  619.              old copies of these files remaining from the last time it was
  620.              run):
  621.  
  622.                   c:\4dos> tour2
  623.                      ... ... ...
  624.  
  625.              Now use EXCEPT to delete all but one of the files that TOUR2
  626.              created:
  627.  
  628.                   c:\4dos> except (file1) del file*
  629.                   Deleting c:\4dos\file2
  630.  
  631.  
  632.  
  633.         -------------------------------------------------------------------
  634.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         10
  635.                                                            More About Files
  636.         -------------------------------------------------------------------
  637.  
  638.  
  639.                   Deleting c:\4dos\file3
  640.                        2 files deleted          4,096 bytes freed
  641.  
  642.              The EXCEPT command protected FILE1 from being deleted.  To
  643.              verify that, use the DIR command.  When you're done, run TOUR2
  644.              one more time so the files are there for the next step.
  645.  
  646.              Next, create two subdirectories within the current directory:
  647.  
  648.                   c:\4dos> md dira dirb
  649.  
  650.              Notice that you can create both subdirectories with a single
  651.              command.  Traditionally, you would have needed two MD commands
  652.              to do the same thing.  To verify that the directories are
  653.              there, use DIR but ask it to display only subdirectories (/A:D
  654.              stands for "Attributes: Directory"):
  655.  
  656.                   c:\4dos> dir /a:d
  657.  
  658.                    Volume in drive C is JPS_TEST  Serial number is ...
  659.                    Directory of  c:\4dos\*.*
  660.  
  661.                   .            <DIR>     10-14-94  14:21
  662.                   ..           <DIR>     10-14-94  14:21
  663.                   DIRA         <DIR>     12-13-94  10:23
  664.                   DIRB         <DIR>     12-13-94  10:23
  665.                             0 bytes in 0 files and 4 dirs  0 bytes ...
  666.                    18,608,128 bytes free
  667.  
  668.              OK, things look right.  Now move the demonstration files to
  669.              those directories, using the built-in MOVE command.  This is
  670.              what you should type to move FILE1 to DIRA, and FILE2 and
  671.              FILE3 to DIRB:
  672.  
  673.                   c:\4dos> move file1 dira
  674.                   c:\4dos\file1 -> c:\4dos\dira\file1
  675.                        1 file moved
  676.  
  677.                   c:\4dos> move file2 file3 dirb
  678.                   c:\4dos\file2 -> c:\4dos\dirb\file2
  679.                   c:\4dos\file3 -> c:\4dos\dirb\file3
  680.                        2 files moved
  681.  
  682.              As usual, you can see exactly what has happened.
  683.  
  684.              Now that you've created a subdirectory structure, it's time to
  685.              get a look at it.  Use DIR's /S option to look for all the
  686.              files whose names begin with "file" in the current directory
  687.              and all of its subdirectories:
  688.  
  689.  
  690.  
  691.         -------------------------------------------------------------------
  692.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         11
  693.                                                            More About Files
  694.         -------------------------------------------------------------------
  695.  
  696.  
  697.                   c:\4dos> dir /s file*
  698.  
  699.                    Volume in drive C is JPS_TEST    Serial number ...
  700.                    Directory of  c:\4dos\dira\file*.*
  701.  
  702.                   file1              22  12-13-94  10:37
  703.                             22 bytes in 1 file and 0 dirs   2,048 ...
  704.                     18,587,648 bytes free
  705.  
  706.                       Total for:  c:\4dos\dira\file*.*
  707.                             22 bytes in 1 file and 0 dirs   2,048 ...
  708.  
  709.                    Directory of  c:\4dos\dirb\file*.*
  710.  
  711.                   file2              22  12-13-94  10:37
  712.                   file3            1938  12-13-94  10:37
  713.                          1,960 bytes in 2 files and 0 dirs   4,096 ...
  714.                     18,587,648 bytes free
  715.  
  716.                       Total for:  c:\4dos\dirb\file*.*
  717.                          1,960 bytes in 2 files and 0 dirs   4,096 ...
  718.  
  719.                       Total for:  c:\4dos\file*.*
  720.                          1,982 bytes in 3 files and 0 dirs   6,144 ...
  721.  
  722.              DIR has displayed the directory header, filenames, and totals
  723.              for each of the two subdirectories that contain files matching
  724.              the name you entered, FILE*.  It also has displayed a grand
  725.              total.
  726.  
  727.              You've seen that DIR can look at several subdirectories at
  728.              once.  Now do the same thing with DEL, and delete the files
  729.              you put in your demonstration subdirectories, along with the
  730.              subdirectories themselves, with a single command.  To do so,
  731.              you need to use two options:  /S and /X.  The /S option tells
  732.              DEL to delete files in the current directory and all of its
  733.              subdirectories.  The /X option makes DEL remove each
  734.              subdirectory if all the files within it are deleted:
  735.  
  736.                   c:\4dos> del /s/x dira dirb
  737.                   c:\4dos\dira\*.* : Are you sure (Y/N/R)? Y
  738.                   Deleting c:\4dos\dira\file1
  739.                   c:\4dos\dirb\*.* : Are you sure (Y/N/R)? Y
  740.                   Deleting c:\4dos\dirb\file2
  741.                   Deleting c:\4dos\dirb\file3
  742.                        3 files deleted          6,144 bytes freed
  743.  
  744.              Note the safety feature here.  When you tell DEL to delete
  745.              DIRA and DIRB, they are recognized as directory names.  DEL
  746.              assumes you mean "delete all files in this directory."  Since
  747.  
  748.  
  749.         -------------------------------------------------------------------
  750.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         12
  751.                                                            More About Files
  752.         -------------------------------------------------------------------
  753.  
  754.  
  755.              you're deleting all the files, DEL displays a prompt that
  756.              tells you what's about to be deleted and asks you whether you
  757.              really want to do the deletion.  Once you answer Y the files
  758.              are deleted, and the subdirectory is automatically removed
  759.              (because you used the /X switch).
  760.  
  761.              4DOS, 4OS2, and 4DOS/NT also let you use file descriptions, so
  762.              you can describe a file's contents more clearly than with an
  763.              8-character file name.  If you installed 4DOS from diskette,
  764.              you've seen some descriptions in your directory displays
  765.              already.  The descriptions can be up to 40 characters long by
  766.              default, and may be extended up to 200 characters if you wish.
  767.  
  768.              Run TOUR2 again to regenerate the three demonstration files.
  769.              Then use the DESCRIBE command to create a description for each
  770.              file (you can enter any description you like; you don't have
  771.              to use the text shown):
  772.  
  773.                   c:\4dos> tour2
  774.                   c:\4dos> describe file*
  775.                   Describe "c:\4dos\file1" : Tour file 1
  776.                   Describe "c:\4dos\file2" : Tour file 2
  777.                   Describe "c:\4dos\file3" : Tour file 3
  778.  
  779.              Now look at the descriptions with a DIR command:
  780.  
  781.                   c:\4dos> dir file*
  782.                        ... ... ...
  783.  
  784.              The descriptions will appear any time you ask for a standard,
  785.              single-column directory display.  They will also appear when
  786.              you use the SELECT command.  They can be a lifesaver when you
  787.              have files whose contents you can't remember, or when you have
  788.              large groups of files with similar names.
  789.  
  790.              4DOS, 4OS2, and 4DOS/NT can also help you find files or text
  791.              quickly and easily, anywhere on your disk.  To search for
  792.              files or text, you use the FFIND command.
  793.  
  794.              In its simplest form, FFIND searches for files.  For example,
  795.              try this command to find all the .DOC files in the  current
  796.              directory:
  797.  
  798.                   c:\4dos> ffind *.doc
  799.                   c:\4dos\4dos.doc
  800.                   c:\4dos\appnotes.doc
  801.                   c:\4dos\license.doc
  802.                   c:\4dos\orderinf.doc
  803.  
  804.  
  805.  
  806.  
  807.         -------------------------------------------------------------------
  808.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         13
  809.                                                        Directory Navigation
  810.         -------------------------------------------------------------------
  811.  
  812.  
  813.                   c:\4dos\readme.doc
  814.                   c:\4dos\updat55.doc
  815.  
  816.                        6 files
  817.  
  818.              You can also use FFIND to search for text:
  819.  
  820.                   c:\4dos> ffind /lt"echo" *.doc
  821.                   ---- c:\4dos\4dos.doc
  822.                   [1179]                   echo %comspec
  823.  
  824.                   ---- c:\4dos\appnotes.doc
  825.                   [1293]                     echo This is junk ...
  826.  
  827.                   ---- c:\4dos\updat55.doc
  828.                   [279]           immediately, without echoing the ...
  829.  
  830.                     3 lines in     3 files
  831.  
  832.              FFIND has listed the first line in each file which contains
  833.              the text you specified.  You can use the /V switch to show
  834.              every line which contains your search string (not just the
  835.              first line).  The /L switch used above includes line numbers
  836.              in the output, and the /T switch specifies the search string.
  837.              Other FFIND switches let you control the order in which files
  838.              are listed, search subdirectories (like DIR /S), search the
  839.              entire hard disk, and even search all the hard disks in your
  840.              system.
  841.  
  842.  
  843.         Directory Navigation
  844.  
  845.              4DOS, 4OS2, and 4DOS/NT make it easier to access files;  they
  846.              also make it much more convenient to navigate through the hard
  847.              disk directory structure.  You're probably already familiar
  848.              with the traditional CD command, which you use to change
  849.              directories.  We've added a "go back" option to CD, which is
  850.              invoked by using the minus sign [-] instead of a directory
  851.              name.  Try this:
  852.  
  853.                   c:\4dos> cd \
  854.                   c:\> cd -
  855.                   c:\4dos>
  856.  
  857.              The CD - changes back to the directory you were in before the
  858.              most recent CD command.  It's a convenient way to switch back
  859.              and forth between two directories.  (Make sure you type at
  860.              least one space between CD and the minus sign.)
  861.  
  862.  
  863.  
  864.  
  865.         -------------------------------------------------------------------
  866.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         14
  867.                                                                     Aliases
  868.         -------------------------------------------------------------------
  869.  
  870.  
  871.              You can also change the drive and directory at the same time
  872.              with the CDD command, so you don't have to switch drives first
  873.              and then change directories.  Here's an example using CDD.
  874.              Before you try it, put a floppy disk in drive A:
  875.  
  876.                   c:\4dos> cdd a:\
  877.                   a:\> cdd -
  878.                   c:\4dos>
  879.  
  880.              As you can see, the minus works with CDD as well.
  881.  
  882.              For more complex sequences of directory navigation, you can
  883.              use PUSHD and POPD.  These commands maintain a directory
  884.              "stack" and let you make several changes, then move back
  885.              through the directories you've been to.  They can change both
  886.              drive and directory, like CDD.  For example:
  887.  
  888.                   c:\4dos> pushd a:\
  889.                   a:\> pushd c:\
  890.                   c:\> popd
  891.                   a:\> popd
  892.                   c:\4dos>
  893.  
  894.              Now press Ctrl-PgUp (hold down the Ctrl key and then press the
  895.              PgUp key).  You'll see a directory history window in the upper
  896.              right corner of your screen showing the directories you have
  897.              visited recently.  You can move around this window with the
  898.              same keys you used earlier in the command history window.
  899.              When you find a directory that you want to move to, press
  900.              Enter to change to it.  You can also press Ctrl-Enter to move
  901.              the directory name to the command line for editing.
  902.  
  903.              We also offer a special environment variable, CDPATH, to help
  904.              you find the right directory without a lot of typing.  CD,
  905.              CDD, and PUSHD use CDPATH to find the subdirectory you want to
  906.              change to if they can't find it in the current directory.
  907.              This can help a lot when you have long but commonly used
  908.              directory names.  See the Reference Manual or online help for
  909.              complete details on CDPATH, and information on another
  910.              directory navigation feature, Automatic Directory Changes.
  911.  
  912.  
  913.         Aliases
  914.  
  915.              Aliases are one of the most powerful features in 4DOS, 4OS2,
  916.              and 4DOS/NT.  Simple aliases are very easy to set up and use
  917.              (that's what we'll discuss here).  Complex aliases allow you
  918.              to configure your system just about any way you want, and can
  919.              often take the place of small batch files.
  920.  
  921.  
  922.  
  923.         -------------------------------------------------------------------
  924.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         15
  925.                                                                     Aliases
  926.         -------------------------------------------------------------------
  927.  
  928.  
  929.              The purpose of an alias is to rename or reconfigure a command.
  930.              Aliases are defined and viewed with the ALIAS command.  In
  931.              this tour, we'll show you how to set up aliases for the DIR
  932.              command.  Of course, you can use aliases to enhance any
  933.              command;  for more examples see the ALIAS command in the
  934.              Reference Manual, and the sample file ALIASES that comes with
  935.              your command processor.
  936.  
  937.              Here's a popular favorite for anyone who uses DIR and wants to
  938.              be able to use a simple D instead:
  939.  
  940.                   c:\4dos> alias d = dir
  941.  
  942.              To see what aliases you've defined, enter ALIAS with no
  943.              parameters:
  944.  
  945.                   c:\4dos> alias
  946.                   d=dir
  947.  
  948.              To use the alias, just enter its name at the prompt, like any
  949.              command.  In this case, you'll see a standard directory
  950.              display:
  951.  
  952.                   c:\4dos> d
  953.  
  954.              Once you've defined an alias, you can use it anywhere a
  955.              command can be used:  at the prompt, in a batch file, or
  956.              inside another alias.
  957.  
  958.              As an example, build on the D alias you have already defined.
  959.              Suppose you regularly use 2-column directory listings,
  960.              discussed near the start of the tour.  You can define an
  961.              alias, D2, to execute the DIR /2 command with the touch of a
  962.              couple of keys.  Since you have already defined D, you can
  963.              define D2 separately, or so it uses the D alias (choose one
  964.              method to try):
  965.  
  966.                   c:\4dos> alias d2 = dir /2
  967.                   c:\4dos> alias d2 = d /2
  968.  
  969.              To use this alias, just type the command D2 and press Enter.
  970.              You can pass file names to these aliases just like you would
  971.              to the original command.  For example, D2 *.DOC will display
  972.              the .DOC files.
  973.  
  974.              You can create aliases that are even easier to use with
  975.              keystroke aliases, which let you assign an Alt, Ctrl, or
  976.              Function key to an alias so you can invoke it by pressing a
  977.              single key.  Say you'd like to assign the 2-column directory
  978.  
  979.  
  980.  
  981.         -------------------------------------------------------------------
  982.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         16
  983.                                                                     Aliases
  984.         -------------------------------------------------------------------
  985.  
  986.  
  987.              display to F5.  Just define an alias like D2, and make the
  988.              alias name the key name, with two at-signs [@@] before it:
  989.  
  990.                   c:\4dos> alias @@f5 = dir /2
  991.  
  992.              Now press F5 and the DIR /2 command will be executed.  You can
  993.              also create key aliases that don't execute when you press the
  994.              key, so you can type additional information on the line --
  995.              just use a single [@] sign at the start of the alias, instead
  996.              of two.
  997.  
  998.              You can use an alias to redefine how a standard command works,
  999.              without changing its name.  Suppose you always want DIR to
  1000.              display its output in 2 columns, with a vertical sort and a
  1001.              pause at the end of each page.  You might think of using
  1002.              something like this:
  1003.  
  1004.                   c:\4dos> alias dir = dir /2/p/v
  1005.  
  1006.              Go ahead and try that, then do a DIR.  You'll get an error:
  1007.  
  1008.                   c:\4dos> dir
  1009.                   Alias loop
  1010.  
  1011.                   c:\4dos>
  1012.  
  1013.              The "alias loop" error is caused because the DIR command
  1014.              inside your alias is interpreted as another attempt to run the
  1015.              same alias.  It's easy to change the alias so this doesn't
  1016.              happen:
  1017.  
  1018.                   c:\4dos> alias dir = *dir /2/p/v
  1019.  
  1020.              The [*] indicates that what follows should not be interpreted
  1021.              as an alias.  Try the definition above (you can scroll back to
  1022.              the incorrect definition with up-arrow and modify it).  Then
  1023.              do a DIR and you'll see the results.  Using this method, you
  1024.              can redefine the default options for any internal command.
  1025.  
  1026.              Aliases can contain multiple commands and can do much fancier
  1027.              things than what you've seen here.  They're great for creating
  1028.              shorthand names for commonly used programs like your word
  1029.              processor or database manager, and they will often load
  1030.              programs faster as well -- if you put the full name of the
  1031.              program in an alias, 4DOS doesn't need to search your PATH for
  1032.              it (see the ALIAS command in the Reference manual or online
  1033.              help for full details on this technique).
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.         -------------------------------------------------------------------
  1040.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         17
  1041.                                                              Other Commands
  1042.         -------------------------------------------------------------------
  1043.  
  1044.  
  1045.         Other Commands
  1046.  
  1047.              There are a few other commands that we'll just touch on, so
  1048.              that you can see some of the other capabilities of 4DOS, 4OS2,
  1049.              and 4DOS/NT.
  1050.  
  1051.              First, turn on the LOG facility, which records all the
  1052.              commands you enter.  Enter the command:
  1053.  
  1054.                   c:\4dos> log /w mylog
  1055.  
  1056.              You won't see anything else happen, but you've turned logging
  1057.              on.  We'll return to the log later.
  1058.  
  1059.              A couple of commands let you control screen color.  The
  1060.              examples here will work on any system with a color video board
  1061.              (the commands work on monochrome systems, too, but you're
  1062.              restricted to the colors white and black).  Try clearing the
  1063.              screen to a specific color:
  1064.  
  1065.                   c:\4dos> cls bright white on magenta
  1066.  
  1067.              Now let's set a different color:
  1068.  
  1069.                   c:\4dos> color bright yellow on blue
  1070.  
  1071.              The behavior of the COLOR command varies depending on which
  1072.              product you are using, and (under DOS) whether you have an
  1073.              ANSI driver loaded.  In some cases COLOR will change the color
  1074.              of the entire screen immediately; in others, it only affects
  1075.              the color of text displayed after it's executed, and not the
  1076.              color of text already on the screen.  You can experiment with
  1077.              COLOR to see how it works on your system.
  1078.  
  1079.              The FREE and MEMORY commands help you keep track of system
  1080.              resources.  FREE tells you about free space on your disk
  1081.              drives (and is much faster than CHKDSK).  MEMORY tells you
  1082.              about memory resources, including available RAM, and internal
  1083.              alias and history storage areas.  Here are examples of the
  1084.              output from our test system;  try the commands on your system
  1085.              and see what you get:
  1086.  
  1087.                   c:\4dos> free
  1088.                    Volume in drive C is JPS_TEST    Serial number ...
  1089.                     41,826,304 bytes total disk space
  1090.                     23,232,512 bytes used
  1091.                     18,593,792 bytes free
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.         -------------------------------------------------------------------
  1098.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         18
  1099.                                                              Other Commands
  1100.         -------------------------------------------------------------------
  1101.  
  1102.  
  1103.                   c:\4dos> memory
  1104.                        655,360 bytes total DOS RAM
  1105.                        612,256 bytes free
  1106.  
  1107.                      7,815,168 bytes total EMS memory
  1108.                        688,128 bytes free
  1109.  
  1110.                         12,288 bytes free XMS memory  (HMA in use)
  1111.  
  1112.                          1,792 bytes total environment
  1113.                            233 bytes free
  1114.  
  1115.                          6,144 bytes total alias
  1116.                          1,045 bytes free
  1117.  
  1118.                          1,024 bytes total history
  1119.  
  1120.              The TIMER command lets you time events.  The following line
  1121.              also shows that 4DOS, 4OS2, and 4DOS/NT can accept multiple
  1122.              commands on one line.  (The character used to separate
  1123.              commands is a caret [^] in 4DOS, as shown below.  Use an
  1124.              ampersand [&] in place of the caret if you are working with
  1125.              4OS2 or 4DOS/NT.)  This command starts the timer, runs the
  1126.              TOUR2.BTM file to create the three demonstration files,
  1127.              deletes the three files, and then stops the timer and displays
  1128.              the how long the whole operation took.  Enter this command to
  1129.              time the entire sequence on your computer:
  1130.  
  1131.                   c:\4dos> timer ^ tour2 ^ del file* ^ timer
  1132.                   Timer 1 on: 11:10:01
  1133.  
  1134.                   Please wait ...
  1135.  
  1136.                   File creation completed
  1137.                   Deleting c:\4dos\file1
  1138.                   Deleting c:\4dos\file2
  1139.                   Deleting c:\4dos\file3
  1140.                        3 files deleted
  1141.                   Timer 1 off: 11:10:06 elapsed: 0:00:05.11
  1142.  
  1143.              Now return to the log that you started a few minutes ago.
  1144.              Turn logging off, then take a look at what was recorded, using
  1145.              these commands:
  1146.  
  1147.                   c:\4dos> log off
  1148.                   c:\4dos> list mylog
  1149.  
  1150.              You'll see a full-screen display of the log file.  It should
  1151.              look something like this:
  1152.  
  1153.  
  1154.  
  1155.         -------------------------------------------------------------------
  1156.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         19
  1157.                                                                 Batch Files
  1158.         -------------------------------------------------------------------
  1159.  
  1160.  
  1161.                   [12-13-94 11:05:02] cls bright white on magenta
  1162.                   [12-13-94 11:06:45] color bright yellow on blue
  1163.                     ... ... ...
  1164.                     ... (commands from TOUR2.BTM displayed here)
  1165.                     ... ... ...
  1166.                   [12-13-94 11:12:35] log off
  1167.  
  1168.              You can scroll through the log with the arrow keys and PgUp /
  1169.              PgDn.  Press Esc to exit when you've finished viewing the log.
  1170.  
  1171.              As you can see, the log contains every command you entered
  1172.              plus a date and time stamp.  It's a complete record of system
  1173.              activity, including commands you type and those entered from
  1174.              batch files and aliases.  You can use it as a record of your
  1175.              work, for security purposes, or for anything else you desire.
  1176.              You may want to clean up the directory now by deleting this
  1177.              demonstration log with a DEL MYLOG command.
  1178.  
  1179.  
  1180.         Batch Files
  1181.  
  1182.              This final section demonstrates a few of the enhancements we
  1183.              offer for your batch files.  If you've never worked with batch
  1184.              files, you may want to skip this section.  If you aren't sure,
  1185.              give it a try and stop if things seem too complex.  You don't
  1186.              have to be a batch file expert to use 4DOS, 4OS2, or 4DOS/NT.
  1187.  
  1188.              Rather than having you write actual batch files, we'll
  1189.              demonstrate some of the batch file features that work just as
  1190.              well at the prompt.
  1191.  
  1192.              Some batch file improvements aid in communicating with the
  1193.              user.  You can make sounds:
  1194.  
  1195.                   c:\4dos> beep 440 2 880 8 660 4
  1196.  
  1197.              You can draw boxes and lines.  Enter each of these commands on
  1198.              one line;  use the second set if you have a monochrome
  1199.              monitor:
  1200.  
  1201.                   c:\4dos> cls bright white on blue
  1202.                   c:\4dos> drawbox 10 10 20 70 4 bright cyan on black
  1203.                              fill black
  1204.                   c:\4dos> drawhline 15 10 61 1 bright cyan on black
  1205.  
  1206.                   c:\4dos> cls bright white on black
  1207.                   c:\4dos> drawbox 10 10 20 70 4 black on white fill
  1208.                             white
  1209.                   c:\4dos> drawhline 15 10 61 1 black on white
  1210.  
  1211.  
  1212.  
  1213.         -------------------------------------------------------------------
  1214.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         20
  1215.                                                                 Batch Files
  1216.         -------------------------------------------------------------------
  1217.  
  1218.  
  1219.              Notice that these commands correctly connect the lines on the
  1220.              screen where they intersect.  Additional commands like SCREEN
  1221.              and SCRPUT, which we won't demonstrate here, display text
  1222.              anywhere on the screen and in any color.
  1223.  
  1224.              You can also ask the user for input.  Try this (be sure to use
  1225.              two percent signs before the second "letter"):
  1226.  
  1227.                   c:\4dos> inkey Enter a letter: %%letter
  1228.                   Enter a letter: A
  1229.  
  1230.              The letter you typed was stored in your environment in the
  1231.              variable named LETTER.  Use the SET command to view it:
  1232.  
  1233.                   c:\4dos> set
  1234.                   COMSPEC=C:\4DOS\4DOS.COM
  1235.                        ... ... ...
  1236.                   LETTER=A
  1237.  
  1238.              The user can also type full strings if you use the INPUT
  1239.              command:
  1240.  
  1241.                   c:\4dos> input Enter a string: %%string
  1242.                   Enter a string: Type anything you like here ...
  1243.  
  1244.              Again, SET will let you view the string, stored in the
  1245.              environment variable STRING.  INKEY and INPUT have many
  1246.              additional options, including the ability to check for valid
  1247.              keystrokes, and "time out" if you don't press a key within a
  1248.              specified length of time.
  1249.  
  1250.              Once you've collected some input, you can test it with the IF
  1251.              and IFF commands.  Here's one example.  Enter this on one line
  1252.              (there's plenty of room;  command lines can be up to 255
  1253.              characters long in 4DOS, and up to 1023 characters in 4OS2 and
  1254.              4DOS/NT).  Type ampersands [&] in place of the carets [^] if
  1255.              you are using 4OS2 or 4DOS/NT.
  1256.  
  1257.                   c:\4dos> inkey Enter a letter: %%letter
  1258.                            ^ iff "%letter" == "A" then ^ echo hello
  1259.                            ^ else ^ echo goodbye ^ endiff
  1260.  
  1261.              Try using the up-arrow to repeat the command several times,
  1262.              giving different responses to the "Enter a letter" prompt.
  1263.  
  1264.              4DOS, 4OS2, and 4DOS/NT offer dozens of additional batch file
  1265.              improvements.  For more information see the Reference Manual
  1266.              or online help.
  1267.  
  1268.  
  1269.  
  1270.  
  1271.         -------------------------------------------------------------------
  1272.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         21
  1273.                                                                  Conclusion
  1274.         -------------------------------------------------------------------
  1275.  
  1276.  
  1277.         Conclusion
  1278.  
  1279.              This has been a very fast tour of some of the most popular
  1280.              features of our enhanced command processors.  There are many
  1281.              more features, commands, and options to explore, as well as
  1282.              ways to customize your system so that it suits your computing
  1283.              habits and needs.  One of the best features of 4DOS, 4OS2, and
  1284.              4DOS/NT is their ability to adapt to your way of working
  1285.              instead of requiring you to adapt to them.
  1286.  
  1287.              If you selected "Tour Installation" when you ran the INSTALL
  1288.              program, you will probably want to perform a full installation
  1289.              now.  You can put the distribution disk in your floppy drive,
  1290.              run INSTALL, and follow the instructions on the screen.  If
  1291.              you need help, refer to the installation instructions in your
  1292.              Introduction and Installation Guide.
  1293.  
  1294.              To learn more about specific commands, look through the
  1295.              Command Reference section of the Reference Manual, or the
  1296.              individual commands in the online help.  To learn more about
  1297.              the dozens of features that aren't related to specific
  1298.              commands, read through Chapter 3 / Using 4DOS, 4OS2, and
  1299.              4DOS/NT in the Reference Manual, or browse through the online
  1300.              help.
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.         -------------------------------------------------------------------
  1330.         A Guided Tour of 4DOS, 4OS2, and 4DOS/NT                         22
  1331.