home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util4 / 4dos301.lzh / 4DOS.DOC < prev    next >
Text File  |  1990-05-22  |  332KB  |  10,790 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                               4DOS Version 3.01
  22.  
  23.  
  24.  
  25.                      A PC-DOS / MS-DOS Command Processor
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                               Distributed by:
  39.  
  40.                               J.P. Software
  41.                               P.O. Box 1470
  42.                               E. Arlington, MA 02174, USA
  43.                               (617) 646-3975
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                _______
  64.           ____|__     |               (tm)
  65.        --|       |    |-------------------
  66.          |   ____|__  |  Association of
  67.          |  |       |_|  Shareware
  68.          |__|   o   |    Professionals
  69.        -----|   |   |---------------------
  70.             |___|___|    MEMBER
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.                     Written by Rex C. Conn and Tom Rawson
  78.  
  79.  
  80.  
  81.                     J.P. Software
  82.                     P.O. Box 1470
  83.                     E. Arlington, MA 02174, USA
  84.                     (617) 646-3975  voice
  85.                     (617) 646-0904  fax
  86.  
  87.  
  88.    Electronic mail to:
  89.                     CompuServe 75300,210
  90.                     BIX "trawson"
  91.                     InterNet, Bitnet, etc.:  75300.210@compuserve.com
  92.  
  93.  
  94.    Program and Documentation Copyright 1988, 1989, 1990 Rex C. Conn and
  95.    J.P. Software.  All rights reserved.
  96.  
  97.    Portions Copyright 1987, 1988, 1990 Microsoft Corporation
  98.    Portions Copyright 1987, 1989 Borland International
  99.    Portions Copyright 1987, 1988, 1989 TurboPower Software
  100.  
  101.  
  102.    4DOS is a trademark of J.P. Software.
  103.    PC-DOS, PC, PC XT, PC AT, and PS/2 are trademarks of IBM Corporation.
  104.    MS-DOS, OS/2, and Windows are trademarks of Microsoft Corporation.
  105.    1-2-3 is a trademark of Lotus Development Corporation.
  106.    dBASE is a trademark of Ashton Tate.
  107.    386-To-The-Max and Move-Em are trademarks of Qualitas Inc.
  108.    DESQview and QEMM are trademarks of Quarterdeck Office Systems
  109.    Brief is a trademark of UnderWare Inc.
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.    4DOS Reference Manual         Copyright 1990, J.P. Software             
  117.  
  118.  
  119.  
  120.                                ACKNOWLEDGEMENTS
  121.  
  122.    We couldn't produce a product like 4DOS without the dedication and
  123.    quality work of many people.  Our thanks to all these folks:
  124.  
  125.         J.P. Software office staff:  Ruth Dornfeld, Hayyim Feldman, Susan
  126.         Mampre, Keren Sammett, Ellen Stone.
  127.  
  128.         Beta testers:  Bruce Aldrich, Mike Bessy, David Birnbaum, Jeff
  129.         Bishop, "Dr. File Finder" (Mike Callahan), Gary Clanfield, John
  130.         Cooper, Chris DeVoney, Emanuel Donchin, Stan Dvoskin, John
  131.         Fleming, Doug Frank, Peter Frank, Gary Gibson, Tim Grissom, Ken
  132.         Harwell, Keith Hawes, Bob Huntley, John James, Tom Kellen, Bob
  133.         Kertesz, Dave Lemire, Kevin Lockwood, Brad McDonald, John McKown,
  134.         Burt Model, Stuart Moore, Phil Newman, Jorge Ochoa-Lions, Shakib
  135.         Otaqui, John Peterson, Ed Phillips, Mike Phillips, Sam Pierce,
  136.         Chip Rabinowitz, Dan Rawson, David Rodman, Chris Rousseau, Alan
  137.         Samuels, Guy Scharf, Martin Schiff, Bill Shaffer, Malcolm Shealy,
  138.         Stephen Spehn, Michael Stein, Ted Thompson, Brian Trainer, Thomas
  139.         Traubitz, Randy Wallin, Bill Walton, Iram Weinstein, Joe Zott,
  140.         and anyone else we forgot!
  141.  
  142.         Beta test support:  David Moskowitz, Nick Cvetkovic, and all the
  143.         sysops of the CompuServe CONSULT forum.
  144.  
  145.         BBS support:  Future Technology BBS sysops Bud Napier and Brian
  146.         Moran.
  147.  
  148.    The 4DOS 3.01 HELP system was originally written by Ross Neilson
  149.    Wentworth, and is now owned and distributed by J.P. Software.
  150.  
  151.    The following tools are used in creating and maintaining 4DOS:
  152.  
  153.         Compilers:          Microsoft C 6.0 and Macro Assembler 5.1
  154.                             Turbo Pascal 5.5 (Borland)
  155.         Libraries:          Turbo Professional 5.0 (TurboPower Software)
  156.         Editors:            Edix (Emerging Technology), Brief (Solution
  157.                             Systems)
  158.         Debuggers:          Periscope (The Periscope Company), Soft-ICE
  159.                             (Nu-Mega Technologies)
  160.         Version Control:    PVCS (Polytron)
  161.  
  162.    The following suppliers produce the finished product:
  163.  
  164.         Manual Printing:    Causeway Print, Boston
  165.         Disk Duplication:   Diversified Systems Group, Issaquah, WA
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.   4DOS Reference Manual         Copyright 1990, J.P. Software              
  175.  
  176.  
  177.   TABLE OF CONTENTS
  178.  
  179.        Introduction                      i
  180.  
  181.             Registration Information    ii
  182.             4DOS License Agreement     iii
  183.             Technical Support           iv
  184.  
  185.  
  186.        4DOS Features                     1
  187.  
  188.  
  189.        Installation                      9
  190.  
  191.             4DOS Files                  10
  192.             Test Driving 4DOS           11
  193.             Quick Start                 12
  194.             Automatic Installation      13
  195.             DOS Shells Explained        14
  196.             COMSPEC                     15
  197.             Manual Installation         16
  198.             Memory Usage                18
  199.             Setting up CONFIG.SYS       19
  200.             Startup Options             21
  201.             4DSHELL                     25
  202.             AUTOEXEC and 4START         25
  203.             4DOS and COMMAND.COM        26
  204.  
  205.  
  206.        Using 4DOS                       27
  207.  
  208.             Starting 4DOS               27
  209.             Command Line Editing        28
  210.             Command History and Recall  29
  211.             Multiple Commands           30
  212.             Conditional Commands        30
  213.             Escape Character            31
  214.             Command Echoing             32
  215.             Argument Quoting            32
  216.             Batch Files                 33
  217.             Aliases                     35
  218.             Executable Extensions       37
  219.             Keystack                    39
  220.             Environment Variables       40
  221.             Variable Functions          42
  222.             I/O Redirection             43
  223.             Command Parsing             45
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.   4DOS Reference Manual         Copyright 1990, J.P. Software              
  233.  
  234.  
  235.        Command Reference Guide          46
  236.  
  237.             ?                           48
  238.             ALIAS                       49
  239.             ATTRIB                      52
  240.             BEEP                        53
  241.             BREAK                       54
  242.             CALL                        55
  243.             CANCEL                      56
  244.             CD / CHDIR                  57
  245.             CDD                         58
  246.             CHCP                        59
  247.             CLS                         60
  248.             COLOR                       61
  249.             COPY                        62
  250.             CTTY                        64
  251.             DATE                        65
  252.             DEL / ERASE                 66
  253.             DELAY                       67
  254.             DESCRIBE                    68
  255.             DIR                         69
  256.             DIRS                        72
  257.             DRAWBOX                     73
  258.             DRAWHLINE                   74
  259.             DRAWVLINE                   75
  260.             ECHO                        76
  261.             ENDLOCAL                    77
  262.             ESET                        78
  263.             EXCEPT                      79
  264.             EXIT                        80
  265.             FOR                         81
  266.             FREE                        82
  267.             GLOBAL                      83
  268.             GOSUB                       84
  269.             GOTO                        85
  270.             HELP                        86
  271.             HISTORY                     87
  272.             IF                          88
  273.             IFF                         91
  274.             INKEY                       92
  275.             INPUT                       93
  276.             KEYSTACK                    94
  277.             LIST                        95
  278.             LOG                         97
  279.             MD / MKDIR                  98
  280.             MEMORY                      99
  281.             MOVE                       100
  282.             PATH                       102
  283.             PAUSE                      103
  284.             POPD                       104
  285.             PROMPT                     105
  286.             PUSHD                      107
  287.  
  288.  
  289.  
  290.   4DOS Reference Manual         Copyright 1990, J.P. Software              
  291.  
  292.  
  293.             QUIT                       108
  294.             RD / RMDIR                 109
  295.             REM                        110
  296.             REN / RENAME               111
  297.             RETURN                     112
  298.             SCREEN                     113
  299.             SCRPUT                     114
  300.             SELECT                     115
  301.             SET                        117
  302.             SETDOS                     119
  303.             SETLOCAL                   122
  304.             SHIFT                      123
  305.             SWAPPING                   124
  306.             TEE                        125
  307.             TEXT                       126
  308.             TIME                       127
  309.             TIMER                      128
  310.             TYPE                       129
  311.             UNALIAS                    130
  312.             UNSET                      131
  313.             VER                        132
  314.             VERIFY                     133
  315.             VOL                        134
  316.             Y                          135
  317.  
  318.  
  319.        Appendix A - Error messages     136
  320.  
  321.  
  322.        Appendix B - ASP                146
  323.  
  324.  
  325.        Appendix C - Key codes          148
  326.  
  327.  
  328.        Appendix D- Programming         149
  329.  
  330.  
  331.        Appendix E - Tips and
  332.             Troubleshooting            150
  333.  
  334.  
  335.        Glossary                        162
  336.  
  337.  
  338.        Index                           173
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.   4DOS Reference Manual         Copyright 1990, J.P. Software              
  349.  
  350.  
  351.  
  352.   Introduction
  353.  
  354.        Welcome, and thanks for trying 4DOS!
  355.  
  356.        4DOS is designed to help you get the most out of your IBM PC or
  357.        compatible system.  It replaces COMMAND.COM, the command
  358.        interpreter that comes with all versions of MS-DOS and PC-DOS.
  359.  
  360.        You'll find 4DOS provides a wide variety of capabilities
  361.        COMMAND.COM can't, ranging from a vastly enhanced DIR command, to
  362.        point-and-shoot file selection for any command, to the ability to
  363.        completely redefine your system's commands.  Yet 4DOS is fully
  364.        compatible with COMMAND.COM.
  365.  
  366.        4DOS is a "DOS shell" (a program that gives you access to DOS
  367.        functions and commands), but it's unlike most DOS shells on the
  368.        market.  Virtually all of these shells are designed to isolate
  369.        the novice user from the DOS command line.  4DOS, on the other
  370.        hand, is intended to make DOS easier to use and to make you more
  371.        productive while working at the command line.  It provides
  372.        enhancements to most of the DOS commands, as well as more than 40
  373.        new commands.  These improvements make 4DOS a much richer and
  374.        more powerful working environment than COMMAND.COM, without
  375.        sacrificing the compatibility, flexibility and control you get
  376.        from working at the command line.  If you're tired of the
  377.        limitations of COMMAND.COM, you'll love 4DOS!
  378.  
  379.        4DOS is distributed as shareware, which means if you've
  380.        downloaded it from a bulletin board or obtained it from a friend,
  381.        you can try it out before you decide whether you'd like to keep
  382.        it.  Like all shareware, if you do decide to keep 4DOS, you must
  383.        pay a registration fee.
  384.  
  385.        4DOS is also distributed through normal retail channels.  If you
  386.        purchased a retail copy of 4DOS, it includes a shareware disk
  387.        which you can share with your friends and associates.
  388.  
  389.        The following pages include information on registration, the 4DOS
  390.        license agreement, and technical support for 4DOS.
  391.  
  392.        The text in this ASCII manual is essentially the same as that in
  393.        the printed manual.  Changes from the original version 3.0 manual
  394.        have been made to correct typographical errors or document small
  395.        changes in the software, but a few significant new features of
  396.        version 3.01 which would require repagination of the text are not
  397.        included.  For complete documentation on changes in version 3.01,
  398.        see the file UPDATE30.DOC.
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.   4DOS Reference Manual         Copyright 1990, J.P. Software            i 
  407.  
  408.  
  409.   Registration Information
  410.  
  411.        4DOS is a copyrighted program protected by both U.S. and
  412.        international copyright law.  If you obtained 4DOS from a
  413.        shareware disk vendor, an on-line computer service or bulletin
  414.        board, a friend or colleague, or another similar source, you have
  415.        an unregistered (trial) copy.  You are authorized to use this
  416.        copy without charge for a limited period of time under the terms
  417.        of the 4DOS license agreement.  After this time is up, you must
  418.        register and pay for 4DOS to continue using it.
  419.  
  420.        This method of distribution is known as shareware.  It allows you
  421.        to determine whether 4DOS meets your needs before you pay for it.
  422.  
  423.        The registration fee for a single copy of 4DOS is $50.  Payment
  424.        of this fee entitles you to:
  425.  
  426.          ∙    A disk with the latest version of 4DOS, registered to you.
  427.  
  428.          ∙    One copy of the printed and bound 4DOS manual.
  429.  
  430.          ∙    A free upgrade to the next version of 4DOS.  Future
  431.               upgrades will be available for downloading from a wide
  432.               variety of sources; if you do not have a modem there will be
  433.               a minimal processing charge ($7 or less, including shipping)
  434.               to obtain an upgrade on diskette.
  435.  
  436.          ∙    Technical support via electronic mail or telephone.
  437.  
  438.          ∙    A subscription to the 4DOS newsletter.
  439.  
  440.        If you prefer, you may register for $35 and receive only the disk
  441.        and notices of future upgrades.  Network, site, and corporate
  442.        licenses are also available; contact J.P. Software for more
  443.        information.
  444.  
  445.        If you purchased a complete copy of 4DOS with printed manual from
  446.        a software dealer, your copy came with a yellow registration
  447.        card.  Return this card promptly to J.P. Software to ensure you
  448.        are registered with us, and to receive technical support and
  449.        notices of future upgrades.  If you purchased 4DOS directly from
  450.        J.P. Software and paid the full $35 or $50 fee, you are already
  451.        registered, and no registration card is necessary.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.   4DOS Reference Manual         Copyright 1990, J.P. Software           ii 
  465.  
  466.  
  467.   4DOS License Agreement
  468.  
  469.        Your use of 4DOS is covered by a license agreement which specifies
  470.        how you may and may not use the program.  For space reasons this
  471.        license is only summarized here.  The full text is available in the
  472.        file ORDER.FRM.  Your legal right to use 4DOS depends on your
  473.        compliance with the terms of this agreement; please read it
  474.        carefully.
  475.  
  476.        The license agreement includes information on:
  477.  
  478.          ∙  Copyright and usage restrictions on 4DOS;
  479.  
  480.          ∙  The registered and shareware versions of 4DOS, and restric-
  481.             tions on the distribution of each version, including the
  482.             requirement that you purchase a registered copy of 4DOS if
  483.             you continue to use it beyond the 21-day trial period;
  484.  
  485.          ∙  When you may and may not use one copy of 4DOS on two computers;
  486.  
  487.          ∙  Using 4DOS on networks or multiple systems;
  488.  
  489.          ∙  Restrictions on copying and distributing 4DOS, including
  490.             distribution for a fee;
  491.  
  492.          ∙  What J.P. Software does and does not warrant about the per-
  493.             formance and usefulness of 4DOS, including LIMITED WARRANTY
  494.             information;
  495.  
  496.          ∙  A satisfaction guarantee.
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.   4DOS Reference Manual         Copyright 1990, J.P. Software          iii 
  523.  
  524.  
  525.   Technical Support
  526.  
  527.        Technical support for 4DOS is available to registered users.  If
  528.        you are not a registered user, we will provide you with
  529.        assistance to install a shareware copy of 4DOS and evaluate it
  530.        during the 21 day evaluation period, but we cannot provide
  531.        continuing support beyond that until you purchase 4DOS.
  532.  
  533.        The best way to contact us for support is by modem, in one of the
  534.        following public 4DOS support conferences.  The numbers in
  535.        parentheses indicate the usual delay, in days, to receive a reply
  536.        to a message.
  537.  
  538.        CompuServe / PCMagNet:  Primary support is via the J.P. Software
  539.        section of the CompuServe PCVENB forum (GO PCVENB) (1 day).  We
  540.        also monitor the CompuServe CONSULT and IBMSYS forums, and the
  541.        PCMagNet UTILFORUM (1-3 days).
  542.  
  543.        Bulletin Boards:  Primary support is via Future Technology BBS,
  544.        4DOS Conference, Boston, MA  617-720-3600 (1-3 days).  Additional
  545.        support is available from many local BBSes via the 4DOS
  546.        conferences on the InterLink and PC Relay BBS Networks (3-5
  547.        days).
  548.  
  549.        BIX:  Support is available via the ibm.dos conference, topic 4DOS
  550.        (3-5 days).
  551.  
  552.        In addition, you can contact J.P. Software for support by mail,
  553.        telephone, fax, or electronic mail.  Addresses and phone numbers
  554.        are listed on the first page of this manual.
  555.  
  556.        We prefer support via one of the electronic services listed
  557.        above, or via electronic mail, as it allows correspondence at
  558.        convenient times regardless of time zones and work schedules, and
  559.        it provides a record of the communication.  However, telephone
  560.        support is also provided to those users who do not have a modem
  561.        or who need an quick response.
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.   4DOS Reference Manual         Copyright 1990, J.P. Software           iv 
  581.  
  582.  
  583.   4DOS Features
  584.  
  585.        4DOS is a complete replacement for COMMAND.COM, the command
  586.        processor provided with MS-DOS or PC-DOS.  (References in this
  587.        manual to MS-DOS also apply to PC-DOS.)  4DOS is compatible with
  588.        MS-DOS versions 2.0 to 4, and the OS/2 DOS compatibility box, and
  589.        adds many enhancements to your MS-DOS prompt, including:
  590.  
  591.          Minimal Memory Usage
  592.  
  593.             4DOS requires less than 4K of your precious RAM for its
  594.             resident portion (less than 1K with XMS swapping!), and can
  595.             use EMS, XMS, or disk for swapping its transient portion.
  596.  
  597.          Fast Batch Files
  598.  
  599.             4DOS 3.0 adds a new batch file extension (.BTM, "batch to
  600.             memory") that is compatible with 99% of your existing batch
  601.             files, but runs several times faster.
  602.  
  603.          Executable Extensions
  604.  
  605.             In addition to the normal executable file extensions (.COM,
  606.             .EXE, .BAT, and .BTM), 4DOS allows you to define additional
  607.             extensions and the programs they should invoke.  For
  608.             example, entering a document name could automatically invoke
  609.             your word processor.
  610.  
  611.          On-line Help
  612.  
  613.             4DOS provides help for all of its internal commands, as well
  614.             as the MS-DOS external commands.  You can get help by
  615.             pressing the F1 key at the command prompt.  The 4DOS help
  616.             facility is extensible, so you can add help for your own
  617.             programs.  (Modifications to the help facility require the
  618.             4DOS utility disk, which contains the source text and help
  619.             file compiler.)
  620.  
  621.          Command Line Editing
  622.  
  623.             4DOS provides command line editing, including insert and
  624.             delete, and full cursor key support.  4DOS also offers
  625.             interactive expansion of wildcard filenames on the command
  626.             line.
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.   4DOS Reference Manual         Copyright 1990, J.P. Software            1 
  639.  
  640.  
  641.          Command History
  642.  
  643.             4DOS lets you view, search, modify, and reexecute your
  644.             previous commands.  The commands are saved in memory, and
  645.             can be recalled with the cursor keys.  The command history
  646.             list size is user-defined, from 512 to 8192 characters.
  647.  
  648.          Flexible File Wildcards
  649.  
  650.             4DOS offers more flexible wildcards than COMMAND.COM.  For
  651.             example, you can display all the files that have a "2"
  652.             anywhere in their filename by entering:
  653.  
  654.               dir *2*.*
  655.  
  656.          File Descriptions
  657.  
  658.             4DOS allows you to provide descriptions (up to 40
  659.             characters) for each of your files and directories.  The
  660.             descriptions are displayed with the filenames when you use
  661.             the DIR or SELECT commands.  The description goes with a
  662.             file when you COPY, ERASE, MOVE, or RENAME it.
  663.  
  664.          Multiple Commands on a Single Line
  665.  
  666.             You can enter several commands on a line by separating them
  667.             with a ^ (caret), or other user-defined character.
  668.  
  669.          Expanded and Editable Environment
  670.  
  671.             4DOS provides a user-defined environment size from 512 to
  672.             32000 characters.  You can interactively edit environment
  673.             entries with the ESET command.
  674.  
  675.          Environment Variables
  676.  
  677.             Environment variables allow you to associate a string of
  678.             characters with a variable name, substituting that string
  679.             when the name is used.  4DOS provides a number of predefined
  680.             variables, including system date and time, current
  681.             directory, and default disk, and "variable functions," for
  682.             returning substrings, the parts of a filename (path, name,
  683.             extension), etc.
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.   4DOS Reference Manual         Copyright 1990, J.P. Software            2 
  697.  
  698.  
  699.          Aliases
  700.  
  701.             Aliases allow you to rename or reconfigure commands (for
  702.             example, to pass default parameters to a command, or to give
  703.             MS-DOS the look and feel of a different operating system),
  704.             or to define a new command as a combination of several other
  705.             commands.  Aliases support batch file-like arguments (%1,
  706.             %2, etc.) and environment variables, so when combined with
  707.             the multiple commands feature, they act as very fast batch
  708.             files.
  709.  
  710.          Expanded Command Line
  711.  
  712.             4DOS expands the MS-DOS command input line from 127 to 255
  713.             characters for internal commands.  (Because MS-DOS truncates
  714.             the command line for external commands to 127 characters,
  715.             4DOS makes the full command line available to your programs
  716.             through the CMDLINE environment variable.)
  717.  
  718.          Conditional Commands
  719.  
  720.             4DOS includes two new command line operators: || (OR) and &&
  721.             (AND).  They allow you to control the execution of
  722.             subsequent commands based on the result of the previous
  723.             command.
  724.  
  725.          Additional Redirection Options
  726.  
  727.             In addition to redirection of standard input and standard
  728.             output, 4DOS supports redirection of standard error, and the
  729.             option to prevent overwriting existing files.  4DOS also
  730.             provides TEE and Y "pipe fittings."
  731.  
  732.          EGA/VGA Support
  733.  
  734.             4DOS supports Monochrome, CGA, EGA and VGA displays with any
  735.             number of lines and columns per screen.
  736.  
  737.          Networks
  738.  
  739.             4DOS supports MS-DOS compatible networks, including 3Com 3+
  740.             and Novell Netware.
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.   4DOS Reference Manual         Copyright 1990, J.P. Software            3 
  755.  
  756.  
  757.   New and Enhanced Commands
  758.  
  759.        4DOS provides many new internal commands, and new options for
  760.        existing commands.  Most 4DOS commands can take multiple
  761.        arguments.  For example, you can delete several files with a
  762.        single DEL command:
  763.  
  764.          del *.bak test.wks oldfile.txt
  765.  
  766.        You can also copy several files with a single COPY command (the
  767.        target directory here is a:\):
  768.  
  769.          copy *.wks memo.doc *.c a:\
  770.  
  771.        The following list is intended to give you a sampling of some of
  772.        the new and enhanced commands.  See the Command Reference Guide
  773.        for full details.
  774.  
  775.  
  776.          ALIAS / UNALIAS
  777.  
  778.             Define aliases for commonly used commands, allowing you to
  779.             execute a complex series of commands with a few keystrokes.
  780.  
  781.          ATTRIB
  782.  
  783.             Display or change the file attributes (read-only, hidden,
  784.             system, and archive) for the specified files and/or
  785.             directories.
  786.  
  787.          CDD
  788.  
  789.             Change the default drive and directory.
  790.  
  791.          COLOR
  792.  
  793.             Set the screen foreground and background colors.
  794.  
  795.          COPY
  796.  
  797.             COPY includes new switches for copying only updated files
  798.             (where the source is newer than the target), and to prompt
  799.             for confirmation before overwriting existing files.
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.   4DOS Reference Manual         Copyright 1990, J.P. Software            4 
  813.  
  814.  
  815.          DESCRIBE
  816.  
  817.             Add 40-character descriptions to filenames.  The
  818.             descriptions are displayed when using DIR and SELECT.
  819.  
  820.          DIR
  821.  
  822.             Display the disk directory with a wide variety of options,
  823.             including 1, 2, 4, or 5 column display; sorted by name,
  824.             extension, description, size, or date/time; display
  825.             subdirectories; display file attributes; and display
  826.             subtotals only.
  827.  
  828.          ESET
  829.  
  830.             Interactively edit environment variables and aliases.
  831.  
  832.          EXCEPT
  833.  
  834.             Execute a command except on the specified file(s).
  835.  
  836.          FREE
  837.  
  838.             Display the total and free disk space for the specified
  839.             drive(s).
  840.  
  841.          GLOBAL
  842.  
  843.             Execute a command in the current directory and all of its
  844.             subdirectories.
  845.  
  846.          HELP
  847.  
  848.             Display a pop-up help window for 4DOS internal commands and
  849.             MS-DOS external commands.
  850.  
  851.          HISTORY
  852.  
  853.             Display, clear or load the command history list.
  854.  
  855.          LIST
  856.  
  857.             Display a file on the screen.  LIST provides forward and
  858.             backward paging, vertical and horizontal scrolling, text
  859.             search, and printing.
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.   4DOS Reference Manual         Copyright 1990, J.P. Software            5 
  871.  
  872.  
  873.          LOG
  874.  
  875.             Keep a disk log of each command executed, with the date and
  876.             time.
  877.  
  878.          MEMORY
  879.  
  880.             Display the amount of total and available DOS, expanded,
  881.             XMS, and extended memory, and environment space.
  882.  
  883.          MOVE
  884.  
  885.             Move files between directories and/or drives, and optionally
  886.             prompt before overwriting existing files.
  887.  
  888.          PUSHD / POPD / DIRS
  889.  
  890.             Use a "directory stack" to change directories, perform some
  891.             work, and then return to the original directory.
  892.  
  893.          RENAME
  894.  
  895.             In addition to renaming files, 4DOS also allows you to
  896.             rename files to another directory, and to rename
  897.             directories.
  898.  
  899.          SELECT
  900.  
  901.             Perform a command on selected files (using point-and-shoot
  902.             selection).
  903.  
  904.          SETDOS
  905.  
  906.             Configure the 4DOS internal parameters, including the
  907.             default line editing mode (insert or overstrike), the
  908.             default batch echo mode, the compound command character, the
  909.             escape character, screen size, and cursor shape.
  910.  
  911.          TIMER
  912.  
  913.             A system stopwatch for timing events, including split times.
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.   4DOS Reference Manual         Copyright 1990, J.P. Software            6 
  929.  
  930.  
  931.   Enhanced Batch Processor
  932.  
  933.        The batch processor in 4DOS is compatible with batch files
  934.        written for COMMAND.COM, and includes several new and enhanced
  935.        commands to make batch file programming easier and more powerful,
  936.        including:
  937.  
  938.  
  939.          BEEP
  940.  
  941.             Beep the speaker at the specified frequency and for the
  942.             specified duration.
  943.  
  944.          CALL
  945.  
  946.             Execute nested batch files without loading a secondary
  947.             copy of the command processor.
  948.  
  949.          CANCEL
  950.  
  951.             Terminate nested batch file processing.
  952.  
  953.          DELAY
  954.  
  955.             Wait for the specified period of time before continuing
  956.             batch processing.
  957.  
  958.          DRAWBOX / DRAWHLINE / DRAWVLINE
  959.  
  960.             Draw boxes, horizontal, and vertical lines in single or
  961.             double widths, in your choice of colors.  These commands
  962.             automatically make connectors when crossing other lines.
  963.  
  964.          GOSUB / RETURN
  965.  
  966.             Call subroutines within a batch file.
  967.  
  968.          IF
  969.  
  970.             Many new comparison tests, (including less than, greater
  971.             than, etc), and tests for memory, disk, and display type.
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.   4DOS Reference Manual         Copyright 1990, J.P. Software            7 
  987.  
  988.  
  989.          IFF / THEN / ELSEIFF / ELSE / ENDIFF
  990.  
  991.             Allows nested IF / THEN / ELSE tests in batch files and
  992.             aliases, and supports all of the new IF tests (see above).
  993.  
  994.          INPUT / INKEY
  995.  
  996.             Input variables from the keyboard while in a batch
  997.             file, with an optional timeout period.
  998.  
  999.          KEYSTACK
  1000.  
  1001.             Send keystrokes to a program, as if entered from the
  1002.             keyboard.
  1003.  
  1004.          QUIT
  1005.  
  1006.             Exit the current batch file.
  1007.  
  1008.          SCREEN
  1009.  
  1010.             Position the cursor and (optionally) display text.
  1011.  
  1012.          SCRPUT
  1013.  
  1014.             Position the cursor and display text in the specified
  1015.             colors.
  1016.  
  1017.          SETLOCAL / ENDLOCAL
  1018.  
  1019.             Define a local environment within a batch file, saving the
  1020.             original environment, disk, and directory, and restoring
  1021.             them when finished.
  1022.  
  1023.          SHIFT
  1024.  
  1025.             Optionally specify how many positions to shift,
  1026.             including reverse SHIFTs.
  1027.  
  1028.          TEXT / ENDTEXT
  1029.  
  1030.             Display a block of text.
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.   4DOS Reference Manual         Copyright 1990, J.P. Software            8 
  1045.  
  1046.  
  1047.   Installation
  1048.  
  1049.        4DOS is written for the IBM PC, PC/XT, PC/AT, PS/2 (all models),
  1050.        and compatibles.  It requires MS-DOS 2 or above (MS-DOS 3.1 or
  1051.        above is recommended), and uses less than 4K of RAM in swapping
  1052.        mode, or about 70K in resident mode.
  1053.  
  1054.        If you are new to 4DOS, read through this section until you get
  1055.        to "Automatic Installation."  If you have a diskette copy of
  1056.        4DOS, you can follow the automatic installation procedure, and
  1057.        come back later to read the section on manual installation and
  1058.        configuration.
  1059.  
  1060.        If you would like to try out 4DOS before fully installing it, see
  1061.        the section Test Driving 4DOS.
  1062.  
  1063.        If you are an experienced 4DOS user, do not have 4DOS on
  1064.        diskette, or prefer manual installation for any other reason,
  1065.        read through this section before installing 4DOS.  See the Quick
  1066.        Start section for brief instructions for experienced users on how
  1067.        to install 4DOS.
  1068.  
  1069.   4DOS Files
  1070.  
  1071.        The files listed below are part of 4DOS.  Depending on where you
  1072.        obtained your copy, you may find the files in a compressed form,
  1073.        usually in a file with the extension .ZIP or .ARC.  These files
  1074.        may change from time to time.  See the file README.DOC for up to
  1075.        date information on which files are included with your copy of
  1076.        4DOS.
  1077.  
  1078.        INSTALL.BAT*   The automatic installation batch file.  Note that
  1079.                       INSTALL.BAT will only work with copies of 4DOS
  1080.                       distributed on diskette.
  1081.  
  1082.        4DOS.COM       The 4DOS shell loader and swapper.
  1083.  
  1084.        4DOS88.EXE     Replaces COMMAND.COM as the default MS-DOS command
  1085.                       processor on any PC compatible system.
  1086.  
  1087.        4DOS286.EXE    A version of 4DOS optimized for 80186, 80286,
  1088.                       80386, 80486, V20 and V30 processors.  4DOS286
  1089.                       is slightly smaller and faster than 4DOS88.
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.   4DOS Reference Manual         Copyright 1990, J.P. Software            9 
  1103.  
  1104.  
  1105.        4DOS.DOC         The 4DOS manual.
  1106.  
  1107.        KEYSTACK.SYS     This device driver provides the support for the
  1108.                         4DOS KEYSTACK command.
  1109.  
  1110.        HELP.EXE         This is the on-line help program for 4DOS.  It
  1111.                         provides help for all of the internal 4DOS
  1112.                         commands, and for the external MS-DOS commands.
  1113.  
  1114.        DOS.HLP          The text file for HELP.EXE.
  1115.  
  1116.        ALIASES          Sample predefined 4DOS aliases.
  1117.  
  1118.        PKUNZIP.EXE*     Program used to uncompress the .ZIP files.
  1119.  
  1120.        PKUNZIP.DOC*     Documentation for PKUNZIP.EXE.
  1121.  
  1122.        COMPAT.DOC       Compatibility notes -- look here if you have
  1123.                         trouble getting another program running with
  1124.                         4DOS.
  1125.  
  1126.        README.DOC       Last-minute revisions and bug reports.
  1127.  
  1128.        * Included only with diskette copies of 4DOS.
  1129.  
  1130.   Compatibility
  1131.  
  1132.        Compatibility information varies from release to release of both
  1133.        4DOS and other products.  See Appendix E - Troubleshooting 4DOS
  1134.        for general usage notes and troubleshooting tips.  The file
  1135.        COMPAT.DOC (distributed with 4DOS) contains the latest
  1136.        compatibility information available to us, along with information
  1137.        on how to address known compatibility problems.
  1138.  
  1139.        If the information in Appendix E and COMPAT.DOC doesn't solve
  1140.        your problem, contact J.P. Software directly for technical
  1141.        support.
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.   4DOS Reference Manual         Copyright 1990, J.P. Software           10 
  1161.  
  1162.  
  1163.   Test Driving 4DOS
  1164.  
  1165.        While 4DOS is normally installed as your system's primary command
  1166.        processor, you can try it out by running it just like any other
  1167.        program.  This allows you to explore the features and advantages
  1168.        of 4DOS before doing a full installation.
  1169.  
  1170.        To try 4DOS, copy the files 4DOS.COM and 4DOS88.EXE to your
  1171.        system disk.  If the copy of 4DOS you received has these files
  1172.        compressed, use the following command to decompress them (this
  1173.        example assumes the files are stored in the compressed file
  1174.        A:\4DOS30.ZIP, and you are decompressing them with the PKUNZIP
  1175.        program onto the root directory of drive C)
  1176.  
  1177.             pkunzip a:\4dos30 c:\4dos.com c:\4dos88.exe
  1178.  
  1179.        You can put these files in any directory, including a separate
  1180.        4DOS directory if you like.  Change to that directory, and enter
  1181.        the command:
  1182.  
  1183.             4dos
  1184.  
  1185.        You will see the 4DOS sign-on message and a prompt.  You are now
  1186.        ready to try 4DOS!  You can return to COMMAND.COM at any time by
  1187.        typing:
  1188.  
  1189.             exit
  1190.  
  1191.        Note that the 4DOS KEYSTACK command will be unavailable because
  1192.        it requires the KEYSTACK.SYS device driver to be installed.
  1193.        Installation of KEYSTACK.SYS is described in the Manual
  1194.        Installation section.
  1195.  
  1196.        The 4DOS HELP command will also be unavailable.  To try it out,
  1197.        decompress and/or copy the files HELP.EXE and DOS.HLP to a
  1198.        directory included in your PATH statement.  Then type HELP or
  1199.        press F1 at the 4DOS prompt to access the 4DOS online help
  1200.        facility.
  1201.  
  1202.        There are a few situations where you will need to make some
  1203.        changes in the method described above.  If your system does not
  1204.        have a hard disk, EMS, or XMS memory, use the following command
  1205.        to start 4DOS:
  1206.  
  1207.             4dos /s:n
  1208.  
  1209.        This will disable 4DOS swapping (floppy disk swapping is too slow
  1210.        to be useful).  Under these conditions 4DOS will require about
  1211.        70K of memory, instead of the under 4K required in swapping mode.
  1212.  
  1213.        If you are running network software, you can start 4DOS as above,
  1214.        but do so after your network is loaded.  If you are running a
  1215.        multitasking or task switching environment such as DESQview or
  1216.        Microsoft Windows, load 4DOS as above within a partition or
  1217.  
  1218.   4DOS Reference Manual         Copyright 1990, J.P. Software           11 
  1219.  
  1220.  
  1221.        window, rather than attempting to load the operating environment
  1222.        after 4DOS has started.  (These restrictions apply only to
  1223.        testing 4DOS.  Once it is installed as the primary shell and
  1224.        configured properly for your system, they will not be necessary.)
  1225.  
  1226.   Quick Start
  1227.  
  1228.        If you are an experienced MS-DOS user, the following instructions
  1229.        will get you up and running with 4DOS.  If you have trouble or if
  1230.        these instructions don't make sense, use the automatic or manual
  1231.        installation procedures described later in this section.  These
  1232.        instructions assume you are booting from a hard disk which is
  1233.        drive C.
  1234.  
  1235.          1) Be sure you have a bootable MS-DOS floppy.
  1236.  
  1237.          2) Decompress and/or copy the files 4DOS.COM, KEYSTACK.SYS, and
  1238.             4DOS286.EXE (for 8018x/286/386/486, V20, and V30 processors)
  1239.             or 4DOS88.EXE (for 808x processors) to the root directory of
  1240.             drive C:.
  1241.  
  1242.          3) If you have a registered (non-shareware) copy of 4DOS,
  1243.             change to the root directory of drive C and run the BRAND
  1244.             program by entering "A:BRAND".  Enter the serial number from
  1245.             the diskette label, and your EXE file will be branded as a
  1246.             fully registered copy.  If you only copied one of the EXE
  1247.             files, ignore the error message about the missing EXE file.
  1248.  
  1249.          4) Decompress and/or copy the files HELP.EXE and DOS.HLP to a
  1250.             directory included in your PATH statement.
  1251.  
  1252.          5) Edit CONFIG.SYS so that it contains the following lines
  1253.             (delete any existing SHELL= line):
  1254.  
  1255.                  device=c:\keystack.sys
  1256.                  shell=c:\4dos.com /E:n /A:m /P
  1257.  
  1258.             where n is your desired environment size, and m is the
  1259.             desired alias list size (in bytes).  The default values are
  1260.             /E:512 and /A:1024.
  1261.  
  1262.          6) Reboot your system.  The system will load 4DOS (swapping to
  1263.             XMS, EMS, or disk, depending on what is available), execute
  1264.             AUTOEXEC, and return to the 4DOS prompt when AUTOEXEC is
  1265.             done.
  1266.  
  1267.          7) If you are using PROMPT commands in AUTOEXEC to transmit
  1268.             ANSI control sequences for key redefinitions, they will not
  1269.             work with 4DOS; you must use ECHO instead.  See the PROMPT
  1270.             command in the Command Reference Guide for more information.
  1271.             ANSI control sequences for the prompt itself (to set colors
  1272.             etc.) will work properly.
  1273.  
  1274.  
  1275.  
  1276.   4DOS Reference Manual         Copyright 1990, J.P. Software           12 
  1277.  
  1278.  
  1279.          8) If you are explicitly setting COMSPEC in AUTOEXEC, you
  1280.             should delete this line or place a REM in front of it if you
  1281.             want to use 4DOS as your secondary shell.  4DOS will
  1282.             automatically set the COMSPEC to C:\4DOS.COM.
  1283.  
  1284.   Automatic Installation
  1285.  
  1286.        You must have a diskette version of 4DOS to use automatic
  1287.        installation.  If you have a registered copy of 4DOS, insert the
  1288.        4DOS Registered Disk in drive A; otherwise insert the 4DOS
  1289.        Shareware Disk in drive A and type:
  1290.  
  1291.             a:install
  1292.  
  1293.        If you need to install from a drive other than drive A:, use the
  1294.        following command:
  1295.  
  1296.             d:install
  1297.  
  1298.        where d is the drive containing the 4DOS installation disk.
  1299.  
  1300.        INSTALL will prompt you for your desired configuration, copy the
  1301.        necessary files to your boot disk, save your existing CONFIG.SYS
  1302.        file and create a modified version.  Reboot your system to start
  1303.        4DOS.
  1304.  
  1305.        NOTE:  You may want to edit the new CONFIG.SYS if you have an
  1306.        unusual configuration, or if you want to modify the default
  1307.        values.
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.   4DOS Reference Manual         Copyright 1990, J.P. Software           13 
  1335.  
  1336.  
  1337.   DOS Shells Explained
  1338.  
  1339.        This section gives an overview of what "DOS shells" (as discussed
  1340.        in this manual) are, and of primary and secondary shells.  This
  1341.        information is important in understanding how to install and
  1342.        configure 4DOS.  If you already understand these concepts, go on
  1343.        to the next section.
  1344.  
  1345.        In the PC world the term shell has come to mean any program that
  1346.        gives you the capability to execute DOS commands and run
  1347.        programs.  We will use it more precisely to mean the system
  1348.        command interpreter, the program which reads your keystrokes at
  1349.        the DOS prompt and interprets them, allowing you to execute
  1350.        internal commands and run external programs.  Before 4DOS,
  1351.        virtually all PCs using DOS used COMMAND.COM as the shell.
  1352.  
  1353.        When your system is started, the last thing the system startup
  1354.        software does is to load a copy of the shell program into memory
  1355.        and give it control.  This program is called the primary or root
  1356.        shell.  It executes AUTOEXEC.BAT, displays the command line
  1357.        prompt and processes your commands.
  1358.  
  1359.        The primary shell is the program that executes most of the
  1360.        commands you enter, either as internal functions (e.g., the DIR
  1361.        command), or by loading and executing other programs (e.g., a
  1362.        word processing program).
  1363.  
  1364.        The text file CONFIG.SYS, stored in the root directory of your
  1365.        boot disk, tells MS-DOS how to start:  what device drivers to
  1366.        load, how many open files to allow, etc.  The SHELL statement in
  1367.        CONFIG.SYS determines what program is loaded as the primary
  1368.        shell.  If you don't have a SHELL statement, MS-DOS will load
  1369.        COMMAND.COM as the primary shell.  However, any properly written
  1370.        program can be loaded in place of COMMAND.COM.  This is the
  1371.        normal method for loading 4DOS.
  1372.  
  1373.        Now, suppose from inside your word processor you invoke the
  1374.        "shell to DOS" option, to execute some commands without having to
  1375.        save your files and exit first.  When the prompt comes up, you
  1376.        are running a secondary shell;  the word processor has loaded a
  1377.        shell program into memory to perform commands.  When you type the
  1378.        EXIT command, the secondary shell terminates and control is
  1379.        returned to the word processor.
  1380.  
  1381.        The same kind of sequence is used by many programs which run
  1382.        other programs or execute MS-DOS commands:  the program loads a
  1383.        copy of the command processor (a secondary shell) and passes a
  1384.        command to it to execute a command or another program.  For
  1385.        example, a hard disk manager which allows you to copy files may
  1386.        invoke a secondary shell and pass a COPY command to it to
  1387.        actually perform the copy.
  1388.  
  1389.  
  1390.  
  1391.  
  1392.   4DOS Reference Manual         Copyright 1990, J.P. Software           14 
  1393.  
  1394.  
  1395.        Multitasking or task switching systems may also use secondary
  1396.        shells to load and execute the programs you specify in each of
  1397.        the windows or partitions they support. For example, DESQview
  1398.        will load a secondary shell to execute your program under some
  1399.        conditions, and will execute the program directly under other
  1400.        conditions (see the DESQview manual for details).
  1401.  
  1402.        In all of these situations, the secondary shell need not be the
  1403.        same program as the primary shell.  The two shells are completely
  1404.        independent, occupy different areas of memory, and generally have
  1405.        little interaction with each other. Both COMMAND.COM and 4DOS can
  1406.        work as primary and/or secondary shells.
  1407.  
  1408.   The COMSPEC Environment Variable
  1409.  
  1410.        A variable in the MS-DOS environment, COMSPEC, determines which
  1411.        program is loaded as the secondary shell, just as the SHELL
  1412.        command in CONFIG.SYS specifies the primary shell program.  The
  1413.        COMSPEC variable is set at startup time to point to the primary
  1414.        shell program.  It can be modified at any time with the SET
  1415.        command.  If COMSPEC does not point to a valid command processor
  1416.        (including the correct drive and directory), programs attempting
  1417.        to shell to MS-DOS will fail.
  1418.  
  1419.        In 4DOS, COMSPEC is set at system startup to d:\4DOS.COM, where
  1420.        d: represents the drive the system was started from.  In
  1421.        COMMAND.COM, COMSPEC is set to d:\COMMAND.COM.
  1422.  
  1423.        If 4DOS is your primary shell, and 4DOS.COM and 4DOS88.EXE (or
  1424.        4DOS286.EXE) are not stored in the root directory of the boot
  1425.        drive, you MUST set COMSPEC yourself in AUTOEXEC.BAT with the
  1426.        proper drive and directory for 4DOS.COM and the 4DOS EXE files.
  1427.        If COMSPEC is not set correctly, you will not be able to shell
  1428.        out to 4DOS or execute external commands from within your
  1429.        application programs.  For example, if your 4DOS.COM and
  1430.        4DOS88.EXE or 4DOS286.EXE files are in D:\BIN\4DOS, put the
  1431.        following command in AUTOEXEC.BAT:
  1432.  
  1433.          set comspec=d:\bin\4dos\4dos.com
  1434.  
  1435.        Note that COMSPEC contains only the name of the shell program.
  1436.        Any options to be passed to secondary 4DOS shells must be set
  1437.        separately in 4DSHELL (see below).
  1438.  
  1439.  
  1440.        NOTE:  A few ill-behaved programs ignore COMSPEC, and explicitly
  1441.        load COMMAND.COM as a secondary shell.  Although it is possible
  1442.        to rename 4DOS.COM to COMMAND.COM to handle most of these cases,
  1443.        we recommend you keep a copy of COMMAND.COM on your system as it
  1444.        may be needed for other purposes.
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.   4DOS Reference Manual         Copyright 1990, J.P. Software           15 
  1451.  
  1452.  
  1453.        Some versions of COMMAND.COM permit specification of an alternate
  1454.        path for COMMAND.COM as an argument on the SHELL= line in
  1455.        CONFIG.SYS, and this path is used to set the COMSPEC.  This is
  1456.        not a documented feature of COMMAND.COM, and is not supported by
  1457.        4DOS.
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.   4DOS Reference Manual         Copyright 1990, J.P. Software           16 
  1509.  
  1510.  
  1511.   Manual Installation and Configuration Options
  1512.  
  1513.        These instructions assume that you are installing 4DOS on a hard
  1514.        disk with drive letter C, and that you will be placing the 4DOS
  1515.        system files in the root directory of that disk.  If you need to
  1516.        place the files on another drive or directory (for example, on a
  1517.        floppy disk system), you will need to adjust the parameters.
  1518.  
  1519.        The first step in installing 4DOS is to copy the files from the
  1520.        4DOS disk or compressed file to your boot disk.  If you have a
  1521.        diskette copy of 4DOS, see the README.DOC file on the diskette
  1522.        for information on exactly how the files are stored.
  1523.  
  1524.        Copy (or decompress) the following 4DOS system files to the root
  1525.        directory of your boot disk:
  1526.  
  1527.             KEYSTACK.SYS
  1528.             4DOS.COM
  1529.             4DOS88.EXE, if your system has an 8086 or 8088 CPU (this
  1530.                applies to most PC and XT systems)
  1531.             4DOS286.EXE, if your system has an 80186, 80188, 80286,
  1532.                80386, 80486, or NEC V20 or V30 CPU (this applies to all
  1533.                AT and 386/486 systems, and some other systems with
  1534.                accelerator boards or replacement CPU chips)
  1535.  
  1536.        If you are in doubt about your CPU type, use 4DOS88.EXE until you
  1537.        can determine the CPU type definitively (see the _CPU variable in
  1538.        Environment Variables).  4DOS88.EXE will work with all PCs.
  1539.  
  1540.        Copy (or decompress) the files HELP.EXE and DOS.HLP to a
  1541.        directory included in your path (i.e. one listed in the PATH
  1542.        statement in AUTOEXEC.BAT).
  1543.  
  1544.        Copy (or decompress) the  files 4DOS.DOC, README.DOC, COMPAT.DOC,
  1545.        and ALIASES to any directory you choose, if you wish to have them
  1546.        available on-line permanently, or temporarily in order to print
  1547.        them.
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.   4DOS Reference Manual         Copyright 1990, J.P. Software           17 
  1567.  
  1568.  
  1569.   4DOS Memory Usage
  1570.  
  1571.        When installing 4DOS you must decide whether you want to run in
  1572.        swapping mode or memory-resident mode.
  1573.  
  1574.        Swapping mode is recommended for most users.  In this mode a
  1575.        small part of 4DOS (the resident portion, less than 4K in size,
  1576.        from the file 4DOS.COM) resides permanently in low memory.  The
  1577.        remainder of 4DOS (the transient portion, about 70K in size, from
  1578.        the file 4DOS88.EXE or 4DOS286.EXE), resides at the end of normal
  1579.        MS-DOS memory, and is swapped out to XMS, EMS, or disk while your
  1580.        applications are running.  This swapping is very fast, especially
  1581.        if XMS or EMS memory or a RAM disk is available, and it allows
  1582.        you to have the power of 4DOS, yet keep most of your memory
  1583.        available for applications.
  1584.  
  1585.        COMMAND.COM uses a similar approach to keep its resident portion
  1586.        in low memory and its transient portion at the end of DOS memory.
  1587.        It does not retain information while applications are running, so
  1588.        it does not use a swap area.  The resident portion of COMMAND.COM
  1589.        is slightly larger than that of 4DOS.  The transient portion is
  1590.        smaller (about 35K) as COMMAND.COM has far fewer features and
  1591.        capabilities than 4DOS.
  1592.  
  1593.        The resident portion of 4DOS takes about 10K of memory to load
  1594.        (later reduced to less than 4K), and the transient portion 70K,
  1595.        so you must have about 80K of free memory to load 4DOS in
  1596.        swapping mode (82K for 4DOS88).
  1597.  
  1598.        COMMAND.COM requires about 40K of free memory to load.  If you
  1599.        find you are able to load COMMAND.COM as the secondary shell from
  1600.        a particular program, but are unable to load 4DOS, it is probably
  1601.        because you have more than 40K but less than 80K of free memory,
  1602.        or because COMSPEC and/or 4DSHELL (see below) are set
  1603.        incorrectly.
  1604.  
  1605.        Memory resident mode is recommended only on systems (older PCs
  1606.        and some laptops) which have no hard disk, XMS or EMS memory, or
  1607.        RAM disk.  On such systems the only swap area available is a
  1608.        floppy disk, which is unacceptably slow.  In memory-resident
  1609.        mode, all of 4DOS is loaded permanently into low memory; the
  1610.        memory required is about 70K for 4DOS286.EXE, or 72K for
  1611.        4DOS88.EXE.
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.   4DOS Reference Manual         Copyright 1990, J.P. Software           18 
  1625.  
  1626.  
  1627.   Setting up CONFIG.SYS
  1628.  
  1629.        In order to install 4DOS you must modify the CONFIG.SYS file.
  1630.        First, create a SHELL command to tell MS-DOS to load 4DOS as the
  1631.        command processor.  The format of the command is:
  1632.  
  1633.             SHELL=d:\path\filename [options]
  1634.  
  1635.        where d:\path is the drive and directory where the primary shell
  1636.        program is stored, filename is the full name of that program, and
  1637.        [options] is any option or parameter values for 4DOS.  (See 4DOS
  1638.        Startup Options.)  The options are passed to the program just as
  1639.        if they had been typed on the command line.
  1640.  
  1641.        When loading 4DOS, the filename part of the command should be
  1642.        4DOS.COM.  For example, the simplest SHELL command which will
  1643.        load 4DOS properly is:
  1644.  
  1645.             SHELL=C:\4DOS.COM /P
  1646.  
  1647.        This loads 4DOS in swapping mode (4DOS determines the optimal
  1648.        swapping method), with default sizes for the environment, alias
  1649.        list, and history list.  The /P tells 4DOS it is the primary
  1650.        shell.
  1651.  
  1652.        Use an editor to edit or create your CONFIG.SYS file, and set up
  1653.        your SHELL command as shown above, along with any additional
  1654.        options you need (see next section).  If you already have a SHELL
  1655.        command for COMMAND.COM, remove it.  Examples of SHELL commands
  1656.        for different systems are given in 4DOS Startup Options.
  1657.  
  1658.        CAUTION:  Due to a bug in all versions of MS-DOS and PC-DOS, the
  1659.        SHELL command in CONFIG.SYS may not contain more than 33
  1660.        characters following the name of the shell program (i.e.,
  1661.        beginning with the first character of the [options] in the
  1662.        example above).  If the line is too long, the options will not be
  1663.        passed properly to 4DOS, and a variety of errors can occur.  You
  1664.        can usually set all of the 4DOS options without exceeding this
  1665.        limit, provided you keep 4DOS88.EXE / 4DOS286.EXE in the root
  1666.        directory of your boot disk.  If you need a longer SHELL command
  1667.        line, 4DOS provides the @filename option (see 4DOS Startup
  1668.        Options).
  1669.  
  1670.        In addition to the shell command, if you want to use the 4DOS
  1671.        KEYSTACK command (see Command Reference), you must place a line
  1672.        in CONFIG.SYS to load the 4DOS KEYSTACK device driver.  This line
  1673.        should read:
  1674.  
  1675.             device=c:\keystack.sys
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.   4DOS Reference Manual         Copyright 1990, J.P. Software           19 
  1683.  
  1684.  
  1685.   Loading 4DOS Under DOS 2
  1686.  
  1687.        While we recommend the use of MS-DOS 3.1 or above, 4DOS can be
  1688.        used with MS-DOS 2.  In MS-DOS 2, certain functions require
  1689.        COMMAND.COM to be loaded as the primary command processor, so you
  1690.        must load COMMAND.COM first, then load 4DOS.  Assuming all files
  1691.        are in the root directory of drive C, the SHELL command to do
  1692.        this is:
  1693.  
  1694.             shell=c:\command.com /c 4DOS [options]
  1695.  
  1696.        The [options] are defined in 4DOS Startup Options, and should
  1697.        include /P even though 4DOS is not (technically) the primary
  1698.        shell.  If /P is left off, AUTOEXEC.BAT will not be run.
  1699.  
  1700.        Note that due to the /C 4DOS on the SHELL line, fewer options can
  1701.        be used before running into the 33-character limit discussed
  1702.        earlier.  For this reason the "@filename" option may be necessary
  1703.        when loading 4DOS under DOS 2.
  1704.  
  1705.   Loading 4DOS in the OS/2 DOS Compatibility Box
  1706.  
  1707.        4DOS can be loaded in the OS/2 MS-DOS compatibility box, but you
  1708.        will be limited to either disk swapping or memory resident modes.
  1709.        (The compatibility box does not support EMS or XMS.)
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.   4DOS Reference Manual         Copyright 1990, J.P. Software           20 
  1741.  
  1742.  
  1743.   4DOS Startup Options
  1744.  
  1745.        This section describes the options that can be included on the
  1746.        SHELL command in CONFIG.SYS, and/or used for secondary shells
  1747.        (see 4DSHELL).  The same options can also be used when you start
  1748.        4DOS in a window of a multitasking or task switching environment
  1749.        such as DESQview or Windows, or from the command line or a batch
  1750.        file.
  1751.  
  1752.        @d:\path\filename
  1753.             Stop processing input from the command line, and switch to
  1754.             the specified file.  Any characters on the line after this
  1755.             option will be ignored.  The file must contain a single
  1756.             line, up to 128 characters long, with additional 4DOS
  1757.             options on it.  This option allows you to get around the 33-
  1758.             character limit on options in the SHELL command by placing
  1759.             4DOS options in a separate file.
  1760.  
  1761.        /A:n
  1762.             Set the alias list size.  The range of allowable alias list
  1763.             sizes for all shells is 256 - 32000 bytes.  The default
  1764.             value for all shells is /A:1024.
  1765.  
  1766.        /C cmd
  1767.             Load a transient copy of 4DOS, execute cmd, and then return
  1768.             to the parent command processor.  This option is used by
  1769.             some application programs to start the command processor,
  1770.             execute a command, and automatically return to the program.
  1771.             It should never be used in the SHELL statement.
  1772.  
  1773.        /E
  1774.             Set the environment size.  The range of allowable
  1775.             environment sizes for all shells is 256 - 32000 bytes.
  1776.             There are two formats for this option:
  1777.  
  1778.             /E:n
  1779.                  n is the size of the environment in bytes.  The default
  1780.                  for the primary shell is /E:512.
  1781.  
  1782.             /E+n
  1783.                  Set the environment size to the amount of space
  1784.                  previously used, plus n bytes.  This allows you to
  1785.                  guarantee a certain amount of free space in a secondary
  1786.                  shell environment.  The default for secondary shells is
  1787.                  /E+128; the minimum increment allowed is 128 bytes.
  1788.  
  1789.             With either format, appending a U after the size (for
  1790.             example, /E:512U) will cause 4DOS to load the master
  1791.             environment into an XMS UMB.  (See the /U option below for
  1792.             more information on UMBs.)  This reduces low-memory
  1793.             requirements, but may not be compatible with some programs
  1794.             which access the master environment.  If no UMB is
  1795.             available, 4DOS displays an error message, and the
  1796.             environment is put into low memory.
  1797.  
  1798.   4DOS Reference Manual         Copyright 1990, J.P. Software           21 
  1799.  
  1800.  
  1801.             Appending an S after the size will swap the master copy of
  1802.             the environment.  This will save a small amount of DOS memory,
  1803.             but will not work with any application that attempts to
  1804.             modify the master environment (for example, Novell Netware).
  1805.             
  1806.             4DOS will always ensure there is at least 128 bytes free in
  1807.             a secondary shell environment, and will override your /E
  1808.             parameter if necessary.
  1809.  
  1810.        /H:n
  1811.             Set the history size, where n is the size of the history
  1812.             list.  (The default is 1024 bytes; the range is 512-8192
  1813.             bytes.)
  1814.  
  1815.        /L:d:\path
  1816.             Tells 4DOS where to find 4DOS88.EXE (or 4DOS286.EXE).  The
  1817.             default is the root directory of the boot drive for the
  1818.             primary shell, and the path specified by COMSPEC for
  1819.             secondary shells.  You must use this switch if the EXE file
  1820.             is not in the default location.
  1821.  
  1822.        /P
  1823.             Load 4DOS permanently, and run AUTOEXEC.BAT.  4DOS will NOT
  1824.             run AUTOEXEC.BAT without a /P.  This option may be placed
  1825.             anywhere on the SHELL= line, but normally appears as the
  1826.             last option.  Do NOT use this option for secondary shells,
  1827.             or you will be unable to return to the primary shell.
  1828.  
  1829.        /S
  1830.             Set the 4DOS swapping mode, as follows:
  1831.  
  1832.             /S:B[d:\path]
  1833.                  Best guess swapping (default mode).  4DOS first tries
  1834.                  XMS memory swapping (on an 80286 or 80386), then EMS,
  1835.                  then disk swapping to the specified drive and
  1836.                  directory.  Disk swapping filenames and defaults are as
  1837.                  described for /S:D below.
  1838.  
  1839.             /S:D[d:\path]
  1840.                  Swap to disk.  Creates a file 4DOSSWAP.xxx where xxx is
  1841.                  the current shell nesting level (000 for the primary
  1842.                  shell).  If the drive and path are not specified, disk
  1843.                  swapping will default to the current directory (the
  1844.                  root directory of the boot drive for the primary
  1845.                  shell), and the current MS-DOS directory for secondary
  1846.                  shells.
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.   4DOS Reference Manual         Copyright 1990, J.P. Software           22 
  1857.  
  1858.  
  1859.             /S:E
  1860.                  Swap to EMS memory.  EMS swapping requires a minimum of
  1861.                  80K free EMS memory for the primary shell, and 32K for
  1862.                  most secondary shells; very large environment, alias
  1863.                  list, and history sizes will require more.
  1864.  
  1865.             /S:N
  1866.                  Load 4DOS in memory-resident mode (no swapping).
  1867.  
  1868.             /S:X
  1869.                  Swap to XMS (extended) memory.  XMS swapping requires
  1870.                  an XMS device driver and a minimum of 70K of free XMS
  1871.                  memory; large environment, alias list, and history
  1872.                  sizes will require more.
  1873.  
  1874.             If 4DOS can't access EMS or XMS memory or create the disk
  1875.             swap file, it will load with swapping disabled (memory-
  1876.             resident mode).  4DOS displays the type of swapping (XMS,
  1877.             EMS, or disk) and the amount of swapping space used when it
  1878.             starts.
  1879.  
  1880.        /U
  1881.             Move the resident portion of 4DOS to an XMS Upper Memory
  1882.             Block (UMB).  This reduces the size of the resident portion
  1883.             in low memory from about 3K to 256 bytes, plus the
  1884.             environment size.  This option can only be used on 286 and
  1885.             386 systems with an XMS driver.  The system must allow
  1886.             memory mapping in the 640KB to 1MB memory area, and have
  1887.             about 3K free in that area when 4DOS is loaded.  XMS
  1888.             swapping may be used for the rest of 4DOS via /S:X, but is
  1889.             not required for /U to work.  If the UMB load fails, the
  1890.             load will continue with the resident portion of 4DOS
  1891.             remaining in low memory.
  1892.  
  1893.        Any text on the 4DOS command line (including the SHELL= line)
  1894.        following the final option will be interpreted as a startup
  1895.        program command.  This allows you to directly load a program
  1896.        without running AUTOEXEC.BAT (and giving the user the opportunity
  1897.        to break out to the MS-DOS prompt with a ^C).
  1898.  
  1899.        For example, to load 4DOS in EMS swapping mode with a 2048
  1900.        character alias list and a 2048 character command history:
  1901.  
  1902.             shell=c:\4dos.com /s:e /a:2048 /h:2048 /p
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.   4DOS Reference Manual         Copyright 1990, J.P. Software           23 
  1915.  
  1916.  
  1917.        To load 4DOS with a 2048 character environment in disk swapping
  1918.        mode, swapping to a RAM disk defined as F:
  1919.  
  1920.             shell=c:\4dos.com /s:df:\ /e:2048 /p
  1921.  
  1922.        To load 4DOS in "best available" swapping mode, using drive G for
  1923.        disk swapping if necessary, loading the .COM and .EXE files from
  1924.        the directory D:\BIN\4DOS, with a 1024 character environment, a
  1925.        4096 character alias list, and a 2048 character history, and the
  1926.        low-memory code moved to a UMB if possible:
  1927.  
  1928.             shell=d:\bin\4dos\4dos.com @d:\bin\4dos\4dos.opt
  1929.  
  1930.        The file D:\BIN\4DOS\4DOS.OPT: would contain:
  1931.  
  1932.             /s:bg:\ /l:d:\bin\4dos /e:1024 /a:4096 /h:2048 /u /p
  1933.  
  1934.        To load 4DOS in XMS swapping mode, with default history and
  1935.        environment, and run a program called C:\UTIL\MYSHELL
  1936.        automatically after the AUTOEXEC file (if any) is completed:
  1937.  
  1938.             shell=c:\4dos.com /s:x /p c:\util\myshell
  1939.  
  1940.        The 4DOS EXE file (4DOS88 or 4DOS286) can be loaded directly as
  1941.        the primary shell, by using it as the filename in the SHELL
  1942.        command; or as the secondary shell, by using it as the filename
  1943.        in COMSPEC.  For example:
  1944.  
  1945.             shell=c:\4dos286.exe /e:2048 /p
  1946.  
  1947.        When the EXE file is loaded directly, rather than via 4DOS.COM,
  1948.        4DOS will be in memory-resident mode.  The only options permitted
  1949.        are /A:n, /E:n, /H:n, /C,  and /P.  Aliases will not be inherited
  1950.        from a previous shell.
  1951.  
  1952.        We do not recommend this method of loading 4DOS in most
  1953.        circumstances; to load in memory-resident mode, use the /S:N
  1954.        option instead.  However, you may wish to use it to conserve disk
  1955.        space (for example, on a laptop with no hard disk), as it does
  1956.        not require 4DOS.COM to be on your disk.
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.   4DOS Reference Manual         Copyright 1990, J.P. Software           24 
  1973.  
  1974.  
  1975.   The 4DSHELL Environment Variable
  1976.  
  1977.        When loading the primary shell, the shell name and options are
  1978.        both specified by the SHELL command in CONFIG.SYS.  For secondary
  1979.        shells, COMSPEC specifies the shell name, but not the options.
  1980.        4DSHELL is an environment variable, used by 4DOS to set the
  1981.        options for secondary shells.  If 4DSHELL is not defined,
  1982.        secondary shells will use default values for their options.  If
  1983.        options are set on the command line, they will override those in
  1984.        4DSHELL.
  1985.  
  1986.        4DSHELL should normally be set in AUTOEXEC.BAT.  It can contain
  1987.        any of the options listed in 4DOS Startup Options, except /C and
  1988.        /P.  If the 4DOS EXE file is not in the directory specified by
  1989.        COMSPEC, you MUST use the /L option in 4DSHELL, or secondary
  1990.        shells will not start properly.
  1991.  
  1992.        The following examples show the use of both COMSPEC and 4DSHELL
  1993.        to configure your system properly for secondary shell operation.
  1994.  
  1995.        To load 4DOS.COM and the EXE file from C:\, use EMS swapping in
  1996.        secondary shells, and guarantee 512 bytes of free environment
  1997.        space:
  1998.  
  1999.             [no COMSPEC setting necessary]
  2000.             set 4dshell=/s:e /e+512
  2001.  
  2002.        To load 4DOS.COM from C:\BIN and the 4DOS EXE file from D:\BIN,
  2003.        use best guess swapping (default), and move the resident portion
  2004.        of secondary shells to an XMS UMB if possible:
  2005.  
  2006.             set comspec=c:\bin\4dos.com
  2007.             set 4dshell=/l:d:\bin /u
  2008.  
  2009.   AUTOEXEC and 4START
  2010.  
  2011.        The AUTOEXEC.BAT file contains DOS commands to be AUTOmatically
  2012.        EXECuted by the primary shell when it starts.  It is executed
  2013.        before you are given control at the prompt.  The /P switch MUST
  2014.        be on the SHELL= line in CONFIG.SYS for AUTOEXEC.BAT to be
  2015.        executed.  AUTOEXEC cannot be a .BTM file.
  2016.  
  2017.        If you do not have an AUTOEXEC.BAT file, COMMAND.COM will prompt
  2018.        you for the current date and time.  4DOS will not; it will simply
  2019.        transfer you immediately to the 4DOS prompt.
  2020.  
  2021.        4START is an optional batch (.BAT or .BTM) file of 4DOS commands
  2022.        to be executed whenever 4DOS is started, whether as a primary or
  2023.        secondary shell.  This makes it a convenient place to put
  2024.        configuration commands such as SETDOS, to make 4DOS operate in
  2025.        the mode you want regardless of whether you are in a primary or
  2026.        secondary shell.  In the primary shell, 4START is executed before
  2027.        AUTOEXEC.BAT.
  2028.  
  2029.  
  2030.   4DOS Reference Manual         Copyright 1990, J.P. Software           25 
  2031.  
  2032.  
  2033.        You should not load any memory-resident programs (TSRs) from the
  2034.        4START file, because 4DOS will attempt to load them every time it
  2035.        starts a new shell.
  2036.  
  2037.        You shouldn't load aliases from 4START, since 4DOS will pass them
  2038.        automatically to secondary shells.
  2039.  
  2040.   4DOS and COMMAND.COM
  2041.  
  2042.        In virtually all circumstances you will want to load 4DOS as your
  2043.        primary and secondary shell.  However, there are a handful of
  2044.        ill-behaved programs which dynamically modify COMMAND.COM, or
  2045.        otherwise interact with COMMAND.COM in a non-standard way, which
  2046.        may require you to load COMMAND.COM in order to work properly.
  2047.  
  2048.        In some circumstances, to run a particular program you may need
  2049.        to load a copy of COMMAND.COM from within 4DOS, then run the
  2050.        program.  In very rare circumstances, you may need to load
  2051.        COMMAND.COM as the primary shell and then load 4DOS.  An
  2052.        explanation of both techniques is included in Appendix E and the
  2053.        file COMPAT.DOC, along with a list of the programs known to
  2054.        require them.
  2055.  
  2056.        You may also find that in some cases, when there is a need to
  2057.        shell to DOS with very little memory available, you wish to use
  2058.        COMMAND.COM as your secondary shell, while 4DOS is the primary
  2059.        shell.  To do so, simply set your COMSPEC to point to
  2060.        COMMAND.COM.
  2061.  
  2062.        If you wish to run a copy of COMMAND.COM from the 4DOS prompt for
  2063.        testing or other purposes, be sure to set the COMSPEC to point to
  2064.        COMMAND.COM first.  If you don't, and an application overwrites
  2065.        the COMMAND.COM transient portion, COMMAND.COM may be unable to
  2066.        reload itself, and will give an error message and return to 4DOS.
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.   4DOS Reference Manual         Copyright 1990, J.P. Software           26 
  2089.  
  2090.  
  2091.   Using 4DOS
  2092.  
  2093.        This section briefly reviews 4DOS features, and provides some
  2094.        examples of how 4DOS can help improve your productivity, and make
  2095.        your computer easier to use.  It also documents the features of
  2096.        4DOS which are not related to specific commands, such as command
  2097.        line editing, command history, command syntax, and batch files.
  2098.  
  2099.   Starting 4DOS
  2100.  
  2101.        Whenever 4DOS is loaded, it searches the boot directory for the
  2102.        file 4START.BTM or 4START.BAT, and executes it if found.  If 4DOS
  2103.        is started with the /P option, it will then execute AUTOEXEC.BAT.
  2104.  
  2105.        Because 4START is always executed when 4DOS starts, it provides a
  2106.        convenient place to put the 4DOS configuration commands (for
  2107.        example, SETDOS parameters) that would otherwise not be set when
  2108.        executing a secondary copy of 4DOS.  (For example, when shelling
  2109.        out to MS-DOS from within a program.)  See the Command Reference
  2110.        Guide for more information on SETDOS.
  2111.  
  2112.        When setting up 4START and AUTOEXEC.BAT, we recommend you break
  2113.        up the work to be done into smaller batch files.  In particular,
  2114.        if you put the aliases and environment variables into separate
  2115.        batch files and use CALL to invoke them, you can edit and
  2116.        reinvoke them later without having to reboot the system.
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.   4DOS Reference Manual         Copyright 1990, J.P. Software           27 
  2147.  
  2148.  
  2149.   Command Line Editing
  2150.  
  2151.        The following keys have special meanings when editing command
  2152.        lines (the caret ^ means press the Control key together with with
  2153.        the specified key):
  2154.  
  2155.        Left Arrow     Move the cursor left one character.
  2156.        Right Arrow    Move the cursor right one character.
  2157.        Up Arrow       Recall the previous command from the history list,
  2158.                         or match a partial command entry with a history
  2159.                         list entry.
  2160.        Down Arrow     Recall the next command from the history list, or
  2161.                         match a partial command entry with a history list
  2162.                         entry.
  2163.        ^Left Arrow    Move the cursor left one word.
  2164.        ^Right Arrow   Move the cursor right one word.
  2165.        Home           Move the cursor to the beginning of the line.
  2166.        ^Home          Delete from the beginning of the line to the
  2167.                         character preceding the cursor.
  2168.        End            Move the cursor to the end of the line.
  2169.        ^End           Delete from the cursor to the end of the line.
  2170.        Ins            Toggle between insert and overstrike mode.
  2171.        Del            Delete the character at the cursor.
  2172.        Backspace      Delete the character to the left of the cursor.
  2173.        CR or LF       Execute the command.
  2174.        Esc            Erase the entire line.
  2175.        ^L             Delete the word to the left of the cursor.
  2176.        ^R or ^Bksp    Delete the word to the right of the cursor.
  2177.        ^C             Cancel the command.
  2178.        ^D             Delete the history list entry, erase the line, and
  2179.                         display the previous history entry.
  2180.        ^E             Go to the end of the history list and display the
  2181.                         entry.
  2182.        ^K             Save the command to the history list, and erase
  2183.                         the line.
  2184.        F1             Call the on-line help (HELP.EXE).
  2185.        F8, F9 & F10   F9 scans the filename (including the wildcard
  2186.                         characters * and ?) at or immediately to the left
  2187.                         of the cursor position, and replaces it with the
  2188.                         first matching filename.  Pressing F9 again
  2189.                         substitutes the next filename; pressing F10
  2190.                         appends the next filename at the current cursor
  2191.                         position.  Pressing F8 gets the previous
  2192.                         filename.  If you don't enter an extension, F9
  2193.                         will append *.* to the filename; otherwise, F9
  2194.                         will append *.  See Command History and Recall
  2195.                         for more information on filename completion.
  2196.        Alt-255        You can enter characters that would normally be
  2197.                         interpreted by the line editor as a command (for
  2198.                         example, ^D) by preceding them with an Alt-255.
  2199.                         (Hold down the Alt key and enter 255 on the
  2200.                         numeric keypad.)
  2201.        Anything else  Enter that character at the cursor position.
  2202.  
  2203.  
  2204.   4DOS Reference Manual         Copyright 1990, J.P. Software           28 
  2205.  
  2206.  
  2207.   Command History and Recall
  2208.  
  2209.        4DOS saves each command into the command history list as it is
  2210.        entered (except when executing a batch file), allowing you to
  2211.        display, recall, search, and modify previous commands.
  2212.  
  2213.        The history list size is determined by the /H parameter at
  2214.        startup time (see Installation).  The history is a circular list;
  2215.        when the history list is full, 4DOS discards the oldest
  2216.        command(s) before adding the newest.
  2217.  
  2218.        The command history list can be displayed or cleared with the
  2219.        HISTORY command.  The /H option in SETDOS allows you to enable or
  2220.        disable the history saves, and to specify a minimum length to
  2221.        save.  (See the Command Reference Guide for more information on
  2222.        HISTORY and SETDOS.)  You can prevent a command line from being
  2223.        saved in the history list by beginning it with an @.
  2224.  
  2225.        The simplest use of the command history is to repeat commands
  2226.        exactly.  For example, you might enter the command:
  2227.  
  2228.             dir /2p b:*.wks b:*.doc
  2229.  
  2230.        and then move some files to or from drive B.  When you're
  2231.        through, you want to repeat the DIR command.  Just press the up-
  2232.        arrow repeatedly to scan back through the history list; when the
  2233.        DIR command appears, press ENTER to reexecute it.
  2234.  
  2235.        After you've found the command, you can also edit it before
  2236.        pressing ENTER.  This provides a simple means of executing a
  2237.        series of commands that differ only slightly from each other.
  2238.  
  2239.        Another powerful feature is command completion, which searches
  2240.        the command history for the last command that begins with the
  2241.        characters you entered.  In the above example, you can quickly
  2242.        recall the DIR command by typing DI, and pressing the up arrow.
  2243.        4DOS will display the most recent command in the history list
  2244.        that begins with DI.  Pressing the up arrow again will display
  2245.        the next most recent match.  Typing DI and pressing the down
  2246.        arrow key instead would search for the oldest matching command in
  2247.        the history list.  4DOS will beep if there are no matching
  2248.        commands.
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.   4DOS Reference Manual         Copyright 1990, J.P. Software           29 
  2263.  
  2264.  
  2265.        4DOS also offers filename completion.  For example, suppose you
  2266.        want to copy a file.  You remember that the name starts with AU,
  2267.        but you can't remember the rest.  Enter:
  2268.  
  2269.             copy au
  2270.  
  2271.        and press the F9 key.  The first filename that starts with AU
  2272.        will be inserted in the command line.  If it's the right file,
  2273.        simply complete your command.  If it's not, press F9 again to
  2274.        substitute the next matching filename.  If you go past the
  2275.        filename(s) you wanted, pressing the F8 key will return the
  2276.        previous matching filename.  The F10 key saves the current
  2277.        filename, and then appends the next matching filename to the
  2278.        command line.  You can use the wildcard characters (* and ?) in
  2279.        the filename.  4DOS will beep when there are no more matching
  2280.        filenames.
  2281.  
  2282.   Multiple Commands
  2283.  
  2284.        You may enter multiple commands on a single line.  The default
  2285.        command separator is a caret (^).  For example, the following
  2286.        command displays a directory and then copies files to the root
  2287.        directory on drive A:
  2288.  
  2289.             dir *.bat ^ copy *.bat a:\
  2290.  
  2291.        The command separator character can be changed by setting the
  2292.        COMPOUND variable (see the SETDOS command in the Command
  2293.        Reference Guide).
  2294.  
  2295.   Conditional Commands
  2296.  
  2297.        When an internal or external command finishes, it returns a
  2298.        result, called the exit code.  The conditional commands allow you
  2299.        to perform tasks based upon the previous command's exit code.
  2300.        (See also the IF ERRORLEVEL and IFF ERRORLEVEL commands in the
  2301.        Command Reference Guide.)
  2302.  
  2303.        If two commands are separated by && (AND), the second command
  2304.        will be executed only if the first returns an exit code of 0.
  2305.  
  2306.        If two commands are separated by || (OR), the second command will
  2307.        be executed only if the first returns a non-zero exit code.
  2308.  
  2309.        NOTE:  All 4DOS internal commands return an exit code (0 if
  2310.        successful, or non-zero for an error return), but not all
  2311.        external programs do.  Conditional command behavior will be
  2312.        unpredictable for programs that don't explicitly return an exit
  2313.        code.
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.   4DOS Reference Manual         Copyright 1990, J.P. Software           30 
  2321.  
  2322.  
  2323.        For example, if the BACKUP operation fails, the files will not be
  2324.        erased:
  2325.  
  2326.             backup c:\ a: /s && global erase *.bak *.lst
  2327.  
  2328.        If the BACKUP operation fails, then ECHO will display a message:
  2329.  
  2330.             backup c:\ a: /s || echo Error in the backup!
  2331.  
  2332.   Escape Character
  2333.  
  2334.        4DOS has a user-definable escape character (a character which
  2335.        gives the following character a non-standard meaning, not the
  2336.        same as the ASCII ESC).  The default is ^X (control-X, which will
  2337.        be displayed as an up arrow ), but another character can be used
  2338.        by setting the ESCAPE variable (see the SETDOS command in the
  2339.        Command Reference Guide).   4DOS assumes special meanings when
  2340.        these characters follow the escape character on the command line:
  2341.  
  2342.             b  backspace
  2343.             e  the ASCII ESC character (27 decimal)
  2344.             f  formfeed
  2345.             n  linefeed
  2346.             r  carriage return
  2347.  
  2348.        Any other character following the escape character is copied
  2349.        directly to the command line and the escape character is removed.
  2350.        This allows you to suppress the normal interpretation of special
  2351.        characters (such as ? * / \ | ` > < and &).
  2352.  
  2353.        For example, to send a form feed followed by the sequence ESC Y
  2354.        to the printer:
  2355.  
  2356.             echo feY > prn
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.   4DOS Reference Manual         Copyright 1990, J.P. Software           31 
  2379.  
  2380.   Command Echoing
  2381.  
  2382.        Like COMMAND.COM, 4DOS defaults to ECHO ON in batch files.  To
  2383.        prevent a line from being echoed, preface it with the @ symbol.
  2384.        You can tell 4DOS to default to ECHO OFF by setting the variable
  2385.        VERBOSE to 0 (see the SETDOS command in the Command Reference
  2386.        Guide).
  2387.  
  2388.        4DOS also offers command echoing during keyboard input.  If ECHO
  2389.        is set ON from the command line, the fully parsed and expanded
  2390.        command (including alias and variable expansion) will be
  2391.        displayed before it is executed.  If the command line contains
  2392.        multiple commands, each command is echoed separately just before
  2393.        it is executed.
  2394.  
  2395.        Note that the command line echo state and batch file echo state
  2396.        are independent.  Turning echo on or off inside a batch file will
  2397.        not affect command line echoing, and vice versa.
  2398.  
  2399.   Argument Quoting
  2400.  
  2401.        4DOS normally parses command line arguments by searching for
  2402.        white space (blanks, tabs, and commas).  Command line arguments
  2403.        enclosed in back quotes (`) or double quotes (") may contain
  2404.        white space.  No special processing (alias or variable expansion,
  2405.        and I/O redirection) will be performed on expressions enclosed in
  2406.        quotes, except variable expansion WILL be performed inside double
  2407.        quotes.
  2408.  
  2409.        4DOS will strip back quotes from the command line before
  2410.        executing the command.  Double quotes will be passed through to
  2411.        the command.
  2412.  
  2413.        For example, suppose the batch file QUOTES.BAT contains the
  2414.        following commands:
  2415.  
  2416.             @echo off
  2417.             echo Arg1 = %1
  2418.             echo Arg2 = %2
  2419.             echo Arg3 = %3
  2420.  
  2421.        and that the environment variable %FORVAR has been defined as:
  2422.  
  2423.             set %forvar=for
  2424.  
  2425.        Entering the command:
  2426.  
  2427.             quotes `Now is the time %forvar` all good
  2428.  
  2429.        produces the following output:
  2430.  
  2431.             Arg1 = Now is the time %forvar
  2432.             Arg2 = all
  2433.             Arg3 = good
  2434.  
  2435.  
  2436.   4DOS Reference Manual         Copyright 1990, J.P. Software           32 
  2437.  
  2438.  
  2439.        and entering the command:
  2440.  
  2441.             quotes "now is the time %forvar" all good
  2442.  
  2443.        produces the following output:
  2444.  
  2445.             Arg1 = "Now is the time for"
  2446.             Arg2 = all
  2447.             Arg3 = good
  2448.  
  2449.        When an alias is defined in a batch file or from the command line
  2450.        (see Aliases), its argument should be enclosed in back-quotes to
  2451.        prevent the expansion of parameters, variables, and multiple
  2452.        commands until the alias is invoked.  Back quotes should NOT be
  2453.        used when defining aliases to be read in an ALIAS /R file.
  2454.  
  2455.   Batch Files
  2456.  
  2457.        COMMAND.COM executes batch files by opening the file, reading one
  2458.        line, saving the position, closing the file, executing the line,
  2459.        opening the file, moving to the saved position, reading the next
  2460.        line, etc.  This scheme has two advantages: batch files can
  2461.        modify themselves dynamically, and they can extend across
  2462.        multiple disks.  It also has one disadvantage: batch files run
  2463.        very slowly.
  2464.  
  2465.        For the sake of compatibility, 4DOS processes .BAT files the same
  2466.        way.  But 4DOS also offers a much faster approach, called Batch
  2467.        to Memory (.BTM).  Since a .BTM file is loaded entirely into RAM
  2468.        before it is executed (requiring only one disk access), .BTM
  2469.        files run two to five times faster than .BAT files (even faster
  2470.        on floppy disks).  For very small batch files the difference
  2471.        between .BAT and .BTM files will be negligible, but for large
  2472.        files or ones with loops, a .BTM will run nearly as fast as an
  2473.        alias.  Most .BAT files can be renamed to a .BTM extension and
  2474.        immediately realize a significant performance improvement.
  2475.  
  2476.        The maximum size of a .BTM file is 64K bytes.
  2477.  
  2478.        You should not use a .BTM file (or a .BAT file which is CALLed
  2479.        from a .BTM file) to load memory-resident (TSR) programs.  If you
  2480.        do, the memory used for the .BTM file will be located below the
  2481.        TSR.  When the .BTM file exits, this memory will be freed and you
  2482.        will be left with a "hole" in memory.  This is not harmful, but
  2483.        wastes memory.
  2484.  
  2485.        4DOS also offers an additional "Cancel ALL" option for ^C
  2486.        handling in batch files.  If you press ^C or ^BREAK while in a
  2487.        batch file, 4DOS will prompt:
  2488.  
  2489.             Cancel batch job ? (Y/N/A) :
  2490.  
  2491.  
  2492.  
  2493.  
  2494.   4DOS Reference Manual         Copyright 1990, J.P. Software           33 
  2495.  
  2496.  
  2497.        Pressing N will continue batch processing at the next line.
  2498.        Pressing Y will end the current batch file and return to the
  2499.        calling batch file (if any).  Pressing A will cancel all batch
  2500.        file processing, regardless of the nesting level (see CALL and
  2501.        CANCEL in the Command Reference Guide) and return to the command
  2502.        prompt.
  2503.  
  2504.   Batch File Variables
  2505.  
  2506.        Batch file variables are only active inside a batch file.  They
  2507.        are referenced as %0 to %127, and expand to the matching argument
  2508.        on the command line that started the batch file.  The parameter
  2509.        %n& is a special case, and expands to all arguments in the
  2510.        command line tail, starting at argument number n.  If n is not
  2511.        specified, it defaults to 1 (so %& expands to all arguments in
  2512.        the command line tail).
  2513.  
  2514.        The batch variable %# expands to the number of command line
  2515.        arguments, not including %0 (the batch file name).
  2516.  
  2517.        Note that the SHIFT command will shift both the numbered
  2518.        variables (%0, %1, etc.) and the %n& and %# variables.
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.   4DOS Reference Manual         Copyright 1990, J.P. Software           34 
  2553.  
  2554.  
  2555.   Aliases
  2556.  
  2557.        Much of the power of 4DOS comes together when using aliases.  An
  2558.        alias is a new name for a command or combination of commands.
  2559.        Aliases are defined with the ALIAS command, and removed with the
  2560.        UNALIAS command.  Aliases are expanded before the command line is
  2561.        broken up for multiple commands, redirection, and conditional
  2562.        commands.  Aliases may be nested; i.e., an alias can refer to
  2563.        another alias, but they cannot refer back to themselves.
  2564.  
  2565.        The alias name is limited to no more than 80 characters, and the
  2566.        alias argument to no more than 255 characters.
  2567.  
  2568.        The simplest type of alias is to give a new name to an existing
  2569.        command.  For example:
  2570.  
  2571.             alias up cd ..
  2572.  
  2573.        defines the alias UP to mean "change to the parent directory".
  2574.        Aliases can also create a customized version of a command.  For
  2575.        example, the 4DOS DIR command allows a directory to be sorted in
  2576.        various ways.  The alias:
  2577.  
  2578.             alias de dir /oe /p
  2579.  
  2580.        defines the alias DE to mean "sort the directory by extension,
  2581.        pausing after each page."
  2582.  
  2583.        Aliases can also be used to execute multiple commands; when used
  2584.        this way they act like very fast, in-memory batch files.  For
  2585.        example, entering the command:
  2586.  
  2587.             alias w `pushd c:\wp ^ wp %& ^ popd`
  2588.  
  2589.        defines the alias W to mean "save the current directory, change
  2590.        to the WP directory on C, run the WP program passing it all of
  2591.        the arguments on the command line following the alias name, and
  2592.        when finished, restore the original directory."  The back quotes
  2593.        are required to tell 4DOS this is a single alias with three
  2594.        commands, rather than three commands on a single line (see
  2595.        Multiple Commands).
  2596.  
  2597.        You can stop alias expansion by prefacing the alias with an
  2598.        asterisk (*).  This allows you to use aliases to define commands
  2599.        as variations of themselves, or to rename internal commands to
  2600.        avoid conflicts with external programs.  For example, the alias
  2601.        definition:
  2602.  
  2603.             alias global global /I
  2604.  
  2605.        will fail with an "alias loop" error message, but the alias:
  2606.  
  2607.             alias global *global /I
  2608.  
  2609.  
  2610.   4DOS Reference Manual         Copyright 1990, J.P. Software           35 
  2611.  
  2612.  
  2613.        will work properly.  You can also use this feature to rename a
  2614.        4DOS internal command (for example, if you have an external
  2615.        program of the same name).  The following alias definitions
  2616.        rename the LIST command to DISPLAY, and call an external program
  2617.        for LIST:
  2618.  
  2619.             alias display *list
  2620.             alias list c:\util\list.com
  2621.  
  2622.        Alias names can be truncated by including an asterisk (*) in the
  2623.        alias name.  For example, if you have an alias defined as:
  2624.  
  2625.             alias wher*eis dir /dp
  2626.  
  2627.        you can refer to it as wher, where, wherei, or whereis.
  2628.  
  2629.        Alias definitions can include replaceable parameters, like those
  2630.        in batch files.  Alias parameters are referenced as %1 to %127,
  2631.        and expand to the matching command line argument.  The parameter
  2632.        %n& is a special case, and expands to all arguments in the
  2633.        command line tail, starting at argument number n.  If n is not
  2634.        specified, it defaults to 1 (so %& expands to all arguments in
  2635.        the command line tail).
  2636.  
  2637.        If an alias has replaceable parameters, 4DOS will delete command
  2638.        line arguments up to and including the highest referenced
  2639.        argument.  For example, if you have an alias which refers only to
  2640.        %1 and %4, then the first and fourth arguments passed to the
  2641.        alias will be used, the second and third arguments will be
  2642.        discarded, and any additional arguments beyond the fourth will be
  2643.        appended to the end of the alias.  If an alias has no replaceable
  2644.        parameters, all of the command line arguments will be appended to
  2645.        the alias.
  2646.  
  2647.        For example, the following alias will change directories, perform
  2648.        a command, and return to the original directory:
  2649.  
  2650.             alias in `pushd %1 ^ %2& ^ popd`
  2651.  
  2652.        When this alias is invoked with:
  2653.  
  2654.             in c:\comm mycomm /xmodem /2400
  2655.  
  2656.        it is expanded into the following three commands:
  2657.  
  2658.             pushd c:\comm
  2659.             mycomm /xmodem /2400
  2660.             popd
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.   4DOS Reference Manual         Copyright 1990, J.P. Software           36 
  2669.  
  2670.  
  2671.  
  2672.        The distribution disk includes a sample alias file (ALIASES)
  2673.        which demonstrates a number of useful predefined aliases.
  2674.  
  2675.        See the ALIAS and UNALIAS commands in the Command Reference Guide
  2676.        for more information and examples.
  2677.  
  2678.   Executable Extensions
  2679.  
  2680.        4DOS provides a means to specify a program to be invoked when a
  2681.        filename which does not have a .COM, .EXE, .BTM, or .BAT
  2682.        extension is entered as the first argument on the command line.
  2683.        For example, you could start your text editor when a text file is
  2684.        specified, or your spreadsheet program when a worksheet file is
  2685.        specified.
  2686.  
  2687.        4DOS uses environment variables to define what program or batch
  2688.        file to run for a particular extension.  The syntax of the SET
  2689.        command to define an executable extension is:
  2690.  
  2691.             SET .ext=d:\path\program [options]
  2692.  
  2693.        where .EXT is the file extension, D:\PATH\PROGRAM  is the full
  2694.        name of the program or batch file to be called, and [options]
  2695.        are any startup options you want to specify for the program.  The
  2696.        file to be executed must be a .COM, .EXE, .BTM, or .BAT file; it
  2697.        cannot be an alias or internal command.
  2698.  
  2699.        For example, the following command would define BASICA.COM as the
  2700.        processor for .BAS files:
  2701.  
  2702.             set .bas=c:\dos\basica.com
  2703.  
  2704.        The following command would define B.EXE (the Brief text editor)
  2705.        as the processor for .C files:
  2706.  
  2707.             set .C=c:\brief\b.exe -Mxyz
  2708.  
  2709.        If you have a file HELLO.C, and enter the command:
  2710.  
  2711.             hello -i30
  2712.  
  2713.        4DOS expands the command line to:
  2714.  
  2715.             c:\brief\b.exe -Mxyz hello.c -i30
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.   4DOS Reference Manual         Copyright 1990, J.P. Software           37 
  2727.  
  2728.  
  2729.        Note that 4DOS inserts the value of the environment variable at
  2730.        the beginning of the line, including any options, then appends
  2731.        the original command name (i.e., the file name, with extension
  2732.        added if necessary), and the remainder of the original command
  2733.        line.
  2734.  
  2735.        4DOS searches for external commands in the following order:
  2736.        .COM, .EXE, .BTM, .BAT, and executable extensions (in the order
  2737.        they appear in the environment) in the current directory, and
  2738.        then in each subdirectory specified by the PATH environment
  2739.        variable.
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.   4DOS Reference Manual         Copyright 1990, J.P. Software           38 
  2785.  
  2786.  
  2787.   Keystack
  2788.  
  2789.        The KEYSTACK command can be used in aliases and batch files to
  2790.        feed keystrokes to application programs.  The most common use of
  2791.        KEYSTACK is to have a program take certain actions when it
  2792.        starts.  For example, when the alias (this should be entered on
  2793.        one line):
  2794.  
  2795.             alias 321 `keystack 0 13 0 13 0 13 0 13 0 13 "/fr" 0 "%1" 13 ^
  2796.                123`
  2797.  
  2798.        is executed as:
  2799.  
  2800.             321 February
  2801.  
  2802.        it loads Lotus 1-2-3, skips the startup screens, and loads the
  2803.        spreadsheet FEBRUARY.WK1.
  2804.  
  2805.        KEYSTACK can store up to 255 characters, enough keystrokes to
  2806.        cause a program to do an entire operation and exit.  For example,
  2807.        the following alias DRPT will run a dBASE report called TIMEREP
  2808.        in the directory DATA (this should be entered on one line):
  2809.  
  2810.             alias drpt `pushd c:\data ^ keystack "use times index times"
  2811.                13 "report form timerep to print" 13 "quit" 13 ^ dbase ^
  2812.                popd`
  2813.  
  2814.        See the Command Reference Guide for more information on KEYSTACK.
  2815.  
  2816.        KEYSTACK.SYS is a small device driver invoked in your CONFIG.SYS
  2817.        file (see Installation) and used to support the KEYSTACK command.
  2818.        You must have KEYSTACK.SYS installed to use the KEYSTACK command.
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.   4DOS Reference Manual         Copyright 1990, J.P. Software           39 
  2843.  
  2844.  
  2845.   Environment Variables
  2846.  
  2847.        Environment variables are defined with the SET command.  (See the
  2848.        Command Reference Guide for more information on SET.)
  2849.  
  2850.        Environment variables are expanded before the command line is
  2851.        broken up for multiple commands, redirection, and conditional
  2852.        commands, but after alias expansion has been done.
  2853.  
  2854.        Variables are referenced in a command by starting the variable
  2855.        name with a percent sign (%).  Two percent signs in a row (%%)
  2856.        signify a percent sign character.  An environment variable name
  2857.        is terminated by either another percent sign, or by an invalid
  2858.        character (see below).  To pass a variable name (instead of the
  2859.        value) to a command (for example, in INKEY or INPUT), you must
  2860.        precede it with two percent signs.
  2861.  
  2862.        Environment variable names may be composed of any alphanumeric
  2863.        character, plus the underscore (_) and $ characters.
  2864.  
  2865.        For example:
  2866.  
  2867.             c:\> set start=c:\wordproc\myfiles\memos
  2868.             c:\> dir /w %start
  2869.  
  2870.        In addition to the standard variable name characters, you can
  2871.        force 4DOS to accept any sequence of characters as a valid
  2872.        variable name by enclosing it in square brackets.  For example:
  2873.  
  2874.             %[AB##1]
  2875.  
  2876.        refers to an environment variable named AB##1.
  2877.  
  2878.        There are some variable names that have special meanings in 4DOS.
  2879.        Only PATH, CMDLINE and TMP are actually stored in the
  2880.        environment; the remainder are internal to 4DOS, and cannot be
  2881.        viewed or modified with SET or ESET.  The internal variable names
  2882.        are checked after variable expansion, so they can be overridden
  2883.        by creating an environment variable of the same name.
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.   4DOS Reference Manual         Copyright 1990, J.P. Software           40 
  2901.  
  2902.  
  2903.          ? returns the exit code of the last external program (see
  2904.               ERRORLEVEL).  This allows you to save an exit code into
  2905.               another variable and then process it later, or to see what
  2906.               a program is actually returning.
  2907.  
  2908.          PATH tells 4DOS where to search for executable files (.COM,
  2909.               .EXE, .BTM and .BAT) not in the current directory.  Some
  2910.               applications also use the PATH variable to find their
  2911.               files.
  2912.  
  2913.          CMDLINE is the fully expanded 255-character command line.  You
  2914.               can access it from an external program by searching the
  2915.               environment.
  2916.  
  2917.          TMP specifies where 4DOS should put the temporary pipe files
  2918.               (see Redirection).
  2919.  
  2920.          _CPU is the cpu type, returned as a string:
  2921.  
  2922.                86  8086 and 8088
  2923.               186  80186 and 80188
  2924.               200  NEC V20 and V30
  2925.               286  80286
  2926.               386  80386 and 80486
  2927.  
  2928.          _CWD is the current directory in the format d:\pathname.
  2929.  
  2930.          _CWDS has the same value as CWD, except it ensures the pathname
  2931.               ends in a backslash (\).
  2932.  
  2933.          _CWP is the current directory in the format \pathname.
  2934.  
  2935.          _CWPS has the same value as CWP, except it ensures the pathname
  2936.               ends in a backslash (\).
  2937.  
  2938.          _DATE contains the current system date, in the format mm-dd-yy
  2939.               (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  2940.  
  2941.          _DISK is the current disk (for example, C).
  2942.  
  2943.          _DOSVER is the current MS-DOS version (for example, 3.3).
  2944.  
  2945.          _FG is the screen foreground color at the current cursor
  2946.               position.
  2947.  
  2948.          _BG is the screen background color at the current cursor
  2949.               position.
  2950.  
  2951.          _SHELL contains the current shell nesting level (in swapping
  2952.               mode).  The root shell is 0.  If you are not in swapping
  2953.               mode, _SHELL returns 99.
  2954.  
  2955.  
  2956.  
  2957.  
  2958.   4DOS Reference Manual         Copyright 1990, J.P. Software           41 
  2959.  
  2960.  
  2961.  
  2962.          _TIME contains the current system time in the format hh:mm:ss .
  2963.               The separator character may vary depending depending upon
  2964.               your country information - see CHCP in the Command
  2965.               Reference Guide).
  2966.  
  2967.   Variable Functions
  2968.  
  2969.        4DOS Version 3 introduces a new type of environment variable.
  2970.        Called Variable Functions, they take one or more arguments (which
  2971.        can be environment variables or variable functions themselves),
  2972.        and return a value.  The variable functions are:
  2973.  
  2974.          @eval[expression] - evaluate an arithmetic expression.  It
  2975.               supports parentheses, addition, subtraction, multiplication,
  2976.               division, and modulo (%%).  The expression can contain envi-
  2977.               ronment variables, including other variable functions.  The
  2978.               elements of the expression and the result are integers between
  2979.               -2,147,483,640 and +2,147,483,647.  For example, if the value
  2980.               of the variable "a" is 5, then %@eval[(%a*4)-2] returns 18.  
  2981.  
  2982.          @ext[filename] - returns the file extension (without the
  2983.               leading period)
  2984.  
  2985.          @full[filename] - returns the fully qualified path name
  2986.  
  2987.          @len[string] - returns the length of the string
  2988.  
  2989.          @line[filename,n] - returns line "n" of the specified file.  (The
  2990.               first line is line 0.)
  2991.  
  2992.          @name[filename] - returns the filename only (no path or extension)
  2993.  
  2994.          @path[filename] - returns the path only (including the trailing
  2995.               backslash)                    
  2996.  
  2997.          @search[filename] - searches for the filename, using the PATH
  2998.               environment variable, and append an extension (.COM, .EXE,
  2999.               .BAT, .BTM, or executable extension) if one wasn't specified.
  3000.  
  3001.          @substr[string,start,length] - returns a substring, starting at
  3002.               the position start and continuing for length characters.  If
  3003.               length is negative, the start is relative to the right side.
  3004.               (The first character is 0.)  For example, to get the current
  3005.               time and extract the hour:
  3006.  
  3007.                   %@substr[%_time,0,2]
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.   4DOS Reference Manual         Copyright 1990, J.P. Software           42 
  3017.  
  3018.  
  3019.   I/O Redirection
  3020.  
  3021.        MS-DOS assumes input comes from the keyboard and output goes to
  3022.        the display.  The keyboard is referred to as the standard input,
  3023.        and the display is referred to as the standard output.  You can
  3024.        change the default standard input and standard output by using
  3025.        the < and > symbols on the command line.  4DOS also allows you to
  3026.        redirect the standard error by appending the & character.
  3027.  
  3028.        Normally, when redirecting standard output, if the specified file
  3029.        doesn't exist, it is created; if it exists, it is overwritten,
  3030.        and the previous contents are lost.  If the variable NOCLOBBER is
  3031.        set (see the SETDOS command in the Command Reference Guide), an
  3032.        error message will be displayed if the file already exists.
  3033.  
  3034.        For example, to get standard input from a file instead of the
  3035.        keyboard, append:
  3036.  
  3037.             < filename
  3038.  
  3039.        to the command line.  To redirect standard output to a file:
  3040.  
  3041.             > filename
  3042.  
  3043.        To redirect standard output to a file, overriding the NOCLOBBER
  3044.        setting:
  3045.  
  3046.             >! filename
  3047.  
  3048.        To redirect standard output and standard error to a file:
  3049.  
  3050.             >& filename
  3051.  
  3052.        To redirect standard error only to a file:
  3053.  
  3054.             >&> filename
  3055.  
  3056.        To redirect standard output and standard error to a file,
  3057.        overriding the NOCLOBBER setting:
  3058.  
  3059.             >&! filename
  3060.  
  3061.        To append standard output or standard error to a file, use >> in
  3062.        place of the first >.  If NOCLOBBER is set, the file must exist
  3063.        before it can be appended to (unless overridden by a !).
  3064.        Otherwise, 4DOS will create the file.
  3065.  
  3066.        Pipes allow you to send the output of one command to the input of
  3067.        another command by separating the commands with the vertical bar
  3068.        (|).  4DOS will perform the commands in order from left to right.
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.   4DOS Reference Manual         Copyright 1990, J.P. Software           43 
  3075.  
  3076.  
  3077.        For example, to use the standard output of command1 as the
  3078.        standard input of command2:
  3079.  
  3080.          command1 | command2
  3081.  
  3082.        To use the standard output and standard error of command1 as the
  3083.        standard input of command2:
  3084.  
  3085.          command1 |& command2
  3086.  
  3087.        4DOS creates temporary files to hold the output of the pipes.
  3088.        The default directory for these temporary files is the root
  3089.        directory on the boot drive, but this can be overridden with the
  3090.        TMP environment variable.  This is useful when booting from a
  3091.        floppy disk or a read-only network drive, or to speed up piping
  3092.        operations by putting the temporary files on a RAM disk.
  3093.  
  3094.        For example, to put the pipe files on a RAM disk defined as drive
  3095.        E:
  3096.  
  3097.          set tmp=e:\
  3098.  
  3099.        4DOS also provides TEE and Y "pipe fittings" (see the Command
  3100.        Reference Guide for more information on TEE and Y).
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.   4DOS Reference Manual         Copyright 1990, J.P. Software           44 
  3133.  
  3134.  
  3135.   Command Parsing
  3136.  
  3137.        Because of the number of features in 4DOS, the command line
  3138.        parsing is somewhat complex.  The following is a summary of the
  3139.        process 4DOS uses to interpret command line input:
  3140.  
  3141.          ∙ Read the command line (from console or batch file) and strip
  3142.             leading white space
  3143.  
  3144.          ∙ Check for a leading @
  3145.               ∙ Save line to history list if no @ found, and if not in a
  3146.             batch file
  3147.               ∙ Set the "no echo" flag if @ found
  3148.  
  3149.          ∙ Perform alias expansion, including expansion of nested
  3150.             aliases, for the first command on the line.
  3151.  
  3152.          ∙ Perform environment variable expansion (except the EXCEPT,
  3153.             FOR, GLOBAL, and SELECT commands) for the first command on
  3154.             the line
  3155.  
  3156.          ∙ Scan the first command for pipes, compound commands or
  3157.             conditionals
  3158.  
  3159.          ∙ Perform redirection (except the EXCEPT, FOR, GLOBAL, and
  3160.             SELECT commands)
  3161.  
  3162.          ∙ Get the first argument and search for commands in the
  3163.             following order:
  3164.               1.  Internal commands
  3165.               2.  External commands - .COM, .EXE, .BTM, and .BAT in that
  3166.             order
  3167.               3.  Executable extensions (in the order they appear in the
  3168.             environment)
  3169.  
  3170.          ∙ Execute the command
  3171.  
  3172.          ∙ Get the remainder of the command line, if any, and test for
  3173.             conditionals
  3174.  
  3175.          ∙ Repeat the above steps for the next command on the line (if
  3176.             any)
  3177.  
  3178.        If you are having trouble getting aliases, batch files, multiple
  3179.        commands, environment variable substitution, or other features
  3180.        related to command parsing to work properly, you may want to step
  3181.        through the command to determine how 4DOS is parsing it.  When
  3182.        doing this you may find it useful to run the command with ECHO
  3183.        set on so you can see the expanded command 4DOS is trying to
  3184.        execute.
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.   4DOS Reference Manual         Copyright 1990, J.P. Software           45 
  3191.  
  3192.  
  3193.   Command Reference Guide
  3194.  
  3195.        4DOS has more than 70 internal commands.  Some are the same as,
  3196.        or improvements of, those in COMMAND.COM.  The remainder are new
  3197.        commands.
  3198.  
  3199.        These commands are equivalent to those in COMMAND.COM:
  3200.  
  3201.          BREAK          CHCP           CTTY           DATE
  3202.          EXIT           GOTO           TIME           VER
  3203.          VERIFY
  3204.  
  3205.        These commands are enhanced:
  3206.  
  3207.          CD             CHDIR          CLS            COPY
  3208.          DEL            DIR            ECHO           ERASE
  3209.          FOR            IF             MD             MKDIR
  3210.          PATH           PAUSE          PROMPT         RD
  3211.          REM            REN            RENAME         RMDIR
  3212.          SET            SHIFT          TYPE           VOL
  3213.  
  3214.        These commands are new:
  3215.  
  3216.          ?              ALIAS          ATTRIB         BEEP
  3217.          CALL           CANCEL         CDD            COLOR
  3218.          DESCRIBE       DIRS           DRAWBOX        DRAWHLINE
  3219.          DRAWVLINE      ENDLOCAL       ESET           EXCEPT
  3220.          FREE           GLOBAL         GOSUB          HISTORY
  3221.          IFF            INKEY          INPUT          KEYSTACK
  3222.          LIST           LOG            MEMORY         MOVE
  3223.          POPD           PUSHD          QUIT           RETURN
  3224.          SCREEN         SCRPUT         SELECT         SETDOS
  3225.          SETLOCAL       SWAPPING       TEE            TEXT
  3226.          TIMER          UNALIAS        UNSET          Y
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.   4DOS Reference Manual         Copyright 1990, J.P. Software           46 
  3249.  
  3250.  
  3251.   Command Syntax
  3252.  
  3253.        Words in uppercase are keywords and must be entered.  Words in
  3254.        lowercase are either options (e.g., "on", "off", "bright",
  3255.        "blink") or variables (e.g. "filename", "path").
  3256.  
  3257.        The expression d: represents a disk drive specification.  (This
  3258.        can be A:, B:, C:, etc.).
  3259.  
  3260.        Words or letters in brackets ([ ]) are optional and are not
  3261.        required to be entered.
  3262.  
  3263.        A vertical bar (|) separating words means enter one word or the
  3264.        other, but not both.
  3265.  
  3266.        A letter preceded by a forward slash (/) is a switch.  Switches
  3267.        are used to enable or disable the various command options.
  3268.        Because 4DOS supports multiple arguments for most commands,
  3269.        switches affect specific arguments, and must be placed with those
  3270.        arguments.  Pay careful attention to switch placement as it is
  3271.        described under the various commands.  The effects occasionally
  3272.        vary between commands in order to retain compatibility with
  3273.        COMMAND.COM.
  3274.  
  3275.        An ellipsis (...) means additional arguments are allowed, but not
  3276.        required.
  3277.  
  3278.        In the examples in the printed manual, characters in bold type
  3279.        represent input from the user.  Characters in normal type
  3280.        represent 4DOS prompts or responses.
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.   4DOS Reference Manual         Copyright 1990, J.P. Software           47 
  3307.  
  3308.  
  3309.   ?
  3310.  
  3311.   Syntax:     ?
  3312.  
  3313.   Purpose:    Display the 4DOS commands.
  3314.  
  3315.   Comments:   ? will display the 4DOS internal commands.  For help
  3316.               with the internal 4DOS and external DOS commands, see
  3317.               the HELP command.
  3318.  
  3319.   Example:    Display the internal commands:
  3320.  
  3321.                  c:\> ?
  3322.                  ?            ALIAS        ATTRIB       BEEP
  3323.                  BREAK        CALL         CANCEL       CD
  3324.                  CDD          CHCP         CHDIR        CLS
  3325.                  COLOR        COPY         CTTY         DATE
  3326.                  DEL          DESCRIBE     DIR          DIRS
  3327.                  DRAWBOX      DRAWHLINE    DRAWVLINE    ECHO
  3328.                  ENDLOCAL     ERASE        ESET         EXCEPT
  3329.                  EXIT         FOR          FREE         GLOBAL
  3330.                  GOSUB        GOTO         HISTORY      IF
  3331.                  IFF          INKEY        INPUT        KEYSTACK
  3332.                  LIST         LOG          MD           MEMORY
  3333.                  MKDIR        MOVE         PATH         PAUSE
  3334.                  POPD         PROMPT       PUSHD        QUIT
  3335.                  RD           REM          REN          RENAME
  3336.                  RETURN       RMDIR        SCREEN       SCRPUT
  3337.                  SELECT       SET          SETDOS       SETLOCAL
  3338.                  SHIFT        SWAPPING     TEE          TEXT
  3339.                  TIME         TIMER        TYPE         UNALIAS
  3340.                  UNSET        VER          VERIFY       VOL
  3341.                  Y
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.   4DOS Reference Manual         Copyright 1990, J.P. Software           48 
  3365.  
  3366.  
  3367.   ALIAS
  3368.  
  3369.   Syntax:     ALIAS [/P] [/R filename] [name[=][value]]
  3370.  
  3371.   Purpose:    Load or display the alias list, or define name as a
  3372.               substitute for value.
  3373.  
  3374.   Comments:   Aliases are useful as a means of executing a complex
  3375.               series of commands with a few keystrokes.  Aliases can
  3376.               also be used as "in memory batch files," and will run much
  3377.               faster than disk-based batch files.
  3378.  
  3379.               If you only specify name, ALIAS displays the current
  3380.               alias value for name.  Otherwise, ALIAS assigns the
  3381.               command(s) in value to name.  (Value may contain
  3382.               environment variables or additional aliases.)  Name can
  3383.               now be used as if it were a built-in or external command.
  3384.               If you don't specify any arguments, ALIAS displays the
  3385.               current alias list.
  3386.  
  3387.               Name is limited to no more than 80 characters, and
  3388.               value to no more than 255 characters.
  3389.  
  3390.               The /P(ause) option will pause after displaying each
  3391.               page and wait for a key to be pressed.
  3392.  
  3393.               The /R(ead) option allows you to load an alias list
  3394.               from a file.  This is much faster than loading aliases
  3395.               from a batch file.  The file is in the same format as the
  3396.               ALIAS display, so ALIAS /R can accept as input a file
  3397.               generated by redirecting ALIAS output.  You can add
  3398.               comments to an alias file by starting the comment line
  3399.               with a colon (:).
  3400.  
  3401.               For example, the following commands will save the
  3402.               aliases to a file, and then reload them from that file:
  3403.  
  3404.                    alias > alist
  3405.                    alias /r alist
  3406.  
  3407.               When defining aliases at the command line, back quotes
  3408.               must be used around the alias arguments that contain
  3409.               multiple commands or variable references (%1, %&2, etc.)
  3410.               to prevent premature expansion.  Back quotes should NOT be
  3411.               used when defining aliases in a file to be read with ALIAS
  3412.               /R.
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.   4DOS Reference Manual         Copyright 1990, J.P. Software           49 
  3423.  
  3424.  
  3425.               Aliases may be nested; i.e., an alias can refer to another
  3426.               alias, but they cannot refer back to themselves (a=b=a).
  3427.               You can stop further alias expansion by prefacing the
  3428.               alias argument with an asterisk (*).  This also allows an
  3429.               alias to refer to a command of the same name (see below
  3430.               for an example).
  3431.  
  3432.               An alias name can be truncated by including an asterisk
  3433.               (*) in the alias name (see example).
  3434.  
  3435.               To remove an alias, use the UNALIAS command.
  3436.  
  3437.               For more information on aliases (including the use of
  3438.               variables), see the Aliases section in Using 4DOS, and the
  3439.               sample file ALIASES, distributed with 4DOS.
  3440.  
  3441.   Example:    Define D as an alias for DIR /AP:
  3442.  
  3443.                    c:\> alias d dir /ap
  3444.  
  3445.               Display the current alias(es):
  3446.  
  3447.                    c:\> alias
  3448.                    D=dir /ap
  3449.  
  3450.               The following example creates a new command WHEREIS
  3451.               that searches a disk for matching files and
  3452.               subdirectories:
  3453.  
  3454.                    c:\> alias whereis dir /dp
  3455.  
  3456.               The same command using alias name truncation (this
  3457.               alias can be referenced as wher, where, wherei, or
  3458.               whereis):
  3459.  
  3460.                    c:\> alias wher*eis dir /dp
  3461.  
  3462.               The following example erases the backup files, and then
  3463.               displays the directory (the back-quotes are necessary to
  3464.               prevent 4DOS from processing the command separator ^):
  3465.  
  3466.                    c:\> alias zap `del *.bak ^ dir /w`
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.   4DOS Reference Manual         Copyright 1990, J.P. Software           50 
  3481.  
  3482.  
  3483.               Redefine the 4DOS DIR command as a variation of itself
  3484.               (wide display, including hidden and system files, pausing
  3485.               after each page):
  3486.  
  3487.                    c:\> alias dir *dir /whp
  3488.  
  3489.               Rename the 4DOS LIST command to DISPLAY, and alias LIST
  3490.               to an external program:
  3491.  
  3492.                    c:\> alias display *list
  3493.                    c:\> alias list c:\util\list.com
  3494.  
  3495.               The following examples show the use of alias arguments:
  3496.  
  3497.                    c:\> alias zap `erase %& ^ chkdsk ^ dir /w`
  3498.                    c:\> zap *.bak *.lst
  3499.  
  3500.                 This expands to:
  3501.  
  3502.                       erase *.bak *.lst ^ chkdsk ^ dir /w
  3503.  
  3504.                    c:\> alias reverse `echo %5 %4 %3 %2 %1`
  3505.                    c:\> reverse one two three four five
  3506.  
  3507.                 This expands to:
  3508.  
  3509.                       echo five four three two one
  3510.  
  3511.               The following example shows the use of IFF inside an
  3512.               alias.  The alias modifies the SET command so that if SET
  3513.               is entered with no arguments, it is replaced by a SET /P
  3514.               (pause after displaying each page).  Note the use of
  3515.               asterisks (*set) to prevent alias loops (this should be
  3516.               entered on one line):
  3517.  
  3518.                       c:\> alias set `iff "%1"=="" then *set /p^
  3519.                            else *set %&^endiff`
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.   4DOS Reference Manual         Copyright 1990, J.P. Software           51 
  3539.  
  3540.  
  3541.   ATTRIB
  3542.  
  3543.   Syntax:     ATTRIB [/D] [-|+[AHRS]] [d:][path]filename...
  3544.  
  3545.   Purpose:    Change the file or subdirectory attributes.
  3546.  
  3547.   Comments:   ATTRIB normally only modifies file attributes.
  3548.               Specifying the /D(irectory) option will also modify
  3549.               subdirectory attributes.
  3550.  
  3551.                    +A   Set the archive attribute
  3552.                    -A   Clear the archive attribute
  3553.                    +H   Set the hidden attribute
  3554.                    -H   Clear the hidden attribute
  3555.                    +R   Set the read-only attribute
  3556.                    -R   Clear the read-only attribute
  3557.                    +S   Set the system file attribute
  3558.                    -S   Clear the system file attribute
  3559.  
  3560.               4DOS will preserve the previous file attributes and
  3561.               change only the specified attributes.  New attribute
  3562.               values are allowed between filenames; otherwise ATTRIB
  3563.               uses the same attributes specified for the previous
  3564.               file(s).  You cannot modify the directory or volume label
  3565.               attributes.
  3566.  
  3567.               You can display the file and subdirectory attributes
  3568.               using the /A option in DIR.
  3569.  
  3570.   Example:    Set the read-only and hidden attributes for the file
  3571.               MEMO:
  3572.  
  3573.                    c:\> attrib +rh memo
  3574.  
  3575.               Set the archive attribute (file has been modified) for
  3576.               MEMO, and change TEST.COM to system and not modified:
  3577.  
  3578.                    c:\> attrib +a memo +s -a test.com
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.   4DOS Reference Manual         Copyright 1990, J.P. Software           52 
  3597.  
  3598.   BEEP
  3599.  
  3600.   Syntax:     BEEP [frequency duration ...]
  3601.  
  3602.   Purpose:    Beep the speaker.
  3603.  
  3604.   Comments:   BEEP is normally used in batch files to signal that an
  3605.               operation has been completed, or that the computer needs
  3606.               attention (for example, to change disks).  Because BEEP
  3607.               allows you to specify the frequency and duration, you can
  3608.               use it to play simple music.  You can specify multiple
  3609.               frequency/duration pairs on the command line.
  3610.  
  3611.               The frequency is specified in Hertz, and the duration
  3612.               in 1/18th second intervals.  No sound will be generated
  3613.               for frequencies less than 20 Hz, allowing you to insert
  3614.               short delays.  The default value for frequency is 440 Hz;
  3615.               the default value for duration is 2.
  3616.  
  3617.               The following table gives the frequency values for a
  3618.               five octave range (middle C is 523 Hz):
  3619.                _______________________________________________________
  3620.               |       |       |       |       |       |       |       |
  3621.               |   C   |   65  |  131  |  262  |  523  | 1040  | 2093  |
  3622.               |-------|-------|-------|-------|-------|-------|-------|
  3623.               | C#/Db |   69  |  139  |  277  |  554  | 1103  | 2217  |
  3624.               |-------|-------|-------|-------|-------|-------|-------|
  3625.               |   D   |   73  |  147  |  294  |  587  | 1176  | 2349  |
  3626.               |-------|-------|-------|-------|-------|-------|-------|
  3627.               | D#/Eb |   78  |  156  |  311  |  622  | 1241  | 2489  |
  3628.               |-------|-------|-------|-------|-------|-------|-------|
  3629.               |   E   |   82  |  165  |  330  |  659  | 1311  | 2637  |
  3630.               |-------|-------|-------|-------|-------|-------|-------|
  3631.               |   F   |   87  |  175  |  349  |  698  | 1391  | 2794  |
  3632.               |-------|-------|-------|-------|-------|-------|-------|
  3633.               | F#/Gb |   93  |  185  |  370  |  740  | 1488  | 2960  |
  3634.               |-------|-------|-------|-------|-------|-------|-------|
  3635.               |   G   |   98  |  196  |  392  |  784  | 1568  | 3136  |
  3636.               |-------|-------|-------|-------|-------|-------|-------|
  3637.               | G#/Ab |  104  |  208  |  415  |  831  | 1662  | 3322  |
  3638.               |-------|-------|-------|-------|-------|-------|-------|
  3639.               |   A   |  110  |  220  |  440  |  880  | 1760  | 3520  |
  3640.               |-------|-------|-------|-------|-------|-------|-------|
  3641.               | A#/Bb |  117  |  233  |  466  |  932  | 1866  | 3729  |
  3642.               |-------|-------|-------|-------|------ |-------|-------|
  3643.               |   B   |  123  |  248  |  494  |  988  | 1973  | 3951  |
  3644.               |_______|_______|_______|_______|_______|_______|_______|
  3645.  
  3646.   Example:    The following batch file fragment runs the program
  3647.               DEMO, plays a few notes, and waits for you to press a key:
  3648.  
  3649.                    demo
  3650.                    beep 440 4  600 2 1040 6
  3651.                    pause Finished with the demo - hit a key...
  3652.  
  3653.  
  3654.   4DOS Reference Manual         Copyright 1990, J.P. Software           53 
  3655.  
  3656.  
  3657.   BREAK
  3658.  
  3659.   Syntax:     BREAK [on | off]
  3660.  
  3661.   Purpose:    Display, enable, or disable ^C / ^BREAK checking.
  3662.  
  3663.   Comments:   BREAK turns the ^C / ^BREAK checking on or off.  If no
  3664.               argument is given, it displays the current BREAK status.
  3665.  
  3666.               If BREAK is off, MS-DOS will only check for a ^C during
  3667.               DOS character I/O (screen, keyboard, serial port, or
  3668.               printer operations).  Many programs don't use these I/O
  3669.               functions, and it can be difficult to break out of the
  3670.               program with BREAK off.  If BREAK is on, MS-DOS will check
  3671.               for a ^C or ^BREAK during any MS-DOS operation (including
  3672.               disk I/O).
  3673.  
  3674.               BREAK defaults to OFF.  You can change the default
  3675.               BREAK setting by adding the following line to your
  3676.               CONFIG.SYS file:
  3677.  
  3678.                    break=on
  3679.  
  3680.   Example:    Check the current BREAK status:
  3681.  
  3682.                    c:\> break
  3683.                    BREAK is OFF
  3684.  
  3685.               Enable ^C checking in all MS-DOS calls:
  3686.  
  3687.                    c:\> break on
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.   4DOS Reference Manual         Copyright 1990, J.P. Software            
  3713.  
  3714.  
  3715.   CALL
  3716.  
  3717.   Syntax:     CALL [d:][path]filename
  3718.  
  3719.   Purpose:    Call a secondary batch file.
  3720.  
  3721.   Comments:   CALL allows batch files to call other batch files
  3722.               (batch file nesting) without invoking a secondary copy of
  3723.               the command processor.  4DOS supports batch file nesting
  3724.               up to four levels deep.  The calling batch file is
  3725.               suspended while the called batch file runs.  When the
  3726.               called batch file finishes, the calling batch file resumes
  3727.               execution at the next command.  If you execute a batch
  3728.               file from another batch file without using CALL, the first
  3729.               batch file is terminated before the second one starts.
  3730.  
  3731.               The current ECHO state will be inherited by a called
  3732.               batch file.
  3733.  
  3734.               See also CANCEL and QUIT.
  3735.  
  3736.   Example:    The following batch file fragment compares an input
  3737.               line to "wp" and calls a secondary batch file if it
  3738.               matches:
  3739.  
  3740.                    input  Enter your choice:   %%option
  3741.                    if  "%option" == "wp"  call  wp.bat
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.   4DOS Reference Manual         Copyright 1990, J.P. Software           55 
  3771.  
  3772.  
  3773.   CANCEL
  3774.  
  3775.   Syntax:     CANCEL
  3776.  
  3777.   Purpose:    Terminate batch file processing.
  3778.  
  3779.   Comments:   The CANCEL command will end all batch file processing,
  3780.               regardless of the batch nesting level.  (Use QUIT to end a
  3781.               nested batch file and return to the previous batch file.)
  3782.  
  3783.               You can CANCEL at any point in a batch file.
  3784.  
  3785.               See also CALL and QUIT.
  3786.  
  3787.   Example:    The following batch file fragment compares an input
  3788.               line to "end" and terminates all batch file processing if
  3789.               it matches:
  3790.  
  3791.                    input  Enter your choice:   %%option
  3792.                    if  "%option" == "end"  cancel
  3793.  
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.   4DOS Reference Manual         Copyright 1990, J.P. Software           56 
  3829.  
  3830.  
  3831.   CD / CHDIR
  3832.  
  3833.   Syntax:     CD [d:][pathname]
  3834.                    or
  3835.               CHDIR [d:][pathname]
  3836.  
  3837.   Purpose:    Display or change the current directory.
  3838.  
  3839.   Comments:   Entering CD with no argument or only a disk drive name
  3840.               will display the current directory.  Entering CD and a
  3841.               pathname will change the current directory.
  3842.  
  3843.               Every disk drive on the system has its own current
  3844.               directory.  Specifying both a drive and a directory in the
  3845.               CD command will change the current directory on the
  3846.               specified drive, but will not change the default drive.
  3847.               Use CDD to change both the drive and directory.
  3848.  
  3849.               To start at the root directory, start the pathname with
  3850.               a backslash (\).  To start at the parent directory, start
  3851.               the pathname with two periods (..).  All other pathnames
  3852.               start at the current directory.
  3853.  
  3854.               MS-DOS will not accept directory names longer than 64
  3855.               characters.
  3856.  
  3857.               See also CDD.
  3858.  
  3859.   Example:    Change to the subdirectory C:\FINANCE\MYFILES:
  3860.  
  3861.                    c:\> cd \finance\myfiles
  3862.                    c:\finance\myfiles>
  3863.  
  3864.               Change the default directory on drive A:
  3865.  
  3866.                    c:\> cd a:\utility
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.   4DOS Reference Manual         Copyright 1990, J.P. Software           57 
  3887.  
  3888.  
  3889.   CDD
  3890.  
  3891.   Syntax:     CDD [d:]pathname
  3892.  
  3893.   Purpose:    Change the current disk drive and directory.
  3894.  
  3895.   Comments:   CDD is similar to CD, except it also changes the
  3896.               default disk drive.
  3897.  
  3898.               To start at the root directory, start the pathname with
  3899.               a backslash (\).  To start at the parent directory, start
  3900.               the pathname with two periods (..).  All other pathnames
  3901.               start at the current directory.
  3902.  
  3903.               MS-DOS will not accept directory names longer than 64
  3904.               characters.
  3905.  
  3906.               See also CD.
  3907.  
  3908.   Example:    Change from the root directory on drive A to the
  3909.               subdirectory C:\WP:
  3910.  
  3911.                    a:\> cdd c:\wp
  3912.                    c:\wp>
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.   4DOS Reference Manual         Copyright 1990, J.P. Software           58 
  3945.  
  3946.  
  3947.   CHCP
  3948.  
  3949.   Syntax:     CHCP [n]
  3950.  
  3951.   Purpose:    Display or change the current system code page.
  3952.  
  3953.   Comments:   Code page switching allows you to select different
  3954.               character sets for language support.  To use code page
  3955.               switching, you must have an EGA or VGA display, and MS-DOS
  3956.               3.3 or above.
  3957.  
  3958.               Before using CHCP, you must first load the device
  3959.               drivers (in CONFIG.SYS); make sure the information file
  3960.               (COUNTRY.SYS) is available; load national language support
  3961.               (using the NLSFUNC command); and prepare the specified
  3962.               code page for the devices (using the MODE command with the
  3963.               CODEPAGE PREPARE option).
  3964.  
  3965.               CHCP accepts one of the two prepared system code pages.
  3966.               An error message is displayed if a code page is selected
  3967.               that has not been prepared for the system.
  3968.  
  3969.               Entering CHCP with no arguments displays the active
  3970.               code page.
  3971.  
  3972.               See your MS-DOS manual for more information on CHCP.
  3973.  
  3974.   Example:    Display the current code page:
  3975.  
  3976.                    c:\> chcp
  3977.                    Active code page: 437
  3978.  
  3979.               Set the code page to multilingual:
  3980.  
  3981.                    c:\> chcp 850
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.   4DOS Reference Manual         Copyright 1990, J.P. Software           59 
  4003.  
  4004.  
  4005.   CLS
  4006.  
  4007.   Syntax:     CLS [[bright] [blink] fg ON bg]
  4008.  
  4009.   Purpose:    Clear the video display, optionally to the specified
  4010.               colors.
  4011.  
  4012.   Comments:   CLS clears the display and moves the cursor to the
  4013.               upper left corner.  fg is the foreground color, bg the
  4014.               background color.  Only the first three characters of the
  4015.               color name and attributes ("bright" and "blink") are
  4016.               required.
  4017.  
  4018.               You must have ANSI.SYS (or another ANSI compatible
  4019.               screen driver) loaded to set screen colors.
  4020.  
  4021.               The available colors are:
  4022.  
  4023.                         Black     Blue      Green     Red
  4024.                         Magenta   Cyan      Yellow    White
  4025.  
  4026.               CLS is normally used in batch files to clear the screen
  4027.               before displaying text.
  4028.  
  4029.               See also COLOR.
  4030.  
  4031.   Example:    Clear the display:
  4032.  
  4033.                    c:\> cls
  4034.  
  4035.               Clear the display to a blue background, and set white
  4036.               characters as the new default:
  4037.  
  4038.                    c:\> cls white on blue
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.   4DOS Reference Manual         Copyright 1990, J.P. Software           60 
  4061.  
  4062.  
  4063.   COLOR
  4064.  
  4065.   Syntax:     COLOR [bright] [blink] fg ON bg
  4066.  
  4067.   Purpose:    Set the screen display colors.
  4068.  
  4069.   Comments:   fg is the foreground color, bg the background color.
  4070.               Only the first three characters of the color name and
  4071.               attributes ("bright" and "blink") are required
  4072.  
  4073.               You must have ANSI.SYS (or another ANSI compatible
  4074.               screen driver) loaded to set screen colors.
  4075.  
  4076.               The available colors are:
  4077.  
  4078.                         Black     Blue      Green     Red
  4079.                         Magenta   Cyan      Yellow    White
  4080.  
  4081.               See also CLS and SCRPUT.
  4082.  
  4083.   Example:    Set the default screen colors to bright white text on a
  4084.               blue background:
  4085.  
  4086.                    c:\> color bright white on blue
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.   4DOS Reference Manual         Copyright 1990, J.P. Software           61 
  4119.  
  4120.  
  4121.   COPY
  4122.  
  4123.   Syntax:     COPY [/MPQRUV] [d:][path]filename[+]...[/AB]
  4124.                    [[d:][path]filename][/AB]
  4125.  
  4126.   Purpose:    Copy or append one or more files.
  4127.  
  4128.   Comments:   Unlike COMMAND.COM, 4DOS allows you to copy several
  4129.               unrelated files to a target directory with a single COPY
  4130.               command.  If there are two or more arguments on the
  4131.               command line, COPY assumes the last argument is the
  4132.               target.  If there is only one argument, the target is
  4133.               assumed to be the current directory.
  4134.  
  4135.               The plus (+) tells 4DOS to append two or more files to
  4136.               a single target file.  If you don't specify a target, COPY
  4137.               will append each subsequent file to the first file.
  4138.  
  4139.               If you specify more than one source file, and the
  4140.               target is NOT a directory, COPY will automatically append
  4141.               the files to the target.
  4142.  
  4143.               The /A(SCII) and /B(inary) options apply to the
  4144.               preceding filename and to all subsequent filenames on the
  4145.               command line until another /A or /B is entered.  The other
  4146.               options (/M, /P, /Q, /R, /U, /V) apply to all filenames on
  4147.               the command line.
  4148.  
  4149.               If you use the /A option with a source filename, 4DOS
  4150.               will copy the file up to, but not including, the first ^Z
  4151.               character in the file.  If you use /A with a target
  4152.               filename, 4DOS will add a ^Z to the end of the file.  4DOS
  4153.               defaults to /A when appending files, or when the source or
  4154.               target is a device.
  4155.  
  4156.               If you use the /B option with a source filename, 4DOS
  4157.               will copy the entire file.  Using /B with a target
  4158.               filename prevents 4DOS from adding a ^Z to the end of the
  4159.               target file.  4DOS defaults to /B for normal file copies.
  4160.  
  4161.               The /M(odified) option copies only those files with the
  4162.               archive bit set (see ATTRIB).  The archive bit will NOT be
  4163.               cleared after copying.
  4164.  
  4165.               The /P(rompt) option prompts you to confirm each file
  4166.               copy (Y or N).  An N response will skip that particular
  4167.               source file.
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.   4DOS Reference Manual         Copyright 1990, J.P. Software           62 
  4177.  
  4178.  
  4179.               The /Q(uiet) option turns off the display of the files
  4180.               copied.
  4181.  
  4182.               The /R(eplace) option prompts before overwriting an
  4183.               existing file.
  4184.  
  4185.               The /U(pdate) option copies only those source files
  4186.               that are newer than a matching target file, or where a
  4187.               matching target file doesn't exist.
  4188.  
  4189.               The /V(erify) option verifies each disk write.  This is
  4190.               the same as executing the VERIFY ON command, but is only
  4191.               active during the COPY command.
  4192.  
  4193.               See also MOVE.
  4194.  
  4195.   Example:    Copy the files MEMO1, PROJECT8.WKS, and UPDATE.BAT to
  4196.               the root directory on drive A:
  4197.  
  4198.                    c:\> copy memo1 project8.wks update.bat a:\
  4199.  
  4200.               Append the files MEMO1, MEMO2, and MEMO3, and store the
  4201.               result in BIGMEMO:
  4202.  
  4203.                    c:\> copy memo1+memo2+memo3 bigmemo
  4204.  
  4205.               Copy only those files in the root directory on drive A
  4206.               that are newer than the matching files in the current
  4207.               directory, or which don't exist in the current directory:
  4208.  
  4209.                    c:\> copy /u a:\*.* c:\*.*
  4210.  
  4211.               Copy files from the root directory on drive A to the
  4212.               current directory, but prompt before overwriting existing
  4213.               files:
  4214.  
  4215.                    c:\> copy /r a:\*.*
  4216.  
  4217.               Copy a downloadable font file to the printer in binary
  4218.               mode:
  4219.  
  4220.                    c:\> copy myfont.dat prn: /b
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.   4DOS Reference Manual         Copyright 1990, J.P. Software           63 
  4235.  
  4236.  
  4237.   CTTY
  4238.  
  4239.   Syntax:     CTTY device
  4240.  
  4241.   Purpose:    Change the default console device.
  4242.  
  4243.   Comments:   At startup, 4DOS uses the keyboard as the standard
  4244.               input device and the display as the standard output
  4245.               device.  CTTY allows you to change the console (CON:) to
  4246.               another device that can perform standard character I/O.
  4247.  
  4248.               CTTY works only for those programs that use the
  4249.               standard MS-DOS I/O functions (this includes all of the
  4250.               4DOS internal commands with the exception of DRAWBOX,
  4251.               DRAWHLINE, DRAWVLINE, LIST, SCREEN, SCRPUT, and SELECT).
  4252.  
  4253.   Example:    Change the console to the first serial port:
  4254.  
  4255.                    c:\> ctty com1:
  4256.  
  4257.               Change the console back to the standard keyboard and
  4258.               display:
  4259.  
  4260.                    c:\> ctty con:
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.   4DOS Reference Manual         Copyright 1990, J.P. Software           64 
  4293.  
  4294.  
  4295.   DATE
  4296.  
  4297.   Syntax:     DATE [mm-dd-yy]
  4298.  
  4299.   Purpose:    Display and (optionally) change the system date.
  4300.  
  4301.   Comments:   If you don't enter any parameters, DATE will display
  4302.               the current system date and time, and prompt for the new
  4303.               date.  Press ENTER if you don't wish to change the date,
  4304.               otherwise enter the new date.
  4305.  
  4306.               The parameters for the DATE command are:
  4307.  
  4308.                    mm (month) = 1 - 12
  4309.                    dd (day)  = 1 - 31
  4310.                    yy (year)  = 80 - 199 (1980 - 2099)
  4311.  
  4312.               You can use hyphens, slashes, or periods to separate
  4313.               the month, day, and year entries.
  4314.  
  4315.               The format for the date entry depends on the country
  4316.               code defined in the CONFIG.SYS file or by the CHCP
  4317.               command.  The default format is U.S. (mm-dd-yy).  The
  4318.               European format is dd-mm-yy; the Japanese is yy-mm-dd.
  4319.  
  4320.               See also CHCP and TIME.
  4321.  
  4322.   Example:    Enter the date from the command line:
  4323.  
  4324.                    c:\> date 12/25/89
  4325.  
  4326.               To be prompted for the date:
  4327.  
  4328.                    c:\> date
  4329.                    Mon  Dec 25, 1989  9:30:06
  4330.                    Enter new date (mm-dd-yy):
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.   4DOS Reference Manual         Copyright 1990, J.P. Software           65 
  4351.  
  4352.  
  4353.   DEL / ERASE
  4354.  
  4355.   Syntax:     DEL [/PQY] [d:][path]filename...
  4356.                    or
  4357.               ERASE [/PQY] [d:][path]filename...
  4358.  
  4359.   Purpose:    Erase the specified file(s) from the disk.
  4360.  
  4361.   Comments:   If the /P(rompt) option is specified, 4DOS will prompt
  4362.               you to enter a Y or N to confirm file deletions for all
  4363.               filenames.
  4364.  
  4365.               The /Q(uiet) option turns off the display of the files
  4366.               deleted.
  4367.  
  4368.               The /Y(es) option is the reverse of /P - it assumes a Y
  4369.               response to everything, including deleting an entire
  4370.               subdirectory (*.*).  Use this option with caution!
  4371.  
  4372.               If you enter a subdirectory name, or a filename
  4373.               composed only of wildcards (* and/or ?), DEL asks for
  4374.               confirmation (Y or N), unless you specified the /Y(es)
  4375.               option.  If you respond with a Y, DEL will delete all the
  4376.               files in that subdirectory (except hidden, system, and
  4377.               read-only files).
  4378.  
  4379.   Example:    Erase all the files in the current directory with a
  4380.               .BAK or .PRN extension:
  4381.  
  4382.                    c:\> del *.bak *.prn
  4383.  
  4384.               Confirm the deletion of all files in the current
  4385.               directory with .WKS extensions:
  4386.  
  4387.                    c:\> del /P *.wks
  4388.                    Delete JAN89.WKS (Y/N)? n
  4389.                    Delete FEB88.WKS (Y/N)? y
  4390.                    Delete DEC88.WKS (Y/N)? y
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.   4DOS Reference Manual         Copyright 1990, J.P. Software           66 
  4409.  
  4410.  
  4411.   DELAY
  4412.  
  4413.   Syntax:     DELAY [seconds]
  4414.  
  4415.   Purpose:    Pause for a specified length of time.
  4416.  
  4417.   Comments:   DELAY is useful in batch file loops while waiting for a
  4418.               condition to occur.  The default value is one second.
  4419.  
  4420.               You can cancel a DELAY loop by pressing ^C.
  4421.  
  4422.   Example:    Wait for 10 seconds:
  4423.  
  4424.                    delay 10
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.   4DOS Reference Manual         Copyright 1990, J.P. Software           67 
  4467.  
  4468.  
  4469.   DESCRIBE
  4470.  
  4471.   Syntax:     DESCRIBE [d:][path]filename ["description"] ...
  4472.  
  4473.   Purpose:    Create, modify, or delete file and subdirectory
  4474.               descriptions.
  4475.  
  4476.   Comments:   DESCRIBE adds descriptions (up to 40 characters) to MS-
  4477.               DOS filenames and subdirectories.  The descriptions will
  4478.               be displayed when using DIR with the default single column
  4479.               option, or when using SELECT.
  4480.  
  4481.               File descriptions allow you to identify your files in
  4482.               much more meaningful ways than MS-DOS allows in an eight
  4483.               character filename.
  4484.  
  4485.               You can enter a description on the command line by
  4486.               entering the filename followed by the description enclosed
  4487.               in quotes.  Using wildcards (* and ?) and/or multiple
  4488.               filenames with a description on the command line will give
  4489.               all matching files the same description.
  4490.  
  4491.               Descriptions are stored in each directory in a hidden
  4492.               file called DESCRIPT.ION.  Use the ATTRIB command to
  4493.               "unhide" this file if you need to copy or delete it.
  4494.  
  4495.               The description file is modified appropriately whenever
  4496.               you perform an internal command (such as COPY, MOVE, DEL,
  4497.               or RENAME), but not if you use an external program (such
  4498.               as XCOPY or a shell program).
  4499.  
  4500.   Example:    Create a description for the file MEMO.TXT:
  4501.  
  4502.                    c:\> describe memo.txt
  4503.                    Describe "memo.txt" : Memo to Bob about party
  4504.  
  4505.               Enter the same description from the command line:
  4506.  
  4507.                    c:\> describe memo.txt "Memo to Bob about party"
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.   4DOS Reference Manual         Copyright 1990, J.P. Software           68 
  4525.  
  4526.  
  4527.   DIR
  4528.  
  4529.   Syntax:     DIR [/124ACDFHJNOeirtuzPQSVWX] [[d:][path]filename[+]...]
  4530.  
  4531.   Purpose:    Display information about files and subdirectories.
  4532.  
  4533.   Comments:   DIR displays information about the files and
  4534.               subdirectories in the specified directory.  Depending upon
  4535.               the options specified, DIR can show the filename, file
  4536.               attributes, size, date and time of the most recent change
  4537.               to the file, and the file description.
  4538.  
  4539.               DIR allows wildcard characters (* and ?) in the
  4540.               filename.  If you don't specify a filename, DIR defaults
  4541.               to *.* (display all files and subdirectories in the
  4542.               current directory).
  4543.  
  4544.               If you append filenames with a +, 4DOS will display the
  4545.               matching filenames in a single directory listing.
  4546.  
  4547.               If a country code was defined in the CONFIG.SYS file or
  4548.               by the CHCP command, DIR will display the date in the
  4549.               format for that country.  The default date format is U.S.
  4550.               (mm-dd-yy).
  4551.  
  4552.               DIR can handle directories of any size, limited only by
  4553.               the available memory.  Each filename requires 32 bytes of
  4554.               DOS memory plus the size of the description (if any); a
  4555.               system with 128K of free DOS memory can display up to
  4556.               4,000 files per directory.
  4557.  
  4558.               Options on the command line apply only to the filenames
  4559.               which follow the option, except that options at the end of
  4560.               the line apply to the preceding filename only.  This
  4561.               allows you to specify several options for a group of
  4562.               files, and retains compatibility with COMMAND.COM when a
  4563.               single filename is specified.
  4564.  
  4565.               The DIR options are:
  4566.  
  4567.                  1  Single column display - display the filename, size,
  4568.                       date, time, and description.  This is the default.
  4569.                  2  Two column display - display the filename, size,
  4570.                       date, and time.
  4571.                  4  Four column display - display the filename and size
  4572.                       (in K(ilobytes) or M(egabytes).
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.   4DOS Reference Manual         Copyright 1990, J.P. Software           69 
  4583.  
  4584.  
  4585.                  A  Display filenames and attributes (see ATTRIB), in
  4586.                       the format RHSA, where:
  4587.                             R   Read-only
  4588.                             H   Hidden
  4589.                             S   System
  4590.                             A   Archive
  4591.                       When displaying attributes, DIR cannot also
  4592.                       display file descriptions.
  4593.                  C  Display filenames in upper case (like COMMAND.COM).
  4594.                       See also SETDOS /U.
  4595.                  D  Display contents of the current directory and all of
  4596.                       its subdirectories.  DIR will only display headers
  4597.                       and summaries for those directories with matching
  4598.                       filenames.
  4599.                  F  Display files only (no subdirectories).
  4600.                  H  Display all files, including hidden and system
  4601.                       files.
  4602.                  J  Justify filenames (same format as COMMAND.COM).
  4603.                  N  Reset DIR options to the default values (useful when
  4604.                       displaying some files in one format, and then
  4605.                       changing back to the default format).
  4606.                  O? Sort sequence, where ? can be any combination of the
  4607.                       following options:
  4608.                             e   Sort by extension
  4609.                             i   Sort by the file description (see
  4610.                                  DESCRIBE)
  4611.                             r   Reverse the normal sort order
  4612.                             t   Sort by time (oldest first)
  4613.                             u   Unsorted (same as COMMAND.COM)
  4614.                             z   Sort by size
  4615.                         The default sort is by filename.
  4616.                  P  Pause after each screen page and wait for a key to
  4617.                       be pressed (useful for displaying long directory
  4618.                       listings).
  4619.                  Q  Suppress header line and summaries, and display file
  4620.                       or subdirectory names only, in a single column
  4621.                       (useful when redirecting output to a file or
  4622.                       another program).
  4623.                  S  Display summary only (number of files & bytes used).
  4624.                  V  Display filenames sorted vertically rather than
  4625.                       horizontally (with the /2, /4, or /W option).
  4626.                  W  Wide display - display the filenames only,
  4627.                       horizontally across the screen (5 columns on an
  4628.                       80-character display).
  4629.                  X  Display subdirectories only.
  4630.  
  4631.                  See also DESCRIBE and SELECT.
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.   4DOS Reference Manual         Copyright 1990, J.P. Software           70 
  4641.  
  4642.  
  4643.   Example:    Display the .WKS files, and then the .WK1 files in the
  4644.               current directory:
  4645.  
  4646.                    c:\> dir *.wks *.wk1
  4647.  
  4648.               Display the .WKS and .WK1 files together:
  4649.  
  4650.                    c:\> dir *.wks+*.wk1
  4651.  
  4652.               Display all the files on drive C, including hidden and
  4653.               system files, pausing after each page:
  4654.  
  4655.                    c:\> dir /dhp c:\*.*
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.   4DOS Reference Manual         Copyright 1990, J.P. Software           71 
  4699.  
  4700.  
  4701.   DIRS
  4702.  
  4703.   Syntax:     DIRS
  4704.  
  4705.   Purpose:    Display the current directory stack.
  4706.  
  4707.   Comments:   DIRS displays the directory stack used by PUSHD and
  4708.               POPD (most recent entries first).  The directory stack
  4709.               holds up to 255 characters (about 10 to 20 entries).
  4710.  
  4711.               See also PUSHD and POPD.
  4712.  
  4713.   Example:    Change directories and then display the directory
  4714.               stack:
  4715.  
  4716.                    c:\> pushd c:\database
  4717.                    c:\database> pushd d:\wordp\memos
  4718.                    d:\wordp\memos> dirs
  4719.                    c:\database
  4720.                    c:\
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.   4DOS Reference Manual         Copyright 1990, J.P. Software           72 
  4757.  
  4758.  
  4759.   DRAWBOX
  4760.  
  4761.   Syntax:     DRAWBOX ulrow ulcol lrrow lrcol style [bright] [blink] fg
  4762.                  ON bg [FILL bgfill]
  4763.  
  4764.   Purpose:    Draw a box on the screen.
  4765.  
  4766.   Comments:   DRAWBOX is useful for creating attractive screen
  4767.               displays in batch files.  DRAWBOX detects other lines and
  4768.               boxes on the display, and creates the appropriate
  4769.               connector characters when possible (not all types of lines
  4770.               can be connected with the available characters).
  4771.  
  4772.               The row and column are zero-based, so on a standard 25
  4773.               line by 80 column display, valid rows are 0 - 24 and valid
  4774.               columns are 0 - 79.
  4775.  
  4776.               The parameters are:
  4777.  
  4778.                    ulrow   Row for upper left corner
  4779.                    ulcol   Column for upper left corner
  4780.                    lrrow   Row for lower right corner
  4781.                    lrcol   Column for lower right corner
  4782.                    style   Box drawing style:
  4783.                                 0 - borderless
  4784.                                 1 - single line
  4785.                                 2 - double line
  4786.                                 3 - single line on top and bottom,
  4787.                                        double on sides
  4788.                                 4 - double line on top and bottom,
  4789.                                        single on sides
  4790.                    fg      Foreground character color
  4791.                    bg      Background character color
  4792.                    bgfill  Background fill color (for the inside of the
  4793.                               box)
  4794.  
  4795.               Only the first three characters of the color name and
  4796.               attributes ("bright" and "blink") are required.  The
  4797.               available colors are:
  4798.  
  4799.                         Black     Blue      Green     Red
  4800.                        Magenta   Cyan      Yellow    White
  4801.  
  4802.               See also DRAWHLINE and DRAWVLINE.
  4803.  
  4804.   Example:    Draw a single line box around the entire screen with
  4805.               bright white lines on a blue background:
  4806.  
  4807.                    drawbox 0 0 24 79 1 bright white on blue fill blue
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.   4DOS Reference Manual         Copyright 1990, J.P. Software           73 
  4815.  
  4816.  
  4817.   DRAWHLINE
  4818.  
  4819.   Syntax:     DRAWHLINE row column len style [bright] [blink] fg ON bg
  4820.  
  4821.   Purpose:    Draw a horizontal line on the screen.
  4822.  
  4823.   Comments:   DRAWHLINE is useful for creating attractive screen
  4824.               displays in batch files.  DRAWHLINE detects other lines
  4825.               and boxes on the display, and creates the appropriate
  4826.               connector characters when possible (not all types of lines
  4827.               can be connected with the available characters).
  4828.  
  4829.               The row and column are zero-based, so on a standard 25
  4830.               line by 80 column display, valid rows are 0 - 24 and valid
  4831.               columns are 0 - 79.
  4832.  
  4833.               The parameters are:
  4834.  
  4835.                            row      Start row
  4836.                            column   Start column
  4837.                            len      Length of line
  4838.                            style    Line drawing style:
  4839.                                        1 - single line
  4840.                                        2 - double line
  4841.                            fg       Foreground character color
  4842.                            bg       Background character color
  4843.  
  4844.               Only the first three characters of the color name and
  4845.               attributes ("bright" and "blink") are required.  The
  4846.               available colors are:
  4847.  
  4848.                         Black     Blue      Green     Red
  4849.                         Magenta   Cyan      Yellow    White
  4850.  
  4851.               See also DRAWBOX and DRAWVLINE.
  4852.  
  4853.   Example:    Draw a double line along the top row of the display
  4854.               with green characters on a blue background:
  4855.  
  4856.                    drawhline 0 0 79 2 green on blue
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.   4DOS Reference Manual         Copyright 1990, J.P. Software           74 
  4873.  
  4874.  
  4875.   DRAWVLINE
  4876.  
  4877.   Syntax:     DRAWVLINE row column len style [bright][blink] fg ON bg
  4878.  
  4879.   Purpose:    Draw a vertical line on the screen.
  4880.  
  4881.   Comments:   DRAWVLINE is useful for creating attractive screen
  4882.               displays in batch files.  DRAWVLINE detects other lines
  4883.               and boxes on the display, and creates the appropriate
  4884.               connector characters when possible (not all types of lines
  4885.               can be connected with the available characters).
  4886.  
  4887.               The row and column are zero-based, so on a standard 25
  4888.               line by 80 column display, valid rows are 0 - 24 and valid
  4889.               columns are 0 - 79.
  4890.  
  4891.                  The parameters are:
  4892.  
  4893.                            row      Start row
  4894.                            column   Start column
  4895.                            len      Length of line
  4896.                            style    Line drawing style:
  4897.                                        1 - single line
  4898.                                        2 - double line
  4899.                            fg       Foreground character color
  4900.                            bg       Background character color
  4901.  
  4902.               Only the first three characters of the color name and
  4903.               attributes ("bright" and "blink") are required.  The
  4904.               available colors are:
  4905.  
  4906.                         Black     Blue      Green     Red
  4907.                         Magenta   Cyan      Yellow    White
  4908.  
  4909.               See also DRAWBOX and DRAWHLINE.
  4910.  
  4911.   Example:    Draw a double width line along the left margin of the
  4912.               display with bright red characters on a black background:
  4913.  
  4914.                    drawvline 0 0 24 2 bright red on black
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.   4DOS Reference Manual         Copyright 1990, J.P. Software           75 
  4931.  
  4932.  
  4933.   ECHO
  4934.  
  4935.   Syntax:     ECHO [on | off | message]
  4936.  
  4937.   Purpose:    Display the echo status, enable or disable batch file
  4938.               or command line echoing, or display a message.
  4939.  
  4940.   Comments:   4DOS defaults to ECHO ON in batch files.  To prevent a
  4941.               line from being echoed, preface it with the @ symbol.  You
  4942.               can default to ECHO OFF by setting the variable VERBOSE to
  4943.               0 (see SETDOS).  The current ECHO state is inherited by
  4944.               called batch files.
  4945.  
  4946.               4DOS defaults to ECHO OFF during keyboard input.  If
  4947.               you set ECHO ON from the command line, 4DOS will display
  4948.               the fully parsed and expanded commands (including aliases
  4949.               and variables) before they are executed.  The keyboard
  4950.               ECHO state is independent of the batch file ECHO state;
  4951.               changing ECHO in a batch file has no effect on the display
  4952.               at the command prompt, and vice versa.
  4953.  
  4954.               If no arguments are entered, ECHO displays the current
  4955.               echo status (ON or OFF).
  4956.  
  4957.               ECHO commands in a batch file will send messages to the
  4958.               screen while the batch file executes, even if ECHO is set
  4959.               OFF.   You cannot use the command separator character or
  4960.               the 4DOS redirection symbols (| > <) in an ECHO message,
  4961.               unless you enclose them in quotes or precede them with the
  4962.               escape character.
  4963.  
  4964.               See also SCREEN, SCRPUT, SETDOS and TEXT.
  4965.  
  4966.   Example:    Enable command line echoing:
  4967.  
  4968.                    c:\> echo on
  4969.  
  4970.               Display a message in a batch file:
  4971.  
  4972.                    echo Processing your print files...
  4973.  
  4974.               Turn off batch file echoing, without displaying ECHO
  4975.               itself:
  4976.  
  4977.                    @echo off
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.   4DOS Reference Manual         Copyright 1990, J.P. Software           76 
  4989.  
  4990.  
  4991.   ENDLOCAL
  4992.  
  4993.   Syntax:     ENDLOCAL
  4994.  
  4995.   Purpose:    Restore the saved disk drive, directory, environment
  4996.               variables and aliases.
  4997.  
  4998.   Comment:    ENDLOCAL restores the disk drive, directory,
  4999.               environment variables and aliases saved by the previous
  5000.               SETLOCAL command.  SETLOCAL and ENDLOCAL can only be used
  5001.               in batch files, not in aliases.
  5002.  
  5003.               See also SETLOCAL.
  5004.  
  5005.   Example:    This batch file fragment saves the drive, current
  5006.               working directory, environment variables and aliases,
  5007.               changes the drive and directory, modifies some environment
  5008.               variables, runs the program TEST1, and then restores the
  5009.               original values:
  5010.  
  5011.                    setlocal
  5012.                    cdd d:\test
  5013.                    set path=c:\;c:\dos;c:\util
  5014.                    set lib=d:\lib
  5015.                    test1
  5016.                    endlocal
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.   4DOS Reference Manual         Copyright 1990, J.P. Software           77 
  5047.  
  5048.  
  5049.   ESET
  5050.  
  5051.   Syntax:     ESET varname...
  5052.  
  5053.   Purpose:    Edit environment variables and/or aliases.
  5054.  
  5055.   Comments:   ESET allows you to edit your environment variables and
  5056.               aliases using the 4DOS line editing commands (see Command
  5057.               Line Editing in Using 4DOS).  The cursor will be
  5058.               positioned at the first character of the variable or
  5059.               alias.
  5060.  
  5061.               ESET will search for environment variables first, and
  5062.               then aliases.  If you have an environment variable and an
  5063.               alias with the same name (a bad idea!), ESET will only be
  5064.               able to edit the environment variable.
  5065.  
  5066.               4DOS limits environment variable and alias names to 80
  5067.               characters, and their arguments to 255 characters.
  5068.  
  5069.               See also ALIAS, UNALIAS, SET, and UNSET.
  5070.  
  5071.   Example:    Edit the MS-DOS executable file search path:
  5072.  
  5073.                    c:\> eset path
  5074.                    path=c:\;c:\dos;c:\util
  5075.  
  5076.               Create and then edit an alias:
  5077.  
  5078.                    c:\> alias d dir /djp
  5079.                    c:\> eset d
  5080.                    d=dir /djp
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103.  
  5104.   4DOS Reference Manual         Copyright 1990, J.P. Software           78 
  5105.  
  5106.  
  5107.   EXCEPT
  5108.  
  5109.   Syntax:     EXCEPT ([d:][path]filename...) command [args...]
  5110.  
  5111.   Purpose:    Perform a command, except on the file(s) specified.
  5112.  
  5113.   Comments:   EXCEPT provides a means of executing a command on a
  5114.               group of files and/or subdirectories, except those
  5115.               enclosed within the parentheses.
  5116.  
  5117.               The command can be a 4DOS internal command or alias, an
  5118.               external command, or a batch file.
  5119.  
  5120.               You may use the wildcard characters (? and *) in a
  5121.               filename.
  5122.  
  5123.               When using filename completion (see Command Line
  5124.               Editing in Using 4DOS) to get the filenames inside the
  5125.               parentheses, type a space after the open parenthesis
  5126.               before entering a partial filename or pressing F9.
  5127.               Otherwise the command line editor will treat the open
  5128.               parenthesis as the first character of the filename to be
  5129.               completed.
  5130.  
  5131.               EXCEPT prevents operations on the specified file(s) by
  5132.               setting the hidden attribute, performing the command, and
  5133.               then clearing the hidden attribute.  If EXCEPT is aborted
  5134.               in an unusual way, you may need to use the ATTRIB command
  5135.               to "unhide" (-H) the file(s).
  5136.  
  5137.               EXCEPT will not work with programs or commands that
  5138.               ignore the hidden attribute.
  5139.  
  5140.               See also ATTRIB.
  5141.  
  5142.   Example:    Erase all the files in the current directory, except
  5143.               those beginning with MEMO and those ending in .WKS:
  5144.  
  5145.                    c:\> except (memo*.* *.wks) erase *.*
  5146.  
  5147.               Copy all the files and subdirectories except those in
  5148.               C:\MSC and C:\DOS on drive C to drive D:
  5149.  
  5150.                    c:\> except (c:\msc c:\dos) xcopy c:\*.* d:\ /s
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.   4DOS Reference Manual         Copyright 1990, J.P. Software           79 
  5163.  
  5164.  
  5165.   EXIT
  5166.  
  5167.   Syntax:     EXIT
  5168.  
  5169.   Purpose:    Return from a secondary command processor.
  5170.  
  5171.   Comments:   Some application programs will start a secondary copy
  5172.               of the command processor to allow you to execute MS-DOS
  5173.               commands.  To return to the application again, type EXIT.
  5174.  
  5175.               You cannot EXIT from the primary command processor.
  5176.  
  5177.   Example:    Return to the previous command processor or
  5178.               application:
  5179.  
  5180.                    c:\> exit
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.   4DOS Reference Manual         Copyright 1990, J.P. Software           80 
  5221.  
  5222.  
  5223.   FOR
  5224.  
  5225.   Syntax:     FOR %var IN (set) [DO] command ...
  5226.  
  5227.   Purpose:    Repeat a command for several variables.
  5228.  
  5229.   Comments:   4DOS sets var sequentially to each member of (set), and
  5230.               then evaluates and executes command for every argument in
  5231.               (set).  If one of the arguments in (set) contains MS-DOS
  5232.               wildcard characters (* and ?), var will be set
  5233.               sequentially to each matching filename on the disk.
  5234.  
  5235.               The command can be a 4DOS internal command or alias, an
  5236.               external command, or a batch file.
  5237.  
  5238.               In COMMAND.COM, you must use a single % for the
  5239.               variable name from the command line, and %% when in a
  5240.               batch file.  4DOS will accept either % or %% in either
  5241.               case.
  5242.  
  5243.               COMMAND.COM requires the variable name to be a single
  5244.               character; 4DOS supports variable names up to 80
  5245.               characters.
  5246.  
  5247.               COMMAND.COM requires the word "DO" on the command line;
  5248.               it is optional in 4DOS.
  5249.  
  5250.               Note that 4DOS supports nested FOR statements;
  5251.               COMMAND.COM does not.
  5252.  
  5253.   Example:    The following example compiles the C programs in the
  5254.               current directory that have a 2 or a 3 somewhere in their
  5255.               name:
  5256.  
  5257.                    c:\msc> for %a in ( *2*.c *3*.c ) do cl %a ;
  5258.  
  5259.               The following example uses variable functions to delete
  5260.               the .BAK files for which a corresponding .TXT file exists
  5261.               in the current directory (this should be entered on one
  5262.               line):
  5263.  
  5264.                    c:\docs> for %file in (*.txt) if exist
  5265.                      %@name[%file].bak del %@name[%file].bak
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.   4DOS Reference Manual         Copyright 1990, J.P. Software           81 
  5279.  
  5280.  
  5281.   FREE
  5282.  
  5283.   Syntax:     FREE [d:]...
  5284.  
  5285.   Purpose:    Display the total disk space, total bytes used, and
  5286.               total bytes free on the specified (or default) drive(s).
  5287.  
  5288.   Comments:   FREE provides the same disk information as the external
  5289.               MS-DOS command CHKDSK, but without the wait.
  5290.  
  5291.               See also MEMORY.
  5292.  
  5293.   Example:    Display the status of the current drive:
  5294.  
  5295.                            c:\> free
  5296.                              Volume in drive C: is DEVELOPMENT
  5297.                              42,496,000 bytes total disk space
  5298.                              36,851,712 bytes used
  5299.                              5,644,288 bytes free
  5300.  
  5301.               Display the status of drives A and C:
  5302.  
  5303.                            c:\> free a: c:
  5304.                              Volume in drive A: is unlabeled
  5305.                              1,213,952 bytes total disk space
  5306.                              1,115,136 bytes used
  5307.                              98,816 bytes free
  5308.                              Volume in drive C: is DEVELOPMENT
  5309.                              42,496,000 bytes total disk space
  5310.                              36,851,712 bytes used
  5311.                              5,644,288 bytes free
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.   4DOS Reference Manual         Copyright 1990, J.P. Software           82 
  5337.  
  5338.  
  5339.   GLOBAL
  5340.  
  5341.   Syntax:     GLOBAL [/IQ] command [args]
  5342.  
  5343.   Purpose:    Execute a command in the current directory and its
  5344.               subdirectories.
  5345.  
  5346.   Comments:   GLOBAL performs the command first in the current
  5347.               directory,  and then in every subdirectory under the
  5348.               current directory.
  5349.  
  5350.               The command can be a 4DOS internal command or alias, an
  5351.               external command, or a batch file.
  5352.  
  5353.               GLOBAL will terminate if the command returns a non-zero
  5354.               exit code, unless you specify the /I(gnore result) switch.
  5355.  
  5356.               GLOBAL will display the current directory unless you specify
  5357.               the /Q(uiet) switch.
  5358.  
  5359.   Example:    Erase all the files with a .BAK extension in every
  5360.               directory on C:
  5361.  
  5362.                    c:\> global erase *.bak
  5363.  
  5364.               Copy the files in every directory on drive A to the
  5365.               directory C:\TEMP :
  5366.  
  5367.                    a:\> global copy *.* c:\temp
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.   4DOS Reference Manual         Copyright 1990, J.P. Software           83 
  5395.  
  5396.  
  5397.   GOSUB
  5398.  
  5399.   Syntax:     GOSUB label
  5400.  
  5401.   Purpose:    Call a subroutine in a batch file.
  5402.  
  5403.   Comments:   GOSUB calls the specified label as a subroutine.  The
  5404.               subroutine must end with a RETURN statement.  After the
  5405.               RETURN, 4DOS will continue processing with the command
  5406.               following the GOSUB command.
  5407.  
  5408.               If the label doesn't exist, the batch file is
  5409.               terminated with the error message "Label not found."
  5410.  
  5411.               The label must begin with a colon (:), and appear by
  5412.               itself on the line.  4DOS ignores case differences when
  5413.               matching labels.
  5414.  
  5415.               See also GOTO and RETURN.
  5416.  
  5417.   Example:    The following batch file fragment calls a subroutine
  5418.               which displays the directory and returns:
  5419.  
  5420.                    echo Calling a subroutine
  5421.                    gosub subr1
  5422.                    echo Returned from the subroutine
  5423.                    quit
  5424.                    :subr1
  5425.                    dir /hw
  5426.                    return
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.   4DOS Reference Manual         Copyright 1990, J.P. Software           84 
  5453.  
  5454.  
  5455.   GOTO
  5456.  
  5457.   Syntax:     GOTO label
  5458.  
  5459.   Purpose:    Continue batch file processing at the line following
  5460.               the label.
  5461.  
  5462.   Comments:   GOTO changes the current position in the batch file to
  5463.               the line immediately following the label.  If the label
  5464.               doesn't exist, the batch file is terminated with the error
  5465.               message "Label not found."
  5466.  
  5467.               The label must begin with a colon (:), and appear by
  5468.               itself on the line.  4DOS ignores case differences when
  5469.               matching labels.
  5470.  
  5471.               See also GOSUB.
  5472.  
  5473.   Example:    The following batch file fragment checks for the
  5474.               existence of the file CONFIG.SYS.  If the file exists,
  5475.               4DOS jumps to C_EXISTS and copies all the files from the
  5476.               current directory to the root directory on A.  If
  5477.               CONFIG.SYS doesn't exist, 4DOS prints an error message and
  5478.               exits.
  5479.  
  5480.                    if exist config.sys goto C_EXISTS
  5481.                    echo CONFIG.SYS doesn't exist - exiting.
  5482.                    quit
  5483.                    :C_EXISTS
  5484.                    copy *.* a:\
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510.   4DOS Reference Manual         Copyright 1990, J.P. Software           85 
  5511.  
  5512.  
  5513.   HELP
  5514.  
  5515.   Syntax:     HELP [topic]
  5516.  
  5517.   Purpose:    Provide help for 4DOS and MS-DOS commands.
  5518.  
  5519.   Comments:   The HELP command displays the proper syntax and a brief
  5520.               description of 4DOS and MS-DOS commands.  You can also
  5521.               call HELP by pressing F1 at the 4DOS prompt.
  5522.  
  5523.               If you enter HELP with no topic, HELP will display all
  5524.               the commands it can help you with.  Select a topic using
  5525.               the cursor keys and press ENTER.  For help on a specific
  5526.               command, enter HELP followed by the command name.
  5527.  
  5528.               Detailed information on how to use the HELP system is
  5529.               provided with HELP itself.  Once you have started HELP,
  5530.               follow the instructions on the screen regarding the
  5531.               effects of various keys.
  5532.  
  5533.               DOS.HLP must be in the current directory or one of the
  5534.               directories specified in the PATH environment variable.
  5535.  
  5536.               If you want to customize the help text (for example, to
  5537.               add HELP for your own commands or aliases), you will need
  5538.               the 4DOS Utility Disk (available from J.P. Software) which
  5539.               contains the source text and hypertext compiler.
  5540.  
  5541.               HELP is an external command.
  5542.  
  5543.   Example:    Display and select from all the available help topics:
  5544.  
  5545.                    c:\> help
  5546.  
  5547.               For help on COPY:
  5548.  
  5549.                    c:\> help copy
  5550.  
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.   4DOS Reference Manual         Copyright 1990, J.P. Software           86 
  5569.  
  5570.  
  5571.   HISTORY
  5572.  
  5573.   Syntax:     HISTORY [/F] [/R [d:][path]filename]
  5574.  
  5575.   Purpose:    Display, clear, or read the history list.
  5576.  
  5577.   Comments:   If no parameters are entered, HISTORY will display the
  5578.               current history list.
  5579.  
  5580.               The /F(ree) option clears the command history list.
  5581.  
  5582.               The /R(ead) option loads the command history from the
  5583.               specified file.  You can save the history list by
  5584.               redirecting its output to a file.
  5585.  
  5586.               The number of commands saved in the history list
  5587.               depends on the length of each command line.  The history
  5588.               list size can be specified at startup from 512 to 8192
  5589.               characters (see Installation).  The default size is 1024
  5590.               characters.
  5591.  
  5592.               You can disable saving commands to the history list, or
  5593.               specify a minimum command line length to save, with the
  5594.               SETDOS /H command.
  5595.  
  5596.               See also SETDOS.
  5597.  
  5598.   Example:    Display the history list:
  5599.  
  5600.                    c:\> history
  5601.  
  5602.               Clear the history entries:
  5603.  
  5604.                    c:\> history /f
  5605.  
  5606.               Save the history list to the file HISTFILE, and then
  5607.               read it in again:
  5608.  
  5609.                    c:\> history > histfile
  5610.                    c:\> history /r histfile
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.   4DOS Reference Manual         Copyright 1990, J.P. Software           87 
  5627.  
  5628.  
  5629.   IF
  5630.  
  5631.   Syntax:     IF [NOT] condition command
  5632.  
  5633.   Purpose:    Allow conditional execution of commands.
  5634.  
  5635.   Comments:   4DOS first tests the given condition.  If the condition
  5636.               is true, 4DOS executes the specified command, otherwise
  5637.               the command will be ignored.  If you use the NOT option,
  5638.               the command is executed only when the condition is false.
  5639.               IF statements can be nested.
  5640.  
  5641.               The command can be a 4DOS internal command or alias, an
  5642.               external command, or a batch file.
  5643.  
  5644.               For the string tests, case differences are ignored.  When
  5645.               comparing strings, you should enclose the strings in double
  5646.               quotes (see examples).  If both arguments to be compared
  5647.               begin with digits, IF will do a numeric comparison; otherwise
  5648.               IF does an ASCII comparison.
  5649.  
  5650.               The condition can be any of the following:
  5651.  
  5652.                  string1 == string2
  5653.                  string1 EQ string2
  5654.                       If string1 is equal to string2, the condition is
  5655.                       true.
  5656.  
  5657.                  string1 NE string2
  5658.                       If string1 is not equal to string2, the condition
  5659.                       is true.
  5660.  
  5661.                  string1 LT string2
  5662.                       If string1 is < string2, the condition is true.
  5663.  
  5664.                  string1 LE string2
  5665.                       If string1 is <= string2, the condition is true.
  5666.  
  5667.                  string1 GE string2
  5668.                       If string1 is >= string2, the condition is true.
  5669.  
  5670.                  string1 GT string2
  5671.                       If string1 is > string2, the condition is true.
  5672.  
  5673.           In the tests below, the term "condition" refers to one of
  5674.               the relational operators described above (==, NE, LT, etc.).
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.   4DOS Reference Manual         Copyright 1990, J.P. Software           88 
  5685.  
  5686.  
  5687.                  ATTRIB [d:][path]filename [RHSVDA]
  5688.                       If the file has matching attributes, the condition
  5689.                       is true.  See also ATTRIB and DIR.  The attributes
  5690.                       are :
  5691.  
  5692.                            R  Read-only
  5693.                            H  Hidden
  5694.                            S  System
  5695.                            V  Volume
  5696.                            D  Directory
  5697.                            A  Archive
  5698.  
  5699.                  DISKFREE condition n[K | M]
  5700.                       Test for the free disk space on the current drive.
  5701.  
  5702.                  DOSMEM condition n[K]
  5703.                       Test for the free DOS memory.
  5704.  
  5705.                  EMS condition n[K | M]
  5706.                       Test for the amount of free expanded memory.
  5707.  
  5708.                  EXTENDED condition n[K | M]
  5709.                       Test for the amount of extended memory (non-XMS).
  5710.  
  5711.                  ERRORLEVEL [condition] n
  5712.                       Test the exit code of the preceding external
  5713.                       program.  ERRORLEVEL supports the same conditions
  5714.                       as the string comparisons (for example, ==, LE,
  5715.                       etc.).  If no condition is specified, the default
  5716.                       is GE.  NOTE:  Not all programs return an explicit
  5717.                       exit code.  In those cases, the behavior of
  5718.                       ERRORLEVEL is undefined.
  5719.  
  5720.                  EXIST [d:][path]filename
  5721.                       If the file exists, the condition is true.  You
  5722.                       can use wildcard characters (* and ?) in the
  5723.                       filename, in which case the condition is true if
  5724.                       any file matching the wildcards exists.
  5725.  
  5726.                  FILESIZE filename condition n[K | M]
  5727.                       Test for the size of the specified file.
  5728.  
  5729.                  ISALIAS aliasname
  5730.                       If the specified name is an alias, the condition
  5731.                       is true.
  5732.  
  5733.                  ISDIR [d:]path
  5734.                       If the subdirectory exists, the condition is true.
  5735.  
  5736.                  MONITOR [MONO | COLOR]
  5737.                       Test for the monitor type.
  5738.  
  5739.  
  5740.  
  5741.  
  5742.   4DOS Reference Manual         Copyright 1990, J.P. Software           89 
  5743.  
  5744.  
  5745.                  VIDEO [MONO | CGA | EGA | VGA]
  5746.                       Test for the video card type.
  5747.  
  5748.                  XMS condition n[K | M]
  5749.                       Test for the amount of available XMS 2.0 extended
  5750.                       memory.
  5751.  
  5752.               The DOSFREE, EMS, EXTENDED, and XMS tests allow testing
  5753.               either by bytes (default), kilobytes (by appending a K to
  5754.               the test value), or megabytes (by appending an M).
  5755.  
  5756.               See also IFF.
  5757.  
  5758.   Example:    Test for the presence of A:\JAN.DOC, and copy it to the
  5759.               root directory on drive C if it exists:
  5760.  
  5761.                    c:\> if exist a:\jan.doc copy a:\jan.doc c:\
  5762.  
  5763.               This batch file fragment tests for a string value:
  5764.  
  5765.                    input  "Enter your selection : "  %%cmd
  5766.                    if  "%cmd" == "WP"  goto  wordproc
  5767.                    if  "%cmd" NE "GRAPHICS"  goto  badentry
  5768.  
  5769.               Test for more than 500K of free DOS memory:
  5770.  
  5771.                    c:\> if dosfree gt 500K echo More than 500K free
  5772.  
  5773.               Test for expanded memory greater than 2 Mb:
  5774.  
  5775.                    c:\> if ems gt 2M echo More than 2 Mb EMS available
  5776.  
  5777.               Run a program ("MONOPROG") if the monitor type is
  5778.               monochrome:
  5779.  
  5780.                    c:\> if monitor mono monoprog
  5781.  
  5782.               This batch file fragment tests to see if the disk in
  5783.               drive A is labeled "INSTALL1":
  5784.  
  5785.                    if attrib a:\install1 V goto INSTALL1
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.   4DOS Reference Manual         Copyright 1990, J.P. Software           90 
  5801.  
  5802.  
  5803.   IFF
  5804.  
  5805.   Syntax:     IFF [NOT] condition THEN ^ ... ^ ELSE[[IFF] ... THEN] ^
  5806.                   ... ^ ENDIFF
  5807.  
  5808.   Purpose:    Allow IF/THEN/ELSE conditional execution of commands.
  5809.  
  5810.   Comments:   4DOS first tests the given condition.  If the condition
  5811.               is true, 4DOS executes the specified command(s) until the
  5812.               next ELSE, ELSEIFF, or ENDIFF, otherwise the command(s)
  5813.               will be ignored and 4DOS will continue parsing at the next
  5814.               ELSE, ELSEIFF, or ENDIFF.  If you use the NOT option,
  5815.               commands are executed only when the condition is false.
  5816.               IFF statements can be nested up to 15 levels deep.
  5817.  
  5818.               The command can be a 4DOS internal command or alias, an
  5819.               external command, or a batch file.
  5820.  
  5821.               See the IF command for a list of the tests available.
  5822.  
  5823.   Example:    The following batch file fragment tests the monitor
  5824.               type (monochrome or color), and sets the appropriate
  5825.               colors and prompt (the PROMPT commands should be entered
  5826.               on one line):
  5827.  
  5828.                    iff monitor color then
  5829.                      color bright white on blue ^ cls
  5830.                      prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  5831.                        $p$e[u$e[44;37m$n$g
  5832.                    else
  5833.                      prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  5834.                        $p$e[u$e[0m$n$g
  5835.                    endiff
  5836.  
  5837.               The following alias checks to see if the argument is a
  5838.               subdirectory.  If so, the alias deletes the subdirectory's
  5839.               files and removes it (enter this on one line):
  5840.  
  5841.                    c:\> alias zap `iff isdir %1 then ^ del %1 ^ rd %1 ^
  5842.                      else ^ echo Not a directory! ^ endiff`
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.   4DOS Reference Manual         Copyright 1990, J.P. Software           91 
  5859.  
  5860.  
  5861.   INKEY
  5862.  
  5863.   Syntax:     INKEY [/Wn] [text] %%varname
  5864.  
  5865.   Purpose:    Get a single keystroke environment variable from
  5866.               standard input.
  5867.  
  5868.   Comments:   You can optionally display prompt text before the
  5869.               variable name.
  5870.  
  5871.               The /W(ait) option allows you to specify a timeout
  5872.               period, where n is the number of seconds to wait for a
  5873.               response.  If no keystroke is entered by the end of the
  5874.               timeout period, INKEY returns with the variable unchanged.
  5875.               You can specify /W0 to check if a key is already in the
  5876.               buffer, and return immediately.
  5877.  
  5878.               ASCII values from 1 to 255 are stored as a character.
  5879.               Extended characters (for example, function keys and cursor
  5880.               keys) are stored as a string in decimal format, with a
  5881.               leading @ (for example, the F1 key is @59).  This is the
  5882.               same format used by the KEYSTACK command.  See Appendix C
  5883.               for a list of the extended key codes.
  5884.  
  5885.               INKEY and INPUT are normally used in batch files,
  5886.               allowing you great flexibility in entering or changing
  5887.               batch variables.
  5888.  
  5889.               If you press ^C or ^BREAK while INKEY is waiting for a
  5890.               key, execution of an alias will be terminated, and
  5891.               execution of a batch file will be suspended while you are
  5892.               prompted whether to cancel the batch job (see Batch Files
  5893.               in Using 4DOS).
  5894.  
  5895.               See also INPUT.
  5896.  
  5897.   Example:    The following batch file fragment prompts for a
  5898.               character and stores it in the variable NUM:
  5899.  
  5900.                    inkey  Enter a number from 1 to 9:  %%num
  5901.  
  5902.               The following batch file fragment waits up to 10
  5903.               seconds for a character, then tests to see if a "Y" was
  5904.               entered (the INKEY command should be entered on one line):
  5905.  
  5906.                    set net=N
  5907.                    inkey /w10 Do you want to load the network (Y/N)?
  5908.                       %%net
  5909.                    if "%net" == "Y" goto load_net
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.   4DOS Reference Manual         Copyright 1990, J.P. Software           92 
  5917.  
  5918.  
  5919.   INPUT
  5920.  
  5921.   Syntax:     INPUT [/Wn] [text] %%varname
  5922.  
  5923.   Purpose:    Enter an environment variable from the standard input.
  5924.  
  5925.   Comments:   You can optionally display prompt text before the
  5926.               variable name.
  5927.  
  5928.               The /W(ait) option allows you to specify a timeout
  5929.               period, where n is the number of seconds to wait for a
  5930.               response.  If no keystroke is entered by the end of the
  5931.               timeout period, INPUT returns with the variable unchanged.
  5932.               If you enter a key before the timeout period, INPUT will
  5933.               wait indefinitely for the remainder of the line.  You can
  5934.               specify /W0 to check if a key is already in the buffer,
  5935.               and return immediately.
  5936.  
  5937.               All characters entered up to, but not including, the
  5938.               carriage return are stored in the variable.
  5939.  
  5940.               INPUT and INKEY are normally used in batch files,
  5941.               allowing you great flexibility in entering or changing
  5942.               batch variables.
  5943.  
  5944.               See also INKEY.
  5945.  
  5946.   Example:    The following batch file fragment prompts for a string
  5947.               and stores it in the variable FNAME:
  5948.  
  5949.                    input  Enter the file name:  %%fname
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.  
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.   4DOS Reference Manual         Copyright 1990, J.P. Software           93 
  5975.  
  5976.  
  5977.   KEYSTACK
  5978.  
  5979.   Syntax:     KEYSTACK ["abc"] [nn] [@nn] [!]
  5980.  
  5981.   Purpose:    Feed keystrokes to a program from a batch file or
  5982.               alias.
  5983.  
  5984.   Comments:   Characters entered within double quotes ("abc") will be
  5985.               stored "as is" in the keyboard buffer.  Numbers (nn) not
  5986.               enclosed in quotes are ASCII decimal codes (e.g., 13
  5987.               (ENTER), or 27 (ESCAPE)).  The number 0 is a special case;
  5988.               it is used with programs that flush the keyboard buffer
  5989.               (it tells the program the buffer is clear, so subsequent
  5990.               keystrokes will be accepted normally).  Numbers preceded
  5991.               by @ are extended keyboard codes generated by the Alt key,
  5992.               cursor pad keys, and the Function keys (e.g., @59 is the
  5993.               F1 function key).  See Appendix C for a list of the
  5994.               extended key codes.  A ! will clear all pending keystrokes,
  5995.               both in the KEYSTACK buffer and in the keyboard buffer.
  5996.  
  5997.               You can store a maximum of 255 characters.
  5998.  
  5999.               Each time KEYSTACK is executed, it will clear any
  6000.               remaining keystrokes stored by a previous KEYSTACK.
  6001.  
  6002.               You may need to experiment a bit with your programs to
  6003.               find the proper sequence of keystrokes.  Programs that
  6004.               bypass MS-DOS and the BIOS for keyboard input cannot read
  6005.               keystrokes entered with KEYSTACK.
  6006.  
  6007.               KEYSTACK requires the device driver KEYSTACK.SYS be
  6008.               loaded in the CONFIG.SYS file (see Installation).
  6009.  
  6010.   Example:    The following batch file starts Lotus 1-2-3 and loads
  6011.               the file specified on the command line:
  6012.  
  6013.                    pushd c:\123
  6014.                    keystack 0 13 0 13 0 13 0 13 0 13 "/FR" 0 "%1" 13
  6015.                    123
  6016.                    popd
  6017.  
  6018.               The same command defined as an alias (enter this on one
  6019.               line):
  6020.  
  6021.                    alias 321 `pushd c:\123 ^ keystack 0 13 0 13 0 13 0
  6022.                      13 0 13 "/FR" 0 "%1" 13 ^ 123 ^ popd`
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.   4DOS Reference Manual         Copyright 1990, J.P. Software           94 
  6033.  
  6034.  
  6035.   LIST
  6036.  
  6037.   Syntax:     LIST [/HSW] [d:][path]filename...
  6038.  
  6039.   Purpose:    Display a file with forward and backward paging and
  6040.               scrolling.
  6041.  
  6042.   Comments:   LIST provides a much faster and more flexible way to view a
  6043.               file than TYPE, without the overhead of using a text editor.
  6044.  
  6045.               The /H option strips the high bit from each character
  6046.               before displaying.  This is useful when displaying files
  6047.               created by some word processors that turn on the high bit
  6048.               for formatting purposes.
  6049.  
  6050.               The /S option will read from the standard input rather than
  6051.               a file.  This allows you to redirect command output and view
  6052.               it with LIST.
  6053.  
  6054.               The /W option will wrap the text at the right margin.  This
  6055.               option is useful when displaying non-text files.
  6056.  
  6057.               LIST uses the cursor pad to scroll through the file.  The
  6058.               following keys have special meanings (the caret ^ means
  6059.               press the Control key together with with the specified key):
  6060.  
  6061.                  Home           Display the first page of the file.
  6062.                  End            Display the last page of the file.
  6063.                  Esc            Exit the current file.
  6064.                  ^C             Quit LIST.
  6065.                  Up Arrow       Scroll up one line.
  6066.                  Down Arrow     Scroll down one line.
  6067.                  Left Arrow     Scroll left 8 columns.
  6068.                  Right Arrow    Scroll right 8 columns.
  6069.                  ^Left Arrow    Scroll left 40 columns.
  6070.                  ^Right Arrow   Scroll right 40 columns.
  6071.                  F1             Call the on-line help (HELP.EXE).
  6072.                  F              Prompt and search for a string (case is
  6073.                                   ignored).
  6074.                  N              Find next matching string (case is
  6075.                                   ignored).  LIST saves the search
  6076.                                   string, so you can LIST multiple files
  6077.                                   and search for the same string simply
  6078.                                   by pressing N in each file.
  6079.                  P              Print the file on LPT1.
  6080.  
  6081.               LIST is normally only useful for displaying ASCII text
  6082.               files; executable files (.COM and .EXE) and many data
  6083.               files will be unreadable due to the presence of non-
  6084.               alphanumeric characters.
  6085.  
  6086.               See also TYPE.
  6087.  
  6088.  
  6089.  
  6090.   4DOS Reference Manual         Copyright 1990, J.P. Software           95 
  6091.  
  6092.  
  6093.   Example:    Display the file MEMO.DOC:
  6094.  
  6095.                    c:\> list memo.doc
  6096.  
  6097.               Display the output from a DIR command:
  6098.  
  6099.                    c:\> dir | list /s
  6100.  
  6101.               Redefine the DIR command to always display its output
  6102.               via LIST:
  6103.  
  6104.                    c:\> alias dir `*dir %& | list /s`
  6105.  
  6106.  
  6107.  
  6108.  
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.   4DOS Reference Manual         Copyright 1990, J.P. Software           96 
  6149.  
  6150.  
  6151.   LOG
  6152.  
  6153.   Syntax:     LOG [/W [d:][path]filename | ON | OFF | text]
  6154.  
  6155.   Purpose:    Save a log of commands to a disk file.
  6156.  
  6157.   Comments:   LOG defaults to saving to the file 4DOSLOG in the root
  6158.               directory of the boot drive.
  6159.  
  6160.               Entering LOG with no parameters displays the log status
  6161.               (ON or OFF).  Entering LOG with text writes the text to
  6162.               the log file, even if LOG is set OFF.  This allows you to
  6163.               enter headers in the log file.
  6164.  
  6165.               You can specify a different filename with the /W(rite)
  6166.               switch.  The /W switch automatically enables command
  6167.               logging.
  6168.  
  6169.               The commands are stored in the log file as they were
  6170.               entered, before performing any alias or variable
  6171.               expansion.
  6172.  
  6173.               The LOG file format looks like:
  6174.  
  6175.                    [mm/dd/yy  hh:mm:ss]  command
  6176.  
  6177.   Example:    Display the LOG status:
  6178.  
  6179.                    c:\> log
  6180.                    LOG is OFF
  6181.  
  6182.               Enable command logging:
  6183.  
  6184.                    c:\> log on
  6185.  
  6186.               Enable command logging to the file C:\LOG\LOGFILE and
  6187.               insert a header:
  6188.  
  6189.                    c:\> log /w c:\log\logfile
  6190.                    c:\> log "Started work on the database system"
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.   4DOS Reference Manual         Copyright 1990, J.P. Software           97 
  6207.  
  6208.  
  6209.   MD / MKDIR
  6210.  
  6211.   Syntax:     MD [d:]pathname...
  6212.                    or
  6213.               MKDIR [d:]pathname...
  6214.  
  6215.   Purpose:    Create subdirectories.
  6216.  
  6217.   Comments:   To start at the root directory, start the pathname with
  6218.               a backslash (\).  To start at the parent directory, start
  6219.               the pathname with two periods (..).  All other pathnames
  6220.               start at the current directory.
  6221.  
  6222.               The longest allowable path in MS-DOS from the root
  6223.               directory to any subdirectory is 64 characters (including
  6224.               backslashes).
  6225.  
  6226.               See also RD.
  6227.  
  6228.   Example:    Create a subdirectory called MYDIR in the root
  6229.               directory:
  6230.  
  6231.                    c:\> md \mydir
  6232.  
  6233.               Create a subdirectory called DIRTWO in the current
  6234.               directory:
  6235.  
  6236.                    c:\mydir> md dirtwo
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.   4DOS Reference Manual         Copyright 1990, J.P. Software           98 
  6265.  
  6266.  
  6267.   MEMORY
  6268.  
  6269.   Syntax:     MEMORY
  6270.  
  6271.   Purpose:    Display the system RAM status.
  6272.  
  6273.   Comments:   MEMORY displays the total RAM, the free RAM (available
  6274.               to applications programs after loading MS-DOS, device
  6275.               drivers, 4DOS itself, and RAM resident programs); the
  6276.               total and free expanded memory, extended memory and XMS
  6277.               memory (on an 80286 or 80386); the total and free
  6278.               environment space; the total and free alias list space;
  6279.               and the total command history space.
  6280.  
  6281.               If you compare the free RAM displayed by MEMORY with
  6282.               the free RAM displayed by CHKDSK and some memory map
  6283.               programs, MEMORY will usually show a slightly higher
  6284.               value.  The difference is the size of the environment
  6285.               passed to these external programs;  most memory mapping
  6286.               programs do not count the passed environment as free
  6287.               space.
  6288.  
  6289.   Example:    Display your RAM totals:
  6290.  
  6291.                    c:\> memory
  6292.                    655,360 bytes total RAM
  6293.                    534,464 bytes free
  6294.  
  6295.                    1,687,552 bytes total EMS memory
  6296.                    1,097,728 bytes free
  6297.  
  6298.                    914,432 bytes total XMS memory
  6299.  
  6300.                    512 bytes total environment
  6301.                    195 bytes free
  6302.  
  6303.                    1,024 bytes total alias
  6304.                    452 bytes free
  6305.  
  6306.                    1,024 bytes total history
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.   4DOS Reference Manual         Copyright 1990, J.P. Software          99 
  6323.  
  6324.  
  6325.   MOVE
  6326.  
  6327.   Syntax:     MOVE [/PQR] [d:][path]filename... [d:][path]filename
  6328.  
  6329.   Purpose:    Move files to other directories and drives.
  6330.  
  6331.   Comments:   The MOVE command moves the specified file(s) to the last
  6332.               filename specified, which is designated as the target.  If
  6333.               the target already exists, it is deleted when the file is
  6334.               moved.  You cannot move a file to a character device or to
  6335.               itself.
  6336.  
  6337.               If there is more than one source file specification,
  6338.               the target must be a directory, and the files are moved to
  6339.               the directory with their original filenames.  If the
  6340.               target is not a directory, MOVE will display an error
  6341.               message and exit.
  6342.  
  6343.               Use caution when using MOVE with commands like SELECT.
  6344.               If multiple files are SELECTed and the target is not a
  6345.               subdirectory, each file will be moved in turn to the
  6346.               target, overwriting the previous file.  The net result is
  6347.               that all files but the last will be deleted.  If SELECT is
  6348.               invoked using square brackets instead of parentheses, the
  6349.               MOVE will be done in a single command and MOVE will detect
  6350.               the error.
  6351.  
  6352.               The /P(rompt) option will prompt you for a Y or N
  6353.               response to confirm each move.
  6354.  
  6355.               The /Q(uiet) option turns off the display of the files moved.
  6356.  
  6357.               The /R(eplace) option will prompt you for a Y or N
  6358.               response before overwriting an existing file.
  6359.  
  6360.               MOVE first attempts to rename the file(s).  If that
  6361.               fails (the target is on a different drive, or the target
  6362.               already exists), MOVE will copy the file(s) and then
  6363.               delete the originals.  If MOVE cannot delete the original
  6364.               (for example, a read-only file), it will display an error
  6365.               message, but the target file is still created.
  6366.  
  6367.               See also COPY and RENAME.
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.  
  6380.   4DOS Reference Manual         Copyright 1990, J.P. Software          100 
  6381.  
  6382.  
  6383.   Example:    Move some files to a different directory:
  6384.  
  6385.                    c:\> move *.wks *.txt c:\finance\myfiles
  6386.  
  6387.               Move all the files in the current directory to A:\,
  6388.               prompting before overwriting any existing files:
  6389.  
  6390.                    c:\> move /r *.* a:\
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.   4DOS Reference Manual         Copyright 1990, J.P. Software          101 
  6439.  
  6440.  
  6441.   PATH
  6442.  
  6443.   Syntax:     PATH [[d:]path;[d:]path...]]
  6444.  
  6445.   Purpose:    Tells 4DOS where to search for executable and batch
  6446.               files not in the current directory.
  6447.  
  6448.   Comments:   When searching for an external command (.COM, .EXE,
  6449.               .BTM, and .BAT), 4DOS searches the current directory
  6450.               first, then the directories you specify in the order you
  6451.               list them.  The directory names are separated by
  6452.               semicolons (;).  Like COMMAND.COM, 4DOS shifts the entire
  6453.               path to upper case before storing it in the environment.
  6454.               This maintains compatibility with programs which can only
  6455.               recognize an upper case path.
  6456.  
  6457.               If you enter PATH with no parameters, 4DOS displays the
  6458.               current search path.  If you enter PATH and a semicolon,
  6459.               4DOS clears the search path and will search only the
  6460.               current directory (this is the default at system startup).
  6461.  
  6462.               If you specify an invalid directory, 4DOS will skip
  6463.               that directory and continue searching with the next
  6464.               directory in the path.
  6465.  
  6466.               Some applications use the PATH variable to search for
  6467.               their files.
  6468.  
  6469.               You can edit the path with the ESET command.
  6470.  
  6471.   Example:    The following PATH command directs 4DOS to search for
  6472.               an executable file in the following order: the current
  6473.               directory, the root directory on C, the DOS subdirectory
  6474.               on C, and the UTIL subdirectory on C:
  6475.  
  6476.                    c:\> path c:\;c:\dos;c:\util
  6477.  
  6478.               Display the current search path:
  6479.  
  6480.                    c:\> path
  6481.                    PATH=C:\;C:\DOS;C:\UTIL
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.   4DOS Reference Manual         Copyright 1990, J.P. Software          102 
  6497.  
  6498.  
  6499.   PAUSE
  6500.  
  6501.   Syntax:     PAUSE [message]
  6502.  
  6503.   Purpose:    Suspend alias or batch file execution.
  6504.  
  6505.   Comments:   A PAUSE command will suspend execution, giving you the
  6506.               opportunity to perform activities such as changing disks,
  6507.               turning on the printer, etc.
  6508.  
  6509.               PAUSE flushes the keyboard buffer, and then waits for
  6510.               any key (except ^C or ^BREAK) to be pressed and then
  6511.               continues executing.  If a prompt message is specified,
  6512.               4DOS will display the message and wait for a keystroke.
  6513.               Otherwise, 4DOS will prompt:
  6514.  
  6515.                    Press a key when ready...
  6516.  
  6517.               If you press ^C or ^BREAK while PAUSE is waiting for a
  6518.               key, execution of an alias will be terminated, and
  6519.               execution of a batch file will be suspended while you are
  6520.               prompted whether to cancel the batch job (see Batch Files
  6521.               in Using 4DOS).
  6522.  
  6523.   Example:    The following batch file fragment prompts the user
  6524.               before erasing files:
  6525.  
  6526.                    pause ^C aborts, any other key erases the .LST files
  6527.                    erase *.lst
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.  
  6552.  
  6553.  
  6554.   4DOS Reference Manual         Copyright 1990, J.P. Software          103 
  6555.  
  6556.  
  6557.   POPD
  6558.  
  6559.   Syntax:     POPD [*]
  6560.  
  6561.   Purpose:    Change to the disk drive and directory at the top of
  6562.               the directory stack.
  6563.  
  6564.   Comments:   POPD restores the disk drive and directory saved using
  6565.               PUSHD (most recent first).
  6566.  
  6567.               The * option clears the directory stack, without
  6568.               changing the current drive and directory.
  6569.  
  6570.               Use the DIRS command to display the directory stack.
  6571.  
  6572.               See also DIRS and PUSHD.
  6573.  
  6574.   Example:    Save and change your disk drive and directory with
  6575.               PUSHD, and then restore it:
  6576.  
  6577.                    c:\> pushd d:\database\test
  6578.                    d:\database\test> pushd c:\wordp\memos
  6579.                    c:\wordp\memos> pushd a:\123
  6580.                    a:\123> popd
  6581.                    c:\wordp\memos> popd
  6582.                    d:\database\test> popd
  6583.                    c:\>
  6584.  
  6585.               Clear the directory stack:
  6586.  
  6587.                    c:\> popd *
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.   4DOS Reference Manual         Copyright 1990, J.P. Software          104 
  6613.  
  6614.  
  6615.   PROMPT
  6616.  
  6617.   Syntax:     PROMPT [text]
  6618.  
  6619.   Purpose:    Change the 4DOS command line prompt.
  6620.  
  6621.   Comments:   If you enter PROMPT with no arguments, 4DOS sets the
  6622.               prompt on drives A and B to $n$g, and on all other drives
  6623.               to $p$g (display current disk and directory).
  6624.  
  6625.               The prompt text can contain special strings of the form
  6626.               $?, where ? is one of the following characters.
  6627.  
  6628.                  b   The | character
  6629.                  c   The open parenthesis (
  6630.                  d   Current date, in the format Sun  Jan 1, 1989
  6631.                  e   The ASCII ESC character (decimal 27)
  6632.                  f   The close parenthesis )
  6633.                  g   The > character
  6634.                  h   BACKSPACE over the previous character
  6635.                  l   The < character
  6636.                  n   Default drive letter
  6637.                  P   Current disk and directory (upper case)
  6638.                  p   Current disk and directory (lower case)
  6639.                  q   The = character
  6640.                  s   The space character
  6641.                  t   Current time, in the format hh:mm:ss
  6642.                  v   MS-DOS version number, in the format 3.10
  6643.                  Xd: Current disk and directory (upper case) where d is
  6644.                       the drive specification
  6645.                  xd: Current disk and directory (lower case) where d is
  6646.                       the drive specification
  6647.                  z   Display the current 4DOS shell nesting level (you
  6648.                       must be running 4DOS as the primary shell in
  6649.                       swapping mode).  The primary command processor is
  6650.                       0.  Resident copies of 4DOS return a 99 for the
  6651.                       shell nesting level.
  6652.                  $   The $ character
  6653.                  _   CR/LF (go to beginning of new line)
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.   4DOS Reference Manual         Copyright 1990, J.P. Software          105 
  6671.  
  6672.  
  6673.               Under COMMAND.COM, it is possible to use the PROMPT
  6674.               command in a batch file to transmit ANSI.SYS control
  6675.               sequences to the screen (for example, to redefine function
  6676.               keys).  This is because COMMAND.COM displays a prompt when
  6677.               echoing lines in a batch file.  This technique will not
  6678.               work with 4DOS, because 4DOS doesn't display a prompt
  6679.               within batch files; hence the characters in the PROMPT
  6680.               string are never sent to ANSI.SYS.  To send ANSI sequences
  6681.               in 4DOS, use the ECHO command, substituting e (control-X
  6682.               followed by an e) for $e in the PROMPT string.
  6683.  
  6684.   Example:    Set the prompt to the current date and time:
  6685.  
  6686.                    c:\> prompt $d $t $g
  6687.                    Mon  Dec 25, 1989 18:29:19 >
  6688.  
  6689.               Set a prompt using ANSI escape sequences to display the
  6690.               shell level, date, time and path in color on the top line
  6691.               (enter as one line):
  6692.  
  6693.                    c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d  Time:
  6694.                         $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.   4DOS Reference Manual         Copyright 1990, J.P. Software          106 
  6729.  
  6730.  
  6731.   PUSHD
  6732.  
  6733.   Syntax:     PUSHD [[d:]pathname]
  6734.  
  6735.   Purpose:    Save the current disk drive and directory.
  6736.  
  6737.   Comments:   PUSHD saves the current disk and directory on the
  6738.               directory stack, and if a pathname is specified on the
  6739.               command line, changes the disk drive and directory.  The
  6740.               directory stack can hold up to 255 characters (about 10 to
  6741.               20 entries).  If you exceed the directory stack size, the
  6742.               oldest directory is removed before adding the current
  6743.               directory.
  6744.  
  6745.               The saved directory is restored on a "last in, first
  6746.               out" basis by the POPD command.  The directory stack can
  6747.               be displayed with the DIRS command.
  6748.  
  6749.               See also CDD, DIRS and POPD.
  6750.  
  6751.   Example:    Save the current directory and change to C:\WORDP\MEMOS:
  6752.  
  6753.                    c:\> pushd \wordp\memos
  6754.                    c:\wordp\memos>
  6755.  
  6756.               Save the current drive and directory, without changing
  6757.               directories:
  6758.  
  6759.                    c:\> pushd
  6760.                    c:\>
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.   4DOS Reference Manual         Copyright 1990, J.P. Software          107 
  6787.  
  6788.  
  6789.   QUIT
  6790.  
  6791.   Syntax:     QUIT
  6792.  
  6793.   Purpose:    Terminate the current batch file.
  6794.  
  6795.   Comments:   You can QUIT at any point in a batch file, not just at
  6796.               the end.
  6797.  
  6798.               If you QUIT a batch file called from another batch
  6799.               file, you will be returned to the previous file at the
  6800.               line following the original call.  To end all batch file
  6801.               processing, use CANCEL.
  6802.  
  6803.               See also CANCEL.
  6804.  
  6805.   Example:    This batch file fragment checks to see if the user
  6806.               entered "quit" and exits if true.
  6807.  
  6808.                    input  Enter your choice :  %%option
  6809.                    if  "%option" == "quit"  quit
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.   4DOS Reference Manual         Copyright 1990, J.P. Software          108 
  6845.  
  6846.  
  6847.   RD / RMDIR
  6848.  
  6849.   Syntax:     RD [d:]path...
  6850.                     or
  6851.               RMDIR [d:]path...
  6852.  
  6853.   Purpose:    Remove one or more subdirectories.
  6854.  
  6855.   Comments:   Before removing a subdirectory, you must delete all the
  6856.               files and subdirectories (and their files) in that
  6857.               directory (including any hidden or read-only files).
  6858.  
  6859.               You can use the MS-DOS wildcard characters (* and ?) in
  6860.               the directory names.
  6861.  
  6862.               You cannot remove the root directory (\), the current
  6863.               directory (.), or the parent directory (..).
  6864.  
  6865.               See also MD.
  6866.  
  6867.   Example:    Remove the subdirectory MEMOS from the subdirectory WP:
  6868.  
  6869.                    c:\> rmdir \wp\memos
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.   4DOS Reference Manual         Copyright 1990, J.P. Software          109 
  6903.  
  6904.  
  6905.   REM
  6906.  
  6907.   Syntax:     REM [comment]
  6908.  
  6909.   Purpose:    Put a comment in a batch file.
  6910.  
  6911.   Comments:   If ECHO is ON, or the variable VERBOSE (see the SETDOS
  6912.               command) is set, 4DOS will echo the comment.  Otherwise,
  6913.               4DOS will ignore it.  If you don't want to echo the line,
  6914.               preface REM with the @ character.
  6915.  
  6916.               Enter your comment following the REM, separated by a
  6917.               space or tab.  Comments can be up to 255 characters.  4DOS
  6918.               will ignore everything following a REM, including quote
  6919.               characters, the redirection symbols (| > <), the command
  6920.               separator character, aliases, and environment variables.
  6921.  
  6922.               Batch file comments are useful for documenting the
  6923.               purpose for a batch file and the procedures used.
  6924.  
  6925.   Example:    Enter comments in a batch file:
  6926.  
  6927.                    rem This batch file provides a
  6928.                    rem menu-based system for accessing
  6929.                    rem the word processing utilities.
  6930.                    rem Clear the screen and get selection
  6931.                    cls
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.   4DOS Reference Manual         Copyright 1990, J.P. Software          110 
  6961.  
  6962.  
  6963.   REN / RENAME
  6964.  
  6965.   Syntax:     REN [/PQ] [d:][path]filename... [d:][path]filename
  6966.                     or
  6967.               RENAME [/PQ] [d:][path]filename... [d:][path]filename
  6968.  
  6969.   Purpose:    Rename files or subdirectories.
  6970.  
  6971.   Comments:   The last filename is the new name; preceding names are
  6972.               the files or directories to be renamed.  You can use the
  6973.               wildcard characters (* and ?) in the filenames.  The new
  6974.               filename must not already exist.  You cannot rename a
  6975.               subdirectory to a new path!
  6976.  
  6977.               If the /P(rompt) option is specified, 4DOS will prompt
  6978.               you to enter Y or N to confirm each rename.
  6979.  
  6980.               The /Q(uiet) option turns off the display of the files
  6981.               renamed.
  6982.  
  6983.               RENAME in COMMAND.COM only allows a path to be
  6984.               specified with the first file name; the path for the
  6985.               target is always assumed to be the same as the source.
  6986.               4DOS allows you to optionally select the target path,
  6987.               renaming the source file to a new directory on the same
  6988.               disk drive.  If you don't specify a path for the target,
  6989.               4DOS will assume a "COMMAND.COM compatible" RENAME, and
  6990.               will rename the source file to the new name without moving
  6991.               it to another directory.
  6992.  
  6993.               If you want to rename to a different drive, use MOVE.
  6994.  
  6995.   Example:    Rename the file MEMO.TXT to OFFICE.TXT:
  6996.  
  6997.                    c:\> rename memo.txt office.txt
  6998.  
  6999.               Rename the files MEMO.TXT and MEMO2.TXT to another
  7000.               directory:
  7001.  
  7002.                    c:\> rename memo.txt memo2.txt c:\wp\memos
  7003.  
  7004.               Rename the directory \WORDPROC to \WP:
  7005.  
  7006.                    c:\> rename \wordproc \wp
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.   4DOS Reference Manual         Copyright 1990, J.P. Software          111 
  7019.  
  7020.  
  7021.   RETURN
  7022.  
  7023.   Syntax:     RETURN
  7024.  
  7025.   Purpose:    Return from a GOSUB (subroutine) call in a batch file.
  7026.  
  7027.   Comments:   The RETURN command returns from a GOSUB call to the
  7028.               command following the original GOSUB.
  7029.  
  7030.               See also GOSUB.
  7031.  
  7032.   Example:    The following batch file fragment calls a subroutine
  7033.               which displays the current directory:
  7034.  
  7035.                    echo Calling a subroutine
  7036.                    gosub subr1
  7037.                    echo Returned from the subroutine
  7038.                    quit
  7039.                    :subr1
  7040.                    dir /hw
  7041.                    return
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.   4DOS Reference Manual         Copyright 1990, J.P. Software          112 
  7077.  
  7078.  
  7079.   SCREEN
  7080.  
  7081.   Syntax:     SCREEN row column [message]
  7082.  
  7083.   Purpose:    Position the cursor on the screen, and optionally
  7084.               display a message.
  7085.  
  7086.   Comments:   The row and column are zero-based, so on a standard 25
  7087.               line by 80 column display, valid rows are 0 - 24 and valid
  7088.               columns are 0 - 79.
  7089.  
  7090.               SCREEN allows you to create attractive batch file
  7091.               screen displays.
  7092.  
  7093.               SCREEN does not change the screen colors.  If you have
  7094.               ANSI.SYS installed and have set colors with CLS or COLOR,
  7095.               those colors will be used for the display.  To display
  7096.               text in specific colors, use SCRPUT.
  7097.  
  7098.               SCREEN checks for a valid row and column, and displays
  7099.               an error message if either value is out of range.
  7100.  
  7101.               See also ECHO, SCRPUT and TEXT.
  7102.  
  7103.   Example:    The following batch file fragment displays a menu:
  7104.  
  7105.                    @echo off ^ cls
  7106.                    screen 3 10  Select a number from 1 to 4:
  7107.                    screen 6 20  1 - Word Processing
  7108.                    screen 7 20  2 - Spreadsheet
  7109.                    screen 8 20  3 - Telecommunications
  7110.                    screen 9 20  4 - Quit
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.   4DOS Reference Manual         Copyright 1990, J.P. Software          113 
  7135.  
  7136.  
  7137.   SCRPUT
  7138.  
  7139.   Syntax:     SCRPUT row column [bright] [blink] fg ON bg text
  7140.  
  7141.   Purpose:    Display text in color.
  7142.  
  7143.   Comments:   The row and column are zero-based, so on a standard 25
  7144.               line by 80 column display, valid rows are 0 - 24 and valid
  7145.               columns are 0 - 79.
  7146.  
  7147.               SCRPUT works like SCREEN, but allows you to specify the
  7148.               display colors, and writes directly to the screen.
  7149.  
  7150.               The parameters are:
  7151.  
  7152.                    row     Start row
  7153.                    col     Start column
  7154.                    fg      Foreground character color
  7155.                    bg      Background character color
  7156.  
  7157.               Only the first three characters of the color name and
  7158.               attributes ("bright" and "blink") are required.  The
  7159.               available colors are:
  7160.  
  7161.                         Black     Blue      Green     Red
  7162.                         Magenta   Cyan      Yellow    White
  7163.  
  7164.               See also CLS, ECHO, SCREEN and TEXT.
  7165.  
  7166.   Example:    The following batch file fragment displays a menu in
  7167.               color (all commands should be entered on one line):
  7168.  
  7169.                    @echo off ^ cls white on blue
  7170.                    scrput 3 10 bri white on blue Select a number from 1
  7171.                      to 4:
  7172.                    scrput 6 20 bri red on blue 1 - Word Processing
  7173.                    scrput 7 20 bri yellow on blue 2 - Spreadsheet
  7174.                    scrput 8 20 bri green on blue 3 - Telecommunications
  7175.                    scrput 9 20 bri magenta on blue 4 - Quit
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.   4DOS Reference Manual         Copyright 1990, J.P. Software          114 
  7193.  
  7194.  
  7195.   SELECT
  7196.  
  7197.   Syntax:     SELECT [/Oeirtuz] [command] ([d:][path]filename...)...
  7198.  
  7199.   Purpose:    Execute a command on the specified files.
  7200.  
  7201.   Comments:   SELECT allows you to select command line file arguments
  7202.               by marking the directory entries using a full-screen
  7203.               "point-and-shoot" display.   SELECT substitutes the
  7204.               selected files for the argument enclosed in parentheses,
  7205.               and executes the command for each marked file.  The
  7206.               command can be an alias, internal or external command, or
  7207.               batch file.  If you don't specify a command, the selected
  7208.               filename(s) will become the command (see example).
  7209.  
  7210.               The command can be a 4DOS internal command or alias, an
  7211.               external command, or a batch file.
  7212.  
  7213.               If you join filenames with a plus (+) sign, SELECT will
  7214.               display the files together (an "include list").  Only the
  7215.               first file in an include list can have a pathname;
  7216.               subsequent filenames default to the same path.
  7217.  
  7218.               If the filenames are enclosed in square brackets
  7219.               instead of parentheses, SELECT will substitute all of the
  7220.               selected filenames on one command line.  If there are too
  7221.               many filenames to fit on the line, SELECT will display an
  7222.               error message and exit.  All internal 4DOS commands
  7223.               support 255 character command lines, but  MS-DOS only
  7224.               supports 127 character command lines for external
  7225.               programs.  SELECT displays the approximate command line
  7226.               length in the upper left corner; it is your responsibility
  7227.               to ensure SELECT doesn't exceed the 127 character limit
  7228.               for external commands.
  7229.  
  7230.               SELECT uses the up arrow, down arrow, PgUp, and PgDn
  7231.               keys to scroll through the files matching the argument(s).
  7232.               Use the + key or the spacebar to select a file (or
  7233.               unselect a marked file), and the - key to unselect a file.
  7234.               The * key will select all of the files (excluding
  7235.               subdirectories).  After marking the files, press ENTER to
  7236.               execute the command.  You can select a single file by
  7237.               moving the scroll bar to the filename and pressing ENTER
  7238.               when no other files have been marked.
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.   4DOS Reference Manual         Copyright 1990, J.P. Software          115 
  7251.  
  7252.  
  7253.               The /O option determines the sort order for the
  7254.               directory display (the default sort is by filename):
  7255.  
  7256.                    e  Sort by extension
  7257.                    i  Sort by description (see DESCRIBE)
  7258.                    r  Reverse the sort order
  7259.                    t  Sort by time (oldest first)
  7260.                    u  Unsorted
  7261.                    z  Sort by size
  7262.  
  7263.               If you want to use filename completion (see Command
  7264.               Line Editing in Using 4DOS) to enter the filenames inside
  7265.               the parentheses, type a space after the "(".  Otherwise
  7266.               the command line editor will treat "(" as the first
  7267.               character of the filename.
  7268.  
  7269.               To cancel the SELECT command, type an Escape, ^C, or
  7270.               ^BREAK.
  7271.  
  7272.   Example:    Select from the files in the current directory with the
  7273.               extension .COM, and then from the files with the extension
  7274.               .EXE to copy to the root directory on drive A:
  7275.  
  7276.                    c:\> select copy (*.com *.exe) a:\
  7277.  
  7278.               Define an alias that selects from the executable files
  7279.               in the directory C:\UTIL, and then executes them in the
  7280.               order marked (the alias should be entered on one line):
  7281.  
  7282.                    c:\> alias utils select
  7283.                            (c:\util\*.com+*.exe+*.btm+*.bat)
  7284.                    c:\> utils
  7285.  
  7286.               Select from all the files in the current directory to
  7287.               move to the root directory on A (since the argument list
  7288.               is enclosed in square brackets, this will be done by a
  7289.               single command):
  7290.  
  7291.                    c:\> select move [*.*] a:\
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.   4DOS Reference Manual         Copyright 1990, J.P. Software          116 
  7309.  
  7310.  
  7311.   SET
  7312.  
  7313.   Syntax:     SET [/P] [/R filename] [variable[=][value]]
  7314.  
  7315.   Purpose:    Display, create, modify, or delete environment
  7316.               variables.
  7317.  
  7318.   Comments:   Entering SET with no variable or value displays the
  7319.               environment.  If you don't enter a value, SET will remove
  7320.               the variable from the environment.  Otherwise, the
  7321.               variable and the value are placed in the environment.  If
  7322.               the variable already exists, its old contents are replaced
  7323.               by the new value.  4DOS limits the variable name to a
  7324.               maximum of 80 characters, and the value to a maximum of
  7325.               255 characters.  The variable names are shifted to upper
  7326.               case before being stored in the environment; the value is
  7327.               stored exactly as entered.
  7328.  
  7329.               The /P option will pause after displaying a page of
  7330.               environment entries.  Press ^C to quit, or any other key
  7331.               to display the next page.
  7332.  
  7333.               The /R(ead) option allows you to load environment
  7334.               variables from a file.  This is much faster than loading
  7335.               variables from a batch file.  The file is in the same
  7336.               format as the SET display, so SET /R can accept as input a
  7337.               file generated by redirecting SET output.  For example,
  7338.               the following commands will save the environment variables
  7339.               to a file, and then reload them from that file:
  7340.  
  7341.                    set > varlist
  7342.                    set /r varlist
  7343.  
  7344.               You can add comments to a variable file by starting the
  7345.               comment line with a colon (:).
  7346.  
  7347.               SET only affects the environment of the current command
  7348.               processor.  If you EXIT to a parent command processor, the
  7349.               original environment will be unchanged.  The size of the
  7350.               environment is specified by the /E parameter at startup.
  7351.               The default size is 512 characters, the minimum size 256
  7352.               characters, and the maximum size 32000 characters.
  7353.  
  7354.  
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.   4DOS Reference Manual         Copyright 1990, J.P. Software          117 
  7367.  
  7368.  
  7369.               You can remove multiple environment variables with the
  7370.               UNSET command.
  7371.  
  7372.               You can edit environment variables and aliases with the
  7373.               ESET command.  To enter aliases, use ALIAS.
  7374.  
  7375.               See also UNSET and ESET.
  7376.  
  7377.   Example:    Display the current environment:
  7378.  
  7379.                    c:\> set
  7380.                    COMSPEC=C:\4DOS.COM
  7381.                    PATH=C:\;C:\DOS;C:\UTIL
  7382.  
  7383.               Add a variable to the environment:
  7384.  
  7385.                    c:\> set mine=c:\finance\myfiles
  7386.                    c:\> set
  7387.                    COMSPEC=C:\4DOS.COM
  7388.                    PATH=C:\;C:\DOS;C:\UTIL
  7389.                    MINE=c:\finance\myfiles
  7390.  
  7391.               Remove a variable from the environment:
  7392.  
  7393.                    c:\> set mine
  7394.                    c:\> set
  7395.                    COMSPEC=C:\4DOS.COM
  7396.                    PATH=C:\;C:\DOS;C:\UTIL
  7397.  
  7398.  
  7399.  
  7400.  
  7401.  
  7402.  
  7403.  
  7404.  
  7405.  
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.   4DOS Reference Manual         Copyright 1990, J.P. Software          118 
  7425.  
  7426.  
  7427.   SETDOS
  7428.  
  7429.   Syntax:     SETDOS [/A? /C? /E? /H? /I+|-command /L? /M? /N? /R?
  7430.                /S?:? /U? /V?]
  7431.  
  7432.   Purpose:    Display or set 4DOS configuration variables.
  7433.  
  7434.   Comments:   SETDOS allows you to customize 4DOS to your personal
  7435.               tastes.  You would normally define the SETDOS variables in
  7436.               your AUTOEXEC.BAT or 4START file.  The SETDOS options are:
  7437.  
  7438.                  A  The ANSI variable determines whether 4DOS will
  7439.                       attempt to use an ANSI escape sequence for CLS.
  7440.                       4DOS normally determines this itself, but if you
  7441.                       are using a non-standard ANSI driver or your
  7442.                       loading sequence is unusual, you may need to
  7443.                       explicitly inform 4DOS.  /A0 allows 4DOS to
  7444.                       determine whether an ANSI driver is installed; /A1
  7445.                       forces 4DOS to assume an ANSI driver is installed.
  7446.  
  7447.                  C  The COMPOUND variable is the character used for
  7448.                       separating multiple commands on the same line.
  7449.                       The default character is the caret (^).  You
  7450.                       cannot use any of the redirection characters (| >
  7451.                       <), or any of the whitespace characters (=,;) as
  7452.                       the command separator.
  7453.  
  7454.                  E  The ESCAPE variable is the character used to suppress
  7455.                       the normal meaning of the following character.  Any
  7456.                       character following the escape character will be
  7457.                       passed unmodified to the command line.  The default
  7458.                       escape character is ^X (Ctrl-X, displayed as an up
  7459.                       arrow).  You cannot use any of the redirection
  7460.                       characters (| > <) or the whitespace characters
  7461.                       (=,;) as the escape character.
  7462.  
  7463.                  H  The HISTORY variable determines the minimum command
  7464.                       size to save.  Any command line whose length is
  7465.                       less than this value will not be saved to the
  7466.                       history list.  Setting /H to 256 will disable
  7467.                       history saves; setting it to 0 will save
  7468.                       everything.  The default value is 0 (save all
  7469.                       command lines).
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.   4DOS Reference Manual         Copyright 1990, J.P. Software          119 
  7483.  
  7484.  
  7485.                  I  The INTERNAL variable allows you to disable or
  7486.                       enable internal 4DOS commands.  To disable a
  7487.                       command, precede the command name with a minus (-
  7488.                       ).  To reenable a command, precede it with a plus
  7489.                       (+).
  7490.  
  7491.                  L  The LINE variable controls how 4DOS gets its input
  7492.                       from the command line.  The default value is 0
  7493.                       (character input).  If you set /L to 1, 4DOS uses
  7494.                       the INT 21 0Ah "Get Line" call (like COMMAND.COM).
  7495.                       Note that this will disable command line editing,
  7496.                       history recall, and filename expansion.  If you
  7497.                       have an program that requires line input, you can
  7498.                       define an alias or batch file:
  7499.  
  7500.                            setdos /L1 ^ program %& ^ setdos /L0
  7501.  
  7502.                       See the file COMPAT.DOC for information on
  7503.                       programs which require this option.
  7504.  
  7505.                  M  The MODE variable controls the line editing mode.
  7506.                       4DOS defaults to overstrike mode (/M0).  If MODE
  7507.                       is set to 1, the default is insert mode.
  7508.  
  7509.                  N  The NOCLOBBER variable controls output redirection.
  7510.                       If NOCLOBBER is set to 1, then existing files may
  7511.                       not be destroyed by output redirection, and when
  7512.                       appending with >>, the output file must exist.
  7513.                       NOCLOBBER can be overridden with the ! character
  7514.                       (see the section on redirection in Using 4DOS).
  7515.                       The default value is 0.
  7516.  
  7517.                  R  The ROWS variable sets the number of screen rows
  7518.                       used by the video display.  Normally 4DOS detects
  7519.                       the screen size, but if you have a non-standard
  7520.                       display you may need to set it explicitly.  The
  7521.                       ROWS variable does not affect screen scrolling
  7522.                       (that is controlled by your video BIOS or
  7523.                       ANSI.SYS); it is used only for LIST, SELECT, the
  7524.                       paged output options (i.e., TYPE /P), and error
  7525.                       checking in the screen output commands.
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.   4DOS Reference Manual         Copyright 1990, J.P. Software          120 
  7541.  
  7542.  
  7543.                  S  The SHAPE variable sets the 4DOS cursor shape.  The
  7544.                       format is /Ss:e where s is the starting scan line
  7545.                       and e the ending.  The default values are the last
  7546.                       two lines of the cursor cell.  The default editing
  7547.                       mode (see /M above) uses the default cursor shape;
  7548.                       the other mode sets the starting scan line to 0
  7549.                       and displays a block cursor.
  7550.  
  7551.                  U  The UPPER variable controls the way filenames are
  7552.                       displayed for the internal commands (COPY, DIR,
  7553.                       etc.).  If UPPER is set to 1, filenames will be
  7554.                       displayed in upper case (like COMMAND.COM).  UPPER
  7555.                       defaults to /U0 (filenames will be displayed in
  7556.                       lower case).
  7557.  
  7558.                  V  The VERBOSE variable controls command echoing in
  7559.                       batch files.  If VERBOSE is set to 0, batch file
  7560.                       commands will NOT be echoed unless ECHO is set ON.
  7561.                       VERBOSE defaults to 1 (that is, batch file
  7562.                       commands WILL be echoed).
  7563.  
  7564.   Example:    Change the COMPOUND character to a ~ (tilde):
  7565.  
  7566.                    c:\> setdos /c~
  7567.  
  7568.               Change MODE to insert, VERBOSE to off, and set
  7569.               NOCLOBBER on:
  7570.  
  7571.                    c:\> setdos /m1 /v0 /n1
  7572.  
  7573.               Disable the internal LIST command to force 4DOS to use
  7574.               an external command:
  7575.  
  7576.                    c:\> setdos /i-list
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.   4DOS Reference Manual         Copyright 1990, J.P. Software          121 
  7599.  
  7600.  
  7601.   SETLOCAL
  7602.  
  7603.   Syntax:     SETLOCAL
  7604.  
  7605.   Purpose:    Save a copy of the current disk drive, directory,
  7606.               environment variables, and aliases.
  7607.  
  7608.   Comments:   SETLOCAL is used in batch files to save the disk drive,
  7609.               directory, environment variables and aliases to a reserved
  7610.               block of memory.  You can then change their values, and
  7611.               later restore the original values with ENDLOCAL.  You
  7612.               cannot use SETLOCAL  in an alias.
  7613.  
  7614.               SETLOCAL and ENDLOCAL are not nestable within the same
  7615.               batch file.  However, you can have multiple SETLOCAL /
  7616.               ENDLOCAL pairs within a batch file, and nested batch files
  7617.               can each have their own SETLOCAL / ENDLOCAL.  4DOS will
  7618.               automatically perform an ENDLOCAL at the end of a batch
  7619.               file.
  7620.  
  7621.               Note that if you invoke a batch file from another
  7622.               without using CALL, the first batch file is implicitly
  7623.               terminated, and an automatic ENDLOCAL performed.  The
  7624.               second batch file will inherit the drive, directory,
  7625.               environment variables, and aliases as they were prior to
  7626.               the SETLOCAL.
  7627.  
  7628.               Do not load TSRs (memory-resident programs) from a
  7629.               batch file while a SETLOCAL is in effect.  If you do, when
  7630.               ENDLOCAL is executed and the memory used by SETLOCAL is
  7631.               released, a "hole" will be left in memory below the TSR.
  7632.               This is not harmful, but wastes memory.
  7633.  
  7634.                  See also ENDLOCAL.
  7635.  
  7636.   Example:    This batch file fragment saves the disk drive,
  7637.               directory, environment variables and aliases, changes the
  7638.               disk and directory, modifies some variables, runs a
  7639.               program, and then restores the original values:
  7640.  
  7641.                    setlocal
  7642.                    cdd d:\test ^ set path=c:\;c:\dos;c:\util
  7643.                    set lib=d:\lib
  7644.                    rem run some program here
  7645.                    endlocal
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.   4DOS Reference Manual         Copyright 1990, J.P. Software          122 
  7657.  
  7658.  
  7659.   SHIFT
  7660.  
  7661.   Syntax:     SHIFT [n]
  7662.  
  7663.   Purpose:    Allow the use of more than 10 variables in a batch
  7664.               file.
  7665.  
  7666.   Comment:    SHIFT is provided for compatibility with COMMAND.COM.
  7667.               COMMAND.COM supports only 10 parameters (%0 through %9);
  7668.               4DOS supports 128 parameters (%0 to %127), so you may not
  7669.               need to use SHIFT for batch files running exclusively
  7670.               under 4DOS.
  7671.  
  7672.               SHIFT moves each of the batch file parameters n
  7673.               positions (i.e., %1 becomes %0, %2 becomes %1, etc.).  The
  7674.               default value for n  is 1.  You can also reverse a SHIFT,
  7675.               by giving a negative value for n (i.e., if n  is -1, the
  7676.               former value for %0 is restored, %0 becomes %1, %1 becomes
  7677.               %2, etc.).
  7678.  
  7679.               SHIFT also affects the %n& (command line tail) and %#
  7680.               (number of command arguments) batch variables.
  7681.  
  7682.   Example:    Create a batch file called TEST.BAT:
  7683.  
  7684.                    echo %1 %2 %3 %4
  7685.                    shift
  7686.                    echo %1 %2 %3 %4
  7687.                    shift 2
  7688.                    echo %1 %2 %3 %4
  7689.                    shift -1
  7690.                    echo %1 %2 %3 %4
  7691.  
  7692.               Executing TEST.BAT produces the following results:
  7693.  
  7694.                    c:\> test zero one two three four five six
  7695.                    zero one two three
  7696.                    one two three four
  7697.                    three four five six
  7698.                    two three four five
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.   4DOS Reference Manual         Copyright 1990, J.P. Software          123 
  7715.  
  7716.  
  7717.   SWAPPING
  7718.  
  7719.   Syntax:     SWAPPING [on | off]
  7720.  
  7721.   Purpose:    Display, enable, or disable the 4DOS swapping state.
  7722.  
  7723.   Comments:   SWAPPING will temporarily disable or enable the
  7724.               swapping of the 4DOS transient portion to EMS, XMS, or
  7725.               disk (see Installation).  This is particularly useful when
  7726.               running batch files while swapping to disk.  If swapping
  7727.               is enabled, 4DOS saves its transient portion before
  7728.               executing any external command.  When the command
  7729.               finishes, 4DOS performs a checksum on the transient
  7730.               portion (when swapping to disk), and restores it if
  7731.               necessary.  (When swapping to EMS or XMS, 4DOS always
  7732.               restores the transient portion.)  When you are running
  7733.               several small programs from a batch file and using disk
  7734.               swapping, the swapping can sometimes cause a noticeable
  7735.               delay.  Turning SWAPPING OFF can speed up such operations.
  7736.  
  7737.               If SWAPPING is OFF, available MS-DOS memory will be
  7738.               reduced by the size of the 4DOS transient portion (about
  7739.               70K).  Setting SWAPPING OFF does not close the disk swap
  7740.               file, or release any reserved EMS or XMS memory.
  7741.  
  7742.               Setting SWAPPING OFF can be useful in speeding up your
  7743.               AUTOEXEC.BAT file.
  7744.  
  7745.   Example:    Check the current SWAPPING status:
  7746.  
  7747.                    c:\> swapping
  7748.                    SWAPPING is ON
  7749.  
  7750.               The following batch file fragment disables swapping,
  7751.               runs several programs, and then reenables swapping:
  7752.  
  7753.                    swapping off
  7754.                    c:\util\mouse
  7755.                    c:\video\ansi.com
  7756.                    cls bright white on blue
  7757.                    c:\bin\cache.com
  7758.                    swapping on
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.   4DOS Reference Manual         Copyright 1990, J.P. Software          124 
  7773.  
  7774.  
  7775.   TEE
  7776.  
  7777.   Syntax:     TEE [/A] [d:][path]filename...
  7778.  
  7779.   Purpose:    Copy standard input to standard output, and save a copy
  7780.               in the specified file(s).
  7781.  
  7782.   Comments:   The /A option causes the output to be appended to the
  7783.               file(s) rather than overwriting it.
  7784.  
  7785.               If you are typing at the keyboard, you need to enter a
  7786.               ^Z to terminate the input.
  7787.  
  7788.               TEE is often used to save the intermediate output of a
  7789.               pipe.
  7790.  
  7791.               See also Y.
  7792.  
  7793.   Example:    Search the file DOC for any lines containing the string
  7794.               "4DOS", make a copy of the matching lines in 4.DAT, sort
  7795.               the lines, and write them to the output file 4DOS.DAT:
  7796.  
  7797.                    c:\> find "4DOS" doc | tee 4.dat | sort > 4dos.dat
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.  
  7805.  
  7806.  
  7807.  
  7808.  
  7809.  
  7810.  
  7811.  
  7812.  
  7813.  
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.   4DOS Reference Manual         Copyright 1990, J.P. Software          125 
  7831.  
  7832.  
  7833.   TEXT
  7834.  
  7835.   Syntax:     TEXT
  7836.                 .
  7837.                 .
  7838.                 .
  7839.               ENDTEXT
  7840.  
  7841.   Purpose:    Display a block of text in a batch file.
  7842.  
  7843.   Comments:   The TEXT command is useful for displaying menus or
  7844.               multiple line messages.  TEXT will display subsequent
  7845.               lines in the batch file until terminated by ENDTEXT.  Both
  7846.               TEXT and ENDTEXT must be entered as the only command on
  7847.               that line.
  7848.  
  7849.               If you have ANSI.SYS loaded, you can change screen
  7850.               colors by inserting ANSI escape sequences into the text
  7851.               block.
  7852.  
  7853.               See also ECHO, SCREEN and SCRPUT.
  7854.  
  7855.   Example:    The following batch file fragment displays a simple
  7856.               menu:
  7857.  
  7858.                    @echo off ^ cls ^ screen 2 0
  7859.                    text
  7860.                    Enter one of the following:
  7861.  
  7862.                       1 - Spreadsheet
  7863.                       2 - Word Processing
  7864.                       3 - DOS Utilities
  7865.  
  7866.                    Enter your selection :
  7867.                    endtext
  7868.  
  7869.  
  7870.  
  7871.  
  7872.  
  7873.  
  7874.  
  7875.  
  7876.  
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.   4DOS Reference Manual         Copyright 1990, J.P. Software          126 
  7889.  
  7890.  
  7891.   TIME
  7892.  
  7893.   Syntax:     TIME [hh[:mm[:ss]][am | pm]
  7894.  
  7895.   Purpose:    Display or set the current system time.
  7896.  
  7897.   Comments:   If you don't enter any parameters, TIME will display
  7898.               the current system time and prompt you for a new time.
  7899.               Press ENTER if you don't wish to change the time,
  7900.               otherwise enter the new time.
  7901.  
  7902.               The parameters for the TIME command are:
  7903.  
  7904.                    hh (hour) = 0 - 23
  7905.                    mm (minute) = 0 - 59
  7906.                    ss (second) = 0 - 59
  7907.  
  7908.               TIME defaults to 24-hour format, but you can optionally
  7909.               enter the time in 12-hour format by appending an "am" or
  7910.               "pm".
  7911.  
  7912.               Whenever you create or modify a file, the system time
  7913.               is recorded in  the directory entry.
  7914.  
  7915.   Example:    Enter the time (9:30 am):
  7916.  
  7917.                    c:\> time 9:30
  7918.  
  7919.               To be prompted for the time:
  7920.  
  7921.                    c:\> time
  7922.                    Mon  Dec 25, 1989  9:30:10
  7923.                    New time (hh:mm:ss):
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.   4DOS Reference Manual         Copyright 1990, J.P. Software          127 
  7947.  
  7948.  
  7949.   TIMER
  7950.  
  7951.   Syntax:     TIMER [/S]
  7952.  
  7953.   Purpose:    System stopwatch.
  7954.  
  7955.   Comments:   The TIMER command turns the system stopwatch on and
  7956.               off.  The first time you run TIMER, the stopwatch starts.
  7957.               When you run TIMER again, the stopwatch stops and the
  7958.               elapsed time is displayed.
  7959.  
  7960.               The /S option allows you to display a split time
  7961.               without stopping the timer.
  7962.  
  7963.               TIMER is particularly useful for timing events in batch
  7964.               files.
  7965.  
  7966.               The smallest interval TIMER can measure is .06 seconds;
  7967.               the largest interval is 23:59:59.99.
  7968.  
  7969.   Example:    Start the timer:
  7970.  
  7971.                    c:\> timer
  7972.                    Timer on:  12:21:46
  7973.  
  7974.               Display the current time, leaving the timer running:
  7975.  
  7976.                    c:\> timer /s
  7977.                    Elapsed time:  0:00:08.90
  7978.  
  7979.               Stop the timer:
  7980.  
  7981.                    c:\> timer
  7982.                    Timer off:  12:21:58    Elapsed time: 0:00:12.06
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.   4DOS Reference Manual         Copyright 1990, J.P. Software          128 
  8005.  
  8006.  
  8007.   TYPE
  8008.  
  8009.   Syntax:     TYPE [/LP] [d:][pathname]filename...
  8010.  
  8011.   Purpose:    Display the contents of the specified file(s).
  8012.  
  8013.   Comments:   The TYPE command displays a file.  Press ^S to suspend
  8014.               the display, and any character key to continue the
  8015.               display.
  8016.  
  8017.               The /L option prints line numbers preceding each line
  8018.               of text.
  8019.  
  8020.               The /P option will pause after each page.  Press ^C to
  8021.               quit, or any other key to display the next page.
  8022.  
  8023.               TYPE is normally only useful for displaying ASCII text
  8024.               files; executable files (.COM and .EXE) and many data
  8025.               files may be unreadable due to the presence of non-
  8026.               alphanumeric characters.
  8027.  
  8028.               You will probably find LIST to be more useful for
  8029.               displaying files.
  8030.  
  8031.               See also LIST.
  8032.  
  8033.   Example:    Display the files MEMO1 and MEMO2, pausing at the end
  8034.               of each page:
  8035.  
  8036.                    c:\> type /p memo1 memo2
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.   4DOS Reference Manual         Copyright 1990, J.P. Software          129 
  8063.  
  8064.  
  8065.   UNALIAS
  8066.  
  8067.   Syntax:     UNALIAS alias...
  8068.                 or
  8069.               UNALIAS *
  8070.  
  8071.   Purpose:    Remove aliases from the alias list.
  8072.  
  8073.   Comments:   UNALIAS also accepts the wildcard character * to delete
  8074.               all aliases.
  8075.  
  8076.               See also ALIAS and ESET.
  8077.  
  8078.   Example:    Remove the alias DDIR:
  8079.  
  8080.                    c:\> unalias ddir
  8081.  
  8082.               Remove the aliases DDIR and ZAP:
  8083.  
  8084.                    c:\> unalias ddir zap
  8085.  
  8086.               Remove all the aliases:
  8087.  
  8088.                    c:\> unalias *
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.   4DOS Reference Manual         Copyright 1990, J.P. Software          130 
  8121.  
  8122.  
  8123.   UNSET
  8124.  
  8125.   Syntax:     UNSET name...
  8126.                 or
  8127.               UNSET *
  8128.  
  8129.   Purpose:    Remove variables from the environment.
  8130.  
  8131.   Comments:   UNSET also accepts the wildcard character * to delete
  8132.               all of the environment variables.  Use caution with UNSET
  8133.               *; many programs are dependent on environment variables,
  8134.               and 4DOS itself relies on PATH, COMSPEC, and 4DSHELL.
  8135.  
  8136.               See also SET and ESET.
  8137.  
  8138.   Example:    Remove the variable CMDLINE:
  8139.  
  8140.                    c:\> unset cmdline
  8141.  
  8142.               Remove the variables CMDLINE and PATH:
  8143.  
  8144.                    c:\> unset cmdline path
  8145.  
  8146.               Remove all the environment variables:
  8147.  
  8148.                    c:\> unset *
  8149.  
  8150.  
  8151.  
  8152.  
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.   4DOS Reference Manual         Copyright 1990, J.P. Software          131 
  8179.  
  8180.  
  8181.   VER
  8182.  
  8183.   Syntax:     VER
  8184.  
  8185.   Purpose:    Display the current 4DOS and MS-DOS versions.
  8186.  
  8187.   Comments:   The 4DOS and MS-DOS versions consist of a one digit
  8188.               major version number, a period, and a one or two digit
  8189.               minor version number.
  8190.  
  8191.   Example:    Get the current version of 4DOS and MS-DOS:
  8192.  
  8193.                    c:\> ver
  8194.  
  8195.                    4DOS 3.01     DOS 3.31
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.   4DOS Reference Manual         Copyright 1990, J.P. Software          132 
  8237.  
  8238.  
  8239.   VERIFY
  8240.  
  8241.   Syntax:     VERIFY [on | off]
  8242.  
  8243.   Purpose:    Display, enable, or disable disk write verification.
  8244.  
  8245.   Comments:   When VERIFY is ON, MS-DOS will verify that no error
  8246.               occurred during the disk write operation.  It does NOT
  8247.               compare the data actually written to the disk.  VERIFY
  8248.               will remain ON until you set it OFF.
  8249.  
  8250.               Entering VERIFY with no parameters will display the
  8251.               current VERIFY state.
  8252.  
  8253.               Verification will slow your disk write operations
  8254.               slightly.
  8255.  
  8256.               At system startup, VERIFY is OFF.
  8257.  
  8258.   Example:    Check the current verify status:
  8259.  
  8260.                    c:\> verify
  8261.                    VERIFY is OFF
  8262.  
  8263.               Enable disk write verification:
  8264.  
  8265.                    c:\> verify on
  8266.  
  8267.  
  8268.  
  8269.  
  8270.  
  8271.  
  8272.  
  8273.  
  8274.  
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.  
  8281.  
  8282.  
  8283.  
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294.   4DOS Reference Manual         Copyright 1990, J.P. Software          133 
  8295.  
  8296.  
  8297.   VOL
  8298.  
  8299.   Syntax:     VOL [d:]...
  8300.  
  8301.   Purpose:    Display the disk volume label(s).
  8302.  
  8303.   Comments:   If you don't enter a drive name, VOL displays the disk
  8304.               label for the current drive.
  8305.  
  8306.               If the disk doesn't have a volume name, VOL will report
  8307.               it as "unlabeled."
  8308.  
  8309.               Volume labels can be created, changed or deleted with
  8310.               the external MS-DOS LABEL command.
  8311.  
  8312.   Example:    Display the label for the default disk:
  8313.  
  8314.                    c:\> vol
  8315.                    Volume in drive C: is MYHARDDISK
  8316.  
  8317.               Display the disk labels for drives A and B:
  8318.  
  8319.                    c:\> vol a: b:
  8320.                    Volume in drive A: is unlabeled
  8321.                    Volume in drive B: is BACKUP_2
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.   4DOS Reference Manual         Copyright 1990, J.P. Software          134 
  8353.  
  8354.  
  8355.   Y
  8356.  
  8357.   Syntax:     Y [d:][path]filename...
  8358.  
  8359.   Purpose:    Copy standard input to standard output, and then copy
  8360.               the specified file(s) to standard output.
  8361.  
  8362.   Comments:   Standard input from the console is terminated by a ^Z.
  8363.  
  8364.               See also TEE.
  8365.  
  8366.   Example:    Get text from standard input, append the files MEMO1
  8367.               and MEMO2 to it, and send the output to MEMOS:
  8368.  
  8369.                    c:\> y memo1 memo2 > memos
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.   4DOS Reference Manual         Copyright 1990, J.P. Software          135 
  8411.  
  8412.  
  8413.   APPENDIX A - 4DOS and MS-DOS Error Messages
  8414.  
  8415.  
  8416.   4DOS swapping failed, loading in memory-resident mode
  8417.  
  8418.        None of the swapping options worked.  Check your swapping
  8419.        specification in SHELL or 4DSHELL, and/or free XMS or EMS memory
  8420.        or disk space.
  8421.  
  8422.   4DOS unrecoverable error XX
  8423.  
  8424.        An error occurred in the resident portion of 4DOS.  These errors
  8425.        will terminate secondary shells, and require a reboot if they
  8426.        occur during a primary shell.
  8427.  
  8428.                  BI   Bad server function code
  8429.                  DI   Same as Disk swap file corrupted
  8430.                  DR   Same as Swap file read error
  8431.                  DS   Same as Swap file seek error
  8432.                  ES   Same as EMS map save or restore failed
  8433.                  EI   Same as EMS mapping error
  8434.                  NS   No number for new shell
  8435.                  PT   Illegal process termination
  8436.                  TS   Terminated inactive shell
  8437.                  XI   Same as XMS move failed
  8438.  
  8439.   Access denied
  8440.  
  8441.        You tried to erase or write to a read-only protected file, to
  8442.        rename a file or directory to an existing name, or to remove a
  8443.        read-only directory or a directory with files or subdirectories
  8444.        still in it.
  8445.  
  8446.   Alias loop
  8447.  
  8448.        An alias refers back to itself (i.e., a = b = a), or aliases are
  8449.        nested more than 16 deep.  Correct your alias list.
  8450.  
  8451.   Attempt to exit from root shell
  8452.  
  8453.        Another program has destroyed a portion of 4DOS' memory, or you
  8454.        forgot a /P on your SHELL line in CONFIG.SYS.  Reboot the system
  8455.        and correct the error.
  8456.  
  8457.   Bad disk unit
  8458.  
  8459.        Generally caused by a disk drive hardware failure.
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.  
  8468.   4DOS Reference Manual         Copyright 1990, J.P. Software          136 
  8469.  
  8470.  
  8471.   Bad environment
  8472.  
  8473.        The MS-DOS environment has a bad structure.  Reboot the system.
  8474.  
  8475.   Batch file missing
  8476.  
  8477.        4DOS can't find the batch (.BAT) file it was running.  It was
  8478.        either deleted, renamed, moved, or the disk was changed.
  8479.  
  8480.   Can't copy file to itself
  8481.  
  8482.        4DOS will not permit you to COPY or MOVE a file to itself.
  8483.        Unlike COMMAND.COM, 4DOS does full path and filename expansion
  8484.        before copying to ensure that files aren't inadvertently
  8485.        destroyed.
  8486.  
  8487.   Can't create
  8488.  
  8489.        4DOS can't create the specified file.  The disk may be full or
  8490.        write protected, the file already exists and is read-only, or the
  8491.        root directory is full.
  8492.  
  8493.   Can't delete
  8494.  
  8495.        4DOS can't delete the specified file or directory.  The disk is
  8496.        probably write protected.
  8497.  
  8498.   Can't find EXE file
  8499.  
  8500.        The loader (4DOS.COM) can't locate either 4DOS88.EXE or
  8501.        4DOS286.EXE.  At boot time, one of these files must be in the
  8502.        current directory, or the path must be specified with the /L
  8503.        switch (see Installation).  When starting a secondary shell, one
  8504.        of these files must be specified with the /L switch in the
  8505.        4DSHELL environment variable, or must be in the directory
  8506.        specified by COMSPEC.
  8507.  
  8508.   Can't get directory
  8509.  
  8510.        4DOS can't read the directory.  The disk drive is probably not
  8511.        ready.
  8512.  
  8513.   Can't make directory entry
  8514.  
  8515.        4DOS can't create the filename in the directory.  This is usually
  8516.        caused by a full root directory.  Create a subdirectory and move
  8517.        some of the files to it.
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.   4DOS Reference Manual         Copyright 1990, J.P. Software          137 
  8527.  
  8528.  
  8529.   Can't open
  8530.  
  8531.        4DOS can't open the specified file; either it doesn't exist or
  8532.        the disk directory or File Allocation Table is damaged.
  8533.  
  8534.   Can't remove current directory
  8535.  
  8536.        MS-DOS can't delete your current directory.  Change to the parent
  8537.        directory and try again.
  8538.  
  8539.   Can't set up disk swap file
  8540.  
  8541.        The disk swap file you specified cannot be opened.  The path or
  8542.        drive is invalid, the disk is full, MS-DOS is out of file
  8543.        handles, or there is a hardware problem.  Check SHELL and
  8544.        4DSHELL.
  8545.  
  8546.   Command line too long
  8547.  
  8548.        The command exceeded 255 characters during alias and variable
  8549.        expansion, or you or your program attempted to pass a command
  8550.        line exceeding 126 characters to a secondary 4DOS shell
  8551.        (including the necessary alias, environment, and history
  8552.        settings).  Reduce the line length and/or use default alias,
  8553.        environment, and history sizes.
  8554.  
  8555.   Contents lost before copy
  8556.  
  8557.        COPY was appending files, and found one of the source files is
  8558.        the same as the target.  That source file is skipped, and
  8559.        appending continues with the next file.
  8560.  
  8561.   Data error
  8562.  
  8563.        MS-DOS can't read or write properly to the device.
  8564.  
  8565.   Directory stack empty
  8566.  
  8567.        POPD or DIRS can't find any entries in the directory stack.
  8568.  
  8569.   Disk is write protected
  8570.  
  8571.        The disk cannot be written to.  Check the disk and remove the
  8572.        write-protect tab if necessary.
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.   4DOS Reference Manual         Copyright 1990, J.P. Software          138 
  8585.  
  8586.  
  8587.   Disk swap file corrupted
  8588.  
  8589.        The 4DOS disk swapping file (4DOSSWAP) has been moved, deleted,
  8590.        or damaged.  Reboot the system.
  8591.  
  8592.   Drive not ready--close door
  8593.  
  8594.        The floppy disk drive door is open.  Close the door and try
  8595.        again.
  8596.  
  8597.   EMS deallocation failed
  8598.  
  8599.        The loader (4DOS.COM) can't deallocate EMS memory when exiting
  8600.        from a secondary copy of 4DOS.  The EMS map has been corrupted or
  8601.        the loader's memory area has been destroyed by a program.  Reboot
  8602.        the system.
  8603.  
  8604.   EMS map save or restore failed
  8605.  
  8606.        4DOS cannot save or restore the EMS page map.  The EMS map has
  8607.        been corrupted, or memory has been destroyed by a program, or you
  8608.        have an incompatible EMS driver.  Try another swapping method.
  8609.  
  8610.   EMS mapping failed
  8611.  
  8612.        The loader (4DOS.COM) can't map EMS pages when swapping 4DOS to
  8613.        or from EMS.  The EMS map has been corrupted, or the loader's
  8614.        memory area has been destroyed by a program.  Reboot the system.
  8615.  
  8616.   EMS not available for swapping
  8617.  
  8618.        You requested EMS swapping but no EMS memory was available.
  8619.        Change your swapping method or free some EMS memory.
  8620.  
  8621.   Environment already saved
  8622.  
  8623.        You have already saved the environment with a previous SETLOCAL
  8624.        command.  You cannot nest SETLOCAL / ENDLOCAL pairs.
  8625.  
  8626.   Error reading
  8627.  
  8628.        MS-DOS experienced an I/O error when reading from a device.  This
  8629.        is usually caused by a bad disk, a device not ready, or a
  8630.        hardware error.
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.   4DOS Reference Manual         Copyright 1990, J.P. Software          139 
  8643.  
  8644.  
  8645.   Error writing
  8646.  
  8647.        MS-DOS experienced an I/O error when writing to a device.  This
  8648.        is usually caused by a full disk, a bad disk, a device not ready,
  8649.        or a hardware error.
  8650.  
  8651.   Exceeded batch nesting limit
  8652.  
  8653.        You have attempted to nest batch files more than 4 levels deep.
  8654.  
  8655.   EXE file [seek | read | close] failed
  8656.  
  8657.        The loader (4DOS.COM) encountered an I/O error while attempting
  8658.        to access 4DOS88.EXE or 4DOS286.EXE.  Either the disk directory
  8659.        or FAT is corrupted, or one of these files has been damaged.  Run
  8660.        CHKDSK to verify the disk is OK, and reload 4DOS88 or 4DOS286
  8661.        from your distribution disk.
  8662.  
  8663.   Fatal error -- please reboot
  8664.  
  8665.        4DOS cannot continue due to the previous error.  Reboot the
  8666.        system.
  8667.  
  8668.   File Allocation Table bad
  8669.  
  8670.        MS-DOS can't access the FAT on the specified disk.  This can be
  8671.        caused by a bad disk or a hardware error.
  8672.  
  8673.   File exists
  8674.  
  8675.        The requested output file already exists, and 4DOS won't
  8676.        overwrite it.
  8677.  
  8678.   File not found
  8679.  
  8680.        4DOS couldn't find the specified file.  Check the spelling or
  8681.        path name.
  8682.  
  8683.   General failure
  8684.  
  8685.        This is usually a hardware problem, particularly a disk drive
  8686.        failure or a device not properly connected to a serial or
  8687.        parallel port.  Try to correct the problem or reboot and try
  8688.        again.
  8689.  
  8690.   Internal DOS error
  8691.  
  8692.        MS-DOS encountered an internal bug and failed.  Reboot the
  8693.        system.
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.   4DOS Reference Manual         Copyright 1990, J.P. Software          140 
  8701.  
  8702.  
  8703.   Invalid date
  8704.  
  8705.        An invalid date was entered.  Check the syntax and reenter.
  8706.  
  8707.   Invalid drive
  8708.  
  8709.        A bad or non-existent disk drive was specified.
  8710.  
  8711.   Invalid load path specified, ignored
  8712.  
  8713.        You specified an invalid path in the /L option in SHELL or
  8714.        4DSHELL.
  8715.  
  8716.   Invalid MS-DOS version
  8717.  
  8718.        You need a newer version of MS-DOS to execute the specified
  8719.        command.
  8720.  
  8721.   Invalid parameter
  8722.  
  8723.        4DOS didn't recognize the a parameter.  Check the syntax and
  8724.        spelling.
  8725.  
  8726.   Invalid path
  8727.  
  8728.        The specified path does not exist.  Check the disk specification
  8729.        and/or spelling.
  8730.  
  8731.   Invalid swap path specified, using current drive and directory
  8732.  
  8733.        You specified an invalid path in the /S:B or /S:D option in SHELL
  8734.        or 4DSHELL.
  8735.  
  8736.   Invalid swapping option
  8737.  
  8738.        You specified an invalid value for the /S option in SHELL or
  8739.        4DSHELL.
  8740.  
  8741.   Invalid time
  8742.  
  8743.        An invalid time was entered.  Check the syntax and reenter.
  8744.  
  8745.   KEYSTACK.SYS not loaded
  8746.  
  8747.        You attempted to execute a KEYSTACK command without loading
  8748.        KEYSTACK.SYS in your CONFIG.SYS file (see Installation).
  8749.  
  8750.  
  8751.  
  8752.  
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.   4DOS Reference Manual         Copyright 1990, J.P. Software          141 
  8759.  
  8760.  
  8761.   Label not found
  8762.  
  8763.        A GOTO or GOSUB referred to a non-existent label.  Check your
  8764.        batch file.
  8765.  
  8766.   Memory deallocation error
  8767.  
  8768.        The loader (4DOS.COM) can't deallocate memory while loading 4DOS.
  8769.        The MS-DOS memory allocation has been corrupted.  Reboot the
  8770.        system.
  8771.  
  8772.   Memory destroyed
  8773.  
  8774.        The DOS memory control blocks have been corrupted.  Reboot the
  8775.   system.
  8776.  
  8777.   Missing ENDTEXT
  8778.  
  8779.        A TEXT command is missing a matching ENDTEXT.  Check the batch
  8780.        file.
  8781.  
  8782.   Missing GOSUB
  8783.  
  8784.        4DOS cannot perform the RETURN command in a batch file.  You
  8785.        tried to do a RETURN without a GOSUB, or your batch file has been
  8786.        corrupted.
  8787.  
  8788.   Missing SETLOCAL
  8789.  
  8790.        4DOS encountered an ENDLOCAL without a matching SETLOCAL.
  8791.  
  8792.   No aliases defined
  8793.  
  8794.        No aliases were found in the environment.
  8795.  
  8796.   No closing quote
  8797.  
  8798.        4DOS couldn't find a second matching quote (` or ") on the
  8799.        command line.
  8800.  
  8801.   No file handle available
  8802.  
  8803.        This is an internal 4DOS disk swapping error.  Change to another
  8804.        swapping method if possible, and contact J.P. Software.
  8805.  
  8806.   No high memory available, environment will be placed in low memory
  8807.  
  8808.        You requested loading the environment in an XMS UMB via the
  8809.        /E:nnnU option in SHELL or 4DSHELL, but no UMB was available.
  8810.        Check your XMS driver.
  8811.  
  8812.  
  8813.  
  8814.  
  8815.  
  8816.   4DOS Reference Manual         Copyright 1990, J.P. Software          142 
  8817.  
  8818.  
  8819.   No high memory available, resident portion will remain in low memory
  8820.  
  8821.        You requested relocation of the 4DOS resident portion to an XMS
  8822.        UMB via the /U option in SHELL or 4DSHELL, but no UMB was
  8823.        available.  Free some memory or check your XMS driver.
  8824.  
  8825.   Non-DOS disk
  8826.  
  8827.        MS-DOS can't read the disk.  Either the disk is bad, or it has
  8828.        been formatted by a different operating system.  Reformat it as
  8829.        an MS-DOS disk.
  8830.  
  8831.   Not an alias
  8832.  
  8833.        The specified argument is not in the 4DOS alias list.
  8834.  
  8835.   Not an EXE file
  8836.  
  8837.        4DOS88.EXE and/or 4DOS286.EXE is not recognized as an EXE file.
  8838.        Reload the file from your distribution disk.
  8839.  
  8840.   Not in environment
  8841.  
  8842.        The specified argument is not in the environment.
  8843.  
  8844.   Not ready
  8845.  
  8846.        The specified device can't be accessed.
  8847.  
  8848.   Not same device
  8849.  
  8850.        This error usually appears in RENAME.  You cannot rename a file
  8851.        to a different disk drive.
  8852.  
  8853.   Out of environment space
  8854.  
  8855.        4DOS has run out of environment space.  Edit the SHELL line in
  8856.        CONFIG.SYS file to increase the environment size.  Change the /E
  8857.        parameter to read:
  8858.  
  8859.             /E:n
  8860.  
  8861.        where n is a number from 256 to 32000), and reboot the machine.
  8862.  
  8863.  
  8864.  
  8865.  
  8866.  
  8867.  
  8868.  
  8869.  
  8870.  
  8871.  
  8872.  
  8873.  
  8874.   4DOS Reference Manual         Copyright 1990, J.P. Software          143 
  8875.  
  8876.  
  8877.   Out of memory
  8878.  
  8879.        MS-DOS or 4DOS had insufficient free memory to execute the last
  8880.        command, or the DOS memory control blocks have been destroyed.
  8881.        If this error occurs in a secondary shell, return to the primary
  8882.        shell before running the command.  Otherwise, try to free some
  8883.        memory by removing memory-resident programs.  If the error
  8884.        persists, reboot the system.
  8885.  
  8886.   Out of paper
  8887.  
  8888.        MS-DOS detected an out-of-paper condition on one of the parallel
  8889.        printers (LPT1, LPT2, or LPT3).  Check your printer and add paper
  8890.        if necessary.
  8891.  
  8892.   Read error
  8893.  
  8894.        MS-DOS disk read error; usually caused by a bad disk or a non-DOS
  8895.        disk.
  8896.  
  8897.   Sector not found
  8898.  
  8899.        BIOS disk error; usually caused by a bad disk or a non-DOS disk.
  8900.  
  8901.   Seek error
  8902.  
  8903.        MS-DOS can't seek to the proper location on the disk.  This is
  8904.        generally caused by a bad disk or drive.
  8905.  
  8906.   SETLOCAL only valid in batch file
  8907.  
  8908.        The SETLOCAL command can only be used in a batch (.BAT or .BTM)
  8909.        file, not in an alias or from the command line.
  8910.  
  8911.   Swap file [seek | read | write] failed
  8912.  
  8913.        The 4DOS loader (4DOS.COM) encountered an I/O error while
  8914.        accessing the disk swap file (4DOSSWAP.nnn).  Either the disk was
  8915.        changed, or the file or loader's memory area has been destroyed
  8916.        by a program.  Reboot the system.
  8917.  
  8918.   Syntax error
  8919.  
  8920.        A command was entered with the improper format.
  8921.  
  8922.  
  8923.  
  8924.  
  8925.  
  8926.  
  8927.  
  8928.  
  8929.  
  8930.  
  8931.  
  8932.   4DOS Reference Manual         Copyright 1990, J.P. Software          144 
  8933.  
  8934.  
  8935.   Too many open files
  8936.  
  8937.        MS-DOS has run out of file handles.  Try setting FILES=20 or more
  8938.        in the CONFIG.SYS file.
  8939.  
  8940.   Transient memory allocation error
  8941.  
  8942.        4DOS couldn't reserve memory for its transient portion (probably
  8943.        in a SWAPPING OFF command).  The memory control blocks have been
  8944.        destroyed, or a program has fragmented memory.  Reboot the
  8945.        system.
  8946.  
  8947.   Transient memory deallocation error
  8948.  
  8949.        4DOS couldn't release memory for its transient portion (probably
  8950.        in a SWAPPING ON command).  The memory control blocks have been
  8951.        destroyed, or a program has fragmented memory.  Reboot the
  8952.        system.
  8953.  
  8954.   Unknown command
  8955.  
  8956.        A command was entered that 4DOS didn't recognize and couldn't
  8957.        find in the current search path.  Check the spelling or PATH
  8958.        specification.
  8959.  
  8960.   Write error
  8961.  
  8962.        MS-DOS disk error; usually caused by a bad disk or a non-DOS
  8963.        disk.
  8964.  
  8965.   XMS deallocation failed
  8966.  
  8967.        4DOS could not deallocate XMS memory when exiting a secondary
  8968.        shell.  XMS memory has been destroyed; reboot your system.
  8969.  
  8970.   XMS move failed
  8971.  
  8972.        4DOS could not move data between DOS memory and XMS memory while
  8973.        swapping itself.  XMS memory has been destroyed; reboot your
  8974.        system.
  8975.  
  8976.   XMS not available for swapping
  8977.  
  8978.        You requested XMS swapping but no XMS memory is available.
  8979.        Change your swapping method or free some XMS memory.
  8980.  
  8981.  
  8982.  
  8983.  
  8984.  
  8985.  
  8986.  
  8987.  
  8988.  
  8989.  
  8990.   4DOS Reference Manual         Copyright 1990, J.P. Software          145 
  8991.  
  8992.  
  8993.   Appendix B - ASP
  8994.  
  8995.        The authors and publisher of 4DOS are members of the Association
  8996.        of Shareware Professionals (ASP), an organization formed in April
  8997.        1987 to strengthen the future of shareware as an alternative to
  8998.        commercial software.  Its members, all of whom are programmers
  8999.        who subscribe to a code of ethics, are committed to the concept
  9000.        of shareware as a method of marketing.
  9001.  
  9002.        The ASP's Standards for its members and their shareware products
  9003.        are:
  9004.  
  9005.          Programming Standards
  9006.  
  9007.             The program meets the ASP's definition of "shareware" (i.e.,
  9008.             it is not a commercial demo with a major feature disabled,
  9009.             nor a time-limited program).
  9010.  
  9011.             The program has been thoroughly tested by the author and
  9012.             should not be harmful to other files or hardware if used
  9013.             properly.
  9014.  
  9015.          Documentation Standards
  9016.  
  9017.             Sufficient documentation is provided to allow the average
  9018.             user to try all the major functions of the program.
  9019.  
  9020.             Any discussion of the shareware concept and of registration
  9021.             requirements is done in a professional and positive manner.
  9022.  
  9023.          Support Standards
  9024.  
  9025.             The member will respond to people who send registration
  9026.             payments, as promised in the program's documentation.  At a
  9027.             minimum, the member will acknowledge receipt of all
  9028.             payments.
  9029.  
  9030.             The member will establish a procedure for users to report,
  9031.             and have acknowledged, matters such as bug reports, and will
  9032.             describe such means in the documentation accompanying all
  9033.             versions of the programs.  The author will respond to
  9034.             written bug reports from registered users when the user
  9035.             provides a self-addressed, stamped envelope.
  9036.  
  9037.             Known incompatibilities with other software or hardware and
  9038.             major or unusual program limitations are noted in the
  9039.             documentation that comes with the shareware (evaluation)
  9040.             program.
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.  
  9047.  
  9048.   4DOS Reference Manual         Copyright 1990, J.P. Software          146 
  9049.  
  9050.  
  9051.          ASP Ombudsman Information
  9052.  
  9053.             This program is produced by members of the Association of
  9054.             Shareware Professionals (ASP).  ASP wants to make sure that
  9055.             the shareware principle works for you.  If you are unable to
  9056.             resolve a shareware-related problem with an ASP member by
  9057.             contacting the member directly, ASP may be able to help.
  9058.             The ASP ombudsman can help you resolve a dispute or problem
  9059.             with an ASP member, but does not provide technical support
  9060.             for members' products.  Please write to the ASP Ombudsman
  9061.             at:
  9062.  
  9063.                       ASP Ombudsman
  9064.                       P.O. Box 5786
  9065.                       Bellevue, WA  98006
  9066.  
  9067.             or send a Compuserve message via Easyplex electronic mail to
  9068.             the ASP Ombudsman, Compuserve ID number 70475,1071.
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.  
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.   4DOS Reference Manual         Copyright 1990, J.P. Software          147 
  9107.  
  9108.  
  9109.   Appendix C - Key Codes
  9110.  
  9111.        Here are some of the extended key codes used by the INKEY and
  9112.        KEYSTACK commands (see the Command Reference Guide):
  9113.  
  9114.  
  9115.        F1 - @59  Alt-F1 - @104  Ctl-F1 - @94   Shift-F1 - @84
  9116.        F2 - @60  Alt-F2 - @105  Ctl-F2 - @95   Shift-F2 - @85
  9117.        F3 - @61  Alt-F3 - @106  Ctl-F3 - @96   Shift-F3 - @86
  9118.        F4 - @62  Alt-F4 - @107  Ctl-F4 - @97   Shift-F4 - @87
  9119.        F5 - @63  Alt-F5 - @108  Ctl-F5 - @98   Shift-F5 - @88
  9120.        F6 - @64  Alt-F6 - @109  Ctl-F6 - @99   Shift-F6 - @89
  9121.        F7 - @65  Alt-F7 - @110  Ctl-F7 - @100  Shift-F7 - @90
  9122.        F8 - @66  Alt-F8 - @111  Ctl-F8 - @101  Shift-F8 - @91
  9123.        F9 - @67  Alt-F9 - @112  Ctl-F9 - @102  Shift-F9 - @92
  9124.        F10 - @68 Alt-F10 - @113 Ctl-F10- @103  Shift-F10 - @93
  9125.  
  9126.        Home      @71       Up        @72       PgUp @73
  9127.        Left      @75                           Right @77
  9128.        End       @79       Down      @80       PgDn @81
  9129.        Insert    @82       Del       @83
  9130.  
  9131.        Ctl-Home  @119                           Ctl-PgUp  @132
  9132.        Ctl-Left  @115                           Ctl-Right @116
  9133.        Ctl-End   @117                           Ctl-PgDn  @118
  9134.  
  9135.        Alt-A -@30    Alt-N -@49     Alt-1 - @120
  9136.        Alt-B -@48    Alt-O -@24     Alt-2 - @121
  9137.        Alt-C -@46    Alt-P -@25     Alt-3 - @122
  9138.        Alt-D -@32    Alt-Q -@16     Alt-4 - @123
  9139.        Alt-E -@18    Alt-R -@19     Alt-5 - @124
  9140.        Alt-F -@33    Alt-S -@31     Alt-6 - @125
  9141.        Alt-G -@34    Alt-T -@20     Alt-7 - @126
  9142.        Alt-H -@35    Alt-U -@22     Alt-8 - @127
  9143.        Alt-I -@23    Alt-V -@47     Alt-9 - @128
  9144.        Alt-J -@36    Alt-W -@17     Alt-0 - @129
  9145.        Alt-K -@37    Alt-X -@45
  9146.        Alt-L -@38    Alt-Y -@21
  9147.        Alt-M -@50    Alt-Z -@44
  9148.  
  9149.  
  9150.  
  9151.  
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.   4DOS Reference Manual         Copyright 1990, J.P. Software          148 
  9165.  
  9166.  
  9167.   Appendix D - Programming for 4DOS
  9168.  
  9169.        From a batch file, you can test if 4DOS is loaded with the variable
  9170.        function @EVAL (see Environment Variables):
  9171.  
  9172.             if "%@eval[2+2]" == "4" echo 4DOS is loaded!
  9173.  
  9174.        A program can test for the presence of 4DOS by making an INT 2Fh
  9175.        call.  On entry:
  9176.  
  9177.             AX = D44Dh
  9178.             BX = 0
  9179.  
  9180.        If 4DOS is loaded it will return:
  9181.  
  9182.             AX = 44DDh
  9183.             BX = Version number (BL = major version, BH = minor version)
  9184.             CX = 4DOS PSP segment address
  9185.             DL = 4DOS shell number (0 for the root shell, 1 for the
  9186.                  second, etc.).  The shell number is incremented each
  9187.                  time a new copy of 4DOS is loaded, either in a
  9188.                  different multitasker window (for example, DESQview),
  9189.                  or via nested shells.
  9190.  
  9191.        This function is only available in swapping mode.  It tells you
  9192.        if 4DOS is loaded in memory, but not whether it is the parent
  9193.        process of your program.  You can determine if 4DOS is the parent
  9194.        process by comparing the PSP value returned in CX to the PSP
  9195.        chain pointer at offset 16h in your program's PSP.
  9196.  
  9197.        You can put keystrokes into the KEYSTACK driver via the MS-DOS
  9198.        IOCTL call.  First, open the device 4DOSSTAK:
  9199.  
  9200.             MOV   AX,3D01h
  9201.             DS:DX = pointer to the device name "4DOSSTAK"
  9202.             INT   21h
  9203.  
  9204.        The file handle will be returned in AX.  Then send the string to
  9205.        the KEYSTACK device driver:
  9206.  
  9207.             MOV   BX,AX
  9208.             MOV   AX,4403h
  9209.             CX = string length
  9210.             DS:DX = pointer to string
  9211.             INT   21h
  9212.  
  9213.  
  9214.  
  9215.  
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.   4DOS Reference Manual         Copyright 1990, J.P. Software          149 
  9223.  
  9224.  
  9225.   Appendix E - Tips and Troubleshooting
  9226.  
  9227.        This appendix covers general usage notes and troubleshooting
  9228.        information about 4DOS.  It will help you figure out what to do
  9229.        if you're having trouble with 4DOS, or compatibility problems
  9230.        with another software package.
  9231.  
  9232.        What isn't covered here is information on compatibility with
  9233.        specific hardware or individual software packages.   Because this
  9234.        information is subject to change as 4DOS and other programs are
  9235.        modified, we have included it in the file COMPAT.DOC, which is
  9236.        distributed with 4DOS.  This file is updated with every new
  9237.        release to reflect the latest compatibility information.  It
  9238.        should be read in conjunction with this appendix.
  9239.  
  9240.   Installation and Boot
  9241.  
  9242.        Most 4DOS installation problems occur because the instructions in
  9243.        the manual have not been followed correctly.  If you have
  9244.        trouble, re-read the instructions carefully and see if they cover
  9245.        the problem you're having.  If not, try the information below.
  9246.  
  9247.        If you have questions about booting 4DOS on a system attached to
  9248.        a network, see the section in this appendix Using 4DOS on a
  9249.        Network.
  9250.  
  9251.        If you get a message such as "missing command interpreter" or
  9252.        "can't find EXE file", you probably have the 4DOS files in the
  9253.        wrong place.  4DOS is easiest to install when its system files
  9254.        (KEYSTACK.SYS, 4DOS.COM, and 4DOS88.EXE or 4DOS286.EXE) are
  9255.        stored in the root directory of your boot disk.  If they aren't,
  9256.        be sure the SHELL command in CONFIG.SYS has the correct drive and
  9257.        path for 4DOS.COM, and that the /L: switch is set properly.  Also
  9258.        be sure that you are setting COMSPEC properly in AUTOEXEC.BAT, or
  9259.        secondary shells won't load correctly.
  9260.  
  9261.        If the system hangs after 4DOS is loaded (i.e., while processing
  9262.        4START.BAT or AUTOEXEC.BAT), edit AUTOEXEC to remove the program
  9263.        being loaded at the point where the hang occurs, and try again.
  9264.        If problems are inconsistent or persist, edit CONFIG.SYS and
  9265.        AUTOEXEC.BAT to remove all of the device drivers and TSRs that
  9266.        you can reasonably remove and still have the system boot.  Then
  9267.        put them back one at a time until you find out what program or
  9268.        combination of programs is causing the problem.
  9269.  
  9270.        If you have trouble with keyboard device drivers or TSRs
  9271.        (including those that use "hot keys"), try removing KEYSTACK.SYS
  9272.        to see if there is a conflict between it and the other program.
  9273.        If the KEYSTACK command fails to work, try loading it as late as
  9274.        possible in CONFIG.SYS; another device driver may be stealing the
  9275.        keyboard interrupt and failing to pass it along to KEYSTACK.
  9276.  
  9277.  
  9278.  
  9279.  
  9280.   4DOS Reference Manual         Copyright 1990, J.P. Software          150 
  9281.  
  9282.  
  9283.        If you have trouble booting 4DOS, or see garbage characters in
  9284.        your environment immediately after boot, check the length of your
  9285.        SHELL command.  As discussed in Installation, the line may not
  9286.        have more than 33 characters beyond the name of the shell
  9287.        (including trailing spaces), due to a bug in all versions of MS-
  9288.        DOS and PC-DOS.
  9289.  
  9290.   AUTOEXEC and 4START Problems
  9291.  
  9292.        If you follow the instructions in the manual, both of these files
  9293.        should work with no trouble.  Some common problems are:
  9294.  
  9295.          1.  AUTOEXEC.BAT is not executed when the primary shell is
  9296.          started.  This occurs because you did not put a /P in the SHELL
  9297.          command, or the AUTOEXEC.BAT file is not in the root directory
  9298.          of the boot drive.
  9299.  
  9300.          2.  AUTOEXEC.BAT is executed when a secondary shell is started.
  9301.          You've put a call to AUTOEXEC.BAT into 4START, moved the
  9302.          contents of AUTOEXEC.BAT into 4START, or called 4DOS with a /P
  9303.          option on the command line.  4START should only be used for
  9304.          commands to be executed when any shell is started.  Commands
  9305.          for the primary shell should go in AUTOEXEC.BAT.
  9306.  
  9307.          3.  4START is not executed when a secondary shell is started.
  9308.          This is because 4DOS cannot find 4START.   4START must be a
  9309.          .BAT or .BTM file, located in the root directory of the drive
  9310.          COMSPEC points to.
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.  
  9322.  
  9323.  
  9324.  
  9325.  
  9326.  
  9327.  
  9328.  
  9329.  
  9330.  
  9331.  
  9332.  
  9333.  
  9334.  
  9335.  
  9336.  
  9337.  
  9338.   4DOS Reference Manual         Copyright 1990, J.P. Software          151 
  9339.  
  9340.  
  9341.   Booting from a Floppy Disk
  9342.  
  9343.        4DOS will boot properly from a floppy disk, as long as cautions
  9344.        about file locations are observed carefully.
  9345.  
  9346.        4DOS.COM, KEYSTACK.SYS, and 4DOSxx.EXE should be placed in the
  9347.        root directory of the floppy disk, and the SHELL and DEVICE
  9348.        commands should point to them.  If your system has a hard disk,
  9349.        the files can be placed there instead; be sure to set the /L:
  9350.        switch so the 4DOS EXE file can be found.
  9351.  
  9352.        When you boot from a floppy disk, 4DOS sets COMSPEC to point to
  9353.        that disk (e.g. A:\4DOS.COM), regardless of where the 4DOS files
  9354.        are loaded from (it isn't possible for the primary shell to
  9355.        determine where it was loaded from and set COMSPEC accordingly).
  9356.        If you are booting from a floppy disk on a system with a hard
  9357.        disk, and you want secondary shells to load 4DOS from the hard
  9358.        disk, you MUST set the COMSPEC yourself in AUTOEXEC.BAT to point
  9359.        to the hard disk copy of 4DOS.
  9360.  
  9361.        When using a pipe the temporary files created are written to the
  9362.        root directory of the boot drive.  If you are booting from a
  9363.        floppy disk and want pipe temporary files to be written elsewhere
  9364.        (e.g. to a hard disk), set the TMP environment variable to point
  9365.        to the correct path.  See Redirection in Using 4DOS for details
  9366.        on pipes and TMP.
  9367.  
  9368.        The AUTOEXEC and 4START batch files are always loaded from the
  9369.        root directory of the boot drive when starting the primary shell,
  9370.        so they will have to be on the floppy disk.  The 4START file for
  9371.        secondary shells is loaded from the root directory of the drive
  9372.        COMSPEC points to, so if you are using 4START and change COMSPEC
  9373.        be sure to make a copy of 4START on the new drive.
  9374.  
  9375.   Hardware Errors
  9376.  
  9377.        4DOS is compatible with virtually all PC hardware, including a
  9378.        wide variety of systems, memory configurations, disk drives,
  9379.        keyboards, and so on.  While compatibility problems between 4DOS
  9380.        and your hardware could occur, hardware problems which appear to
  9381.        be due to 4DOS are usually found to be due to the hardware
  9382.        itself, or to other software.
  9383.  
  9384.        4DOS performs ALL disk I/O through standard MS-DOS calls.  We
  9385.        have avoided including capabilities which require direct access
  9386.        to the disk , in order to maintain the maximum level of
  9387.        compatibility with your disk hardware.  There are no known
  9388.        incompatibilities between 4DOS and disk drive hardware or
  9389.        partitioning software.  4DOS is compatible with the large (over
  9390.        32 MB) disk volumes created by Compaq DOS 3.31 and MS-DOS / PC-
  9391.        DOS 4.0.
  9392.  
  9393.  
  9394.  
  9395.  
  9396.   4DOS Reference Manual         Copyright 1990, J.P. Software          152 
  9397.  
  9398.  
  9399.        If you find that you are having trouble with a disk drive while
  9400.        running under 4DOS, check carefully to see what the problem is
  9401.        and whether it can be reproduced under COMMAND.COM.  There has
  9402.        never been a documented instance of damage to a directory or FAT
  9403.        due to a problem in 4DOS.  When such problems occur it is
  9404.        understandable that a new part of the operating system is the
  9405.        first thing suspected of causing them, but in the few cases we
  9406.        have heard about the problem has always turned out to be due to
  9407.        hardware problems or errors in applications software.
  9408.  
  9409.   Memory
  9410.  
  9411.        4DOS does its best to detect and properly access all the types of
  9412.        memory your PC can have:  MS-DOS RAM, EMS, XMS, and extended
  9413.        memory.  4DOS' access to these areas is always through standard
  9414.        documented methods.  If you want to know whether 4DOS sees your
  9415.        system's memory accurately, check the output of the MEMORY
  9416.        command.
  9417.  
  9418.        Note that the output of MEMORY will show slightly more free MS-
  9419.        DOS RAM than is shown by CHKDSK and some memory map programs.
  9420.        This is because these programs do not count their own environment
  9421.        space as free space.  When 4DOS is running this space is not
  9422.        occupied by a program's environment, and hence appears to be
  9423.        free.
  9424.  
  9425.        MEMORY's report of free space includes the space occupied by the
  9426.        4DOS transient portion, at the end of MS-DOS memory (this space
  9427.        is freed whenever an application is run).  While 4DOS is running
  9428.        this space is reserved, and is not available to 4DOS itself for
  9429.        use by commands which allocate DOS memory (COPY, DIR, LIST,
  9430.        SELECT, SETLOCAL, and the processing of .BTM files).  If you use
  9431.        one of these features and receive an "out of memory" error when
  9432.        running in  relatively limited (under 90K) memory (e.g., when
  9433.        shelled to 4DOS from an application), the problem may be there is
  9434.        not enough room for both 4DOS itself, and the memory to perform
  9435.        the command, despite what appears to be a reasonable amount of
  9436.        free RAM when looking at the output of MEMORY.
  9437.  
  9438.        4DOS EMS swapping sometimes has difficulty with EMS drivers which
  9439.        do not fully meet the EMS 3.2 specifications (4DOS supports, but
  9440.        does not require, EMS 4.0).  If you have trouble accessing EMS
  9441.        for swapping, check COMPAT.DOC to see if there are any known
  9442.        problems with your EMS board or the associated driver software.
  9443.  
  9444.  
  9445.  
  9446.  
  9447.  
  9448.  
  9449.  
  9450.  
  9451.  
  9452.  
  9453.  
  9454.   4DOS Reference Manual         Copyright 1990, J.P. Software          153 
  9455.  
  9456.  
  9457.   Critical Errors
  9458.  
  9459.        A "critical" error is an error that gives you the "Abort, Retry,
  9460.        Fail" message.  When running 4DOS, this message appears as
  9461.        follows:
  9462.  
  9463.             [Error message]
  9464.             R(etry), I(gnore), F(ail), or A(bort)?
  9465.  
  9466.        The error message on the first line explains the error that has
  9467.        occurred, and the device it occurred on.  The second line prompts
  9468.        for your choice of action (the Fail choice will not be displayed
  9469.        under MS-DOS 2).
  9470.  
  9471.        A critical error usually indicates a hardware malfunction.  The
  9472.        error may be that the device doesn't exist, there is no disk in
  9473.        the drive, the network has gone down, or a data error occurred.
  9474.        In most cases you will choose R to retry the operation, or A to
  9475.        abort the operation.  Choose I(gnore) at your peril: this
  9476.        response will cause 4DOS to proceed as if the error had not
  9477.        occurred!
  9478.  
  9479.        F(ail) will tell 4DOS that the operation it was attempting has
  9480.        failed, which will generally produce another error message.  For
  9481.        example, if you attempt to do a
  9482.        directory on drive A with no disk in the drive, and answer F to
  9483.        the resulting critical error, you will get an additional error
  9484.        message, "Invalid drive A".
  9485.  
  9486.        Many programs install their own critical error handlers.  If you
  9487.        get a critical error message within an application and the second
  9488.        line does not read as shown above, the message probably did not
  9489.        come from 4DOS, and any problem in handling your response
  9490.        properly is due to the application, and not to 4DOS.
  9491.  
  9492.        Choosing A to abort within an application may abort the entire
  9493.        application, and not just the operation being performed,
  9494.        depending on which critical error handler is in use (4DOS' or the
  9495.        applications's), and how the application's critical error handler
  9496.        (if any) is designed.
  9497.  
  9498.  
  9499.  
  9500.  
  9501.  
  9502.  
  9503.  
  9504.  
  9505.  
  9506.  
  9507.  
  9508.  
  9509.  
  9510.  
  9511.  
  9512.   4DOS Reference Manual         Copyright 1990, J.P. Software          154 
  9513.  
  9514.  
  9515.   Video
  9516.  
  9517.        4DOS is compatible with most display adapters and monitors.
  9518.        However as with any software package, you may have to configure
  9519.        4DOS to run properly on your system.
  9520.  
  9521.        4DOS uses two methods of displaying text on the screen:
  9522.  
  9523.          1.  Prompts and normal messages call DOS to write text to the
  9524.          screen.  If you use an ANSI driver, it will process these
  9525.          calls.  Otherwise, DOS will transmit the text to the BIOS (the
  9526.          I/O software which comes on your system or video board) to
  9527.          display it on your screen.  This method for displaying text
  9528.          will work on all MS-DOS systems, regardless of video type.
  9529.  
  9530.          2.  The DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT, and SCRPUT
  9531.          commands bypass MS-DOS, the BIOS, and ANSI, and write text
  9532.          directly to video memory.  These commands will only work on
  9533.          systems with 100% PC-compatible video.  On other systems,
  9534.          results will be unpredictable at best.  If you have such a
  9535.          system, you probably know it already, as most PC applications
  9536.          will have similar problems.
  9537.  
  9538.   Video Cursor
  9539.  
  9540.        The video cursor shape is defined by "start" and "stop" line
  9541.        numbers within a character "cell" (the space occupied by one
  9542.        character on the screen).   Typical cell sizes are 14 lines on a
  9543.        monochrome or EGA system, and 8 lines on a CGA system; other
  9544.        video cards will have varying cell sizes.
  9545.  
  9546.        4DOS reads the cursor shape at boot, and defines that as the
  9547.        default shape.  The shape used by 4DOS can be adjusted with
  9548.        SETDOS /Sb:e, where b is the beginning line and e is the ending
  9549.        line.  To see what values 4DOS is using, run SETDOS with no
  9550.        parameters.  The shape defined in SETDOS is used for the default
  9551.        editing mode (set by SETDOS /M).  The "other" editing mode (e.g.,
  9552.        if overstrike is the default then insert is the other mode) uses
  9553.        a cursor that starts at line 0 and ends on the same line as the
  9554.        default cursor.
  9555.  
  9556.        If you have trouble with the cursor, experiment with the SETDOS
  9557.        /S command until you find a setting that works for your system.
  9558.        Note that you will have to reduce the SETDOS cursor settings if
  9559.        you switch an EGA or VGA to 43-line or 50-line mode.  The cursor
  9560.        lines in 25-line mode use a larger character cell, and lie
  9561.        outside the smaller 43-line or 50-line cell, making the cursor
  9562.        invisible.
  9563.  
  9564.        If you find the cursor has disappeared and the problem is not
  9565.        addressed by SETDOS /S, it is probably due to screen color
  9566.        problems.  The cursor is shown in the color of the underlying
  9567.  
  9568.  
  9569.  
  9570.   4DOS Reference Manual         Copyright 1990, J.P. Software          155 
  9571.  
  9572.  
  9573.        character cell.  If that cell has (for example) the color
  9574.        attributes of black on black, the cursor will be invisible.  If
  9575.        you have an ANSI driver installed, you can test this out easily
  9576.        by clearing the screen to a known color (see CLS in the Command
  9577.        Reference Guide).  The cursor should reappear.  If the problem
  9578.        persists, you will need to determine what is setting your screen
  9579.        attributes to an invisible color.  One common source of this
  9580.        problem is use of an ANSI driver for 43-line or 50-line mode on
  9581.        an EGA/VGA system when the ANSI driver does not support these
  9582.        modes.
  9583.  
  9584.   Screen Length
  9585.  
  9586.        The SETDOS /R command sets the 4DOS screen length.  It will not
  9587.        cause 4DOS to attempt to change the video mode; it is an internal
  9588.        variable used to determine display length for LIST, SELECT, and
  9589.        those commands which have a "pause" option (TYPE /P, DIR /P,
  9590.        etc.).  4DOS normally determines the screen length from the BIOS.
  9591.        If you have a non-standard display and/or have trouble with the
  9592.        default screen length, try correcting it with SETDOS /R.
  9593.  
  9594.        SETDOS /R will NOT affect display scrolling at the command
  9595.        prompt.  This scrolling is handled by ANSI and/or your system
  9596.        BIOS.  If you have an EGA or VGA, and have put the screen in 43-
  9597.        line or 50-line mode, you may find that the display still scrolls
  9598.        at the 25th line.  This is usually because your ANSI driver is
  9599.        not properly supporting the extended screen length; it is not a
  9600.        4DOS problem.
  9601.  
  9602.   ANSI.SYS
  9603.  
  9604.        ANSI.SYS is a device driver, normally installed in your
  9605.        CONFIG.SYS file, which allows control of a variety of screen
  9606.        characteristics via strings of characters sent to the screen.
  9607.        Most versions of MS-DOS include a copy of ANSI.SYS, and there are
  9608.        a number of more powerful versions available as public-domain,
  9609.        shareware, or retail products.
  9610.  
  9611.        The only 4DOS commands requiring ANSI.SYS are CLS and COLOR.  CLS
  9612.        will always clear the screen, but will ignore color
  9613.        specifications if ANSI.SYS is not installed.  COLOR will work
  9614.        ONLY if you have an ANSI driver installed.
  9615.  
  9616.        4DOS normally detects automatically whether an ANSI driver is
  9617.        installed.  If you have ANSI installed and 4DOS doesn't seem to
  9618.        recognize it (e.g., CLS BRIGHT WHITE ON BLUE still leaves the
  9619.        screen in white on black), try SETDOS /A1, which forces 4DOS to
  9620.        use ANSI commands.
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.   4DOS Reference Manual         Copyright 1990, J.P. Software          156 
  9629.  
  9630.  
  9631.   4DOS and COMMAND.COM
  9632.  
  9633.        4DOS is designed to be 99% compatible with the standard MS-DOS
  9634.        command interpreter, COMMAND.COM.  In virtually all cases
  9635.        commands will work identically under 4DOS and COMMAND.COM.
  9636.        However, 4DOS has improved on COMMAND.COM in a number of areas,
  9637.        and on rare occasions these improvements produce a conflict.
  9638.  
  9639.        In some cases 4DOS command output differs from COMMAND.COM in
  9640.        order to provide enhancements.  For example, the default DIR
  9641.        display is in alphabetical order, rather than physical order as
  9642.        in COMMAND.COM.  The filenames are also in lower case, rather
  9643.        than upper case.  With DIR, as in most such cases, command
  9644.        options allow you to specify output that is closer to or exactly
  9645.        the same as COMMAND.COM.
  9646.  
  9647.        COMMAND.COM also contains bugs or quirks which are not part of
  9648.        its documented behavior, and some programmers and users have
  9649.        chosen to rely on these bugs and quirks in writing their batch
  9650.        files and programs.  4DOS does not emulate some of these quirks -
  9651.        in some cases to do so would be wrong; in others it would hinder
  9652.        useful features of 4DOS.
  9653.  
  9654.        The only specific compatibility difference we are aware of
  9655.        between 4DOS and COMMAND.COM that is unrelated to undocumented
  9656.        "features" is in handling batch file variables.  4DOS allows 128
  9657.        batch variables (%0 to %127), and COMMAND.COM only 10 (%0 to %9).
  9658.        COMMAND.COM therefore only considers the first digit after the
  9659.        "%" as part of the variable name.  As a result, a string like
  9660.        "%10A" will be interpreted by 4DOS as "the value of batch
  9661.        variable 10, followed by the character A", and by COMMAND.COM as
  9662.        "the value of batch variable 1, followed by the characters 0A".
  9663.        However, you can force 4DOS to make the same interpretation as
  9664.        COMMAND.COM by using the "%[varname]" feature:  the string
  9665.        "%[1]0A" will be interpreted the same way COMMAND.COM interprets
  9666.        "%10A".
  9667.  
  9668.        Some users have renamed 4DOS.COM to COMMAND.COM.  This will work
  9669.        provided you set COMSPEC properly (see Installation), and may be
  9670.        necessary to deal with programs that ignore COMSPEC and call
  9671.        COMMAND.COM directly.  However, we do NOT recommend this approach
  9672.        under most circumstances.  It will cause the DOS FORMAT /S
  9673.        command to copy 4DOS.COM rather than COMMAND.COM when creating a
  9674.        bootable floppy disk.  Such a disk will not in fact be bootable
  9675.        because the 4DOS EXE file will not be on it, and you may not want
  9676.        it to boot with 4DOS in any case.  It may also lead to confusion
  9677.        when someone else looks at your disk and sees a file called
  9678.        COMMAND.COM that isn't really COMMAND.COM.
  9679.  
  9680.  
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.   4DOS Reference Manual         Copyright 1990, J.P. Software          157 
  9687.  
  9688.   Using 4DOS on a Network
  9689.  
  9690.        4DOS is compatible with most MS-DOS-compatible networks.  This
  9691.        section will give you some tips on using 4DOS properly on a
  9692.        network, and on the locations used for 4DOS files on a network.
  9693.  
  9694.        If you need to boot from a network drive (i.e., on a diskless
  9695.        workstation), you must have the network drive accessible at boot
  9696.        time.  If this condition is satisfied (so 4DOS can find its files
  9697.        on the network drives), the standard options can be used to load
  9698.        4DOS from the network drive.
  9699.  
  9700.        When using 4DOS on a network, you must pay careful attention to
  9701.        where files are stored in order to be sure that two 4DOS users do
  9702.        not attempt to access the same file at the same time.  When
  9703.        swapping to disk (either explicitly with the /S:D option, or
  9704.        implicitly because best guess swapping is used and no EMS or XMS
  9705.        is available), you must be sure that no two users ever use the
  9706.        same directory for their disk swap files, since the filenames
  9707.        (4DOSSWAP.000, .001, etc.) will conflict.  This includes swap
  9708.        files created by shelling to 4DOS from a program, or running
  9709.        secondary shells implicitly (e.g. with a MAKE utility).  Set the
  9710.        swap file location explicitly with the /S option, assigning each
  9711.        user's swap files to a different directory on the network drive.
  9712.  
  9713.        The primary shell's swap file location is controlled by the /S
  9714.        option in CONFIG.SYS.  For instance, the following command will
  9715.        boot 4DOS with best guess swapping and store any disk swap file
  9716.        created in directory F:\USERA:
  9717.  
  9718.             shell=c:\ /s:bf:\usera
  9719.  
  9720.        The swap file location for secondary shells is controlled by the
  9721.        4DSHELL environment variable (see Installation).  Using the above
  9722.        example, the appropriate setting for 4DSHELL would be:
  9723.  
  9724.             set 4dshell=/s:bf:\usera
  9725.  
  9726.        Both SHELL and 4DSHELL must be set properly to ensure that there
  9727.        are no problems with disk swap files on your network.  Note that
  9728.        if you set up the SHELL command and 4DSHELL to force EMS or XMS
  9729.        swapping (/S:E or /S:X), there is no need to set up a separate
  9730.        directory for each user for this purpose as there will be no disk
  9731.        swap files.
  9732.  
  9733.        Pipes are methods of passing information from one program to
  9734.        another, and are invoked with the pipe symbol | on the command
  9735.        line (see I/O Redirection in Using 4DOS).  Pipes work by taking
  9736.        the output from one program, storing it in a temporary file, then
  9737.        telling a second program to obtain its input from that file.  The
  9738.        temporary files, named P.1$$ and P.2$$, are placed by default in
  9739.        the root directory of the boot drive, but can be placed on a
  9740.        different drive and directory by setting the TMP environment
  9741.        variable.
  9742.  
  9743.  
  9744.   4DOS Reference Manual         Copyright 1990, J.P. Software          158 
  9745.  
  9746.  
  9747.        If you choose to set TMP, or if you have a system where multiple
  9748.        users can boot from the same directory, the same cautions given
  9749.        for disk swapping must be followed for pipe temporary files; that
  9750.        is, you must ensure that each user's pipe temporary files go to a
  9751.        separate directory.  For example, for the user in the examples
  9752.        for disk swapping above, the pipe temporary files can be set to
  9753.        go the same directory by placing this command in AUTOEXEC.BAT:
  9754.  
  9755.             set tmp=f:\usera
  9756.  
  9757.   Common Questions and Problems
  9758.  
  9759.        This section covers a variety of problems and questions which
  9760.        come up regularly in technical support calls and messages, and
  9761.        which are not covered by the sections above.  If you have
  9762.        questions about compatibility with a specific software product,
  9763.        refer to COMPAT.DOC.
  9764.  
  9765.        When you find another piece of software that appears to be
  9766.        incompatible with 4DOS, there are several techniques you can try
  9767.        to determine where the problem lies.  Even if these methods are
  9768.        not workable as a permanent solution, they will provide valuable
  9769.        information as to the nature of the problem.
  9770.  
  9771.        Try removing all of the device drivers and TSRs you can from
  9772.        CONFIG.SYS and AUTOEXEC.BAT (including KEYSTACK.SYS), and see if
  9773.        the problem persists.  If it doesn't, put the drivers and TSRs
  9774.        back one at a time until you find the conflict.  Many apparent
  9775.        two-way compatibility problems ("4DOS and package X don't work
  9776.        together") turn out to be three-way interactions between 4DOS,
  9777.        the problem program, and a device driver or TSR.
  9778.  
  9779.        If the program you are having trouble with uses EMS memory and
  9780.        you are using EMS swapping, you can try changing to disk swapping
  9781.        to see if the problem goes away.  The same is true for XMS
  9782.        swapping and programs which use XMS.
  9783.  
  9784.        If you are using the /U option on a system with XMS memory, try
  9785.        removing it to see if the program cannot work when the command
  9786.        processor is loaded high.
  9787.  
  9788.        If the program is not a TSR, try running it under COMMAND.COM.
  9789.        For example, if COMMAND.COM is in C:\:
  9790.  
  9791.             c:\command /c myprog [parameters]
  9792.  
  9793.        If you need to continue to use this method, you can define an
  9794.        alias:
  9795.  
  9796.             alias myprog `c:\command /c myprog %&`
  9797.  
  9798.        If the program is large enough to overwrite the transient portion
  9799.        of COMMAND.COM, you will need to change COMSPEC temporarily to
  9800.  
  9801.  
  9802.   4DOS Reference Manual         Copyright 1990, J.P. Software          159 
  9803.  
  9804.  
  9805.        point to COMMAND.COM, to avoid an error message when exiting the
  9806.        program.
  9807.  
  9808.   Problems with Shelling to DOS
  9809.  
  9810.        Many application programs allow you to "shell to DOS" from inside
  9811.        the program.  If you have trouble shelling to DOS, or running a
  9812.        program which uses an implicit shell (e.g., a hard disk manager
  9813.        which shells to DOS to perform file copies), check your COMSPEC
  9814.        and 4DSHELL settings.  To shell to 4DOS, COMSPEC must point to
  9815.        4DOS.COM, and the 4DOS EXE file must be in the same directory
  9816.        that COMSPEC points to, or if it is not, the /L: switch must be
  9817.        set in 4DSHELL.  (See Installation for more details on COMSPEC
  9818.        and 4DSHELL.)  You can view the settings of these variables with
  9819.        the command SET /P; this is a more reliable approach than looking
  9820.        at AUTOEXEC, since it tells you what the variables are really set
  9821.        to, instead of what you tried to set them to.
  9822.  
  9823.        You can test whether these variables are set up properly by
  9824.        changing to the directory you are in when the problem occurs, and
  9825.        entering %COMSPEC at the prompt.  This will attempt to execute
  9826.        the program COMSPEC points to.  If this works and 4DOS starts,
  9827.        type EXIT to return to the previous shell.  If it fails, correct
  9828.        COMSPEC and/or 4DSHELL.
  9829.  
  9830.        If COMSPEC and 4DSHELL are set correctly and you still cannot
  9831.        shell to DOS, you may have too little memory.  Try running a
  9832.        smaller application which also shells to DOS and verify that it
  9833.        works correctly; if so, see if the problem application can be
  9834.        adjusted to provide more free memory for a DOS shell.
  9835.  
  9836.        Finally, you may have trouble shelling to DOS because the
  9837.        application is trying to shell directly to COMMAND.COM, rather
  9838.        than looking at the COMSPEC setting.  If you have moved
  9839.        COMMAND.COM or changed your PATH since you installed 4DOS, make
  9840.        sure there is a copy of COMMAND.COM accessible to the program and
  9841.        see if it will then shell properly.  You may need to contact the
  9842.        program manufacturer to determine if a particular program shells
  9843.        directly to COMMAND.COM.
  9844.  
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.  
  9851.  
  9852.  
  9853.  
  9854.  
  9855.  
  9856.  
  9857.  
  9858.  
  9859.  
  9860.   4DOS Reference Manual         Copyright 1990, J.P. Software          160 
  9861.  
  9862.  
  9863.   Name Conflicts with 4DOS Commands
  9864.  
  9865.        You may have a program which has the same name as a 4DOS internal
  9866.        command.  Many 4DOS users use Vern Buerg's excellent file viewer,
  9867.        LIST.COM, whose name conflicts with 4DOS' internal LIST command.
  9868.        Such conflicts can be solved in one of two ways.  If you want to
  9869.        disable the 4DOS internal command entirely, use the SETDOS /I-
  9870.        command.  For example:
  9871.  
  9872.             setdos /i-LIST
  9873.  
  9874.        The command can be re-enabled with SETDOS /I+ (see SETDOS in the
  9875.        Command Reference Guide).
  9876.  
  9877.        The other method is to set up an alias to redirect the command to
  9878.        the external program.  For example:
  9879.  
  9880.             alias list c:\util\list.com
  9881.  
  9882.        This also disables the internal command.  However you can then
  9883.        add another alias to invoke the internal command under a
  9884.        different name.  For example:
  9885.  
  9886.             alias show *list
  9887.  
  9888.   Problems with Memory-Resident Programs (TSRs)
  9889.  
  9890.        Most TSRs will work properly with 4DOS.  If you have trouble
  9891.        getting a TSR to pop up, you may need to use the SETDOS /L1
  9892.        command to convince the TSR that it is at the DOS prompt, or
  9893.        because it traps the DOS line input interrupt to do some of its
  9894.        work.
  9895.  
  9896.        If you have trouble getting a TSR to unload, the problem may be
  9897.        due to the method used by the TSR to remove itself from memory.
  9898.        In most cases programs which cannot be unloaded directly can be
  9899.        removed using the MARK and RELEASE utilities available from
  9900.        TurboPower Software.  These programs are part of a package called
  9901.        TSRCOM which also contains many other useful utilities, and is
  9902.        available free on many bulletin boards and on-line services, and
  9903.        is included on the 4DOS Utility Disk available from J.P.
  9904.        Software.
  9905.  
  9906.  
  9907.  
  9908.  
  9909.  
  9910.  
  9911.  
  9912.  
  9913.  
  9914.  
  9915.  
  9916.  
  9917.  
  9918.   4DOS Reference Manual         Copyright 1990, J.P. Software          161 
  9919.  
  9920.  
  9921.   Glossary
  9922.  
  9923.        4DSHELL:  An environment variable which defines the 4DOS switch
  9924.        values for secondary shells.
  9925.  
  9926.        4START:  A batch file which is executed whenever 4DOS is started,
  9927.        either as a primary shell or a secondary shell.
  9928.  
  9929.        Alias:  A shorthand name for a command or series of commands.
  9930.  
  9931.        Alias Argument:  A numeric variable included in an alias
  9932.        definition, allowing a different value to be used in the alias
  9933.        each time it is executed.
  9934.  
  9935.        ANSI.SYS:  A device driver supplied with MS-DOS which provides
  9936.        enhanced screen display and keyboard macros, or one of the many
  9937.        similar programs available free or as shareware or retail
  9938.        products.
  9939.  
  9940.        Append:  Concatenation of one file or string onto the end of
  9941.        another.  (There is also an MS-DOS external command, APPEND,
  9942.        which has an entirely different meaning -- and should be used
  9943.        extreme with caution!)
  9944.  
  9945.        Application:  A program run from the command prompt or a batch
  9946.        file.  The term is used broadly to mean any program other than
  9947.        the command processor; and more narrowly to mean a program with a
  9948.        specific purpose such as a spreadsheet or word processing
  9949.        program, as opposed to a utility.
  9950.  
  9951.        Archive:  A file attribute indicating that the file has been
  9952.        modified since the last backup (presuming that the last backup
  9953.        cleared the archive attribute, as most backup programs do).  Also
  9954.        sometimes used to refer to a single file which contains a number
  9955.        of other files in compressed form.
  9956.  
  9957.        Argument:  A piece of additional information placed after a
  9958.        command or function name.  For example in the command DIR XYZ,
  9959.        XYZ is an argument.  Also used to refer to an alias argument or
  9960.        batch file argument.
  9961.  
  9962.        ASCII:  The American Standard Code for Information Interchange,
  9963.        which defines numeric values for 128 different characters
  9964.        comprising the English alphabet, numbers, punctuation, and some
  9965.        control characters.
  9966.  
  9967.        ASCII File:  A file containing ASCII text, as opposed to a binary
  9968.        file which may contain codes, numbers, or other information that
  9969.        cannot be sensibly interpreted as text.
  9970.  
  9971.  
  9972.  
  9973.  
  9974.  
  9975.  
  9976.   4DOS Reference Manual         Copyright 1990, J.P. Software          162 
  9977.  
  9978.  
  9979.        Attribute:  A characteristic of a file which can be set or
  9980.        cleared.  The standard attributes are Read-Only, Hidden, System,
  9981.        and Archive.  The special attributes Volume Label and Directory
  9982.        are also used for files of those types.
  9983.  
  9984.        AUTOEXEC.BAT:  A batch file which is AUTOmatically EXECuted when
  9985.        the computer is started.
  9986.  
  9987.        BAT File:  Same as a Batch File.
  9988.  
  9989.        Batch File:  A text file containing a sequence of MS-DOS or 4DOS
  9990.        commands.  Batch files are used to save command sequences so that
  9991.        they can be re-executed at any time, transferred to another
  9992.        system, etc.
  9993.  
  9994.        Batch File Argument:  A numeric variable used within a batch
  9995.        file, allowing a different value to be used at that spot in the
  9996.        file each time it is executed.
  9997.  
  9998.        Binary File:  A file containing information which does not
  9999.        represent or cannot sensibly be interpreted as text.  See also
  10000.        ASCII File.
  10001.  
  10002.        Block Device:  A physical device for input or output which can
  10003.        transmit or receive large blocks of data while the computer is
  10004.        engaged in other activities.  Examples include disk, tape, and
  10005.        CD-ROM drives, and many networks.
  10006.  
  10007.        Boot:  The process of starting the computer and loading MS-DOS
  10008.        and the command processor into memory.
  10009.  
  10010.        Boot Directory:  The current directory at the time the system is
  10011.        booted, almost always the root directory of the boot drive.
  10012.  
  10013.        Boot Drive:  The disk drive that the system is booted from,
  10014.        usually A: (the floppy disk) or C: (the hard disk).
  10015.  
  10016.        Break: A signal sent to a program (including 4DOS) to tell it to
  10017.        halt what it is doing.  The Ctrl-C key  or Ctrl-Break key is used
  10018.        to send this signal.  Some external commands abort when they
  10019.        receive a break signal; others return to a previous screen or
  10020.        menu, or abort the current operation .
  10021.  
  10022.        BTM File:  A special type of batch file which is loaded into
  10023.        memory, dramatically speeding up execution.
  10024.  
  10025.        Buffer:  An area of memory set aside for storage.  Usually refers
  10026.        to disk buffers, used to save information as it is transferred
  10027.        between your program and the disk; or to the keyboard buffer.
  10028.  
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.   4DOS Reference Manual         Copyright 1990, J.P. Software          163 
  10035.  
  10036.  
  10037.        Character Device:  A physical device for input or output which
  10038.        must communicate with your computer one character at a time.
  10039.        Examples include the console, communications ports, and printers.
  10040.  
  10041.        Code Page:  A set of definitions which tells DOS how to get and
  10042.        display date, time, and other information in the format
  10043.        appropriate to a particular country.
  10044.  
  10045.        Command Completion:  A 4DOS feature which allows you to recall a
  10046.        previous command by typing the first few letters of the command,
  10047.        then an up-arrow or down-arrow.
  10048.  
  10049.        Command Echoing:  A feature which displays commands as they are
  10050.        executed.  Echoing can be turned on and off.
  10051.  
  10052.        Command History:  A 4DOS feature which retains commands you have
  10053.        previously executed, so that they can be modified and re-executed
  10054.        later.
  10055.  
  10056.        Command Processor:  A program, such as 4DOS or COMMAND.COM, which
  10057.        interprets commands and executes other programs.  The command
  10058.        processor is the first program loaded when the system is booted.
  10059.  
  10060.        Command Recall:  See Command History.
  10061.  
  10062.        Command Tail:  The portion of a command consisting of all the
  10063.        arguments, i.e. everything but the command name itself.
  10064.  
  10065.        Compound Command:  See Multiple Commands.
  10066.  
  10067.        COMSPEC:  An environment variable which defines where to get the
  10068.        command processor for a secondary shell.
  10069.  
  10070.        Conditional Commands:  A 4DOS feature allowing commands to be
  10071.        executed or skipped depending on the results of a previous
  10072.        command.   See also Exit Code.
  10073.  
  10074.        CONFIG.SYS:  A file which tells MS-DOS what device drivers to
  10075.        install, what command processor to use, and other information
  10076.        about what to do when your system boots.  See your MS-DOS manual
  10077.        for more information.
  10078.  
  10079.        Console:  A term describing the PC keyboard and display,.
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.   4DOS Reference Manual         Copyright 1990, J.P. Software          164 
  10093.  
  10094.  
  10095.        Control Character:  A character which is part of the ASCII code,
  10096.        but does not have a normal text representation, and which can be
  10097.        generated by pressing the Ctrl key along with another key.  For
  10098.        example the control character called "BEL" is generated by
  10099.        pressing Ctrl-G, and will cause the computer to beep if pressed
  10100.        at the MS-DOS prompt.
  10101.  
  10102.        Country Code:  See Code Page.
  10103.  
  10104.        CR:  The ASCII character "carriage return", generated by pressing
  10105.        the "Enter" key on the keyboard, and stored in most ASCII files
  10106.        at the end of each line.
  10107.  
  10108.        Critical Error:  An error, usually related to input, output, or
  10109.        network access, which prevents a program from continuing.  When a
  10110.        critical error occurs a prompt such as "R(etry), I(gnore),
  10111.        F(ail), or A(bort)" is given and you must decide what action to
  10112.        take.
  10113.  
  10114.        Current Directory:  The directory in which all file operations
  10115.        will take place unless otherwise specified.  For example if the
  10116.        current directory is C:\MYFILES then the command "DEL XYZ" will
  10117.        delete the file XYZ in the directory C:\MYFILES, and will not
  10118.        affect other files with the same name which may be in other
  10119.        directories.
  10120.  
  10121.        Description:  A string of up to 40 characters assigned to
  10122.        describe a file with the 4DOS DESCRIBE command.
  10123.  
  10124.        Device:  A physical device for input or output such as the
  10125.        console, a communications port, or a printer.  Sometimes the term
  10126.        "device" alone is used to refer to character devices such as
  10127.        those listed above, and excludes block devices.
  10128.  
  10129.        Device Driver:  A program which allows DOS to communicate with a
  10130.        device, and which is loaded into memory when the system is
  10131.        booted, via a statement in CONFIG.SYS.  Some device drivers are
  10132.        used to manage memory or for other similar internal functions,
  10133.        rather than to communicate with an external device.
  10134.  
  10135.        Directory:  A portion of any disk, identified by a name and a
  10136.        relationship to other directories in a "tree" structure, with the
  10137.        tree starting at the root directory.  A directory separates files
  10138.        on the disk into logical groups, but does not represent a
  10139.        physical division of the data on the disk.
  10140.  
  10141.        Disk Swapping:  A type of swapping where the transient portion of
  10142.        4DOS is stored on disk while an application is running.
  10143.  
  10144.  
  10145.  
  10146.  
  10147.  
  10148.  
  10149.  
  10150.   4DOS Reference Manual         Copyright 1990, J.P. Software          165 
  10151.  
  10152.  
  10153.        DOS Memory:  The portion of your computer's memory available for
  10154.        use by DOS, the command processor, and application programs.  On
  10155.        most PCs this area consists of the first 640K bytes of the
  10156.        computer's memory (one K is 1024 bytes).
  10157.  
  10158.        Echo:  See Command Echoing.
  10159.  
  10160.        EMS Memory:  Memory which conforms to the Lotus - Intel -
  10161.        Microsoft Expanded Memory Specification (LIM EMS).  This
  10162.        hardware/software standard allows programs to access large
  10163.        amounts of memory outside of standard DOS memory or extended
  10164.        memory.  Most systems which have EMS memory have either a
  10165.        specific EMS board (on any PC or compatible system), EMS
  10166.        emulation software (on PC-AT compatible systems), or a 386
  10167.        control program such as QEMM or 386MAX (on 386 systems).  If you
  10168.        do not have one of these items, you probably do not have EMS
  10169.        memory.
  10170.  
  10171.        EMS Swapping:  A type of swapping where the transient portion of
  10172.        4DOS is stored in EMS memory while an application is running.
  10173.  
  10174.        Environment:  An area of memory which contains multiple entries
  10175.        in the form "NAME=value".  Each entry is called an environment
  10176.        variable, with the name "NAME".  See also master environment and
  10177.        passed environment.
  10178.  
  10179.        Environment Variable:  The name of a single entry in the
  10180.        environment.  Environment variables are entered with the SET
  10181.        command, and used to associate the specified value with the
  10182.        specified name for any purpose desired by the user.  Typically,
  10183.        their function is to set default switches for a program, specify
  10184.        a directory path where files can be found, and so on.  When 4DOS
  10185.        encounters an environment variable name in a command in the form
  10186.        "%NAME" (or "%NAME%"), it substitutes the corresponding value in
  10187.        its place.
  10188.  
  10189.        Errorlevel:  A numeric value returned from an external command to
  10190.        indicate its result (e.g. success, failure, response to a
  10191.        question), and accessible via the IF ERRORLEVEL command and the
  10192.        %? environment variable.  The value is between 0 and 255, plus
  10193.        256 if the program was interrupted by a break, 512 if it aborted
  10194.        due to a critical error, or 768 if it remained resident in memory
  10195.        as a TSR.  See also Exit Code.
  10196.  
  10197.        Escape Character:  This term has two meanings.  In some contexts
  10198.        it means the 4DOS escape character, normally Ctrl-X, which is
  10199.        used to suppress the normal meaning of or give special meaning to
  10200.        the following character.  In other cases it refers to the
  10201.        specific ASCII character ESC.  The meaning must be determined
  10202.        from the context.
  10203.  
  10204.  
  10205.  
  10206.  
  10207.  
  10208.   4DOS Reference Manual         Copyright 1990, J.P. Software          166 
  10209.  
  10210.  
  10211.        Executable Extensions:  A 4DOS feature which allows you to
  10212.        specify the application to be executed when a file with a
  10213.        particular extension is named at the command prompt.
  10214.  
  10215.        Executable File:  A file with the extension .COM or .EXE, which
  10216.        can be loaded into memory and run as a program.
  10217.  
  10218.        Exit Code:  The error level returned by an external command, or a
  10219.        similar exit code returned by a 4DOS internal command.  4DOS
  10220.        internal commands return an exit code of 0 if successful, or non-
  10221.        zero if unsuccessful.
  10222.  
  10223.        Expansion:  The process 4DOS goes through when it scans a command
  10224.        line and substitutes the appropriate actual values for aliases,
  10225.        alias arguments, batch file arguments, and environment variables.
  10226.  
  10227.        Extended ASCII Character:  A character which is not part of the
  10228.        standard set of 128 ASCII characters, but is used on the PC as
  10229.        part of an extended set of 256 characters.  These characters
  10230.        include international language symbols, and box and line drawing
  10231.        characters.
  10232.  
  10233.        Extended Memory:  Any memory on a 286-based (PC-AT compatible) or
  10234.        386-based computer system which is above the 1 MB (one megabyte,
  10235.        or 1024*1024 bytes) of memory that DOS can address directly.  Any
  10236.        PC-AT compatible or 386 system with more than 640K of memory has
  10237.        extended memory.  This memory can be used for a variety of
  10238.        purposes depending on the software installed to utilize it.  See
  10239.        also XMS.
  10240.  
  10241.        External Command:  A program which resides in an executable file,
  10242.        as opposed to an internal command which is part of the command
  10243.        processor.  For example, FORMAT and DISKCOPY are external
  10244.        commands; you can find them on your DOS disk under the names
  10245.        FORMAT.COM and DISKCOPY.COM.
  10246.  
  10247.        File Attribute:  See Attribute.
  10248.  
  10249.        File Description:  See Description.
  10250.  
  10251.        Filename Completion:  A 4DOS feature which allows you to type
  10252.        part of a filename on the command line, and have 4DOS fill in the
  10253.        rest for you.
  10254.  
  10255.        Free Memory:  Usually, the amount of DOS memory which is
  10256.        currently unoccupied and available for use by applications.
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.  
  10264.  
  10265.  
  10266.   4DOS Reference Manual         Copyright 1990, J.P. Software          167 
  10267.  
  10268.  
  10269.        Hidden:  A file attribute indicating that the file should not be
  10270.        displayed with a normal DIR command, and should not be available
  10271.        for access by programs unless they specifically request use of
  10272.        hidden files.
  10273.  
  10274.        History:  See Command History.
  10275.  
  10276.        Insert Mode:  When editing text, a mode in which newly typed
  10277.        characters are inserted into the line at the cursor position,
  10278.        rather than overwriting existing characters on the line.  See
  10279.        also overstrike mode.
  10280.  
  10281.        Internal Command:  A command which is part of the command
  10282.        processor, as opposed to an external command.  For example, DIR
  10283.        and COPY are internal commands.
  10284.  
  10285.        Keyboard Buffer:  A buffer which holds keystrokes you have typed
  10286.        that have not yet been used by the currently executing program.
  10287.  
  10288.        Label:  A marker in a batch file which allows GOTO or GOSUB
  10289.        commands elsewhere in the batch file to "jump" to the command on
  10290.        the line following the label.  See also Volume Label.
  10291.  
  10292.        LF:  The ASCII character "line feed", not usually generated from
  10293.        the keyboard, but stored in most ASCII files at the end of each
  10294.        line after the CR character.
  10295.  
  10296.        Master Environment:  The master copy of the environment
  10297.        maintained by the command processor.  The master environment is
  10298.        manipulated with the SET and UNSET commands.  The size of the
  10299.        master environment is set by the /E: command line switch.
  10300.  
  10301.        Memory Resident Mode:  A method of installing 4DOS where swapping
  10302.        is disabled, and all of 4DOS remains permanently resident in
  10303.        memory.  Memory-resident mode requires much more memory than the
  10304.        normal swapping mode.
  10305.  
  10306.        Multiple Commands:  A 4DOS feature which allows multiple commands
  10307.        to be placed on a line, separated by a caret (^) or other user-
  10308.        defined character.
  10309.  
  10310.        Multitasking:  A capability of some software (and the related
  10311.        hardware) which allows two or more programs to run apparently
  10312.        simultaneously on the same computer.  Multitasking software for
  10313.        PC compatible systems includes programs like DESQview.
  10314.  
  10315.        Option:  See Switch.
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.   4DOS Reference Manual         Copyright 1990, J.P. Software          168 
  10325.  
  10326.  
  10327.        Overstrike Mode:  When editing text, a mode in which newly typed
  10328.        characters overwrite existing characters on the line, rather than
  10329.        being inserted into the line at the cursor position.  See also
  10330.        Insert Mode.
  10331.  
  10332.        Parameter:  See Argument.
  10333.  
  10334.        Parsing:  The process 4DOS performs when it analyzes the command
  10335.        line, performs alias and environment variable expansion, and
  10336.        finds the appropriate internal command or external command to
  10337.        execute.
  10338.  
  10339.        Passed Environment:  A copy of the master environment created
  10340.        before running an application, so that any changes made by the
  10341.        application will not affect the master environment.  The size of
  10342.        the passed environment is determined by the amount of space
  10343.        actually used in the master environment when the application is
  10344.        started.
  10345.  
  10346.        Path:  A specification of the directories a file resides in,
  10347.        including all parent directories.  For example, the path for
  10348.        C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Also used to
  10349.        refer to the environment variable PATH, which contains a series
  10350.        of path specifications used when searching for external commands
  10351.        and batch files.
  10352.  
  10353.        Pipe:  A method for collecting the standard output of one program
  10354.        and passing it on as the standard input of the next program to be
  10355.        executed, signified by a vertical bar "|" on the command line.
  10356.        See also Redirection.
  10357.  
  10358.        Primary Shell:  The copy of the command processor which is loaded
  10359.        when the system boots.
  10360.  
  10361.        RAM Disk:  A pseudo "disk drive", created by software, which
  10362.        appears like a normal physical disk drive to programs.  RAM disks
  10363.        can be stored in extended memory, XMS memory, EMS memory, or DOS
  10364.        memory, and provide a convenient way for programs to use this
  10365.        memory for temporary files.
  10366.  
  10367.        Read-Only:  A file attribute indicating that the file can be
  10368.        read, but not written by MS-DOS and 4DOS.
  10369.  
  10370.        Reboot:  The process of restarting the computer, usually by
  10371.        pressing the Ctrl, Alt, and Del keys simultaneously.
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.  
  10382.   4DOS Reference Manual         Copyright 1990, J.P. Software          169 
  10383.  
  10384.  
  10385.        Redirection:  A method for collecting the standard output of a
  10386.        program in a file, and/or of providing the standard input for a
  10387.        program from a file, signified respectively by a greater than
  10388.        symbol ">" or less than symbol "<" on the command line.  See also
  10389.        Pipe.
  10390.  
  10391.        Replaceable Parameter:  See Alias Argument and Batch File
  10392.        Argument.
  10393.  
  10394.        Resident Portion:  The small portion of 4DOS stored permanently
  10395.        in memory when swapping mode is in use, as opposed to the larger
  10396.        transient portion.  The resident portion is stored as close as
  10397.        possible to the beginning of DOS memory.
  10398.  
  10399.        Root Directory:  The first directory, from which all other
  10400.        directories are "descended."  The root directory is referenced
  10401.        with a single backslash (\).  When a disk is first formatted, it
  10402.        is the only directory.
  10403.  
  10404.        Secondary Shell:  Any copy of any command processor which is
  10405.        loaded after the system boots.  Secondary shells may be started
  10406.        from the command line; by executing a "shell to DOS" operation
  10407.        from within an application; implicitly by executing some MS-DOS-
  10408.        related functions within certain applications; or by starting a
  10409.        new partition in a multi-tasking or task switching system.
  10410.  
  10411.        Shell:  A command processor.  Also used to refer to a program
  10412.        which gives access to MS-DOS functions and commands through a
  10413.        menu- or mouse-driven system.
  10414.  
  10415.        Source:  In the 4DOS file commands (COPY, MOVE, and RENAME), the
  10416.        original files before any copying or modification has taken
  10417.        place, i.e. those specified earlier on the command line.  See
  10418.        also Target.
  10419.  
  10420.        Stack:  An area of memory used by any program to store temporary
  10421.        data while the program is running; more generally, any such
  10422.        storage area where the last item stored is normally the first one
  10423.        removed.
  10424.  
  10425.        Standard Error:  A file or character device where error messages
  10426.        from a program are displayed.  Standard error output always goes
  10427.        to the console, unless redirection is used.
  10428.  
  10429.        Standard Input:  A file or character device where a program
  10430.        obtains its normal input.  Standard input always comes from the
  10431.        console, unless redirection is used.
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.   4DOS Reference Manual         Copyright 1990, J.P. Software          170 
  10441.  
  10442.  
  10443.        Standard Output:  A file or character device where normal output
  10444.        from a program is displayed.  Standard output always goes to the
  10445.        console, unless redirection is used.
  10446.  
  10447.        Subdirectory:  Any directory other than the root directory.  See
  10448.        also Root Directory.
  10449.  
  10450.        Swap File:  A disk file created by 4DOS to store its transient
  10451.        portion when disk swapping is in use.
  10452.  
  10453.        Swapping:  A 4DOS feature which removes the larger transient
  10454.        portion of 4DOS from DOS memory while an application is running,
  10455.        leaving the maximum possible amount of memory for the
  10456.        application, yet allowing 4DOS to retain information such as the
  10457.        command history after the application is finished.  See also XMS
  10458.        Swapping, EMS Swapping, and Disk Swapping.
  10459.  
  10460.        Switch:  An argument to an internal command or application which
  10461.        specifies a particular behavior or setting.  For example, the
  10462.        command "DIR /P" might be referred to as "having the /P switch
  10463.        set".  Also, a configuration value for 4DOS specified on the
  10464.        SHELL= line in CONFIG.SYS, or in 4DSHELL.
  10465.  
  10466.        System:  A file attribute indicating that the file belongs to MS-
  10467.        DOS and should not be accessed by normal programs.
  10468.  
  10469.        Target:  In the 4DOS file commands (COPY, MOVE, and RENAME), the
  10470.        final files after any copying or modification has taken place;
  10471.        generally those referred to by the last specification on the
  10472.        command line.  See also Source.
  10473.  
  10474.        Transient Portion:  The larger portion of 4DOS stored in memory
  10475.        temporarily when swapping mode is in use, as opposed to the
  10476.        smaller resident portion.  The transient portion is stored as
  10477.        close as possible to the end of DOS memory, and is removed from
  10478.        memory whenever an application is executed.
  10479.  
  10480.        TSR:  A Terminate and Stay Resident program, i.e. a program which
  10481.        "terminates" but remains resident in DOS memory, to provide
  10482.        capabilities such as network support, a pop-up notepad or
  10483.        telephone dialer, a disk cache, or mouse support.
  10484.  
  10485.        UMB:  An XMS Upper Memory Block, whose address is above the end
  10486.        of normal DOS memory, but is within the 1 megabyte of memory that
  10487.        DOS can address directly.
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.   4DOS Reference Manual         Copyright 1990, J.P. Software          171 
  10499.  
  10500.  
  10501.        Variable:  See Alias Argument, Batch File Argument, and
  10502.        Environment Variable.
  10503.  
  10504.        Volume Label:  A special, hidden file placed on any disk whose
  10505.        name constitutes a "label" for the entire disk.
  10506.  
  10507.        White Space Character:  Generally, a character used to separate
  10508.        arguments on the command line.  The white space characters
  10509.        recognized by 4DOS are the space, tab, comma, semicolon, and
  10510.        equals sign.
  10511.  
  10512.        Wildcard:  A character ("*" or "?") used in a filename to specify
  10513.        the possibility that any single character ("?") or sequence of
  10514.        characters ("*") can occur at that point in the actual name.
  10515.  
  10516.        XMS Memory:  A software method for accessing extended memory on
  10517.        286 and 386 systems (and some systems which support version 4.0
  10518.        of the EMS memory specification).  XMS memory is not additional
  10519.        memory, but is a software specification only.  Its use generally
  10520.        requires Microsoft's HIMEM.SYS be installed as a device driver,
  10521.        or that another program such as 386MAX or MOVE-EM be used.
  10522.  
  10523.        XMS Swapping:  A type of swapping where the transient portion of
  10524.        4DOS is stored in XMS memory while an application is running.
  10525.  
  10526.  
  10527.  
  10528.  
  10529.  
  10530.  
  10531.  
  10532.  
  10533.  
  10534.  
  10535.  
  10536.  
  10537.  
  10538.  
  10539.  
  10540.  
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.   4DOS Reference Manual         Copyright 1990, J.P. Software          172 
  10557.  
  10558.  
  10559.   Index
  10560.  
  10561.       4DOS                                 Cancel batch job   34
  10562.          Features  1                       CD   57
  10563.          Memory Usage  18                  CDD   58
  10564.          Startup Options  21               CHCP   59
  10565.          Swapping mode  22                 CHDIR   57
  10566.        4DOS.COM  9                         CLS   60
  10567.        4DOS.DOC  10                        CMDLINE   3, 41
  10568.        4DOS286.EXE  9                      Code page   59
  10569.        4DOS88.EXE  9                       COLOR   61
  10570.        4DOSSTAK  149                       Colors   60, 114
  10571.        4DSHELL  15, 25, 160                Command
  10572.        4START  25, 27, 119, 151              Completion   29
  10573.                                              Echoing   32
  10574.        ? 48                                  History and Recall   29
  10575.                                              Line   3
  10576.        ALIAS   35, 49                        Line arguments   32
  10577.        Alias                                 Line editing   28
  10578.          Expansion   35                      Parsing   45
  10579.          List   130                          Processor   80
  10580.          List size   21, 99                  Reference Guide   46
  10581.          Parameters   36                     Separator   30, 119
  10582.        Aliases   3, 10, 35, 37, 78,          Syntax   47
  10583.        130                                 COMMAND.COM   26, 157
  10584.        AND   30                            Comment   110
  10585.        ANSI   60, 61, 119, 156             COMPAT.DOC   10
  10586.        Append   62                         Compatibility   10
  10587.        Archive attribute  52, 62           COMPOUND   30, 119
  10588.        Argument quoting 32                 COMSPEC   15, 160
  10589.        ASP 146                             Conditional commands  3, 30
  10590.        Association of Shareware            Conditional execution   88, 91
  10591.          Professionals 146                 CONFIG.SYS   14, 19
  10592.        ATTRIB   52, 89                     Configuration   17
  10593.        Attribute   52                      Console   64
  10594.        AUTOEXEC.BAT   14, 25, 27, 151      COPY   62
  10595.        Automatic Installation   13         Country code   65
  10596.                                            Create subdirectories   98
  10597.        Batch                               Critical errors   154
  10598.          File nesting   55                 CTTY   64
  10599.          File echoing   76                 Current directory   57, 107, 109
  10600.          File parameters   123             Cursor   113, 121, 155
  10601.          File processing   56                    File variables   34               DATE   65
  10602.          Files   33                        DEL   66
  10603.          Processor   7                     DELAY   67
  10604.          Variables   157                   DESCRIBE   68
  10605.        BEEP   53                           DESCRIPT.ION   68
  10606.        Box   73                            DIR   69
  10607.        BREAK   54                          Directory stack   72, 107
  10608.                                            DIRS   72
  10609.        CALL   55                           Disk swapping   22
  10610.        CANCEL   56, 108                    Disk write verification   133
  10611.  
  10612.  
  10613.  
  10614.   4DOS Reference Manual         Copyright 1990, J.P. Software          173 
  10615.  
  10616.  
  10617.        DOS Shells   14                     EXTENDED   89
  10618.        DOS.HLP   10                        Extended key codes   148
  10619.        DOSMEM   89                         Extended memory   99
  10620.        DRAWBOX   73                        External command   102
  10621.        DRAWHLINE   74
  10622.        DRAWVLINE   75                      F1   28, 95
  10623.                                            F8, F9 & F10   28, 30
  10624.        ECHO   32, 76                       File descriptions   2, 68
  10625.        Edit   78                           File attributes   52
  10626.        EGA   156                           Filename completion   30
  10627.        ELSE[IFF]   91                      Floppy disk   152
  10628.        EMS   18, 89                        FOR   81
  10629.          Swapping   23, 153                FREE   82
  10630.        ENDIFF   91                         Frequency   53
  10631.        ENDLOCAL   77, 122
  10632.        ENDTEXT   126                       GE   88
  10633.        Environment   2, 131                GLOBAL   83
  10634.          Size   2, 21                      GOSUB   84, 112
  10635.          Space   99                        GOTO   85
  10636.          Variables   2, 40, 78, 92,        GT   88
  10637.                      93, 117, 122
  10638.             @ext   42                      Hardware errors   152
  10639.             @full   42                     HELP   10, 11, 86
  10640.             @length[string]   42           Hidden attribute   52, 79
  10641.             @name   42                     HISTORY  87, 119
  10642.             @path   42                     History list   29, 87
  10643.             @search   42                   History size   22
  10644.             @substr   42                   Horizontal line  74
  10645.             _BG   41
  10646.             _CPU   41                      I/O Redirection   43
  10647.             _CWD   41                      IF   88
  10648.             _CWDS   41                     IFF   91
  10649.             _CWP   41                      INKEY   92, 148
  10650.             _CWPS   41                     INPUT   93
  10651.             _DATE   41                     INSTALL   13
  10652.             _DISK   41                     INSTALL.BAT   9
  10653.             _DOSVER   41                   Installation   9, 150
  10654.             _FG   41                       INTERNAL   120
  10655.             _SHELL   41                    ISALIAS   89
  10656.             _TIME   41                     ISDIR  89
  10657.        EQ   88
  10658.        ERASE   66                          Key Codes   148
  10659.        Error messages   136                KEYSTACK   10, 11, 39, 94,
  10660.        ERRORLEVEL   30, 41, 89                        148, 149
  10661.        ESCAPE   31, 119
  10662.        Escape character   31, 119          Label   85, 134
  10663.        ESET   78                           Language support   59
  10664.        EXCEPT   79                         LE   88
  10665.        Executable extensions   37          LINE   120
  10666.        EXIST   89                          Line editing mode  120
  10667.        EXIT   80                           LIST   95
  10668.        Exit code   30                      LOG   97
  10669.        Expanded memory   99                LT   88
  10670.  
  10671.  
  10672.   4DOS Reference Manual         Copyright 1990, J.P. Software          174 
  10673.  
  10674.  
  10675.        Manual Installation   17            SCREEN   113
  10676.        MARK   161                          Screen length   156
  10677.        MD   98                             SCRPUT   114
  10678.        MEMORY   99, 153                    SELECT   115
  10679.        Memory resident mode   18,23        SET   40, 117
  10680.        Memory-resident programs   161      SETDOS   29, 30, 31, 32, 43,
  10681.        MKDIR   98                                   76,  87, 110, 119,
  10682.        MODE   120                                   155, 156, 161
  10683.        MONITOR   89                        SETLOCAL   77, 122
  10684.        MOVE   100                          SHAPE   121
  10685.        Multiple arguments   4              Shell   14, 19, 21
  10686.        Multiple commands   2, 30           Shelling to DOS   160
  10687.                                            SHIFT   34, 123
  10688.        Name conflicts   161                Standard
  10689.        NE   88                               Error   43
  10690.        Network   3, 158                      Input   43, 64, 125, 135
  10691.        NOCLOBBER   43, 120                   Output   43, 64, 125, 135
  10692.                                            Starting 4DOS   27
  10693.        OR   30                             Stopwatch   128
  10694.        OS/2 DOS box   1, 20                Subdirectory   98, 109
  10695.                                            Subroutine   84, 112
  10696.        Parent directory   109              SWAPPING   124
  10697.        PATH   41, 98, 102                  Swapping mode   18
  10698.        PAUSE   103                         System attribute   52
  10699.        Pipes   44, 125,158
  10700.        PKUNZIP   10, 11                    TEE   125
  10701.        POPD   104                          TEXT 1  26
  10702.        Primary shell   14                  THEN   91
  10703.        Programming for 4DOS   149          TIME   127
  10704.        PROMPT   105                        TIMER   128
  10705.        PUSHD   107                         Tips   150
  10706.                                            TMP   41, 44, 159
  10707.        Quick Start   12                    Transient portion   18, 124
  10708.        QUIT   108                          Troubleshooting   150
  10709.        Quotes   32                         TSR   161
  10710.                                            TSRCOM   161
  10711.        RAM   99                            TYPE   129
  10712.        RD   109
  10713.        Read-only attribute   52            UMB   23
  10714.        README.DOC   10                     UNALIAS   35, 50, 130
  10715.        Redirection   3, 120                UNSET   131
  10716.        RELEASE   161                       UPPER   121
  10717.        REM   110                           Using 4DOS   27
  10718.        REN   111
  10719.        RENAME   111                        Variable functions   42
  10720.        Replaceable parameters   36         Variables   131
  10721.        Resident portion   18               VER   132
  10722.        RETURN   84, 112                    VERBOSE   32, 76, 110, 121
  10723.        RMDIR   109                         VERIFY   63, 133
  10724.        Root directory   98, 109            Version number   132
  10725.        Root shell   14                     Vertical line   75
  10726.        ROWS   120                          VGA   156
  10727.  
  10728.  
  10729.  
  10730.   4DOS Reference Manual         Copyright 1990, J.P. Software          175 
  10731.  
  10732.  
  10733.        VIDEO   90, 155
  10734.        Video cursor   155
  10735.        VOL   134
  10736.        Volume label   134
  10737.  
  10738.        Wildcards   2
  10739.  
  10740.        XMS   18, 90
  10741.          Memory   99
  10742.          Swapping   23
  10743.          Upper Memory Block   23
  10744.  
  10745.        Y   135
  10746.  
  10747.  
  10748.  
  10749.  
  10750.  
  10751.  
  10752.  
  10753.  
  10754.  
  10755.  
  10756.  
  10757.  
  10758.  
  10759.  
  10760.  
  10761.  
  10762.  
  10763.  
  10764.  
  10765.  
  10766.  
  10767.  
  10768.  
  10769.  
  10770.  
  10771.  
  10772.  
  10773.  
  10774.  
  10775.  
  10776.  
  10777.  
  10778.  
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.  
  10788.   4DOS Reference Manual         Copyright 1990, J.P. Software          176 
  10789.  
  10790.