home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / 4dos / tour.doc < prev    next >
Text File  |  1993-11-23  |  63KB  |  1,366 lines

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