home *** CD-ROM | disk | FTP | other *** search
/ Computer Installation Guide - Dragon Clan Series / CD2.iso / DISK / NU8 / NDOS.DOC < prev    next >
Encoding:
Text File  |  1995-05-15  |  797.7 KB  |  20,431 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.           N       NN    DDDDDDD        OOOOO        SSSSSS
  9.           NN      NN    DDDDDDDD      OOOOOOO      SSSSSSSS
  10.           NNN     NN    DD     DD    OO     OO    SS
  11.           NN N    NN    DD     DD    OO     OO    SS
  12.           NN  N   NN    DD     DD    OO     OO     SSSSSS
  13.           NN   N  NN    DD     DD    OO     OO      SSSSSS
  14.           NN    N NN    DD     DD    OO     OO           SS
  15.           NN     NNN    DD     DD    OO     OO           SS
  16.           NN      NN    DDDDDDDD      OOOOOOO     SSSSSSSS
  17.           NN      NN    DDDDDDD        OOOOO       SSSSSS
  18.  
  19.  
  20.     The software described in this document is furnished under a
  21.     license agreement and may be used only in accordance with the
  22.     terms of the agreement.
  23.  
  24.     Copyright 1991 - 1993 Symantec Corporation.
  25.  
  26.     All Rights Reserved.
  27.  
  28.     NDOS is distributed under license from its developer, JP
  29.     Software, Inc., Arlington, MA, U.S.A. Portions copyright 1988-
  30.     1993 JP Software, Inc. All Rights Reserved.
  31.  
  32.     No part of this publication may be copied without the express
  33.     written permission of Symantec Corporation, Peter Norton
  34.     Group, 10201 Torre Avenue, Cupertino, CA  95014.
  35.  
  36.     Norton Utilities, Norton Disk Doctor, UnErase, and Symantec
  37.     are registered trademarks; and Calibrate, Disk Monitor, Disk
  38.     Tools, Diskreet, Image, Norton Backup, Norton Cache, SmartCan,
  39.     Speed Disk, WipeDisk, WipeFile, and Wipe Information are
  40.     trademarks of Symantec Corporation.
  41.  
  42.     Windows is a trademark of Microsoft Corporation. Other product
  43.     names mentioned in this manual may be trademarks or registered
  44.     trademarks of their respective companies and are hereby
  45.     acknowledged.
  46.  
  47.     For technical support see the Customer Service Plan in the
  48.     back of the "Norton Utilities User's Guide."
  49.  
  50.                                                            CONTENTS
  51. ___________________________________________________________________
  52.  
  53.  
  54. CONTENTS
  55.  
  56.  
  57. Introduction...............................................1
  58.      How to Use This Manual................................1
  59.  
  60. Chapter 1, NDOS Features...................................5
  61.  
  62. Chapter 2, Installation....................................9
  63.      Uninstalling NDOS....................................10
  64.  
  65. Chapter 3, A Guided Tour of NDOS..........................12
  66.      Starting The Tour....................................12
  67.      Basic Commands.......................................13
  68.      Command Line Editing and History.....................17
  69.      More About Files.....................................20
  70.      Directory Navigation.................................25
  71.      Aliases..............................................26
  72.      Other Commands.......................................29
  73.      Batch Programming....................................31
  74.      Conclusion...........................................33
  75.  
  76. Chapter 4, General Concepts...............................34
  77.      DOS and the Command Interpreter......................34
  78.           Primary and Secondary Shells....................35
  79.           AUTOEXEC.BAT, NSTART, and NEXIT.................36
  80.      Command Processing...................................36
  81.      Files and Paths......................................38
  82.      The Environment......................................41
  83.      Memory...............................................42
  84.      ASCII and Key Codes..................................43
  85.      The Keyboard.........................................44
  86.      Video................................................45
  87.      ANSI Drivers.........................................45
  88.  
  89. Chapter 5, Using NDOS.....................................47
  90.      At the Command Line..................................47
  91.           Command Line Editing............................48
  92.           Command History and Recall......................49
  93.           Command History Window..........................51
  94.           Filename Completion.............................52
  95.           Multiple Commands...............................54
  96.           Automatic Directory Changes.....................54
  97.           Temporarily Disabling Aliases...................55
  98.           Command Line Help...............................55
  99.           Command Line Length Limits......................58
  100.      Input and Output.....................................58
  101.  
  102. ___________________________________________________________________
  103. NDOS Reference Manual                                            i
  104.  
  105.                                                            CONTENTS
  106. ___________________________________________________________________
  107.  
  108.           Redirection.....................................59
  109.           Piping..........................................60
  110.           Keystack........................................61
  111.      File Processing......................................63
  112.           Extended Parent Directory Names.................64
  113.           Multiple Filenames..............................66
  114.           Include Lists...................................67
  115.           Executable Extensions...........................68
  116.      The Environment......................................70
  117.           NDOS Configuration Variables....................72
  118.           NDOS Internal Variables.........................73
  119.           NDOS Variable Functions.........................77
  120.      Advanced Features....................................83
  121.           Conditional Commands............................83
  122.           Command Grouping................................84
  123.           Escape Character................................86
  124.           Argument Quoting................................86
  125.      Aliases..............................................88
  126.      Batch Files..........................................91
  127.           .BAT Files and .BTM Files.......................91
  128.           Echoing.........................................91
  129.           Batch File Variables............................92
  130.           Batch File Commands.............................93
  131.           Interrupting a Batch File.......................95
  132.           Batch File Tips.................................95
  133.  
  134. Chapter 6, Options and Tuning............................100
  135.      Configuration Files.................................100
  136.      Setting up CONFIG.SYS...............................101
  137.           Startup Options for Secondary Shells...........104
  138.      Using AUTOEXEC.BAT..................................105
  139.      Using NSTART and NEXIT..............................107
  140.      Using the NDOS.INI File.............................108
  141.           Types of Directives............................112
  142.           Initialization Directives......................114
  143.           Configuration Directives.......................117
  144.           Color Directives...............................121
  145.           Key Mapping Directives.........................121
  146.           Advanced Directives............................126
  147.  
  148. Chapter 7, Using NDOS with Your Hardware and Software....130
  149.      Hardware............................................130
  150.           The CPU........................................130
  151.           Memory.........................................131
  152.           Video..........................................133
  153.           Hard Drives and Floppy Disks...................135
  154.           Laptop and Notebook Computers..................136
  155.           Critical Errors................................138
  156.      Software............................................139
  157.  
  158.  
  159. ___________________________________________________________________
  160. NDOS Reference Manual                                           ii
  161.  
  162.                                                            CONTENTS
  163. ___________________________________________________________________
  164.  
  165.           NDOS and DOS...................................140
  166.           Using NDOS with Task Switchers and Multitaskers140
  167.           Multitasking and Disk Swapping.................142
  168.           NDOS and Microsoft Windows.....................143
  169.           NDOS and DESQview..............................144
  170.           Using NDOS on a Network........................146
  171.      Solving Software Compatibility Problems.............147
  172.  
  173. Chapter 8, Command Reference Guide.......................153
  174.      NDOS Commands.......................................153
  175.      How to Use the Command Descriptions.................155
  176.      ?...................................................158
  177.      ALIAS...............................................159
  178.      ATTRIB..............................................168
  179.      BEEP................................................170
  180.      BREAK...............................................172
  181.      CALL................................................173
  182.      CANCEL..............................................174
  183.      CD/CHDIR............................................175
  184.      CDD.................................................177
  185.      CHCP................................................179
  186.      CLS.................................................180
  187.      COLOR...............................................182
  188.      COPY................................................183
  189.      CTTY................................................188
  190.      DATE................................................189
  191.      DEL/ERASE...........................................190
  192.      DELAY...............................................192
  193.      DESCRIBE............................................193
  194.      DIR.................................................195
  195.      DIRS................................................202
  196.      DRAWBOX.............................................203
  197.      DRAWHLINE...........................................205
  198.      DRAWVLINE...........................................206
  199.      ECHO................................................207
  200.      ECHOS...............................................209
  201.      ENDLOCAL............................................210
  202.      ESET................................................211
  203.      EXCEPT..............................................212
  204.      EXIT................................................214
  205.      FOR.................................................215
  206.      FREE................................................219
  207.      GLOBAL..............................................220
  208.      GOSUB...............................................222
  209.      GOTO................................................224
  210.      HISTORY.............................................225
  211.      IF..................................................227
  212.      IFF.................................................233
  213.      INKEY...............................................235
  214.      INPUT...............................................238
  215.  
  216. ___________________________________________________________________
  217. NDOS Reference Manual                                         iii
  218.  
  219.                                                            CONTENTS
  220. ___________________________________________________________________
  221.  
  222.      KEYSTACK............................................239
  223.      LH/LOADHIGH.........................................243
  224.      LIST................................................245
  225.      LOADBTM.............................................247
  226.      LOG.................................................249
  227.      MD/MKDIR............................................251
  228.      MEMORY..............................................252
  229.      MOVE................................................253
  230.      NDOSHELP............................................256
  231.      PATH................................................257
  232.      PAUSE...............................................259
  233.      POPD................................................260
  234.      PROMPT..............................................261
  235.      PUSHD...............................................264
  236.      QUIT................................................266
  237.      RD/RMDIR............................................267
  238.      REBOOT..............................................268
  239.      REM.................................................269
  240.      REN/RENAME..........................................270
  241.      RETURN..............................................272
  242.      SCREEN..............................................273
  243.      SCRPUT..............................................274
  244.      SELECT..............................................275
  245.      SET.................................................280
  246.      SETDOS..............................................283
  247.      SETLOCAL............................................287
  248.      SHIFT...............................................288
  249.      SWAPPING............................................289
  250.      TEE.................................................290
  251.      TEXT................................................291
  252.      TIME................................................292
  253.      TIMER...............................................293
  254.      TRUENAME............................................295
  255.      TYPE................................................296
  256.      UNALIAS.............................................297
  257.      UNSET...............................................298
  258.      VER.................................................299
  259.      VERIFY..............................................300
  260.      VOL.................................................301
  261.      VSCRPUT.............................................302
  262.      Y...................................................303
  263.  
  264. Appendix A, NDOS Error Messages..........................304
  265.  
  266. Appendix B, ASCII and Key Codes..........................315
  267.      ASCII...............................................315
  268.      Keys and Key Codes..................................316
  269.  
  270. Appendix C, Technical Information........................322
  271.      Detecting NDOS......................................322
  272.  
  273. ___________________________________________________________________
  274. NDOS Reference Manual                                           iv
  275.  
  276.  
  277. ___________________________________________________________________
  278.  
  279.      Placing Keystrokes Into the Keystack................323
  280.      Writing Installable Commands........................324
  281.      Using DESCRIPT.ION..................................325
  282.      Interrupt 2E........................................326
  283.  
  284. Glossary.................................................329
  285.  
  286. Index....................................................340
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330. ___________________________________________________________________
  331. NDOS Reference Manual                                            v
  332.  
  333.  
  334. ___________________________________________________________________
  335.  
  336.  
  337.  
  338.  
  339.  
  340. INTRODUCTION
  341.  
  342.  
  343. Welcome, and thanks for purchasing The Norton Utilities!
  344.  
  345. We started developing NDOS when we realized that our computers
  346. could be a lot more powerful and a lot more helpful than they were.
  347. Whether you are a computer novice or an experienced power user, we
  348. think that NDOS will help you get the most out of your IBM PC or
  349. compatible computer.
  350.  
  351. Technically, NDOS is a command interpreter or "DOS Shell."  That
  352. means that it reacts to the commands you type at the C> prompt.
  353. We've designed NDOS so that you don't have to change your computing
  354. habits or unlearn anything to use it.  If you know how to display a
  355. directory, copy a file, or start an application program, you
  356. already know how to use NDOS.  NDOS understands all of the commands
  357. you know and adds to them.  Its purpose is to make DOS friendlier,
  358. easier to use, and much more powerful and versatile, without
  359. requiring you to use or learn a new program, a new set of commands,
  360. or a new style of work.
  361.  
  362. Once you have NDOS installed, you can learn its new features at
  363. your own pace.  It has more than 40 new commands and scores of
  364. enhanced features, but you don't have to learn them all at once.
  365. Press the F1 key whenever you need help.  NDOS will soon become an
  366. essential part of your computer, and you'll wonder how you ever got
  367. along without it.
  368.  
  369. We are constantly working to improve NDOS.  If you have suggestions
  370. for features or commands that you think we should include in the
  371. next version, or any other way we could improve our product, please
  372. let us know.  Many of the improvements in this version of NDOS were
  373. suggested by our users, and while we can't promise to include every
  374. suggested feature, we really do appreciate and pay attention to
  375. your comments.
  376.  
  377.  
  378. How to Use This Manual
  379.  
  380.     Use this manual as an introduction and tutorial to NDOS for
  381.     novice users and as a reference manual for advanced NDOS
  382.     users.
  383.  
  384.     You can use almost every feature of NDOS without having to
  385.     worry about other features or commands.
  386.  
  387. ___________________________________________________________________
  388. NDOS Reference Manual                                            1
  389.  
  390.                                              How to Use This Manual
  391. ___________________________________________________________________
  392.  
  393.     As you read the manual, the symbol ## may appear next to
  394.     certain paragraphs.  This indicates a more in-depth discussion
  395.     or a more advanced topic.  Come back to this topic later for
  396.     more details, or if you're having trouble with the particular
  397.     issue it discusses.  In many cases, the remainder of the
  398.     section you're reading after such a symbol is devoted to
  399.     similar advanced information.  If you see the ## next to a
  400.     section heading, it means the entire section contains such
  401.     information.
  402.  
  403.     You may find the information in such marked sections useful
  404.     even if you're relatively new to computers or to NDOS.
  405.     However, you can skip the marked section and still understand
  406.     and use the basic topic of the section you're reading.
  407.  
  408.     An exclamation point [!] to the left of a paragraph means that
  409.     paragraph contains a caution or warning you may need to
  410.     observe when using the feature it discusses.
  411.  
  412.     This manual is divided into eight chapters and three
  413.     appendices, plus a glossary and index.  Here's a brief
  414.     overview of each:
  415.  
  416.     Chapter 1, NDOS Features
  417.  
  418.          We begin with a short summary of some NDOS features to
  419.          give you a taste of what NDOS is about.  Start here if
  420.          you are new to NDOS.
  421.  
  422.     Chapter 2, Installation
  423.  
  424.          Everyone should read this short chapter.  After installing
  425.          the Norton Utilities, configuring your computer to use
  426.          NDOS is simple.
  427.  
  428.     Chapter 3, A Guided Tour of NDOS
  429.  
  430.          This chapter will take you on a short, interactive tour
  431.          of some powerful NDOS features.  By the time you finish
  432.          the tour, you will have a good idea of what NDOS will do
  433.          for you.  If you are new to NDOS, be sure to take the
  434.          tour.
  435.  
  436.     Chapter 4, General Concepts
  437.  
  438.          This reference chapter is an introduction to several
  439.          terms and concepts that we use throughout the manual.  If
  440.          you're a novice, you might want to browse through the
  441.          entire chapter.  If you're a power user and all of the
  442.          topics in this chapter seem simple, then go on to the
  443.  
  444. ___________________________________________________________________
  445. NDOS Reference Manual                                            2
  446.  
  447.                                              How to Use This Manual
  448. ___________________________________________________________________
  449.  
  450.          next chapter.  If you think you need to brush up a bit on
  451.          the basics of a couple of terms and ideas, you'll
  452.          probably find them here.
  453.  
  454.     Chapter 5, Using NDOS
  455.  
  456.          This chapter is for everyone.  It contains a description
  457.          of NDOS features and lots of examples to help you learn
  458.          to use each one.  Even if you are a novice user and want
  459.          to ignore some of these features until later, skim
  460.          through this chapter to get an idea of what is available
  461.          and where to find the information that you will
  462.          eventually want.  NDOS offers both features which are not
  463.          related to specific commands, and a complete set of over
  464.          80 internal commands.  This chapter has complete
  465.          reference information on all of the non-command features,
  466.          and introduces a few commands as well.  Reference
  467.          information on NDOS commands is in Chapter 8.
  468.  
  469.     Chapter 6, Options and Tuning
  470.  
  471.          This chapter is for advanced users who want to be sure
  472.          that NDOS is running at top efficiency on their systems.
  473.          It includes detailed information on setting up NDOS and
  474.          on changing your NDOS configuration.
  475.  
  476.     Chapter 7, Using NDOS With Your Hardware and Software
  477.  
  478.          This chapter contains tips on using NDOS with many
  479.          popular kinds of PC hardware and software, and
  480.          information that will be useful if you think NDOS may
  481.          conflict with your hardware or other software.
  482.  
  483.     Chapter 8, NDOS Command Reference
  484.  
  485.          NDOS knows over 80 internal commands.  This chapter
  486.          explains the purpose of each command and tells you how to
  487.          use it.  It has examples that will help you learn each
  488.          command and the technical details you will need to get
  489.          the command to behave exactly as you wish.
  490.  
  491.     Appendices
  492.  
  493.          We've included some helpful tables here, and some
  494.          information for those who like to know technical details.
  495.          There are three appendices.
  496.  
  497.          Appendix A lists all NDOS error messages.  Look here if
  498.          you need an explanation of an error message, or if you
  499.          aren't sure if the message came from NDOS.
  500.  
  501. ___________________________________________________________________
  502. NDOS Reference Manual                                            3
  503.  
  504.                                              How to Use This Manual
  505. ___________________________________________________________________
  506.  
  507.          Appendix B lists codes for the keys on your keyboard.
  508.          These codes can be useful with certain NDOS commands.
  509.  
  510.          Appendix C covers technical information and programming
  511.          interfaces.  You shouldn't need to use it unless you are
  512.          an advanced user or a programmer writing add-on software
  513.          for NDOS.
  514.  
  515.     Glossary
  516.  
  517.          If you need help with any of the terminology in this
  518.          manual, look here.
  519.  
  520.     Index
  521.  
  522.          If you can't find the information you need, this should
  523.          help you find it.
  524.  
  525.     Additional Files
  526.  
  527.          Files distributed with the Norton Utilities cover
  528.          important additional information beyond what's included in
  529.          this manual.  READ.ME contains general notes and
  530.          last-minute updates.  WHATS.NEW contains an overview of
  531.          the new features in this release of the Norton Utilities.
  532.          APPNOTES.DOC contains application notes for a variety of
  533.          other software packages to help you use those packages to
  534.          best advantage with NDOS.  You should browse through
  535.          APPNOTES.DOC and look for references to any software you
  536.          use.
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556. ___________________________________________________________________
  557. NDOS Reference Manual                                            4
  558.  
  559.                                           CHAPTER 1, NDOS FEATURES
  560. ___________________________________________________________________
  561.  
  562.  
  563. CHAPTER 1, NDOS FEATURES
  564.  
  565.  
  566. NDOS is a complete computing environment that works with all
  567. versions of MS-DOS and PC-DOS from 2.0 to 6; with DR-DOS 3.4, 5.0,
  568. and above.  It is compatible with virtually all application
  569. programs, with Microsoft Windows, and with task switching programs
  570. like DESQview and Back & Forth.
  571.  
  572. NDOS replaces the traditional DOS user interface with a more
  573. modern, friendlier, and more powerful one.  NDOS is completely
  574. compatible with traditional DOS commands, and adds dozens of new
  575. features that aren't available with any version of DOS.
  576.  
  577.  
  578.     Minimal Memory Usage
  579.  
  580.     NDOS can take advantage of extended memory, expanded memory,
  581.     and memory managers for 80286, 386, and 486 systems.  If you
  582.     load both NDOS and the environment "high," NDOS will use only
  583.     448 bytes of base memory, less than any version of the
  584.     traditional DOS command processor, COMMAND.COM (see page
  585.     117).
  586.  
  587.  
  588.     Online Help
  589.  
  590.     NDOS has complete, full-screen, context-sensitive help for all
  591.     of its commands and all DOS utilities.  The F1 key pops up the
  592.     help system at any time from the NDOS prompt.  The help system
  593.     is cross-referenced and includes examples (see page 55).
  594.  
  595.  
  596.     Directory Navigation
  597.  
  598.     You can specify where to look for subdirectories with the NDOS
  599.     enhanced CD command.  CDD lets you switch drives and
  600.     directories simultaneously, and the new automatic directory
  601.     change feature changes directories for you when you type a
  602.     directory name at the command line.
  603.  
  604.  
  605.     Faster and Better Batch Files
  606.  
  607.     NDOS speeds up traditional DOS batch files, and introduces a
  608.     new kind of batch file processing that is five to ten times
  609.     faster than traditional batch files as well (see page 91).
  610.  
  611.  
  612.  
  613. ___________________________________________________________________
  614. NDOS Reference Manual                                            5
  615.  
  616.                                           CHAPTER 1, NDOS FEATURES
  617. ___________________________________________________________________
  618.  
  619.     In addition, NDOS has more than two dozen new batch file
  620.     commands, and many other enhancements that will make your
  621.     batch files easier to write and far more powerful.
  622.  
  623.  
  624.     Command Line Enhancements
  625.  
  626.     NDOS replaces the traditional command line with a much
  627.     friendlier and more powerful command line environment.  Among
  628.     the features which NDOS offers are:
  629.  
  630.          Command Line Editing:  You can use the cursor keys to
  631.          make corrections, in the same way that you would with a
  632.          text editor (see page 48).
  633.  
  634.          Command History and Recall:  NDOS keeps track of each
  635.          command you type.  You can recall any command and issue
  636.          it again, or edit it to create a slightly different
  637.          command.   Commands can be recalled one at a time, or you
  638.          can pop up a window of recently entered commands and
  639.          choose the one you want (see page 49).
  640.  
  641.          Automatic Filename Expansion:  If you type part of a
  642.          filename, with or without wildcards, NDOS will fill in
  643.          the complete filename for you at the touch of a key
  644.          (see page 52).
  645.  
  646.          Multiple Commands on a Single Line:  You can type a
  647.          series of commands on a single line instead of waiting
  648.          for each one to finish before you issue the next one
  649.          (see page 54).
  650.  
  651.          Multiple Filenames:  Most NDOS commands can operate on
  652.          multiple files at once.  For example, you can copy
  653.          several files at once from your hard drive to drive A:
  654.          with a command like:
  655.  
  656.               copy *.wks *.dat *.txt  a:\
  657.  
  658.          Point-and-Shoot File Selection:  The SELECT command lets
  659.          you choose files with the cursor keys instead of
  660.          remembering their names.  It gives you a full "point-and-
  661.          shoot" environment for other NDOS commands (see page
  662.          275).
  663.  
  664.  
  665.     Aliases
  666.  
  667.     An alias is a command you create, assigned to a name you
  668.     select or to a key combination of your choosing.  You can use
  669.  
  670. ___________________________________________________________________
  671. NDOS Reference Manual                                            6
  672.  
  673.                                           CHAPTER 1, NDOS FEATURES
  674. ___________________________________________________________________
  675.  
  676.     aliases to rename commands, to set command defaults, and to
  677.     create new commands that are a combination of other commands.
  678.     When aliases are combined with the NDOS multiple command
  679.     feature, they act like very fast batch files (see pages 88
  680.     and 159).
  681.  
  682.  
  683.     File Descriptions
  684.  
  685.     NDOS lets you assign a description (up to 40 characters long)
  686.     to each of your files and directories.  The descriptions are
  687.     displayed with the DIR and SELECT commands, and move with
  688.     their files when you use a COPY, DEL, MOVE, or RENAME command
  689.     (see page 193).
  690.  
  691.  
  692.     Executable Extensions
  693.  
  694.     Executable extensions let you associate a file extension with
  695.     the program that processes files of that type.  For example,
  696.     you could associate .BAS files with the BASIC interpreter, or
  697.     .DBF files with dBASE or Foxbase.  NDOS runs the appropriate
  698.     program automatically whenever you type the name of a file
  699.     that has an extension you have defined as executable (see
  700.     page 68).
  701.  
  702.  
  703.     Compatibility
  704.  
  705.     You can use NDOS:
  706.  
  707.          *  with all monochrome, CGA, EGA, and VGA video systems,
  708.             with any number of screen rows and columns.
  709.  
  710.          *  with DOS-compatible networks, including Novell Netware,
  711.             Microsoft LAN Manager, Banyan Vines, and Artisoft
  712.             LANTastic.
  713.  
  714.          *  with all popular memory managers and task switchers.
  715.  
  716.          *  with virtually all commercial applications, utility
  717.             programs, and memory-resident utilities (TSRs).
  718.  
  719.  
  720.     New Commands and Options
  721.  
  722.     NDOS includes over 80 commands.  A few are the same as
  723.     traditional commands.  Many are compatible with traditional
  724.     commands but are enhanced with several additional options.
  725.     The majority are unique to NDOS.  If you have always wished
  726.  
  727. ___________________________________________________________________
  728. NDOS Reference Manual                                            7
  729.  
  730.                                           CHAPTER 1, NDOS FEATURES
  731. ___________________________________________________________________
  732.  
  733.     that DOS had a command to help in a special situation, you
  734.     will probably find that command in NDOS.  A complete list of
  735.     NDOS commands and options, along with explanations of how to
  736.     use them, begins on page 153.
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784. ___________________________________________________________________
  785. NDOS Reference Manual                                            8
  786.  
  787.                                                     Installing NDOS
  788. ___________________________________________________________________
  789.  
  790.  
  791. CHAPTER 2, INSTALLATION
  792.  
  793.  
  794. Before you install NDOS (or any other software, for that matter),
  795. you should make a bootable system floppy disk so you can recover
  796. in case of a power failure or other interruption during the
  797. installation process.  Put a blank floppy disk in drive A:, then
  798. type:
  799.  
  800.          format a: /s
  801.  
  802. Once the process is complete, test your bootable floppy disk by
  803. leaving it in drive A: and simultaneously pressing the Ctrl, Alt,
  804. and Del keys to make sure your system boots properly.  After
  805. that, put the floppy disk away in a safe place and reboot your
  806. computer normally.
  807.  
  808. To install NDOS while installing the Norton Utilities:
  809.  
  810. 1 Follow the instructions in the "Norton Utilities User's Guide,"
  811.   Chapter 1, "Installation." When you reach Step 6 of "To install
  812.   Norton Utilities," select Custom Installation.
  813.  
  814.   A screen appears where you can choose a directory to install
  815.   Norton Utilities.
  816.  
  817. 2 Select a directory to install Norton Utilities.
  818.  
  819. 3 Continue to follow the installation instructions in Chapter 1
  820.   until you come to the section, "To select which Norton Utilities
  821.   programs to install," then select NDOS from the programs list on
  822.   this screen.
  823.  
  824.   NDOS installs using the defaults when Norton Utilities installs.
  825.  
  826. To install NDOS after installing Norton Utilities:
  827.  
  828. 1 At the DOS prompt, type NUCONFIG.
  829.  
  830.   The Norton Utilities Configuration dialog box appears.
  831.  
  832. 2 Select Startup Programs from the dialog box.
  833.  
  834. 3 Select NDOS from the Startup Programs list box.
  835.  
  836. 4 Select the Configure command button or double-click NDOS.
  837.  
  838.   The NDOS configuration dialog box appears. From this dialog box
  839.   you can install NDOS as well as configure many NDOS options.
  840.  
  841.  
  842. ___________________________________________________________________
  843. NDOS Reference Manual                                            9
  844.  
  845.                                                   Uninstalling NDOS
  846. ___________________________________________________________________
  847.  
  848. 5 Check the Load Command Processor Into Upper Memory check box and
  849.   select OK.
  850.  
  851. 6 Select OK from the Startup Programs dialog box.
  852.  
  853. 7 Select Quit from the Norton Utilities Configuration dialog box.
  854.  
  855.   A message pops up suggesting that you reboot to activate NDOS
  856.   immediately.
  857.  
  858. 8 Select reboot.
  859.  
  860.  
  861. ##  Uninstalling NDOS
  862.  
  863.     In the extremely unlikely event that you have trouble booting
  864.     your computer after you install NDOS, you can also remove it
  865.     quite easily.  We don't expect you to have any trouble, but we
  866.     know some people feel more comfortable knowing how to
  867.     uninstall a product as well as install it.  Or, you may need
  868.     to remove NDOS from one system if you are moving it to another
  869.     system.
  870.  
  871.     To temporarily remove NDOS from your system, first note the
  872.     location of COMMAND.COM on your disk (for example, in the root
  873.     directory, or the DOS directory).  Boot the system and use any
  874.     text editor to edit your CONFIG.SYS file (before modifying
  875.     CONFIG.SYS be sure you have a bootable floppy disk as
  876.     discussed above).  Look for a line that begins:
  877.  
  878.          SHELL=D:\PATH\NDOS.COM ...
  879.  
  880.     ("d:\path" means a drive letter and directory name).  Insert
  881.     the characters "REM " at the beginning of this line.  This
  882.     converts it into "remarks" or comments.  (If you are using DOS
  883.     3, REMarks are not recognized in CONFIG.SYS, so the changed
  884.     lines will produce a harmless "Unrecognized command" error
  885.     when the system boots.)  Next, add a new line like this:
  886.  
  887.          SHELL=D:\PATH\COMMAND.COM /P
  888.  
  889.     where "d:\path" is the proper drive and directory for
  890.     COMMAND.COM.  If you were previously running COMMAND.COM with
  891.     a /E:nnnn switch to set the size of your environment, you can
  892.     add it to this line as well.
  893.  
  894.     After CONFIG.SYS has been modified, edit your AUTOEXEC.BAT
  895.     file to remove any changes made to accommodate NDOS.  Look for
  896.     two commands:
  897.  
  898.  
  899. ___________________________________________________________________
  900. NDOS Reference Manual                                           10
  901.  
  902.                                                   Uninstalling NDOS
  903. ___________________________________________________________________
  904.  
  905.          SET COMSPEC=D:\PATH\NDOS.COM
  906.          D:\PATH\KSTACK.COM
  907.  
  908.     The first command will not be present on most systems.  If
  909.     it's there, change it to read:
  910.  
  911.          SET COMSPEC=D:\PATH\COMMAND.COM
  912.  
  913.     where "d:\path" is replaced by the correct drive and directory
  914.     for COMMAND.COM.  The second command can be deleted, or you
  915.     can place "REM " in front of it to convert it to a comment.
  916.     The second command may be present without the "d:\path"
  917.     portion or the ".COM" portion; the key thing to look for is
  918.     "KSTACK".  If you wish, you can look for the PATH command, and
  919.     remove the NDOS directory from the directories listed there.
  920.     However, there's probably no reason to do so unless you're
  921.     permanently removing NDOS from your system.
  922.  
  923.     Now reboot your system, and you should be back up and running
  924.     under COMMAND.COM.  Correct the problem that gave you trouble
  925.     with NDOS (contact our technical support department if you
  926.     need help).  Once the problem is fixed, edit your CONFIG.SYS
  927.     file again to remove the REMs on your NDOS lines and put one
  928.     on your COMMAND.COM line instead, restore any COMSPEC command
  929.     in AUTOEXEC.BAT, and you can boot with NDOS again.
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956. ___________________________________________________________________
  957. NDOS Reference Manual                                           11
  958.  
  959.                                                   Starting The Tour
  960. ___________________________________________________________________
  961.  
  962.  
  963. CHAPTER 3, A GUIDED TOUR OF NDOS
  964.  
  965.  
  966. This chapter acquaints you with some of the features of NDOS.  It
  967. isn't a substitute for the rest of the manual, but it helps you
  968. become familiar with NDOS if you are used to working at the command
  969. prompt.  At the same time, it introduces you to many popular
  970. features and enhancements of NDOS.  By the time you finish working
  971. through this chapter, you will have a feeling for how easy and
  972. friendly NDOS is compared to the standard DOS command processor.
  973.  
  974. This tour is designed to be used interactively.  Sit down at your
  975. computer with the manual.  Each time an example is shown, try it.
  976. Each section of the tour is self-contained so you can skip any
  977. sections you wish and return to them later.
  978.  
  979. If you come across terms or concepts in this chapter that you are
  980. unsure about, refer to Chapter 4, "General Concepts," the Glossary
  981. on page 329, or the Index.
  982.  
  983.  
  984. Starting The Tour
  985.  
  986.     Before you can start the tour, you need to install NDOS.  If
  987.     you haven't done so yet, see page 9 for instructions.  If you
  988.     have already done a full installation and NDOS is running on
  989.     your system, just skip the step below that starts NDOS (the
  990.     step where the command "NDOS" is entered).
  991.  
  992.     During the course of the tour, we'll ask you to enter several
  993.     commands.  The text that you should enter is always shown in
  994.     lower case, but you can type in either upper or lower case.
  995.  
  996.     The computer's prompts and responses are displayed in normal
  997.     type.  The display may look slightly different on your system,
  998.     depending on how your prompt is set up, what disk drive you're
  999.     using, and what files are in your NDOS directory.  These minor
  1000.     differences don't affect NDOS operation.
  1001.  
  1002.     In some cases, the computer's output will be too long to fit
  1003.     on a line of this manual and remain readable.  We've truncated
  1004.     those lines and placed three dots [...] at the end to show you
  1005.     that the line displayed on your screen will be longer.  Some
  1006.     commands create more lines of output than we need to display
  1007.     here to show how they work.  We've put a set of vertical dots
  1008.     in those locations to indicate that additional information
  1009.     will be shown on your screen.
  1010.  
  1011.  
  1012.  
  1013. ___________________________________________________________________
  1014. NDOS Reference Manual                                           12
  1015.  
  1016.                                                      Basic Commands
  1017. ___________________________________________________________________
  1018.  
  1019.     To prepare for the tour, make sure that NDOS is running. If
  1020.     you installed NDOS when you installed Norton Utilities or from
  1021.     Norton Utilities Configuration, then it's already running as
  1022.     your primary shell as specified in your CONFIG.SYS file (you
  1023.     can also start it in your AUTOEXEC.BAT file). Otherwise, you
  1024.     can run it by changing to the directory where NDOS was
  1025.     installed (if NU is not in your PATH statement you can change
  1026.     to C:\NU), then start NDOS by typing:
  1027.  
  1028.          C:\NU> ndos
  1029.  
  1030.     You'll see a sign-on message from NDOS that looks similar to
  1031.     this:
  1032.  
  1033.          NDOS EMS swapping initialized (25K)
  1034.          NDOS 7.0   DOS 5.0
  1035.          Copyright 1988-1993  Symantec Inc.  ...
  1036.          Registered for use on a single computer.
  1037.  
  1038.     and then a prompt like this:
  1039.  
  1040.          c:\nu>
  1041.  
  1042.     Depending on how your prompt was previously defined, you may
  1043.     see the NDOS prompt in lower case, which many people find
  1044.     easier to read.  A lower case prompt is the NDOS default, and
  1045.     we'll show the prompt that way throughout the tour.  Once you
  1046.     have NDOS installed you can use the PROMPT command (see page
  1047.     261) to change the prompt to upper case if you prefer.
  1048.  
  1049.     If you want to exit from NDOS, you can only do so if it wasn't
  1050.     installed as your shell in your CONFIG.SYS file or with the
  1051.     '/P' switch. To exit, type the command EXIT at the NDOS prompt
  1052.     and press Enter.  This will return you to the traditional DOS
  1053.     command line:
  1054.  
  1055.          c:\nu> exit
  1056.          C:\NU>
  1057.  
  1058.  
  1059. Basic Commands
  1060.  
  1061.     We'll begin the tour by demonstrating some of the most common,
  1062.     and most familiar, NDOS commands.  We'll also show you some of
  1063.     the enhancements that NDOS has added to those commands to make
  1064.     your computing easier.
  1065.  
  1066.     First, enter the single-character command ?.  You'll see a
  1067.     display like this:
  1068.  
  1069.  
  1070. ___________________________________________________________________
  1071. NDOS Reference Manual                                           13
  1072.  
  1073.                                                      Basic Commands
  1074. ___________________________________________________________________
  1075.  
  1076.          c:\nu> ?
  1077.          ?           ALIAS       ATTRIB      BEEP        ...
  1078.          CANCEL      CD          CDD         CHCP        ...
  1079.          COLOR       COPY        CTTY        DATE        ...
  1080.          DESCRIBE    DIR         DIRS        DRAWBOX     ...
  1081.           .          .           .           .            .
  1082.           .          .           .           .            .
  1083.           .          .           .           .            .
  1084.          UNALIAS     UNSET       VER         VERIFY      ...
  1085.          Y
  1086.  
  1087.     The ? command displays a list of all NDOS commands.  You
  1088.     certainly don't have to memorize them all -- we'll show you
  1089.     how to get help with any command in a few moments.  We're not
  1090.     going to demonstrate all of these commands in this tour.  If
  1091.     you want complete information about a command, turn to the
  1092.     alphabetic Command Reference that begins on page 153.
  1093.  
  1094.     Now try a DIR command to see a list of files in the current
  1095.     directory.  DIR displays a list of filenames, sizes, dates,
  1096.     and times:
  1097.  
  1098.          c:\nu> dir
  1099.  
  1100.           Volume in drive C is HARD_DISK    Serial number is ...
  1101.           Directory of  c:\nu\*.*
  1102.  
  1103.          .            <DIR>      8-22-91  14:21
  1104.          ..           <DIR>      8-22-91  14:21
  1105.          advise.hlp      78156   2-02-93  1:00a
  1106.          be.exe          19049   2-02-93  1:00a
  1107.          calibrat.exe    51192   2-02-93  1:00a
  1108.          calibrat.hlp    15108   2-02-93  1:00a
  1109.           .                .     .          .
  1110.           .                .     .          .
  1111.           .                .     .          .
  1112.          unformat.hlp    11255   2-02-93  1:00a
  1113.          wipeinfo.exe    33638   2-02-93  1:00a
  1114.          wipeinfo.hlp    11863   2-02-93  1:00a
  1115.           3,522,742 bytes in 86 file(s)  3,940,352 bytes allocated
  1116.           128,147,456 bytes free
  1117.  
  1118.     The NDOS DIR display should look familiar.  But, unlike the
  1119.     traditional DIR display, NDOS shows filenames in lower case
  1120.     and in alphabetical order.  NDOS also gives you some totals at
  1121.     the end of the display that help you see how much space your
  1122.     files are using.
  1123.  
  1124.     By using certain DIR options, you can make the display easier
  1125.     to read.  The directory display you just saw probably didn't
  1126.  
  1127. ___________________________________________________________________
  1128. NDOS Reference Manual                                           14
  1129.  
  1130.                                                      Basic Commands
  1131. ___________________________________________________________________
  1132.  
  1133.     fit on your screen.  You can tell DIR to pause at the end of
  1134.     each page by using the command DIR /P.  The /P is an example
  1135.     of a switch or option which modifies the behavior of a
  1136.     command:
  1137.  
  1138.          c:\nu> dir /p
  1139.  
  1140.           Volume in drive C is HARD_DISK    Serial number is ...
  1141.           Directory of  c:\nu\*.*
  1142.  
  1143.          .            <DIR>      8-22-91  14:21
  1144.          ..           <DIR>      8-22-91  14:21
  1145.          advise.hlp      78156   2-02-93  1:00a
  1146.          be.exe          19049   2-02-93  1:00a
  1147.          calibrat.exe    51192   2-02-93  1:00a
  1148.          calibrat.hlp    15108   2-02-93  1:00a
  1149.           .                .     .          .
  1150.           .                .     .          .
  1151.           .                .     .          .
  1152.          diskreet exe    50443  02-23-93   1:00a
  1153.          diskreet hlp    21463  02-23-93   1:00a
  1154.          diskreet ico      766  02-23-93   1:00a
  1155.          Press any key when ready...
  1156.               833,056 bytes in 21 file(s)  851,968 bytes allocated
  1157.            18,649,088 bytes free
  1158.  
  1159.     You might prefer to display directories in two columns.  DIR
  1160.     will do that if you include the /2 option.  If you add the /V
  1161.     option, it will perform a vertical sort, with filenames
  1162.     running alphabetically down the first column and then down the
  1163.     second column.  (We've left off the end of the second column
  1164.     of the display, since it doesn't fit on a manual page.  You'll
  1165.     be able to see it on the screen.)
  1166.  
  1167.          c:\nu> dir /2/v
  1168.  
  1169.           Volume in drive C is HARD_DISK    Serial number is ...
  1170.           Directory of  c:\nu\*.*
  1171.  
  1172.          .            <DIR>      8-22-91  14:21   helpcfg.exe  ...
  1173.          ..           <DIR>      8-22-91  14:21   kstack.com   ...
  1174.          advise.hlp      78156   2-23-93  1:00a   ndd.hlp      ...
  1175.          aliases          8077   6-01-92  6:01a   ndd.ico      ...
  1176.          be.exe          19017   2-23-93  1:00a   ndiags.exe   ...
  1177.          calibrat.exe    50916   2-23-93  1:00a   ndiags.hlp   ...
  1178.          calibrat.hlp    15108   2-23-93  1:00a   ndiags.snd   ...
  1179.          compat.doc      58397   6-01-92  6:01a   ndos.com     ...
  1180.          config1.npc       143   2-23-93  1:00a   ndos.ico     ...
  1181.          descript.ion     1915   6-01-92  6:01a   ndos.ini     ...
  1182.  
  1183.  
  1184. ___________________________________________________________________
  1185. NDOS Reference Manual                                           15
  1186.  
  1187.                                                      Basic Commands
  1188. ___________________________________________________________________
  1189.  
  1190.          diskedit.exe   130651   2-23-93  1:00a   ndos.nu7     ...
  1191.           .                .     .          .        .          .
  1192.           .                .     .          .        .          .
  1193.           .                .     .          .        .          .
  1194.          833,056 bytes in 21 file(s)  851,968 bytes allocated
  1195.            18,653,184 bytes free
  1196.  
  1197.     DIR has many other formatting and file selection options.
  1198.     You'll use a few below; all of them are explained with the DIR
  1199.     command on page 195.
  1200.  
  1201.     Next, you'll use a simple batch file called TOUR1.BTM to
  1202.     create a dummy file.  (A .BTM batch file is similar to a
  1203.     traditional .BAT batch file but faster.  See page 91 for an
  1204.     explanation of the differences between the two.)  To run
  1205.     TOUR1.BTM, enter the command:
  1206.  
  1207.          c:\nu> tour1
  1208.  
  1209.     This batch file creates a small file called FILE1 in your
  1210.     current directory.  The contents of the file aren't important;
  1211.     we're simply using it to demonstrate NDOS file-handling
  1212.     capabilities.  You can verify that FILE1 has been created by
  1213.     using DIR again.
  1214.  
  1215.     Now use the COPY command to copy the contents of FILE1 to a
  1216.     new file, FILE2:
  1217.  
  1218.          c:\nu> copy file1 file2
  1219.          c:\nu\file1 => c:\nu\file2
  1220.               1 file(s) copied
  1221.  
  1222.     NDOS performed the copy just like the traditional COPY command
  1223.     does.  You may notice that the output is a little friendlier:
  1224.     COPY tells you exactly what file it copied and where it copied
  1225.     the file to, along with a count of files at the end.
  1226.  
  1227.     Now try renaming a file.  If you've used the traditional
  1228.     RENAME command or its synonym REN, this will look familiar:
  1229.  
  1230.          c:\nu> ren file1 file3
  1231.          c:\nu\file1 -> c:\nu\file3
  1232.               1 file(s) renamed
  1233.  
  1234.     Like COPY, the NDOS REN command tells you just what it did.
  1235.     You now have two files, FILE2 and FILE3, in the current
  1236.     directory.  You can use an NDOS enhancement to add the
  1237.     extension .TST to both of them:
  1238.  
  1239.  
  1240.  
  1241. ___________________________________________________________________
  1242. NDOS Reference Manual                                           16
  1243.  
  1244.                                    Command Line Editing and History
  1245. ___________________________________________________________________
  1246.  
  1247.          c:\nu> ren file2 file3 *.tst
  1248.          c:\nu\file2 -> c:\nu\file2.tst
  1249.          c:\nu\file3 -> c:\nu\file3.tst
  1250.               2 file(s) renamed
  1251.  
  1252.     Unlike the traditional REN command, NDOS lets you rename
  1253.     multiple files with a single command.  All of the NDOS file
  1254.     processing commands like COPY, DEL, MOVE, and RENAME accept
  1255.     multiple filenames, so you can do in one command what used to
  1256.     require a separate command for each file.
  1257.  
  1258.     Now delete the files you have just created.  You could use a
  1259.     simple command like DEL *.TST, but that would delete any other
  1260.     .TST files in the current directory also.  To protect against
  1261.     erasing files that you might want to keep, add a /P option to
  1262.     DEL so that it will prompt you before it deletes each file.
  1263.     Answer Y to the prompts shown below to let NDOS delete your
  1264.     test files:
  1265.  
  1266.          c:\nu> del *.tst /p
  1267.          Delete c:\nu\file3.tst (Y/N)? y
  1268.          Delete c:\nu\file2.tst (Y/N)? y
  1269.               2 file(s) deleted
  1270.  
  1271.     To verify all these actions, you can do a DIR or DIR /P to
  1272.     look at what files are left in the directory.  All the files
  1273.     you've just created (FILE1, FILE2, FILE3, etc.) should be
  1274.     gone.
  1275.  
  1276.     The features we've demonstrated here -- traditional commands
  1277.     with enhancements that make your work easier -- are present
  1278.     throughout NDOS.  If you want more details, pick a DOS command
  1279.     that you're familiar with and look up the corresponding NDOS
  1280.     command in the reference section to get an idea of what's new
  1281.     and improved in NDOS.  (Note that NDOS replaces internal
  1282.     commands like COPY and DIR, not external commands like
  1283.     DISKCOPY and FORMAT.)
  1284.  
  1285.  
  1286. Command Line Editing and History
  1287.  
  1288.     This section demonstrates NDOS features which make it easy to
  1289.     correct typing mistakes at the DOS prompt, to repeat previous
  1290.     commands, and to get help with any command.
  1291.  
  1292.     We can't show you exact examples here as easily as we can in
  1293.     the other sections of the tour, since the display depends on
  1294.     the exact keystrokes you type and we want you to experiment a
  1295.     little.  So we'll guide you through what NDOS can do, and
  1296.     you'll see the results on your screen.
  1297.  
  1298. ___________________________________________________________________
  1299. NDOS Reference Manual                                           17
  1300.  
  1301.                                    Command Line Editing and History
  1302. ___________________________________________________________________
  1303.  
  1304.     First, create a typing error by mistake.  Enter an incorrect
  1305.     DIR command:
  1306.  
  1307.          c:\nu> dur /2
  1308.  
  1309.     Traditionally, you would have had to use the Backspace key to
  1310.     erase most of the line in order to correct this error, or
  1311.     press Esc and start over.  NDOS makes corrections much easier.
  1312.     Press the Home key followed by the RightArrow.  The cursor
  1313.     will move to the start of the line and then right one space to
  1314.     the "u" in "dur".  Type an "i" and the command should be
  1315.     correct.  To execute it, press Enter;  if you'd rather not,
  1316.     press Esc.
  1317.  
  1318.     That's a simple example of NDOS command line editing.  You can
  1319.     use the left and right arrow keys, Home and End, and Backspace
  1320.     and Del to move around and modify your command line at any
  1321.     time, just like you do in your word processor or editor.
  1322.     Other keys let you move the cursor a word at a time, delete
  1323.     words, change between overstrike and insert modes, and perform
  1324.     many other operations.  Esc always clears the line and lets
  1325.     you start over.  For a summary of all the command line
  1326.     editing keys see page 48.
  1327.  
  1328.     NDOS also remembers the commands you type in a command
  1329.     history.  To see the commands you have used so far during this
  1330.     tour, we'll use the NDOS HISTORY command to display the entire
  1331.     history list:
  1332.  
  1333.          c:\nu> history
  1334.          ?
  1335.          dir
  1336.          dir /p
  1337.          dir /2/v
  1338.          tour1
  1339.          ren file1 file3
  1340.          ren file2 file3 *.tst
  1341.          del *.tst /p
  1342.          dir /2
  1343.  
  1344.     NDOS records about 1000 characters of history.  You can reduce
  1345.     or enlarge this amount to suit your own needs.
  1346.  
  1347.     Now press the UpArrow key once.  The last command in the
  1348.     HISTORY display (DIR /2 in the example above) will appear at
  1349.     the prompt.  You can use the editing keys to modify this
  1350.     command, which is much easier than retyping it.  To execute
  1351.     the command again, in either its modified or unmodified form,
  1352.     press Enter.  To clear the line, press Esc.
  1353.  
  1354.  
  1355. ___________________________________________________________________
  1356. NDOS Reference Manual                                           18
  1357.  
  1358.                                    Command Line Editing and History
  1359. ___________________________________________________________________
  1360.  
  1361.     If you'd like to see more commands, first press Esc to clear
  1362.     the command line. (To see all commands in the history, you
  1363.     should always start with an empty command line.)  Now press
  1364.     UpArrow several times.  Each time you press it, NDOS will
  1365.     back up one more line in the command history.  Once you find
  1366.     the line you're looking for, you can modify it if you like and
  1367.     then press Enter to execute it.
  1368.  
  1369.     Now imagine that you have been working for a while.  An hour
  1370.     ago you did a complex DIR command and you need to do it again.
  1371.     You could scroll through an hour's worth of command history.
  1372.     But another NDOS feature called command completion will save
  1373.     you time.
  1374.  
  1375.     First, type the beginning of the command -- DI, or DIR.  Now
  1376.     press the UpArrow.  NDOS will recall the newest command in
  1377.     the history that starts with the characters you typed (if
  1378.     there are no matches, NDOS beeps).  Press UpArrow again to
  1379.     retrieve the command before that, still matching to the
  1380.     characters you originally typed.
  1381.  
  1382.     You can test this out easily using DI or DIR, because you've
  1383.     put several DIR commands into the command history during the
  1384.     tour.
  1385.  
  1386.     Perhaps you would prefer to look at a list of commands that
  1387.     you have entered and choose from the list.  First press the
  1388.     Esc key to clear the command prompt.  Then press the PageUp
  1389.     key.  NDOS will display a history window in the upper right
  1390.     corner of your screen showing the commands you've recently
  1391.     typed.  You can move around in this window with the UpArrow
  1392.     and DownArrow keys.  PageUp and PageDown move the display a
  1393.     page at a time.  When you find the command you want, press
  1394.     Enter to re-execute it as is, or press Ctrl-Enter to move the
  1395.     line down to the prompt where you can edit it as usual.
  1396.  
  1397.     You can find more information on command line editing and
  1398.     history beginning on pages 48 and 49.  And you can use
  1399.     directives in your NDOS.INI file (see page 108) to set the
  1400.     length of the history list and the size of the history window,
  1401.     and to redefine the editing and history keys.
  1402.  
  1403.     You can also get help any time you need it from the NDOS
  1404.     command prompt.  Just press the F1 key.  You'll see a display
  1405.     of all NDOS HELP topics.  If you would like some help with
  1406.     COPY, move the cursor bar to COPY.  Press Enter to see help
  1407.     on the topic; once you're there, scroll through the help
  1408.     using the vertical arrows or PageUp and PageDown keys.  The
  1409.     highlighted items within a topic are cross-references to
  1410.     other topics; select one with the Tab key and press Enter
  1411.  
  1412. ___________________________________________________________________
  1413. NDOS Reference Manual                                           19
  1414.  
  1415.                                                    More About Files
  1416. ___________________________________________________________________
  1417.  
  1418.     to view it. Press Esc or F1 to return to the topic list.
  1419.  
  1420.     For more help using the Help display, select the Help topic a
  1421.     the beginning of the topic list.  If you have a mouse, see the
  1422.     Mouse topic at the beginning of the topic list for information
  1423.     on using the mouse within the Help system.
  1424.  
  1425.     Now exit the help system (use Esc) and start entering a
  1426.     command:
  1427.  
  1428.          c:\nu> copy *.doc a: /
  1429.  
  1430.     After that "/" you want to use the option that tells COPY to
  1431.     prompt you before replacing an existing file, but you can't
  1432.     remember what it is.  Just leave the command as it is and
  1433.     press F1.  NDOS will display help on the command you're
  1434.     entering, and you'll see that the option you want is /R.
  1435.     Press Esc to exit help and you'll be right back on the command
  1436.     line.  You can type the R and press Enter to execute your
  1437.     command, or press Esc instead to clear the line if you don't
  1438.     really want to execute the command.
  1439.  
  1440.     NDOS has may more features that can help you at the command
  1441.     line.  Most of them are described in Chapter 5, "Using NDOS,"
  1442.     in the section At the Command Line starting on page 47.
  1443.  
  1444.  
  1445. More About Files
  1446.  
  1447.     This section of the tour describes NDOS features that help you
  1448.     manage files and directories.  You're about to use another
  1449.     batch file to create some files with which you can experiment.
  1450.     The batch file you'll use is called TOUR2.BTM.  First, take a
  1451.     look at the batch file with the NDOS LIST command:
  1452.  
  1453.          c:\nu> list tour2.btm
  1454.  
  1455.     As you can see on your screen, LIST is a full screen file
  1456.     viewer.  You can scroll and page through the text.  You may
  1457.     notice that some lines near the end of the file extend beyond
  1458.     the edge of your screen.  To make the off-screen text visible
  1459.     use the left and right arrow keys to scroll the display
  1460.     horizontally, or press W to turn line wrapping on and off.
  1461.     LIST also lets you search for text and print the file you're
  1462.     viewing, two capabilities that we won't demonstrate on this
  1463.     tour.  The file TOUR2.BTM is simply a batch file that creates
  1464.     other files, using the NDOS ECHO command.  You don't have to
  1465.     worry about how it works; we just used it to show you LIST.
  1466.  
  1467.  
  1468.  
  1469. ___________________________________________________________________
  1470. NDOS Reference Manual                                           20
  1471.  
  1472.                                                    More About Files
  1473. ___________________________________________________________________
  1474.  
  1475.     Now run TOUR2.BTM:
  1476.  
  1477.          c:\nu> tour2
  1478.  
  1479.          Please wait ...
  1480.  
  1481.          File creation completed
  1482.  
  1483.     TOUR2 creates three files called FILE1, FILE2, and FILE3.  The
  1484.     contents of the files aren't important since we're just using
  1485.     them for demonstration purposes.  You'll be deleting and
  1486.     recreating them several times through the rest of the tour.
  1487.  
  1488.     Now try the NDOS SELECT feature.  SELECT lets you choose files
  1489.     for any NDOS command from a full-screen list.  We'll use it
  1490.     here to delete one of the files that TOUR2 created.  Enter the
  1491.     command:
  1492.  
  1493.          c:\nu> select del (file*)
  1494.  
  1495.     This command tells NDOS to let you select from files that
  1496.     begin with the characters "file", and then pass the name of
  1497.     each file you select to the DEL command for action.
  1498.  
  1499.     The display on your screen should include a two-line header
  1500.     and then the list of files, just as they'd look in a directory
  1501.     display.  Press the spacebar to "mark" the first file -- a
  1502.     triangular mark will appear to the left of the filename.  You
  1503.     can scroll around in the display and mark and unmark files
  1504.     with the spacebar as you like.  When you hit Enter, the
  1505.     command will be executed, deleting the files you've marked.
  1506.     For now, mark FILE1 and leave the other files unmarked, so
  1507.     that FILE2 and FILE3 are not deleted.  You'll use them in the
  1508.     next step.
  1509.  
  1510.     SELECT is also handy if you want to copy a group of files to a
  1511.     floppy disk, perhaps to take your work home for the night or
  1512.     to make a quick backup.  If you'd like to try it, put a blank,
  1513.     formatted floppy disk in drive A:.  Then enter this command:
  1514.  
  1515.          c:\nu> select copy (file*) a:
  1516.  
  1517.     Mark one or both of the files in the SELECT display, and the
  1518.     marked file(s) will be copied to the floppy disk when you hit
  1519.     Enter.
  1520.  
  1521.     SELECT is a "prefix" command:  it goes before another command
  1522.     and modifies what that second command does.  Another useful
  1523.     prefix command is EXCEPT,  which lets you do something except
  1524.     to one or more files.  Before you try EXCEPT, create new
  1525.  
  1526. ___________________________________________________________________
  1527. NDOS Reference Manual                                           21
  1528.  
  1529.                                                    More About Files
  1530. ___________________________________________________________________
  1531.  
  1532.     copies of FILE1, FILE2, and FILE3 (TOUR2 will overwrite any
  1533.     old copies of these files remaining from the last time it was
  1534.     run):
  1535.  
  1536.          c:\nu> tour2
  1537.  
  1538.          Please wait ...
  1539.  
  1540.          File creation completed
  1541.  
  1542.     Now use EXCEPT to delete all but one of the files that TOUR2
  1543.     created:
  1544.  
  1545.          c:\nu> except (file1) del file*
  1546.          Deleting c:\nu\file2
  1547.          Deleting c:\nu\file3
  1548.               2 file(s) deleted
  1549.  
  1550.     The EXCEPT command protected FILE1 from being deleted.  To
  1551.     verify that, use the DIR command.  When you're done, run TOUR2
  1552.     one more time so the files are there for the next step.
  1553.  
  1554.     Next, create two subdirectories within the current directory:
  1555.  
  1556.          c:\nu> md dira dirb
  1557.  
  1558.     Notice that you can create both subdirectories with a single
  1559.     command.  Traditionally, you would have needed two MD commands
  1560.     to do the same thing.  To verify that the directories are
  1561.     there, use DIR but ask it to display only subdirectories and
  1562.     not files (if you're curious, /A:D stands for "Attributes:
  1563.     Directory";  see page 195 for more details):
  1564.  
  1565.          c:\nu> dir /a:d
  1566.  
  1567.           Volume in drive C is HARD_DISK  Serial number is ...
  1568.           Directory of  c:\nu\*.*
  1569.  
  1570.          .            <DIR>      8-22-91  14:21
  1571.          ..           <DIR>      8-22-91  14:21
  1572.          DIRA         <DIR>     10-27-92  10:23
  1573.          DIRB         <DIR>     10-27-92  10:23
  1574.                     0 bytes in 4 file(s)         0 bytes allocated
  1575.            18,608,128 bytes free
  1576.  
  1577.     OK, things look right.  Now move the demonstration files to
  1578.     those directories.  NDOS has a built-in MOVE command to move a
  1579.     file from one directory or drive to another, something DOS
  1580.     users have wished for for a long time.
  1581.  
  1582.  
  1583. ___________________________________________________________________
  1584. NDOS Reference Manual                                           22
  1585.  
  1586.                                                    More About Files
  1587. ___________________________________________________________________
  1588.  
  1589.     Here are the commands to move FILE1 to DIRA, and FILE2 and
  1590.     FILE3 to DIRB:
  1591.  
  1592.          c:\nu> move file1 dira
  1593.          c:\nu\file1 -> c:\nu\dira\file1
  1594.               1 file(s) moved
  1595.  
  1596.          c:\nu> move file2 file3 dirb
  1597.          c:\nu\file2 -> c:\nu\dirb\file2
  1598.          c:\nu\file3 -> c:\nu\dirb\file3
  1599.               2 file(s) moved
  1600.  
  1601.     As usual, NDOS tells you exactly what it's doing.
  1602.  
  1603.     Now that you've created a subdirectory structure, it's time to
  1604.     get a comprehensive look at it.  Use DIR to look for all the
  1605.     files whose names begin with "file" in the current directory
  1606.     and all of its subdirectories -- that's the DIR /S option:
  1607.  
  1608.          c:\nu> dir /s file*
  1609.  
  1610.           Volume in drive C is HARD_DISK    Serial number is ...
  1611.           Directory of  c:\nu\dira\file*.*
  1612.  
  1613.          file1              22  10-27-92  10:37
  1614.                    22 bytes in 1 file(s)     2,048 bytes allocated
  1615.            18,587,648 bytes free
  1616.  
  1617.              Total for:  c:\nu\dira\file*.*
  1618.                    22 bytes in 1 file(s)     2,048 bytes allocated
  1619.  
  1620.           Directory of  c:\nu\dirb\file*.*
  1621.  
  1622.          file2              22  10-27-92  10:37
  1623.          file3            1938  10-27-92  10:37
  1624.                 1,960 bytes in 2 file(s)     4,096 bytes allocated
  1625.            18,587,648 bytes free
  1626.  
  1627.              Total for:  c:\nu\dirb\file*.*
  1628.                 1,960 bytes in 2 file(s)     4,096 bytes allocated
  1629.  
  1630.              Total for:  c:\nu\file*.*
  1631.                 1,982 bytes in 3 file(s)     6,144 bytes allocated
  1632.  
  1633.     DIR has displayed the directory header, filenames, and totals
  1634.     for each of the two subdirectories that contain files matching
  1635.     the name you entered, FILE*.  It also has displayed a grand
  1636.     total.
  1637.  
  1638.  
  1639.  
  1640. ___________________________________________________________________
  1641. NDOS Reference Manual                                           23
  1642.  
  1643.                                                    More About Files
  1644. ___________________________________________________________________
  1645.  
  1646.     You've seen that DIR can look at several subdirectories at
  1647.     once.  Now do the same thing with DEL, and delete the files
  1648.     you put in your demonstration subdirectories, along with the
  1649.     subdirectories themselves, with a single command.  To do so,
  1650.     you need to use two options: /S and /X.  The first tells DEL
  1651.     to delete files in the current directory and all of its
  1652.     subdirectories.  The /X option makes DEL remove each
  1653.     subdirectory if all the files within it are deleted:
  1654.  
  1655.          c:\nu> del /s/x dira dirb
  1656.          c:\nu\dira\*.* : Are you sure (Y/N)? Y
  1657.          Deleting c:\nu\dira\file1
  1658.          c:\nu\dirb\*.* : Are you sure (Y/N)? Y
  1659.          Deleting c:\nu\dirb\file2
  1660.          Deleting c:\nu\dirb\file3
  1661.               3 file(s) deleted
  1662.  
  1663.     Note the safety feature that NDOS gave you here.  When you
  1664.     tell DEL to delete DIRA and DIRB, NDOS recognizes them as
  1665.     directory names and assumes you mean "delete all files in this
  1666.     directory".  Since you're deleting all the files, NDOS
  1667.     displays a prompt that tells you what's about to be deleted
  1668.     and asks you whether you really want to do the deletion.  Once
  1669.     you answer Y, the files are deleted and the subdirectory is
  1670.     automatically removed because you used the /X switch.
  1671.  
  1672.     NDOS also lets you use file descriptions, so you can describe
  1673.     a file's contents more clearly than with an eight-character
  1674.     filename.  The descriptions can be up to 40 characters long.
  1675.  
  1676.     First, run TOUR2 again to regenerate the three demonstration
  1677.     files.  Then enter a DESCRIBE command, along with a
  1678.     description for each file (you can enter any description you
  1679.     like; you don't have to use the text shown):
  1680.  
  1681.          c:\nu> tour2
  1682.          c:\nu> describe file*
  1683.          Describe "c:\nu\file1" : Tour file 1
  1684.          Describe "c:\nu\file2" : Tour file 2
  1685.          Describe "c:\nu\file3" : Tour file 3
  1686.  
  1687.     Now look at the descriptions with a DIR command:
  1688.  
  1689.          c:\nu> dir file*
  1690.  
  1691.           Volume in drive C is HARD_DISK    Serial number is ...
  1692.           Directory of  c:\nu\file*.*
  1693.  
  1694.          file1              22  10-27-92  10:48 Tour file 1
  1695.          file2              22  10-27-92  10:48 Tour file 2
  1696.  
  1697. ___________________________________________________________________
  1698. NDOS Reference Manual                                           24
  1699.  
  1700.                                                Directory Navigation
  1701. ___________________________________________________________________
  1702.  
  1703.          file3            1938  10-27-92  10:49 Tour file 3
  1704.                 1,982 bytes in 3 file(s)     6,144 bytes allocated
  1705.            18,604,032 bytes free
  1706.  
  1707.     The descriptions will appear any time you ask for a standard,
  1708.     single-column directory display.  They will also appear when
  1709.     you use the SELECT command.  They can be a lifesaver when you
  1710.     have files whose contents you can't remember, or when you have
  1711.     large groups of files with similar names.
  1712.  
  1713.  
  1714. Directory Navigation
  1715.  
  1716.     NDOS doesn't just make it easier to access files;  it also
  1717.     makes your life much easier when you're navigating through the
  1718.     hard disk directory structure.  You're probably already
  1719.     familiar with the traditional CD command, which you use to
  1720.     change directories.  NDOS adds a "go back" option to CD, which
  1721.     is invoked by using the minus sign [-] instead of a directory
  1722.     name.  Try this:
  1723.  
  1724.          c:\nu> cd \
  1725.          c:\> cd -
  1726.          c:\nu>
  1727.  
  1728.     The CD - changes back to the directory you were in before the
  1729.     most recent CD command.  It's a convenient way to switch back
  1730.     and forth between two directories.
  1731.  
  1732.     NDOS also lets you change the drive and directory at the same
  1733.     time with the CDD command so you don't have to switch drives
  1734.     first and then change directories.  Here's an example using
  1735.     CDD.  Before you try it, put a floppy disk in drive A:
  1736.  
  1737.          c:\nu> cdd a:\
  1738.          a:\> cdd -
  1739.          c:\nu>
  1740.  
  1741.     As you can see, the minus works with CDD as well.
  1742.  
  1743.     For more complex sequences of directory navigation, you can
  1744.     use PUSHD and POPD.  These commands maintain a directory
  1745.     "stack" and let you make several changes, then move back
  1746.     through the directories you've been to.  They can change both
  1747.     drive and directory, like CDD.  For example:
  1748.  
  1749.          c:\nu> pushd a:\
  1750.          a:\> pushd c:\
  1751.          c:\> popd
  1752.          a:\> popd
  1753.  
  1754. ___________________________________________________________________
  1755. NDOS Reference Manual                                           25
  1756.  
  1757.                                                             Aliases
  1758. ___________________________________________________________________
  1759.  
  1760.          c:\nu>
  1761.  
  1762.     NDOS also offers you a special environment variable, CDPATH,
  1763.     to help you find the right directory without a lot of typing.
  1764.     CD, CDD, and PUSHD use CDPATH to find the directory you want
  1765.     to change to if they can't find it in the current directory.
  1766.     This can help a lot when you have long but commonly used
  1767.     directory names.  For example, say you have a directory called
  1768.     C:\DBASE\REPORTS which contains a subdirectory for each month
  1769.     of the year.  If you set CDPATH like this:
  1770.  
  1771.          c:\nu> set cdpath=c:\dbase\reports
  1772.  
  1773.     Then you can change to the JANUARY subdirectory like this:
  1774.  
  1775.          c:\nu> cd january
  1776.          c:\dbase\reports\january> cd -
  1777.          c:\nu>
  1778.  
  1779.     CD found the JANUARY subdirectory, saving you from typing the
  1780.     entire name, because its parent directory was listed in
  1781.     CDPATH.  For more details about CDPATH see page 107.
  1782.  
  1783.  
  1784. Aliases
  1785.  
  1786.     Aliases are a powerful feature of NDOS.  Simple aliases are
  1787.     very easy to set up and use (that's what we'll discuss here).
  1788.     Complex aliases allow you to configure your system just about
  1789.     any way you want, and can take the place of many small batch
  1790.     files.
  1791.  
  1792.     The purpose of aliases is to rename or reconfigure NDOS
  1793.     commands.  They are defined and viewed with the ALIAS command.
  1794.     In this tour, we'll show you how to set up aliases for the DIR
  1795.     command.  Of course, you can use aliases to enhance any
  1796.     command; for more examples see the ALIAS command on page 159,
  1797.     and the sample file ALIASES that comes with NDOS.
  1798.  
  1799.     Here's a popular favorite for anyone who uses DIR and wants to
  1800.     be able to use a simple D instead:
  1801.  
  1802.          c:\nu> alias d = dir
  1803.  
  1804.     To see what aliases you've defined, enter ALIAS with no
  1805.     parameters:
  1806.  
  1807.          c:\nu> alias
  1808.          d=dir
  1809.  
  1810.  
  1811. ___________________________________________________________________
  1812. NDOS Reference Manual                                           26
  1813.  
  1814.                                                             Aliases
  1815. ___________________________________________________________________
  1816.  
  1817.     To use the alias, just enter its name at the prompt, like any
  1818.     command:
  1819.  
  1820.          c:\nu> d
  1821.  
  1822.           Volume in drive C is HARD_DISK    Serial number is ...
  1823.           Directory of  c:\nu\*.*
  1824.  
  1825.          .            <DIR>      8-22-91  14:21
  1826.          ..           <DIR>      8-22-91  14:21
  1827.          advise   hlp    78156  02-23-93   1:00a
  1828.          aliases          8077  06-01-92   6:01a
  1829.          be       exe    19017  02-23-93   1:00a
  1830.          calibrat exe    50916  02-23-93   1:00a
  1831.           .                .     .          .
  1832.           .                .     .          .
  1833.           .                .     .          .
  1834.          unformat hlp     11255 02-23-93   1:00a
  1835.          wipeinfo exe     34066 02-23-93   1:00a
  1836.          wipeinfo hlp     11863 02-23-93   1:00a
  1837.               835,038 bytes in 24 file(s)  858,112 bytes allocated
  1838.            18,599,936 bytes free
  1839.  
  1840.     Once you've defined an alias, you can use it anywhere a
  1841.     command can be used: at the command prompt, in a batch file,
  1842.     or inside another alias.
  1843.  
  1844.     As an example, build on the D alias you have already defined.
  1845.     Suppose you regularly use the NDOS two-column directory
  1846.     listings, discussed near the start of the tour.  Each time you
  1847.     want a directory listing, you use the command DIR /2.  Define
  1848.     an alias, D2, to let you execute this command with the touch
  1849.     of a couple of keys.  Since you have already defined D, you
  1850.     can define D2 in either of these ways (choose one to try):
  1851.  
  1852.          c:\nu> alias d2 = dir /2
  1853.          c:\nu> alias d2 = d /2
  1854.  
  1855.     If you want to see the results, just enter ALIAS again:
  1856.  
  1857.          c:\nu> alias
  1858.          d=dir
  1859.          d2=d /2
  1860.  
  1861.     To use this alias, just enter the command D2 and press Enter.
  1862.     You can pass filenames to these aliases just like you would
  1863.     to the original command.  For example, D2 *.DOC will give you
  1864.     a two-column display of the .DOC files.
  1865.  
  1866.  
  1867.  
  1868. ___________________________________________________________________
  1869. NDOS Reference Manual                                           27
  1870.  
  1871.                                                             Aliases
  1872. ___________________________________________________________________
  1873.  
  1874.     You can create aliases that are even easier to use with the
  1875.     NDOS keystroke aliases.  These aliases let you assign an Alt
  1876.     or Function key to an alias so you can invoke it by pressing a
  1877.     single key.  Say you'd like to assign the two-column directory
  1878.     display to F5.  Just define an alias like D2 above, and make
  1879.     the alias name the key name, with an at-sign [@] before it:
  1880.  
  1881.          c:\nu> alias @f5 = dir /2
  1882.  
  1883.     Now press F5 and the DIR /2 command will appear on the command
  1884.     line.  Press Enter to execute it, or type some additional
  1885.     arguments and then press Enter if you'd like.  (You can also
  1886.     make key aliases execute as soon as you press the key.  For
  1887.     details on how, see the ALIAS command on page 159.)
  1888.  
  1889.     You can use an alias to redefine how a standard command works,
  1890.     without changing its name.  Suppose you always want DIR to
  1891.     display its output in two columns, with a vertical sort and a
  1892.     pause at the end of each page.  You might think of using
  1893.     something like this:
  1894.  
  1895.          c:\nu> alias dir = dir /2/p/v
  1896.  
  1897.     Go ahead and try that, then do a DIR.  You'll get an error:
  1898.  
  1899.          c:\nu> dir
  1900.          Alias loop
  1901.          c:\nu>
  1902.  
  1903.     The "alias loop" error is caused because NDOS tries to
  1904.     reinterpret the DIR command inside your alias as another
  1905.     attempt to run the same alias.  It's easy to change the alias
  1906.     so this doesn't happen:
  1907.  
  1908.          c:\nu> alias dir = *dir /2/p/v
  1909.  
  1910.     The [*] tells NDOS that what follows is not an alias.  Try the
  1911.     definition above (you can scroll back to the incorrect
  1912.     definition with UpArrow and modify it).  Then do a DIR and
  1913.     you'll see the results.  Using this method, you can redefine
  1914.     the default options for any NDOS command.
  1915.  
  1916.     Aliases can contain multiple commands and can do much fancier
  1917.     things than what you've seen here.  They're great for creating
  1918.     shorthand names for commonly used programs like your word
  1919.     processor or database, and they will often help get programs
  1920.     loaded faster as well -- if you put the full name of the
  1921.     program in an alias, NDOS doesn't have to search your PATH for
  1922.     it.
  1923.  
  1924.  
  1925. ___________________________________________________________________
  1926. NDOS Reference Manual                                           28
  1927.  
  1928.                                                      Other Commands
  1929. ___________________________________________________________________
  1930.  
  1931.     For complete details, see the overview of aliases beginning on
  1932.     page 88, and the ALIAS command reference on page 159.
  1933.  
  1934.     When you read about aliases in the rest of the manual, you'll
  1935.     notice that most alias definitions are shown with back quotes
  1936.     [] around the part after the name.  Some aliases require
  1937.     these back quotes when they are defined at the command line or
  1938.     in a batch file, to make it clear to NDOS what is and isn't
  1939.     part of the alias.
  1940.  
  1941.     We show aliases that way elsewhere because it's the safest way
  1942.     to enter them at the command line.  If you always use the
  1943.     back quotes, you don't have to worry about whether a
  1944.     particular alias needs them or not.  We didn't use them here
  1945.     because none of these aliases require back quotes and we
  1946.     didn't want to add extra typing during the tour.
  1947.  
  1948.  
  1949. Other Commands
  1950.  
  1951.     There are a few other commands that we'll just touch on so
  1952.     that you can see other NDOS capabilities.
  1953.  
  1954.     First, turn on the NDOS LOG facility, which records all the
  1955.     commands you enter in a file.  Enter the command:
  1956.  
  1957.          c:\nu> log /w mylog
  1958.  
  1959.     You won't see anything else happen, but you've turned logging
  1960.     on.  We'll return to the NDOS log later.
  1961.  
  1962.     NDOS has a couple of commands that let you control screen
  1963.     color.  The examples here will work on any system with a color
  1964.     video board (the commands work on monochrome systems, too, but
  1965.     you're restricted to the colors white and black).  Try
  1966.     clearing the screen to a specific color:
  1967.  
  1968.          c:\nu> cls bright white on magenta
  1969.  
  1970.     Now let's set a different color:
  1971.  
  1972.          c:\nu> color bright yellow on blue
  1973.  
  1974.     The behavior of the COLOR command varies, depending on whether
  1975.     you have an ANSI driver loaded.  If you don't, COLOR will
  1976.     change the color of the entire screen immediately.  If you do
  1977.     have an ANSI driver loaded, COLOR only affects the color of
  1978.     text displayed after it's executed, and not the color of text
  1979.     already on the screen.  If you don't know, don't worry about
  1980.     it -- just experiment with COLOR and see.
  1981.  
  1982. ___________________________________________________________________
  1983. NDOS Reference Manual                                           29
  1984.  
  1985.                                                      Other Commands
  1986. ___________________________________________________________________
  1987.  
  1988.     The FREE and MEMORY commands help you keep track of system
  1989.     resources.  FREE tells you about free space on your disk
  1990.     drives (and is much faster than CHKDSK).  MEMORY tells you
  1991.     about memory resources, including expanded and extended memory
  1992.     and the NDOS internal alias and history storage areas.  Here
  1993.     are examples of the output from our test system; try the
  1994.     commands on your system and see what values you get.
  1995.  
  1996.          c:\nu> free
  1997.           Volume in drive C is HARD_DISK    Serial number is ...
  1998.            41,826,304 bytes total disk space
  1999.            23,232,512 bytes used
  2000.            18,593,792 bytes free
  2001.  
  2002.          c:\nu> memory
  2003.               655,360 bytes total DOS RAM
  2004.               612,256 bytes free
  2005.  
  2006.             7,815,168 bytes total EMS memory
  2007.               688,128 bytes free
  2008.  
  2009.                12,288 bytes free XMS memory  (HMA in use)
  2010.  
  2011.                 1,792 bytes total environment
  2012.                   233 bytes free
  2013.  
  2014.                 6,144 bytes total alias
  2015.                 1,045 bytes free
  2016.  
  2017.                 1,024 bytes total history
  2018.  
  2019.     The TIMER command lets you time events.  The following line
  2020.     also shows the NDOS ability to accept multiple commands on one
  2021.     line, which are separated by a caret [^].  It starts the
  2022.     timer, runs the TOUR2.BTM file to create the three
  2023.     demonstration files, deletes the three files, and then stops
  2024.     the timer and displays the time the whole operation took.
  2025.     Enter this command to time the entire sequence on your
  2026.     computer:
  2027.  
  2028.          c:\nu> timer ^ tour2 ^ del file1 file2 file3 ^ timer
  2029.          Timer 1 on: 11:10:01
  2030.  
  2031.          Please wait ...
  2032.  
  2033.          File creation completed
  2034.          Deleting c:\nu\file1
  2035.          Deleting c:\nu\file2
  2036.          Deleting c:\nu\file3
  2037.               3 file(s) deleted
  2038.  
  2039. ___________________________________________________________________
  2040. NDOS Reference Manual                                           30
  2041.  
  2042.                                                   Batch Programming
  2043. ___________________________________________________________________
  2044.  
  2045.          Timer 1 off: 11:10:06 elapsed: 0:00:05.11
  2046.  
  2047.     Now return to the log that you started a few minutes ago.
  2048.     Turn logging off, then take a look at what was recorded.
  2049.     Enter the following two commands;  the output will pause at
  2050.     the end of each page:
  2051.  
  2052.          c:\nu> log off
  2053.          c:\nu> type mylog /p
  2054.          [10-28-92 11:05:02] cls bright white on magenta
  2055.          [10-28-92 11:05:54] color bright yellow on blue
  2056.          [10-28-92 11:07:08] free
  2057.          [10-28-92 11:07:49] memory
  2058.          [10-28-92 11:09:55] timer
  2059.          [10-28-92 11:09:56] tour2
  2060.            ... (commands from TOUR2.BTM will be displayed here)
  2061.          [10-28-92 11:10:00] del file1 file2 file3
  2062.          [10-28-92 11:10:01] timer
  2063.          [10-28-92 11:12:35] log off
  2064.  
  2065.     As you can see, the log contains every command you entered
  2066.     plus a date and time stamp.  It's a complete record of system
  2067.     activity, including commands you type and those entered from
  2068.     batch files and aliases.  You can use it as a record of your
  2069.     work, for security purposes, or for anything else you desire.
  2070.     You may want to clean up the directory now by deleting this
  2071.     demonstration log with a DEL MYLOG command.
  2072.  
  2073.  
  2074. Batch Programming
  2075.  
  2076.     This final section demonstrates a very little bit of what NDOS
  2077.     can do for your batch files.  If you've never worked with
  2078.     batch files, you may want to skip this section.  If you aren't
  2079.     sure, give it a try and stop if things seem too complex.  You
  2080.     don't have to be a batch file programmer to use NDOS.
  2081.  
  2082.     Rather than having you go to the trouble of writing batch
  2083.     files, we'll demonstrate NDOS batch file functions that work
  2084.     just as well at the prompt.
  2085.  
  2086.     Some NDOS batch file improvements aid in communicating with
  2087.     the user.  You can make sounds:
  2088.  
  2089.          c:\nu> beep 440 2 880 8 660 4
  2090.  
  2091.     You can draw boxes and lines.  Enter each of these commands on
  2092.     one line; use the second set of commands if you have a
  2093.     monochrome monitor:
  2094.  
  2095.  
  2096. ___________________________________________________________________
  2097. NDOS Reference Manual                                           31
  2098.  
  2099.                                                   Batch Programming
  2100. ___________________________________________________________________
  2101.  
  2102.          c:\nu> cls bright white on blue
  2103.          c:\nu> drawbox 10 10 20 70 4 bright cyan on black fill
  2104.                    black
  2105.          c:\nu> drawhline 15 10 61 1 bright cyan on black
  2106.  
  2107.          c:\nu> cls bright white on black
  2108.          c:\nu> drawbox 10 10 20 70 4 black on white fill white
  2109.          c:\nu> drawhline 15 10 61 1 black on white
  2110.  
  2111.     Notice that NDOS correctly connects the line to the box where
  2112.     they intersect.  NDOS has additional commands like SCREEN and
  2113.     SCRPUT, which we won't demonstrate here, to display text
  2114.     anywhere on the screen and in any color.
  2115.  
  2116.     NDOS also helps you ask the user for input.  Try this (be sure
  2117.     to use two percent signs before the second "letter"):
  2118.  
  2119.          c:\nu> inkey Enter a letter: %%letter
  2120.          Enter a letter: A
  2121.  
  2122.     The letter you typed was stored in your environment in the
  2123.     variable named LETTER.  Use the SET command to view it:
  2124.  
  2125.          c:\nu> set
  2126.          COMSPEC=C:\NDOS\NDOS.COM
  2127.           .
  2128.           .
  2129.           .
  2130.          LETTER=A
  2131.  
  2132.     The user can also type full strings if you use the INPUT
  2133.     command:
  2134.  
  2135.          c:\nu> input Enter a string: %%string
  2136.          Enter a string: Type anything you like here ...
  2137.  
  2138.     Again, SET will let you view the string, stored in the
  2139.     environment variable STRING.
  2140.  
  2141.     Once you've collected some input, you will probably want to
  2142.     test it with the NDOS IF and IFF commands.  Here's one
  2143.     example.  Enter this on one line (there's plenty of room;
  2144.     NDOS command lines can be up to 255 characters long).  Note
  2145.     that two percent signs are used in the INKEY command and one
  2146.     is used in the IFF, and that a double equal sign is used in
  2147.     the IFF statement.
  2148.  
  2149.          c:\nu> inkey Enter a letter: %%letter ^
  2150.                   iff "%letter"=="A" then ^ echo hi ^ else ^
  2151.                   echo bye ^ endiff
  2152.  
  2153. ___________________________________________________________________
  2154. NDOS Reference Manual                                           32
  2155.  
  2156.                                                          Conclusion
  2157. ___________________________________________________________________
  2158.  
  2159.     Try using the UpArrow to repeat the command several times,
  2160.     giving different responses to the "Enter a letter" prompt.
  2161.  
  2162.     NDOS offers dozens of additional batch file improvements.  For
  2163.     more information see the section on batch files beginning on
  2164.     page 91, and the reference for each individual command.
  2165.  
  2166.  
  2167. Conclusion
  2168.  
  2169.     This has been a very fast tour of some of the most popular
  2170.     features of NDOS.  There are many more features, commands and
  2171.     options to explore, as well as ways to customize NDOS so that
  2172.     it suits your computing habits and needs.  A useful NDOS
  2173.     feature is its ability to adapt to your way of working instead
  2174.     of requiring you to adapt to it.
  2175.  
  2176.     To learn more about specific NDOS commands, look through the
  2177.     Command Reference section of this manual, beginning on page
  2178.     153.  To learn more about the dozens of NDOS features that
  2179.     aren't related to specific commands, read through Chapter 5 /
  2180.     Using NDOS, beginning on page 47.
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210. ___________________________________________________________________
  2211. NDOS Reference Manual                                           33
  2212.  
  2213.                                     DOS and the Command Interpreter
  2214. ___________________________________________________________________
  2215.  
  2216.  
  2217. CHAPTER 4, GENERAL CONCEPTS
  2218.  
  2219.  
  2220. You can start using NDOS as soon as you finish installing it,
  2221. because NDOS is compatible with the traditional commands you're
  2222. used to.  But most users find that the more they know about their
  2223. computer systems, the more power they get from NDOS.  And, the more
  2224. experienced they become with NDOS, the more they want to know about
  2225. their computer system as a whole.
  2226.  
  2227. This section of the manual explains some fundamental concepts about
  2228. your computer, DOS, and NDOS.  It should help you understand the
  2229. terms and concepts in the pages that follow.  If you find some of
  2230. the concepts overwhelming, just remember that they are here when
  2231. you need them.  If you find this material too simple, skim over the
  2232. topics and then go on to the next section.  Each topic in this
  2233. chapter is independent, so if you read it straight through you
  2234. won't necessarily find a natural "flow" from one topic to another.
  2235.  
  2236. If you come across terms or concepts in this chapter that you are
  2237. unsure about, refer to the Glossary on page 329 or the Index.
  2238.  
  2239.  
  2240. DOS and the Command Interpreter
  2241.  
  2242.     When you turn on your computer, it first runs some internal
  2243.     diagnostics and then looks for a boot disk, either a floppy
  2244.     disk in drive A: or your hard disk.  There is nothing magical
  2245.     about a boot disk;  it simply has a copy of DOS and a command
  2246.     interpreter available, plus a small block of special
  2247.     information that tells the computer that it is indeed a boot
  2248.     disk.
  2249.  
  2250.     The core portion of DOS consists of two hidden files (files
  2251.     that are normally invisible to the DIR command).  They aren't
  2252.     hidden to keep you from copying or examining them, but rather
  2253.     to keep you from accidentally erasing them.  The names of the
  2254.     files depend on the version of DOS you are using, but they are
  2255.     usually something like MSDOS.SYS and IO.SYS.  These two files
  2256.     contain the operating system, which controls your disk files
  2257.     and directories, loads and runs programs, maintains the system
  2258.     time and date, and performs other housekeeping tasks.
  2259.  
  2260.     After the computer loads DOS into memory, it performs some
  2261.     standard initialization tasks and then looks for a file called
  2262.     CONFIG.SYS, which contains user-specified initialization
  2263.     commands.  You can view and edit your CONFIG.SYS file with any
  2264.     text editor.  One of the optional lines in CONFIG.SYS begins
  2265.  
  2266.  
  2267. ___________________________________________________________________
  2268. NDOS Reference Manual                                           34
  2269.  
  2270.                                     DOS and the Command Interpreter
  2271. ___________________________________________________________________
  2272.  
  2273.     with the word SHELL.  That line names the command interpreter
  2274.     that DOS should load as it completes its initialization.
  2275.  
  2276.     A command interpreter is a program that accepts your
  2277.     instructions and carries them out.  The command interpreter
  2278.     shipped with DOS is called COMMAND.COM.  Once you have NDOS
  2279.     installed, NDOS.COM replaces COMMAND.COM as your command
  2280.     interpreter.  Both COMMAND.COM and NDOS are normal programs
  2281.     that know how to translate your commands into actions.  NDOS
  2282.     is simply a much more powerful command interpreter than
  2283.     COMMAND.COM.
  2284.  
  2285.  
  2286.     Primary and Secondary Shells
  2287.  
  2288.     Technically, the command interpreter is a shell:  a program
  2289.     that understands your commands and makes the correct calls to
  2290.     DOS to perform various operations, including running programs.
  2291.  
  2292.     The command interpreter that runs when the computer boots up,
  2293.     is called the primary shell.  Any command interpreter that is
  2294.     run by an application program with a "shell to DOS" feature,
  2295.     or that is run by a multitasking program like Windows or
  2296.     DESQview, is a secondary shell.  NDOS can be run as a primary
  2297.     shell and as a secondary shell.
  2298.  
  2299.     A secondary shell has all the same features as a primary
  2300.     shell, but you can leave a secondary shell with the EXIT
  2301.     command.  There is no way to exit from the primary shell,
  2302.     because your computer needs a shell present to operate.
  2303.  
  2304.     There are only a few differences between primary and secondary
  2305.     shells.  Generally, less memory is available when a secondary
  2306.     shell is running, because at least part of the program that
  2307.     started it is still in memory waiting to spring back to life
  2308.     when you exit.  And normally only the primary shell
  2309.     automatically executes the instructions in your AUTOEXEC.BAT
  2310.     file.
  2311.  
  2312.     You may also see the term shell used to describe programs
  2313.     which assist you in managing your files (for example XTree or
  2314.     Lotus Magellan).  This is a different and less precise meaning
  2315.     of "shell" than the one used above and elsewhere in this
  2316.     manual.  Such programs are also sometimes called "visual
  2317.     shells" because they use a menu or graphical interface to
  2318.     receive commands.  Unlike NDOS, these programs are not command
  2319.     interpreters, and cannot replace COMMAND.COM.
  2320.  
  2321.  
  2322.  
  2323.  
  2324. ___________________________________________________________________
  2325. NDOS Reference Manual                                           35
  2326.  
  2327.                                                  Command Processing
  2328. ___________________________________________________________________
  2329.  
  2330.     AUTOEXEC.BAT, NSTART, and NEXIT
  2331.  
  2332.     When a primary shell, either COMMAND.COM or NDOS, gets control
  2333.     from DOS during boot up, one of its first responsibilities is
  2334.     to look for and run a batch file called AUTOEXEC.BAT, if that
  2335.     file is available in the root directory of the boot drive.
  2336.     This file is simply a list of commands that you want to have
  2337.     executed every time your computer boots up.  If COMMAND.COM
  2338.     cannot find AUTOEXEC.BAT, it asks you for the time and date.
  2339.     NDOS skips that step and immediately displays a standard
  2340.     prompt (e.g., c:\>).
  2341.  
  2342.     Every time NDOS starts as either a primary or secondary shell,
  2343.     it also looks for an optional batch file called NSTART.BTM or
  2344.     NSTART.BAT, and runs the file if it finds it.  NSTART is a
  2345.     convenient place to put special NDOS configuration commands.
  2346.  
  2347.     Whenever you exit from a NDOS secondary shell, NDOS looks for
  2348.     another optional file called NEXIT.BTM or NEXIT.BAT and runs
  2349.     the file if it finds it.  NEXIT is not necessary in most
  2350.     circumstances, but is a convenient place to put commands to
  2351.     save information from a secondary shell before it exits.
  2352.  
  2353.     AUTOEXEC.BAT, NSTART, and NEXIT are called automatic batch
  2354.     files because they run without your intervention at specific
  2355.     times.  NSTART and NEXIT should not be used to load any memory
  2356.     resident programs (TSRs).  Otherwise, these three files can
  2357.     include any commands that could be part of any batch file or
  2358.     any commands which you could type from the command line.
  2359.  
  2360.     For more details about batch files and batch file commands,
  2361.     see pages 91 and 154.
  2362.  
  2363.  
  2364. Command Processing
  2365.  
  2366.     Whenever you type something at the command line and press the
  2367.     Enter key, you have given a command to NDOS, which must figure
  2368.     out how to execute your command.  If you understand the
  2369.     general process that NDOS uses, you will be able to make the
  2370.     best use of the NDOS commands.
  2371.  
  2372.     NDOS begins by dividing the line you typed into an action word
  2373.     and a command tail.  The action word is the first word in the
  2374.     command;  the tail is everything that follows the command
  2375.     word.  For example, in the command line
  2376.  
  2377.          dir *.txt /p/o/n
  2378.  
  2379.  
  2380.  
  2381. ___________________________________________________________________
  2382. NDOS Reference Manual                                           36
  2383.  
  2384.                                                  Command Processing
  2385. ___________________________________________________________________
  2386.  
  2387.     the action word is "dir," and the command tail is "*.txt
  2388.     /p/o/n."
  2389.  
  2390.     To decide what activity to perform, NDOS makes five attempts
  2391.     to understand the action word:
  2392.  
  2393.     First, NDOS tries to match the action word against its
  2394.     internal list of aliases, which are synonyms that you have
  2395.     defined for commands.  If it finds a match between the action
  2396.     word you typed and one of the aliases you've defined, it
  2397.     replaces the action word you typed with the action word from
  2398.     the alias.  (This substitution is done internally, and is not
  2399.     normally visible to you).  Once it has finished with the
  2400.     aliases, NDOS continues with the steps listed below to
  2401.     identify the meaning of the new action word.
  2402.  
  2403.          NDOS first tries to match the action word against its
  2404.          list of more than 80 internal commands, which are actions
  2405.          that are built into NDOS.  If it finds a match, NDOS
  2406.          performs the internal command and then waits for a new
  2407.          instruction from you.
  2408.  
  2409.          If there is no match with any NDOS internal command, it
  2410.          looks for an executable file (one with a .COM or .EXE
  2411.          extension) whose name matches the action word.  It runs
  2412.          the executable file if it finds one.  This is called an
  2413.          external command or external program.
  2414.  
  2415.          Next, NDOS looks for a batch file (with a .BTM or .BAT
  2416.          extension) that matches the action word.  If it finds
  2417.          such a file, it then reads each line in the file as a new
  2418.          command.
  2419.  
  2420.          Finally, NDOS checks to see if the action word matches
  2421.          the name of a file with an extension that you have
  2422.          defined as executable.  If a match is found, NDOS runs
  2423.          the program you specified when you defined the executable
  2424.          extension.  (Executable extensions are used to associate
  2425.          file extensions with the specific program that processes
  2426.          a particular type of file; see page 68 for details).
  2427.  
  2428.     NDOS first tries the last three steps in the current
  2429.     directory.  If the action word doesn't match a .COM, .EXE,
  2430.     .BTM, or .BAT file or an executable extension in the current
  2431.     directory, NDOS repeats its search in every directory in your
  2432.     PATH.  The PATH is a list of directories that NDOS (and some
  2433.     applications) search to look for executable files.  If all
  2434.     these searches fail, NDOS displays an "Unknown command" error
  2435.     message and waits for your next instruction.
  2436.  
  2437.  
  2438. ___________________________________________________________________
  2439. NDOS Reference Manual                                           37
  2440.  
  2441.                                                     Files and Paths
  2442. ___________________________________________________________________
  2443.  
  2444.     If NDOS finds a matching internal command in the first step,
  2445.     that command begins its activity by examining the command
  2446.     tail.  Some commands require information in the command tail,
  2447.     some accept optional information, and others don't allow any
  2448.     command tail at all.  The command tail for internal commands
  2449.     usually contains filenames, directory names, option switches
  2450.     which modify the command's behavior, or other information.
  2451.  
  2452.     NDOS makes the command tail available to every alias, batch
  2453.     file, and external command that it executes.  Aliases and
  2454.     batch files can examine the command tail by using "replaceable
  2455.     parameters," (see page 92).  External commands examine the
  2456.     command tail in a manner determined by the programmer who
  2457.     wrote that particular external program.
  2458.  
  2459.     It is up to each command to examine the command tail to make
  2460.     sure that the information it has received makes sense.  If you
  2461.     use an option switch which the command doesn't understand, or
  2462.     if you omit a required piece of information, the command
  2463.     issues an error message and ends.  Therefore, the command
  2464.     lines that you create must fit the format that each alias,
  2465.     internal or external command, or batch file expects.
  2466.  
  2467.     The process that internal and external commands go through to
  2468.     separate the individual elements of the command line, make
  2469.     sure you used the correct syntax, and understand what you have
  2470.     requested, is called parsing.
  2471.  
  2472.  
  2473. Files and Paths
  2474.  
  2475.     You may have dozens, hundreds, or thousands of files stored on
  2476.     your computer's disks.  DOS is responsible for managing all of
  2477.     these files.  In order to do so, it uses a unique name to
  2478.     locate each file in much the same way that the post office
  2479.     assigns a unique address to every residence.
  2480.  
  2481.     The unique name of any file is composed of a drive letter, a
  2482.     directory path, and a filename.  Each of these parts of the
  2483.     file's name is case insensitive;  you can mix upper and lower
  2484.     case letters in any way you wish.
  2485.  
  2486.     A drive letter designates which drive contains the file.  In a
  2487.     file's full name, the drive letter is followed by a colon.
  2488.     Drive letters A: and B: are normally reserved for the floppy
  2489.     disk drives.  (Systems with a single drive use both A: and B:
  2490.     for that drive.  DOS asks you to swap floppy disks as
  2491.     necessary to turn that single physical drive into two
  2492.     separate logical disk drives.)
  2493.  
  2494.  
  2495. ___________________________________________________________________
  2496. NDOS Reference Manual                                           38
  2497.  
  2498.                                                     Files and Paths
  2499. ___________________________________________________________________
  2500.  
  2501.     Normally, drive C: is the first (or only) hard disk drive.
  2502.     Later versions of DOS and some utility programs can divide a
  2503.     large hard disk into multiple logical drives that are usually
  2504.     called C:, D:, E:, etc.  Also, the DOS utility SUBST lets you
  2505.     use drive letters as a substitute for directory names.  Many
  2506.     network systems (LANs) use a similar feature to give drive
  2507.     letters to sections of the network file server drives.
  2508.  
  2509.     Some computers also have "RAM disks", which are areas of
  2510.     memory set aside by software (a "RAM disk driver") for use as
  2511.     fast, but temporary storage.  RAM disks are also assigned
  2512.     drive letters, typically using letters beyond that used by the
  2513.     last hard disk in the system, but before any network drives.
  2514.     For example, on a system with a large hard disk you might have
  2515.     A: and B: as floppy disk drives, C:, D:, and E: as parts of
  2516.     the hard disk, F: as a RAM disk, and G: and H: as network
  2517.     drives.
  2518.  
  2519.     Directories are used to divide the files on a drive into
  2520.     logical groups that are easy to work with.  Their purpose is
  2521.     similar to the use of file drawers to contain groups of
  2522.     hanging folders, hanging folders to contain smaller manila
  2523.     folders, and so on.
  2524.  
  2525.     Every drive has a root or base directory, and many have one or
  2526.     more subdirectories.  Subdirectories can also have
  2527.     subdirectories, extending in a branching tree structure from
  2528.     the root directory.  The collection of all directories on a
  2529.     drive is often called the directory tree, and a portion of the
  2530.     tree is sometimes called a subtree.  The terms directory and
  2531.     subdirectory are typically used interchangeably to mean a
  2532.     single subdirectory within this tree structure.
  2533.  
  2534.     Subdirectory names follow the same naming rules as files (see
  2535.     below): a base name followed by an optional extension.
  2536.     However, some application programs do not properly handle
  2537.     subdirectory names that have an extension.  It is best to use
  2538.     only an eight character (or less) name, without an extension,
  2539.     for subdirectories.
  2540.  
  2541.     The drive and subdirectory portion of a file's name are
  2542.     collectively called the file's path.  For example, the
  2543.     filename C:\DIR1\DIR2\MYFILE.DAT says to look for the file
  2544.     MYFILE.DAT in the subdirectory DIR2 which is part of the
  2545.     subdirectory DIR1 which is on drive C:.  The path for
  2546.     MYFILE.DAT is C:\DIR1\DIR2.  The backslashes between
  2547.     subdirectory names are required.  The total length of a file's
  2548.     path may not exceed 64 characters (excluding the filename and
  2549.     extension, but including the drive letter and colon).
  2550.  
  2551.  
  2552. ___________________________________________________________________
  2553. NDOS Reference Manual                                           39
  2554.  
  2555.                                                     Files and Paths
  2556. ___________________________________________________________________
  2557.  
  2558.     DOS remembers both a current or default drive for your system
  2559.     as a whole, and a current or default directory for every drive
  2560.     in your system.  Whenever a program tries to create or access
  2561.     a file without specifying the file's path, DOS uses the
  2562.     current drive (if no other drive is specified) and the current
  2563.     directory (if no other directory path is specified).
  2564.  
  2565.     The root directory is named using the drive letter and a
  2566.     single backslash.  For example, D:\ refers to the root
  2567.     directory of drive D:.  Using a drive letter with no directory
  2568.     name at all refers to the current directory on the specified
  2569.     drive.  For example, E:NDOS.DOC refers to the file NDOS.DOC in
  2570.     the current directory on drive E:.
  2571.  
  2572.     There are also two special subdirectory names that are useful
  2573.     in many situations: a single period [.] by itself means "the
  2574.     current default directory."  Two periods together [..] means
  2575.     "the directory which contains the current default directory"
  2576.     (often referred to as the parent directory).  These special
  2577.     names can be used wherever a full directory name can be used.
  2578.     NDOS allows you to use additional periods to specify
  2579.     directories further "up" the tree (see page 175).
  2580.  
  2581.     Finally, each file has a filename.  The filename consists of a
  2582.     base name of one to eight characters plus an optional
  2583.     extension composed of a period plus one to three more
  2584.     characters.  You can use alphabetic and numeric characters
  2585.     plus the punctuation marks ! # $ % & ' ( ) - @ ^ _ { } and ~
  2586.     in both the base name and the extension.  Because the
  2587.     exclamation point [!], percent sign [%], caret [^], at-sign
  2588.     [@], parentheses [()], and back quote [`] also have other
  2589.     meanings to NDOS, it is best to avoid using them in
  2590.     filenames.
  2591.  
  2592.     Each file also has attributes which define characteristics of
  2593.     the file which may be useful to DOS, to you, or to an
  2594.     application program.  Attributes can be set with the NDOS
  2595.     ATTRIB command (see page 168) and viewed with the ATTRIB and
  2596.     DIR commands.  Every time a program modifies a file, DOS sets
  2597.     the Archive attribute, which signals that the file has been
  2598.     modified since it was last backed up.  This can be used by
  2599.     NDOS to determine which files to COPY, and by backup programs
  2600.     to determine which files to back up.  When the Read-only
  2601.     attribute is set, the file can't be changed or erased; this
  2602.     can be used to protect important files from damage.  The
  2603.     Hidden and System attributes prevent the file from appearing
  2604.     in normal directory listings.  The NDOS DIR command (see page
  2605.     195) has options which allow you to select filenames to view
  2606.     based on their attributes, to view the attributes themselves,
  2607.     and to view information about normally "invisible" hidden and
  2608.     system files.
  2609. ___________________________________________________________________
  2610. NDOS Reference Manual                                           40
  2611.  
  2612.                                                     The Environment
  2613. ___________________________________________________________________
  2614.  
  2615.     When a file is created, and every time it is modified, DOS
  2616.     records the system time and date in a time stamp in the file's
  2617.     directory entry.  Several NDOS commands and variable
  2618.     functions, and many backup and utility programs, use this time
  2619.     stamp to determine the relative ages of files.
  2620.  
  2621.  
  2622. The Environment
  2623.  
  2624.     The command interpreter keeps a list of information about your
  2625.     computer in memory.  This list is called the environment.
  2626.     Every program receives a copy of the environment when it
  2627.     begins, and many programs use some of its information to
  2628.     configure themselves or to find files.
  2629.  
  2630.     The environment is arranged as a series of variables and their
  2631.     related values.  Each variable is a name stored in upper case.
  2632.     The name is followed by an equal sign [=] and some text.  You
  2633.     can view the environment with the SET command, and add new
  2634.     entries or edit existing entries with SET and ESET.  A typical
  2635.     environment entry looks like this:
  2636.  
  2637.          LIB=c:\lib
  2638.  
  2639.     In this example, the name of the variable is LIB and its value
  2640.     is "c:\lib."
  2641.  
  2642.     The format and meaning of each entry in the environment is up
  2643.     to the program that uses the particular variable.  Environment
  2644.     variables can contain just about anything, and can be used for
  2645.     any purpose the author of a program desires.  The "purpose" of
  2646.     the environment as a whole is simply to hold small amounts of
  2647.     text which programs can then access according to their own
  2648.     rules.  Most environment variables are used by single programs
  2649.     for their own information;  a few have well-defined meanings
  2650.     and are used by many different programs.
  2651.  
  2652.     One of the most important environment variables is called
  2653.     PATH.  The text of PATH is a list of subdirectories separated
  2654.     by semicolons.  NDOS searches each of the subdirectories
  2655.     listed in the PATH entry to find executable files that aren't
  2656.     in the default directory.  Many programs also search the PATH
  2657.     list to find their own files.
  2658.  
  2659.     NDOS uses several environment variables to control its own
  2660.     behavior, and provides a wide range of facilities for
  2661.     manipulating and managing the environment.  See page 106 for
  2662.     additional details.
  2663.  
  2664.  
  2665.  
  2666. ___________________________________________________________________
  2667. NDOS Reference Manual                                           41
  2668.  
  2669.                                                              Memory
  2670. ___________________________________________________________________
  2671.  
  2672. Memory
  2673.  
  2674.     The memory in your computer is organized in bytes.  Normally,
  2675.     the amount of memory in a computer is discussed in terms of
  2676.     kilobytes (K or 1,024 bytes) and megabytes (MB or 1,048,576
  2677.     bytes or 1,024K).  The amount of memory available in your
  2678.     computer is determined by the number of memory chips you
  2679.     have installed.
  2680.  
  2681.     In an ideal world, there would be little more to say about
  2682.     memory.  But because of the history of PCs, the needs of large
  2683.     application programs, and the capabilities of advanced CPUs,
  2684.     there are many different kinds of memory.  The original 8088
  2685.     CPUs of the PC and PC/XT can address 1 MB of memory.  Of
  2686.     that, a maximum of 640K is allocated as base, conventional,
  2687.     DOS, or low DOS memory (all these terms mean the same thing).
  2688.     The other 384K, known as upper memory, are set aside for the
  2689.     computer's built-in ROM BIOS, video adapter cards, hard disk
  2690.     controllers, and other expansion hardware.
  2691.  
  2692.     When base memory became too limiting, expanded memory (or EMS
  2693.     memory) was developed to give programs more data space.
  2694.     Expanded memory adds up to 16 MB which programs can access,
  2695.     64K at a time, through a window in upper memory.  In 8088/8086
  2696.     (PC and XT), and 80286-based (AT) computers, expanded memory
  2697.     typically requires an add-on board and support software.  In
  2698.     386 and 486 computers, expanded memory is typically provided
  2699.     without additional hardware, using the capabilities of the
  2700.     386/486 chips.
  2701.  
  2702.     The 80286 CPU used in the AT, and modern 386 and 486 CPUs, can
  2703.     use much more than the 8088's original 1 MB of memory.  An
  2704.     80286 can use a total of 16 MB;  the 386 and 486 can use
  2705.     up to a whopping 4,096 MB.  This extended memory is not
  2706.     normally available to DOS-based programs, however, without
  2707.     special programming techniques and the help of DOS extenders
  2708.     or memory managers.
  2709.  
  2710.     The memory terms used in this manual include
  2711.  
  2712.          BASE memory: The 640K or less that has traditionally been
  2713.          available for DOS and DOS-based applications.
  2714.  
  2715.          EMS or LIM EMS Memory:  Memory which conforms to the
  2716.          Expanded Memory Specification, developed by Lotus, Intel,
  2717.          and Microsoft, that lets programs and utilities share
  2718.          expanded memory.
  2719.  
  2720.  
  2721.  
  2722.  
  2723. ___________________________________________________________________
  2724. NDOS Reference Manual                                           42
  2725.  
  2726.                                                 ASCII and Key Codes
  2727. ___________________________________________________________________
  2728.  
  2729.          Extended Memory:  Memory beyond 1 MB in 80286, 386, and
  2730.          486 computers.  This memory may be accessed directly, in
  2731.          which case it is referred to as Extended Memory, or
  2732.          through XMS software, in which case it is referred to as
  2733.          XMS Memory (see below).
  2734.  
  2735.          XMS Memory:  Extended memory managed by software which
  2736.          conforms to the Extended Memory Specification (XMS).  XMS
  2737.          lets programs share extended memory without conflict.
  2738.          This specification divides extended memory into extended
  2739.          memory blocks (EMBs).  XMS software also usually manages
  2740.          the HMA and the UMBs (see below).
  2741.  
  2742.          HMA:  The first 64K bytes of extended memory, located
  2743.          just above 1 MB.  Certain specialized programs such as
  2744.          DESQview, some network drivers, and portions of MS-DOS
  2745.          (version 5.0 or later) and DR-DOS (version 5.0 or later)
  2746.          can be loaded into the HMA instead of taking up valuable
  2747.          space in base memory.
  2748.  
  2749.          UMBs:  386 and 486 computers can electronically move
  2750.          pieces of extended memory into unused space in the upper
  2751.          memory area between 640K and 1 MB.  Each block of this
  2752.          memory is called an Upper Memory Block (UMB).  With DOS
  2753.          5.0 or special 386/486 memory managers, memory-resident
  2754.          programs can be loaded into these UMBs instead of taking
  2755.          up valuable space in base memory.  Some 8086, 8088, and
  2756.          80286 systems can also use UMBs with appropriate
  2757.          additional hardware and software (see page 131 for
  2758.          details).
  2759.  
  2760.  
  2761. ASCII and Key Codes
  2762.  
  2763.     Internally, computers use numbers for everything.  To
  2764.     represent the text that you type, a computer must translate
  2765.     each letter to and from a number.  For all PC-compatible
  2766.     computers, the code used for this translation is called ASCII
  2767.     (American Standard Code for Information Interchange).  ASCII
  2768.     codes are used both for the characters you type and for the
  2769.     characters that are displayed on the screen.
  2770.  
  2771.     The original ASCII code has 128 values for upper and lower
  2772.     case letters, numerals, punctuation marks, and control codes.
  2773.     The control codes correspond to pressing the Ctrl key plus an
  2774.     alphabetic character.  Some control codes are also represented
  2775.     on the keyboard with such keys as Tab, Enter, Backspace, and
  2776.     Esc.  IBM, in its original PC, defined an additional 128
  2777.     extended ASCII codes for math symbols, international
  2778.     characters, the line characters used to draw boxes, and some
  2779.  
  2780. ___________________________________________________________________
  2781. NDOS Reference Manual                                           43
  2782.  
  2783.                                                        The Keyboard
  2784. ___________________________________________________________________
  2785.  
  2786.     miscellaneous symbols.  You can enter extended ASCII codes on
  2787.     the keyboard by holding down the Alt key while you type the
  2788.     code number on the numeric key pad.
  2789.  
  2790.     Do not confuse extended ASCII with extended key codes.  The
  2791.     latter include special codes that the computer generates when
  2792.     you press a function key, cursor key, or Alt plus a letter.
  2793.     Those keys do not have any representation in either the ASCII
  2794.     or extended ASCII code systems.  Another set of key codes,
  2795.     called scan codes, is discussed in the section on the keyboard
  2796.     below.
  2797.  
  2798.  
  2799.  
  2800. The Keyboard
  2801.  
  2802.     The original IBM PC, PC/XT, and virtually all XT-compatible
  2803.     computers use an 83-key keyboard with ten function keys.  The
  2804.     earliest PC/AT computer and compatibles added an 84th key,
  2805.     called SysReq, but left the rest of the keyboard the same.
  2806.     Most 80286, 386, and 486 computers now use an "enhanced"
  2807.     keyboard with 101 or more keys, including 12 or more function
  2808.     keys.
  2809.  
  2810.     When you press a single key or a key combination, the computer
  2811.     translates the keystroke into two numbers.  For all
  2812.     alphabetic, numeric, and punctuation keys, the Tab, Enter,
  2813.     Backspace, Esc keys and Ctrl plus an alphabetic key, these
  2814.     numbers are an ASCII code plus a scan code.  The ASCII code
  2815.     represents the key's meaning; the scan code identifies which
  2816.     specific key was pressed.  For example, many keyboards have
  2817.     two plus [+] keys, one above the equal sign and one on the
  2818.     numeric keypad.  Both generate the same ASCII code, but they
  2819.     generate different scan codes.
  2820.  
  2821.     Keys which are not represented by ASCII codes are translated
  2822.     to an ASCII 0 plus an extended key code.  These keys include
  2823.     the function keys, the cursor keys, and Alt plus a key.  The
  2824.     extended key code for a key is generally the same as the scan
  2825.     code for that key.
  2826.  
  2827.     Some keys, like the Alt, Ctrl, and Shift by themselves or in
  2828.     combination with each other, plus the Print Screen, SysReq,
  2829.     Scroll Lock, Pause, Break, Num Lock, and Caps Lock do not have
  2830.     any code representations at all.  The computer performs
  2831.     special actions automatically when you press these keys (for
  2832.     example, it switches your keyboard into Caps Lock mode when
  2833.     you press the Caps Lock key), and does not report the
  2834.  
  2835.  
  2836.  
  2837. ___________________________________________________________________
  2838. NDOS Reference Manual                                           44
  2839.  
  2840.                                                               Video
  2841. ___________________________________________________________________
  2842.  
  2843.     keystrokes to whatever program is running unless the program
  2844.     has been written specially to accept them.
  2845.  
  2846.     It is up to the computer to smooth over the differences
  2847.     between the different keyboards.  That is part of the reason
  2848.     why not all keyboards can be used with all computers.
  2849.  
  2850.     Appendix B has a complete list of the scan codes of each of
  2851.     the keys on your keyboard.
  2852.  
  2853.  
  2854. Video
  2855.  
  2856.     NDOS is a "character-based" program, which means that it works
  2857.     in text mode on your computer.  In text mode, the screen
  2858.     displays text in a single font, but cannot mix fonts or
  2859.     display graphics.  NDOS can run graphics programs which change
  2860.     your screen to graphics mode, but the screen must be returned
  2861.     to text mode whenever NDOS is active.  In the early days of
  2862.     the IBM PC, text mode was a single, simple video operating
  2863.     environment.  Today, advanced video boards and video software
  2864.     have created a wide range of text modes.
  2865.  
  2866.     The original IBM PC monochrome and CGA color video cards can
  2867.     display 80 columns and 25 rows of text.  Newer, advanced video
  2868.     systems normally run in this 80 x 25 display mode but can also
  2869.     display more columns and rows.  For example, EGA video cards
  2870.     can display 43 rows of text and VGA video cards can display 50
  2871.     rows.  With special driver programs, a VGA can display 60 rows
  2872.     or more and up to 132 columns of text.  Each of these
  2873.     different screen configurations is a different text mode.
  2874.  
  2875.     NDOS supports whatever number of rows and columns of text you
  2876.     decide to use.  It doesn't have commands to switch from one
  2877.     screen size to another -- you will need to use the software
  2878.     that came with your computer or video board to do that -- but
  2879.     it can read and work with the number of rows and columns on
  2880.     your screen.
  2881.  
  2882.  
  2883. ANSI Drivers
  2884.  
  2885.     Every version of DOS includes a program called ANSI.SYS.  This
  2886.     program lets you use text colors other than drab white on
  2887.     black, redefine keys, and control screen output.  Commercial
  2888.     ANSI drivers are available as replacements for ANSI.SYS.  The
  2889.     commercial programs usually include many new features, boost
  2890.     screen display speed dramatically, and support text displays
  2891.     that have more than 80 columns and 25 lines.
  2892.  
  2893.  
  2894. ___________________________________________________________________
  2895. NDOS Reference Manual                                           45
  2896.  
  2897.                                                        ANSI Drivers
  2898. ___________________________________________________________________
  2899.  
  2900.     NDOS automatically determines whether you have an ANSI driver
  2901.     installed.  If you do, NDOS will use the driver to clear the
  2902.     screen and set screen colors.
  2903.  
  2904.     Several NDOS commands provide replacements for traditional
  2905.     ANSI.SYS commands.  For example, NDOS has commands to set the
  2906.     screen colors and display text in specific colors.  These
  2907.     commands are easier to understand and use than traditional
  2908.     ANSI.SYS control sequences.  Some of these commands manipulate
  2909.     screen colors directly.  Others use an ANSI driver if one is
  2910.     installed, but save you the work of figuring out complex ANSI
  2911.     control sequences.  Any special interaction between NDOS
  2912.     commands and the ANSI.SYS driver is described in the
  2913.     documentation for each command.
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951. ___________________________________________________________________
  2952. NDOS Reference Manual                                           46
  2953.  
  2954.                                                 At the Command Line
  2955. ___________________________________________________________________
  2956.  
  2957.  
  2958. CHAPTER 5, USING NDOS
  2959.  
  2960.  
  2961. NDOS is both a collection of commands and a set of features which
  2962. make your computer easier to use.  The commands are explained in
  2963. the Command Reference section which begins on page 153.  This
  2964. section of the manual primarily explains each of the NDOS features
  2965. that are not directly related to individual commands.
  2966.  
  2967. Most of the features described in this section are easy to use, but
  2968. a few are more technical in nature.  Such features are marked with
  2969. a ## next to the feature name or the paragraph which describes the
  2970. feature's operation.
  2971.  
  2972. As you read through this section, we urge you to experiment with
  2973. the features that catch your interest and pass over any which seem
  2974. too complicated.  Come back to this section as you gain expertise
  2975. with NDOS, and you will probably discover that the more complex
  2976. features will seem easy and very useful.  NDOS doesn't require that
  2977. you learn any more than you want, and even if you are a computer
  2978. novice, you'll find some features that will interest you
  2979. immediately.
  2980.  
  2981. If you come across terms or concepts in this chapter that you are
  2982. unsure about, refer to Chapter 4, "General Concepts," the Glossary
  2983. on page 329, or the Index.
  2984.  
  2985.  
  2986. At the Command Line
  2987.  
  2988.     NDOS, like conventional DOS, displays a c:\> prompt when it is
  2989.     waiting for you to enter a command.  (The actual text depends
  2990.     on the current drive and directory, as well as your PROMPT
  2991.     settings.)  This is called the command line and the prompt is
  2992.     asking you to enter a command, an alias or batch filename, or
  2993.     the instructions necessary to begin an application program.
  2994.  
  2995.     This section of the manual explains the NDOS features that
  2996.     will help you while you are typing in commands, and how NDOS
  2997.     interprets keystrokes entered at the command line.  The
  2998.     keystrokes discussed here are the ones NDOS normally uses.  If
  2999.     you prefer using different keystrokes to perform these
  3000.     functions, you can reassign virtually all NDOS keystrokes with
  3001.     keystroke directives in the NDOS.INI configuration file (see
  3002.     page 108).
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008. ___________________________________________________________________
  3009. NDOS Reference Manual                                           47
  3010.  
  3011.                                                 At the Command Line
  3012. ___________________________________________________________________
  3013.  
  3014.     Command Line Editing
  3015.  
  3016.     The NDOS command line works like a single-line word processor,
  3017.     allowing you to edit any part the command line at any time
  3018.     before you press Enter to execute the command, or Esc to erase
  3019.     it.  NDOS extends the command line to a maximum of 255
  3020.     characters, and allows you to edit the command line even when
  3021.     it exceeds the width of your screen.
  3022.  
  3023.     NDOS recognizes the following editing keys when you are typing
  3024.     a command (the words Ctrl and Shift mean to press the Ctrl
  3025.     [Control] or Shift key together with the other key named):
  3026.  
  3027.     Cursor Movement:
  3028.  
  3029.           LeftArrow        Move the cursor left one character.
  3030.           RightArrow       Move the cursor right one character.
  3031.           Ctrl-LeftArrow   Move the cursor left one word.
  3032.           Ctrl-RightArrow  Move the cursor right one word.
  3033.           Home             Move the cursor to the beginning of the
  3034.                            line.
  3035.           End              Move the cursor to the end of the line.
  3036.  
  3037.     Insert and Delete:
  3038.  
  3039.           Ins              Toggle between insert and overtype
  3040.                            mode.
  3041.           Del              Delete the character at the cursor.
  3042.           Backspace        Delete the character to the left of the
  3043.                            cursor.
  3044.           Ctrl-L           Delete the word or partial word to the
  3045.                            left of the cursor.
  3046.           Ctrl-R or
  3047.           Ctrl-Backspace   Delete the word or partial word to the
  3048.                            right of the cursor.
  3049.           Ctrl-Home        Delete from the beginning of the line
  3050.                            to the cursor.
  3051.           Ctrl-End         Delete from the cursor to the end of
  3052.                            the line.
  3053.           Esc              Delete the entire line.
  3054.           Ctrl-C or
  3055.           Ctrl-Break       Cancel the command.
  3056.           Enter or Return  Execute the command line.
  3057.  
  3058.   ##Sometimes you may need to have NDOS interpret a keystroke
  3059.     literally and place it on the command line instead of
  3060.     performing the usual action listed above.  For example,
  3061.     suppose you have a program that requires a Ctrl-R character on
  3062.     its command line.  Normally you couldn't type this keystroke
  3063.  
  3064.  
  3065. ___________________________________________________________________
  3066. NDOS Reference Manual                                           48
  3067.  
  3068.                                                 At the Command Line
  3069. ___________________________________________________________________
  3070.  
  3071.     at the NDOS prompt, because NDOS would interpret it as a
  3072.     "Delete word right" command.
  3073.  
  3074.     To get around this problem, use the special keystroke Alt-255.
  3075.     You enter Alt-255 by holding down the Alt key while you type
  3076.     255 on the numeric keypad, then releasing the Alt key (you
  3077.     must use the number keys on the numeric pad; the row of keys
  3078.     at the top of your keyboard won't work).  When NDOS sees the
  3079.     Alt-255, it interprets the next keystroke literally and places
  3080.     it on the command line, ignoring any special meaning it would
  3081.     normally have as a NDOS command line editing or history
  3082.     keystroke.  You can use Alt-255 to suppress the normal meaning
  3083.     of command line editing keystrokes even if they have been
  3084.     reassigned with key mapping directives in NDOS.INI (see page
  3085.     108), and Alt-255 itself can be reassigned with the
  3086.     CommandEscape directive.
  3087.  
  3088.  
  3089.     Command History and Recall
  3090.  
  3091.     Each time you execute a command, NDOS saves the command line
  3092.     in a command history list.  NDOS lets you display the saved
  3093.     commands, search the list, modify commands, and rerun
  3094.     commands.
  3095.  
  3096.     The simplest use of the command history list is to repeat a
  3097.     command exactly.  For example, you might enter the command
  3098.  
  3099.          c:\> dir b:*.wks;*.doc
  3100.  
  3101.     to see some of the files on drive B:.  You might move some new
  3102.     files to drive B: and then want to repeat the DIR command.
  3103.     Just press the UpArrow key repeatedly to scan back through
  3104.     the history list.  When the DIR command appears, press Enter
  3105.     to execute it again.
  3106.  
  3107.     After you have found a command, you can edit it before
  3108.     pressing Enter.  You will appreciate this feature when you
  3109.     have to execute a series of commands that differ only slightly
  3110.     from each other.
  3111.  
  3112.     The history list is "circular".  If you move to the last
  3113.     command in the list and then press the DownArrow one more
  3114.     time, you'll see the first command in the list.  Similarly, if
  3115.     you move to the first command in the list and then press the
  3116.     UpArrow one more time, you'll see the last command in the
  3117.     list.
  3118.  
  3119.     You can have NDOS search the command history list to find a
  3120.     previous command quickly using command completion.  Just enter
  3121.  
  3122. ___________________________________________________________________
  3123. NDOS Reference Manual                                           49
  3124.  
  3125.                                                 At the Command Line
  3126. ___________________________________________________________________
  3127.  
  3128.     the first few characters of the command you want to find and
  3129.     press UpArrow.  You only need to enter enough characters to
  3130.     identify the command that you want to find.  For example, to
  3131.     find the DIR command, enter DI and then press UpArrow.  If
  3132.     you press the UpArrow key a second time, NDOS will display
  3133.     the next command that matches.  NDOS will beep if there are no
  3134.     matching commands.  The search process stops as soon as you
  3135.     type one of the NDOS editing keys, whether or not the line is
  3136.     changed.  At that point, the line you're viewing becomes the
  3137.     new line to match if you press UpArrow again.
  3138.  
  3139.     You can specify the size of the command history list with the
  3140.     History directive in NDOS.INI (see page 115).  When the list
  3141.     is full, NDOS discards the oldest commands to make room for
  3142.     new ones.  You can also use the HistMin directive in NDOS.INI
  3143.     to enable or disable history saves and to specify the shortest
  3144.     command line that NDOS will save (see page 119).
  3145.  
  3146.     You can prevent NDOS from saving a command line by beginning
  3147.     it with an at-sign [@].
  3148.  
  3149.     Command History Keys:
  3150.  
  3151.           UpArrow          Recall the previous (or most recent)
  3152.                            command, or the most recent command
  3153.                            that matches a partial command line.
  3154.           DownArrow        Recall the next (or oldest) command, or
  3155.                            the oldest command that matches a
  3156.                            partial command line.
  3157.           F3               Fill in the rest of the command line
  3158.                            from the previous command, beginning at
  3159.                            the current cursor position.
  3160.           Ctrl-D           Delete the currently displayed history
  3161.                            list entry, erase the command line, and
  3162.                            display the previous matching history
  3163.                            list entry.
  3164.           Ctrl-E           Display the last entry in the history
  3165.                            list.
  3166.           Ctrl-K           Save the current command line in the
  3167.                            history list without executing it, and
  3168.                            then clear the command line
  3169.           @                As the first character in a line:  Do
  3170.                            not save the current line in the
  3171.                            history list when it is executed; do
  3172.                            not store it in the CMDLINE environment
  3173.                            variable; and remove the CMDLINE
  3174.                            variable from the environment (this
  3175.                            helps reduce environment space when
  3176.                            loading TSRs).
  3177.  
  3178.  
  3179. ___________________________________________________________________
  3180. NDOS Reference Manual                                           50
  3181.  
  3182.                                                 At the Command Line
  3183. ___________________________________________________________________
  3184.  
  3185.     Use F3 when your new command is different from your old one by
  3186.     just a character or two at the beginning.  For example,
  3187.     suppose you want to execute a DIR on several filenames then
  3188.     use DEL to delete those same files.  After the DIR is complete
  3189.     type DEL and press F3; the rest of the command line will be
  3190.     completed for you.  Check that it's correct, and then press
  3191.     Enter to delete the files.  F3 also retrieves the entire
  3192.     previous command (like UpArrow) if nothing has been typed on
  3193.     the line.
  3194.  
  3195.     Use Ctrl-E to "get your bearings" by returning to the end of
  3196.     the list if you've scrolled around so much that you aren't
  3197.     sure where you are any more.
  3198.  
  3199.     Use Ctrl-K to save some work when you've typed a long command
  3200.     and then realize that you weren't quite ready.  For example,
  3201.     if you forget to change directories and notice it after a
  3202.     command is typed or mostly typed, but before you press Enter,
  3203.     just press Ctrl-K to save the command without executing it.
  3204.     Use the CD or CDD command to change to the right directory,
  3205.     press UpArrow twice to retrieve the command you saved, make
  3206.     any final changes to it, and press Enter to execute it.
  3207.  
  3208.  
  3209.     Command History Window
  3210.  
  3211.     You can also view the command history in a scrollable history
  3212.     window, and select the command to modify or re-execute from
  3213.     those displayed in the window.  To activate the history window
  3214.     press PageUp or PageDown at the command line.  NDOS will
  3215.     display a window in the upper right corner of the screen,
  3216.     with the command you most recently executed marked with a
  3217.     highlight.  (If you just finished re-executing a command from
  3218.     the history, then the next command in sequence will be
  3219.     highlighted.)
  3220.  
  3221.     You can scroll the history window up and down one line at a
  3222.     time with UpArrow and DownArrow, and one page (screen) at a
  3223.     time with PageUp and PageDown.  The display is not circular
  3224.     as it is at the prompt, it has fixed beginning and end
  3225.     points.  Home or Ctrl-PageUp will go to the beginning of the
  3226.     history, and End or Ctrl-PageDown will go to the end.  The
  3227.     Ctrl-D (delete from history) key works within the history as
  3228.     it does at the command line.
  3229.  
  3230.     Once you have selected a command in the history window, press
  3231.     Enter to execute it immediately, or Ctrl-Enter to move the
  3232.     line to the prompt for editing (you can not edit the line
  3233.     directly in the history window).
  3234.  
  3235.  
  3236. ___________________________________________________________________
  3237. NDOS Reference Manual                                           51
  3238.  
  3239.                                                 At the Command Line
  3240. ___________________________________________________________________
  3241.  
  3242.     You can bring up a "filtered" history window by typing some
  3243.     characters on the command line, then pressing PageUp or
  3244.     PageDown.  Only those commands matching the typed characters
  3245.     will be displayed in the window.
  3246.  
  3247.     You can control the position and size of the history window
  3248.     with directives in NDOS.INI (see page 119).  You can also
  3249.     change the keys used in the window with key mapping directives
  3250.     in NDOS.INI (see page 125).
  3251.  
  3252.     Command History Window:
  3253.  
  3254.           PageUp or        (from the command line) Open the
  3255.           PageDown         command history window.
  3256.           UpArrow          Scroll the display up one line.
  3257.           DownArrow        Scroll the display down one line.
  3258.           PageUp           (inside the window) Scroll the display
  3259.                            up one page.
  3260.           PageDown         (inside the window) Scroll the display
  3261.                            down one page.
  3262.           Ctrl-PageUp or   Go to the beginning of the history
  3263.           Home             list.
  3264.           Ctrl-PageDown    Go to the end of the history list.
  3265.           or End
  3266.           Ctrl-D           Delete the selected line from the
  3267.                            history list.
  3268.           Enter            Execute the selected line.
  3269.           Ctrl-Enter       Move the selected line to the command
  3270.                            line for editing.
  3271.  
  3272.  
  3273.     Filename Completion
  3274.  
  3275.     The NDOS filename completion can help you by filling in a
  3276.     complete filename on the command line when you only remember
  3277.     part of the name.  For example, suppose you want to copy a
  3278.     file.  You know that its name begins AU but you can't remember
  3279.     the rest of the name.  Type
  3280.  
  3281.          c:\> copy au
  3282.  
  3283.     and then press the Tab key or F9 key.  NDOS will search the
  3284.     current directory for filenames that begin AU and insert the
  3285.     first one onto the command line in place of the AU that you
  3286.     typed.
  3287.  
  3288.     If NDOS found the file that you want, simply complete the
  3289.     command.  If it didn't find the file that you were looking
  3290.     for, press Tab again to substitute the next filename that
  3291.  
  3292.  
  3293. ___________________________________________________________________
  3294. NDOS Reference Manual                                           52
  3295.  
  3296.                                                 At the Command Line
  3297. ___________________________________________________________________
  3298.  
  3299.     begins with AU.  When there are no more filenames that match
  3300.     your pattern, NDOS will beep each time you press Tab or F9.
  3301.  
  3302.     If you go past the filename that you want, press Shift-Tab or
  3303.     F8 to back up and NDOS will return to the previous matching
  3304.     filename.  After you back up to the first filename, NDOS will
  3305.     beep each time you press Shift-Tab.
  3306.  
  3307.     If you want to enter more than one matching filename on the
  3308.     same command line, press F10 when each desired name appears.
  3309.     NDOS will keep that name and place the next matching filename
  3310.     after it on the command line.  You can then use Tab (or F8)
  3311.     and Shift-Tab (or F9) to move through the remaining matching
  3312.     files.
  3313.  
  3314.     The pattern you use for matching may contain any valid
  3315.     filename characters, as well as wildcard characters and NDOS
  3316.     extended wildcards (see page 64).  For example, you can copy
  3317.     the first matching .TXT file by typing
  3318.  
  3319.          c:\> copy *.txt
  3320.  
  3321.     and then pressing Tab.
  3322.  
  3323.     If you don't specify part of a filename before pressing Tab,
  3324.     NDOS will use *.* as the matching pattern.  If you type a
  3325.     filename without an extension, NDOS will add *.* to the name.
  3326.     It will also place a "*" after a partial extension.  If you
  3327.     are typing a group of filenames in an include list (see page
  3328.     67), NDOS will use the part of the include list at the cursor
  3329.     as the pattern to match.
  3330.  
  3331.     When filename completion is used at the start of the command
  3332.     line, NDOS will only try to match directories, executable
  3333.     files (.COM, .EXE, .BTM, and .BAT), and files with executable
  3334.     extensions, since these are the only filenames that it makes
  3335.     sense to use at the start of a command.  If a directory is
  3336.     found a "\" will be appended to enable an automatic directory
  3337.     change (see below).
  3338.  
  3339.     If you would rather select files from a list of matching
  3340.     filenames, see the SELECT command on page 275.
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350. ___________________________________________________________________
  3351. NDOS Reference Manual                                           53
  3352.  
  3353.                                                 At the Command Line
  3354. ___________________________________________________________________
  3355.  
  3356.     Filename Completion Keys:
  3357.  
  3358.           F8 or Shift-Tab  Get the previous matching filename.
  3359.           F9 or Tab        Get the next matching filename.
  3360.           F10              Keep the current matching filename and
  3361.                            display the next matching name
  3362.                            immediately after the current one.
  3363.  
  3364.  
  3365.     Multiple Commands
  3366.  
  3367.     At times, you probably know the next two or three commands
  3368.     that you want NDOS to execute.  Instead of waiting for each
  3369.     one to finish before you type the next, you can type them all
  3370.     on the same command line, separated by a caret [^].  For
  3371.     example, if you know you want to copy all of your .TXT files
  3372.     to drive A: and next run CHKDSK to be sure that the file
  3373.     structure in drive A: is OK, you can type the following
  3374.     command line:
  3375.  
  3376.          c:\> copy *.txt a: ^ chkdsk a:
  3377.  
  3378.     If you don't like using the caret as the command separator,
  3379.     you can pick another character using the SETDOS command (see
  3380.     page 283) or the CommandSep directive in NDOS.INI (see page
  3381.     118).
  3382.  
  3383.     You may put as many commands on the command line as you wish,
  3384.     as long as the total length of the command line does not
  3385.     exceed 255 characters.
  3386.  
  3387.     You can use multiple commands in batch files (see page 91) and
  3388.     alias definitions (see page 88) as well as from the command
  3389.     line.
  3390.  
  3391.  
  3392.     Automatic Directory Changes
  3393.  
  3394.     The NDOS automatic directory change feature gives you a quick
  3395.     method for changing directories.  You can use an automatic
  3396.     directory change in place of the CD or CDD command.  To do so,
  3397.     simply type the name of the directory you want to change to at
  3398.     the prompt, with a backslash [\] at the end, and NDOS will
  3399.     switch to that directory.  For example:
  3400.  
  3401.          c:\> nu\
  3402.          c:\nu>
  3403.  
  3404.     This feature can make directory changes very simple when it's
  3405.     combined with the CDPATH environment variable (see page 107).
  3406.  
  3407. ___________________________________________________________________
  3408. NDOS Reference Manual                                           54
  3409.  
  3410.                                                 At the Command Line
  3411. ___________________________________________________________________
  3412.  
  3413.     CDPATH includes a list of directories for the CD and CDD
  3414.     commands to search if the directory you name does not exist
  3415.     below the current directory.  Automatic directory changes use
  3416.     CDPATH as well.  For example, suppose CDPATH is set to
  3417.     C:\;D:\;E:\, and the directory WIN exists on drive E:.  You
  3418.     can change to this directory with a single word on the command
  3419.     line:
  3420.  
  3421.          c:\nu> win\
  3422.          e:\win>
  3423.  
  3424.     In executing the command shown above, NDOS first looks for a
  3425.     WIN subdirectory of the current directory, i.e. C:\NDOS\WIN.
  3426.     If no such directory exists it looks for a WIN subdirectory in
  3427.     every directory in the CDPATH list, and changes to the first
  3428.     one it finds.
  3429.  
  3430.     Internally, automatic directory changes use the CDD command,
  3431.     so the text before the backslash can include a drive letter, a
  3432.     full path, or a partial path.  Arguments like "...." are
  3433.     allowed.  Automatic directory changes save the current
  3434.     directory, so it can be recalled with a "CDD -" or "CD -"
  3435.     command.  For more information on directory changes see CD on
  3436.     page 175 and CDD on page 177.
  3437.  
  3438.     Automatic directory changes will not work if the directory
  3439.     name you enter is the same as the name of a NDOS internal
  3440.     command.  NDOS always checks for internal commands before
  3441.     automatic directory changes, to allow commands like CD\ to
  3442.     work.
  3443.  
  3444.  
  3445.     Temporarily Disabling Aliases
  3446.  
  3447.     At times, you may want to temporarily disable an alias that
  3448.     you have defined.  You may have an alias that changes the
  3449.     defaults of a particular command, for example, and want to run
  3450.     the unmodified version of the command.  To do so, precede the
  3451.     command name with an asterisk [*].  For example, if you have
  3452.     an alias for DIR which displays directories in two-column paged
  3453.     mode by default, you can use the following command to display
  3454.     a directory in the normal single-column, non-paged mode:
  3455.  
  3456.          c:\> *dir
  3457.  
  3458.  
  3459.     Command Line Help
  3460.  
  3461.     NDOS includes a complete help program (called NDOSHELP.EXE).
  3462.     The help system includes complete help for all NDOS internal
  3463.  
  3464. ___________________________________________________________________
  3465. NDOS Reference Manual                                           55
  3466.  
  3467.                                                 At the Command Line
  3468. ___________________________________________________________________
  3469.  
  3470.     commands, all standard DOS external commands, and many NDOS
  3471.     features.  It is indexed and fully cross-referenced, so you
  3472.     can move easily among related commands.
  3473.  
  3474.     You can start the NDOS help system to get help for any NDOS or
  3475.     DOS command in several different ways.
  3476.  
  3477.     If you type NDOSHELP at the NDOS prompt, a list of all help
  3478.     topics will be displayed.  Move the cursor bar to the topic
  3479.     you want using a mouse or the arrow keys, and press Enter to
  3480.     see help on that topic.
  3481.  
  3482.     If you type NDOSHELP followed by a topic on the command line,
  3483.     NDOS will skip the opening help screen and go directly to that
  3484.     topic.  For example, if you need help with the COPY command,
  3485.     you can type:
  3486.  
  3487.          ndoshelp copy
  3488.  
  3489.     If you press F1 at the NDOS prompt, NDOS will display the list
  3490.     of all help topics just as if you had entered the NDOSHELP
  3491.     command.  If you have already typed part or all of a command
  3492.     on the line, NDOS will provide "context-sensitive" help by
  3493.     using the first word on the line as a help topic.  If it's a
  3494.     valid topic, you will see help for that topic automatically;
  3495.     if not, you will see the list of all help topics and you can
  3496.     pick the topic you want.  For example, if you press F1 after
  3497.     entering each of the command lines shown below you will get
  3498.     the display indicated:
  3499.  
  3500.          c:\>                      List of ndoshelp topics
  3501.          c:\> copy *.* a:          Help on COPY
  3502.          c:\> c:\util\map          List of NDOSHELP topics
  3503.  
  3504.     If you type the name of any NDOS internal command at the NDOS
  3505.     prompt, followed by a slash and a question mark [/?] like
  3506.     this:
  3507.  
  3508.          copy /?
  3509.  
  3510.     then NDOS will display help for the command in a "quick-
  3511.     reference" style.  Output from a /? display may be redirected
  3512.     with > or >>.  The /? option may not work correctly if you
  3513.     have redefined how the command operates with an alias.  In
  3514.     this case you may need to add an asterisk to the beginning of
  3515.     the command to prevent NDOS from processing the alias:
  3516.  
  3517.          alias copy copy /r
  3518.          *copy /?
  3519.  
  3520.  
  3521. ___________________________________________________________________
  3522. NDOS Reference Manual                                           56
  3523.  
  3524.                                                 At the Command Line
  3525. ___________________________________________________________________
  3526.  
  3527.     /? will only access the NDOS help system when you use it with
  3528.     a NDOS internal command.  If you use it with an external
  3529.     command name, the external command will be executed and will
  3530.     interpret the /? parameter according to its own rules.  Some
  3531.     external commands, including MS-DOS 5.0 external utility
  3532.     programs,  do display help when run with a /? parameter, but
  3533.     this a characteristic of these commands and does not depend on
  3534.     NDOS.  Many other external commands do not have this feature.
  3535.  
  3536.     Once you've started the NDOS help system with NDOSHELP or F1,
  3537.     you can use a standard set of keystrokes to navigate.  The
  3538.     table below gives a brief summary of keys you can use in the
  3539.     help topic list, and in a help text screen.  For details, see
  3540.     the topic Help at the beginning of the topic list in the help
  3541.     system itself.  For details on mouse usage, see the topic
  3542.     Mouse at the beginning of the topic list.
  3543.  
  3544.     Help topic list keys:
  3545.  
  3546.           Arrow Keys       Move the highlight to a different
  3547.                            topic.
  3548.           Enter            Display NDOSHELP on the highlighted
  3549.                            topic.
  3550.           Esc              Return to NDOS.
  3551.           Any other key    Attempt to match the characters typed
  3552.                            with one of the names in the topic
  3553.                            list.
  3554.  
  3555.     Help text screen keys:
  3556.  
  3557.           UpArrow          Scroll up one line in the display.
  3558.           DownArrow        Scroll down one line in the display.
  3559.           PageUp           Scroll up one page in the display.
  3560.           PageDown         Scroll down one page in the display.
  3561.           Shift-Tab        Move the cross-reference highlight to
  3562.                            the previous item.
  3563.           Tab              Move the cross-reference highlight to
  3564.                            the next item.
  3565.           Enter            Switch to the topic shown by the
  3566.                            highlighted cross-reference item.
  3567.           Esc              Return to the topic list, or back to
  3568.                            NDOS if this topic was displayed
  3569.                            directly without using the topic list.
  3570.  
  3571.     The help system normally restores the screen when exiting.
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578. ___________________________________________________________________
  3579. NDOS Reference Manual                                           57
  3580.  
  3581.                                                    Input and Output
  3582. ___________________________________________________________________
  3583.  
  3584.  
  3585.  
  3586.  
  3587.     ##  Command Line Length Limits
  3588.  
  3589.     When you first enter a command at the prompt or in an alias or
  3590.     batch file, it can be up to 255 characters long.
  3591.  
  3592.     As NDOS scans the command line and substitutes the content of
  3593.     aliases and environment variables for their names, the line
  3594.     usually gets longer.  NDOS maintains an internal buffer which
  3595.     allows the command line to grow to as much as 511 characters
  3596.     in length during the expansion process.  If your use of
  3597.     aliases or environment variables causes the command line to
  3598.     exceed this limit, NDOS will display an error message and
  3599.     terminate execution of the line that caused the problem.
  3600.  
  3601.  
  3602. Input and Output
  3603.  
  3604.     NDOS commands and many programs get their input from the
  3605.     computer's standard input device and send their output to the
  3606.     standard output device.  Some programs also send special
  3607.     messages to the standard error device.  Normally, the keyboard
  3608.     is used for standard input and the video screen for both
  3609.     standard output and standard error.  But you can temporarily
  3610.     change these devices for special tasks.
  3611.  
  3612.     For example, suppose you want a printed list of the files in a
  3613.     directory.  If you change the standard output to the printer
  3614.     and issue a DIR command, the task is easy.  DIR prints to
  3615.     standard output, and you have redirected standard output to
  3616.     the printer, so the DIR command prints filenames instead of
  3617.     displaying them on the screen.  You can just as easily send
  3618.     the output of DIR (or any other command) to a file or a serial
  3619.     port.
  3620.  
  3621.     NDOS has three methods of manipulating input and output:
  3622.     Redirection, Piping, and the Keystack.  All three are
  3623.     explained in this section.
  3624.  
  3625.     Redirection and piping affect the standard input, standard
  3626.     output, and standard error devices.  They do not work with
  3627.     application programs which read the keyboard hardware
  3628.     directly, or which write directly to the screen.
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635. ___________________________________________________________________
  3636. NDOS Reference Manual                                           58
  3637.  
  3638.                                                    Input and Output
  3639. ___________________________________________________________________
  3640.  
  3641.  
  3642.     Redirection
  3643.  
  3644.     Redirection replaces standard input, standard output, and
  3645.     standard error with another device like the printer or serial
  3646.     port, or with a file.  The redirection lasts for one command
  3647.     and then everything returns to normal.  You have to use some
  3648.     discretion when you use redirection with a device;  there is
  3649.     no way to get input from the printer, for example.
  3650.  
  3651.     In the descriptions below, filename means either the name of a
  3652.     file or of an appropriate device (PRN, LPT1, LPT2, or LPT3 for
  3653.     printers; COM1 to COM4 for serial ports; CON for the keyboard
  3654.     and screen; etc.).
  3655.  
  3656.     To use redirection, place the redirection symbol and filename
  3657.     at the end of the command line, after the command name and any
  3658.     parameters.  For example, to redirect the output of the DIR
  3659.     command to a file called DIRLIST, you could use a command line
  3660.     like this:
  3661.  
  3662.          c:\> dir /b1 *.dat > dirlist
  3663.  
  3664.     You can use both input and output redirection for the same
  3665.     command, if both are appropriate:
  3666.  
  3667.          c:\> sort < dirlist > dirlist.srt
  3668.  
  3669.     In most cases, redirection works best when there is a space
  3670.     after the command and before the redirection symbol, though
  3671.     this is not always necessary.
  3672.  
  3673.     Here are the redirection options supported by NDOS:
  3674.  
  3675.          To get input from a file or device instead of from the
  3676.          keyboard:
  3677.  
  3678.               < filename
  3679.  
  3680.          To redirect standard output to a file or device:
  3681.  
  3682.               > filename
  3683.  
  3684.          To redirect standard output and standard error to a file
  3685.          or device:
  3686.  
  3687.               >& filename
  3688.  
  3689.          To redirect standard error only to a file or device:
  3690.  
  3691.               >&> filename
  3692. ___________________________________________________________________
  3693. NDOS Reference Manual                                           59
  3694.  
  3695.                                                    Input and Output
  3696. ___________________________________________________________________
  3697.  
  3698.  
  3699.     If you want to append output to the end of a file, replace the
  3700.     first ">" in the last three commands above with ">>" (use >>,
  3701.     >>&, and >>&>).
  3702.  
  3703.   ##When output is directed to a file with >, >&, or >&>, if the
  3704.     file already exists, it will be overwritten.  You can protect
  3705.     existing files by using the SETDOS /N1 command (see page 283)
  3706.     or the NoClobber directive in NDOS.INI (see page 120).
  3707.  
  3708.   ##When output is appended to a file with >>, >>&, or >>&>, the
  3709.     file will be created if it doesn't already exist.  Setting
  3710.     NoClobber will also prevent the creation of a new file.  You
  3711.     can temporarily override the current setting of NoClobber by
  3712.     using an exclamation mark [!] after the redirection symbol.
  3713.     For example, to redirect the output of DIR to the file DIROUT,
  3714.     and allow overwriting of any existing file despite the
  3715.     NoClobber setting:
  3716.  
  3717.          c:\> dir >! dirout
  3718.  
  3719.   ##NDOS redirection is fully nestable.  For example, you can
  3720.     invoke a batch file and redirect all of its output to a file
  3721.     or device.  Output redirection on a command within the batch
  3722.     file will take effect for that command only; when the command
  3723.     is completed, output will revert to the redirected output file
  3724.     or device in use for the batch file as a whole.
  3725.  
  3726.   ##For another method of changing the standard input and output
  3727.     devices see CTTY on page 188.
  3728.  
  3729.  
  3730.     Piping
  3731.  
  3732.     You can also create a "pipe," which means sending the standard
  3733.     output of one command to the standard input of another
  3734.     command.  To send the standard output of command1 to the
  3735.     standard input of command2:
  3736.  
  3737.          command1 | command2
  3738.  
  3739.     To send the standard output and standard error of command1 to
  3740.     the standard input of command2:
  3741.  
  3742.          command1 |& command2
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749. ___________________________________________________________________
  3750. NDOS Reference Manual                                           60
  3751.  
  3752.                                                    Input and Output
  3753. ___________________________________________________________________
  3754.  
  3755.     For example, to take the output of the SET command (which
  3756.     displays a list of your environment variables and their
  3757.     values) and pipe it to the DOS SORT utility to generate a
  3758.     sorted list, you would use the command:
  3759.  
  3760.          c:\> set | sort
  3761.  
  3762.     To do the same thing, then pipe the sorted list to the NDOS
  3763.     LIST command for full-screen viewing (see page 245) type:
  3764.  
  3765.          c:\> set | sort | list /s
  3766.  
  3767.   ##NDOS creates one or two temporary files to hold the output of
  3768.     pipes.  The files are named P1.$00 and P2.$00.  By default,
  3769.     these files are stored in the root directory of the boot
  3770.     drive, but you can override this with either the TEMPNDOS or
  3771.     TEMP environment variable (see page 106 and 107).  The last two
  3772.     characters of the extension will change with the shell nesting
  3773.     level (00 for the primary shell, 01 for the first secondary
  3774.     shell, and so on).
  3775.  
  3776.   ##The NDOS commands TEE and Y (see pages 290 and 303) are "pipe
  3777.     fittings" which add more flexibility to pipes.
  3778.  
  3779.  
  3780.     Keystack
  3781.  
  3782.     The NDOS Keystack overcomes two weaknesses of input
  3783.     redirection: many programs ignore standard input and read the
  3784.     keyboard directly, and input redirection doesn't end until the
  3785.     program or command terminates.  You can't, for example, use
  3786.     redirection to send the opening commands to a program and then
  3787.     type the rest of the commands yourself.  But the Keystack lets
  3788.     you do exactly that.
  3789.  
  3790.     The NDOS Keystack, which is often used in batch files and
  3791.     aliases, sends keystrokes to an application program.  Once the
  3792.     Keystack is empty, the program will receive the rest of its
  3793.     input from the keyboard.  The Keystack is useful when you want
  3794.     a program to take certain actions automatically when it
  3795.     starts.
  3796.  
  3797.     The Keystack is invoked with the KEYSTACK command (see page
  3798.     239).  It depends on a small resident program called
  3799.     KSTACK.COM, which must be installed in your AUTOEXEC.BAT file
  3800.     (see page 105).  If you don't have KSTACK.COM installed, the
  3801.     KEYSTACK command will display an error message.  If you are
  3802.     using a multitasking system such as DESQview or Windows, see
  3803.     page 142 for information on loading KSTACK within a window.
  3804.  
  3805.  
  3806. ___________________________________________________________________
  3807. NDOS Reference Manual                                           61
  3808.  
  3809.                                                    Input and Output
  3810. ___________________________________________________________________
  3811.  
  3812.     To place the letters, digits, and punctuation marks you would
  3813.     normally type for your program into the keystack, enclose them
  3814.     in double quotation marks:
  3815.  
  3816.          c:\> keystack "myfile"
  3817.  
  3818.     Many other keys can be entered into the Keystack using their
  3819.     names.  This example puts the F1 key followed by the Enter key
  3820.     in the keystack:
  3821.  
  3822.          c:\> keystack F1 Enter
  3823.  
  3824.     See the KEYSTACK command for details on how key names are
  3825.     entered and on using numeric key values along with or instead
  3826.     of key names.
  3827.  
  3828.     Some programs may require a delay between keystrokes.  You can
  3829.     insert a delay with the /W option, followed by a delay time in
  3830.     1/18-seconds.  To add a one-second delay between the keystrokes
  3831.     in the previous example:
  3832.  
  3833.          c:\> keystack F1 /W18 Enter
  3834.  
  3835.     Some programs clear all keystrokes from the keyboard buffer
  3836.     and then accept input.  Place a 0 (zero) in the keystack to
  3837.     tell such programs that the keyboard buffer is empty.  This
  3838.     example reports an empty keyboard buffer and then types
  3839.     myfile:
  3840.  
  3841.          c:\> keystack 0 "myfile"
  3842.  
  3843.     Some programs require both the ASCII code and the key's scan
  3844.     code.  To put both together in the Keystack, multiply the scan
  3845.     code by  256, add the ASCII code, and use the resulting
  3846.     numeric value as an argument to KEYSTACK.  For example, the
  3847.     Enter key has a scan code of 28 and an ASCII code of 13.  The
  3848.     combined code is (28 * 256) + 13 = 7181.  To put the combined
  3849.     code for the Enter key on the keystack:
  3850.  
  3851.          c:\> keystack 7181
  3852.  
  3853.     If a program has different uses for the similar keys on the
  3854.     regular keyboard and the numeric keypad, it will need combined
  3855.     codes.
  3856.  
  3857.     The following command creates an alias (see page 159) that
  3858.     will run a dBASE report called TIMEREP (it should be entered
  3859.     on one line):
  3860.  
  3861.          c:\> alias drpt keystack "use times index times" Enter
  3862.  
  3863. ___________________________________________________________________
  3864. NDOS Reference Manual                                           62
  3865.  
  3866.                                                     File Processing
  3867. ___________________________________________________________________
  3868.  
  3869.               "report form timerep to print" Enter "quit" Enter
  3870.                ^ dbase
  3871.  
  3872.     This command creates an alias called DRPT which puts the
  3873.     following characters on the keystack:
  3874.  
  3875.          the characters "use times index times"
  3876.          the Enter key's code
  3877.          the characters "report form timerep to print"
  3878.          the Enter key's code
  3879.          the characters "quit"
  3880.          and one more Enter key
  3881.  
  3882.     The alias then runs the program dBASE which receives those
  3883.     characters just as if you had typed them.
  3884.  
  3885.     You may have to experiment with some programs to find the
  3886.     proper sequence of keystrokes.  Programs which bypass both DOS
  3887.     and the computer's BIOS, and read keystrokes directly from the
  3888.     keyboard hardware, will not accept input from the NDOS
  3889.     Keystack.  Few programs fit into this category except memory-
  3890.     resident utilities.
  3891.  
  3892.     When you use the Keystack, remember that you must put the
  3893.     keystrokes into the Keystack before you run the program that
  3894.     will receive them.  The Keystack will hold the keystrokes
  3895.     until a program asks for them.
  3896.  
  3897.     See Appendix B on page 315 for a list of ASCII, extended key,
  3898.     and scan codes, and KEYSTACK on page 239 for more information.
  3899.  
  3900.  
  3901. File Processing
  3902.  
  3903.     Most NDOS commands (like COPY, DIR, etc.) and many external
  3904.     commands work on a file or a group of files.  Besides typing
  3905.     the exact name of the file you want to work with, you can use
  3906.     the NDOS shorthand forms of naming files: Extended Parent
  3907.     Directory Names, Wildcards, Multiple Filenames, Include Lists,
  3908.     and Executable Extensions.  These four features are explained
  3909.     in this section.
  3910.  
  3911.     These features apply to NDOS commands only, and generally can
  3912.     not be used to pass filenames to external programs.  For
  3913.     example, NDOS can understand the filename ...\FILE.DAT when
  3914.     it is used in an internal NDOS command like COPY or MOVE.
  3915.     However your editor probably was not designed to support this
  3916.     extension to traditional DOS directory names, and is likely to
  3917.     give an error message if you try to pass it such a name.
  3918.  
  3919.  
  3920. ___________________________________________________________________
  3921. NDOS Reference Manual                                           63
  3922.  
  3923.                                                     File Processing
  3924. ___________________________________________________________________
  3925.  
  3926.     Remember throughout this section that a filename is a base
  3927.     name of one to eight characters, optionally followed by an
  3928.     extension which is a period [.] and one to three more
  3929.     characters.
  3930.  
  3931.  
  3932.     Extended Parent Directory Names
  3933.  
  3934.     NDOS allows you to extend the traditional DOS ".." syntax for
  3935.     naming the parent directory, by adding additional [.]
  3936.     characters.  Each additional [.] represents an additional
  3937.     directory level above the current directory.  For example, to
  3938.     copy the file LETTERS.DAT from the directory C:\DATA to drive
  3939.     A:, while you are in a directory two levels further down in
  3940.     the directory tree:
  3941.  
  3942.          C:\DATA\FINANCE\JANUARY>copy ...\LETTERS.DAT A:
  3943.  
  3944.  
  3945.     Wildcards
  3946.  
  3947.     Wildcards let you specify a file or group of files by typing a
  3948.     partial filename.  NDOS scans the appropriate directory to
  3949.     find all of the files that match the partial name you have
  3950.     specified.
  3951.  
  3952.     Most NDOS commands accept filenames with wildcards anywhere
  3953.     that a full filename can be used.  NDOS recognizes two wildcard
  3954.     characters, the asterisk [*] and the question mark [?], plus a
  3955.     special method of specifying a range of permissible
  3956.     characters.
  3957.  
  3958.     An asterisk [*] in a filename means "any zero or more
  3959.     characters in this position."  For example, this command will
  3960.     display a list of all files in the current directory,
  3961.     regardless of the length of each file's name:
  3962.  
  3963.          c:\> dir *.*
  3964.  
  3965.     If you want to see all of the files with a .TXT extension, you
  3966.     could type this:
  3967.  
  3968.          c:\> dir *.txt
  3969.  
  3970.     If you know that the file you are looking for has a base name
  3971.     that begins with ST and an extension that begins with .D, you
  3972.     can find it this way.  Filenames such as STATE.DAT,
  3973.     STEVEN.DOC, and ST.D will all be displayed:
  3974.  
  3975.          c:\> dir st*.d*
  3976.  
  3977. ___________________________________________________________________
  3978. NDOS Reference Manual                                           64
  3979.  
  3980.                                                     File Processing
  3981. ___________________________________________________________________
  3982.  
  3983.     With NDOS, you can also use the asterisk to match filenames
  3984.     with specific letters somewhere inside the name.  The
  3985.     following example will display any file with a .TXT extension
  3986.     that has the letters AM together anywhere inside its base
  3987.     name.  It will, for example, display AMPLE.TXT, STAMP.TXT,
  3988.     CLAM.TXT, and AM.TXT:
  3989.  
  3990.          c:\> dir *am*.txt
  3991.  
  3992.     A question mark [?] matches any single filename character.
  3993.     Also, DOS automatically extends all base names to 8 characters
  3994.     and all extensions to three characters by adding blanks at the
  3995.     end of the names, if necessary.  The question mark wildcard
  3996.     will match one of these blanks as well as a normal character.
  3997.     For example, if you have files called LETTER.DOC, LETTER1.DOC,
  3998.     and LETTERA.DOC, this command will display all three names:
  3999.  
  4000.          c:\> dir letter?.doc
  4001.  
  4002.     You can put the question mark anywhere in a filename and use
  4003.     as many question marks as you need.  The following example
  4004.     will display files with names like LETTER.DOC and LATTER.DAT,
  4005.     and LITTER.DU:
  4006.  
  4007.          c:\> dir l?tter.d??
  4008.  
  4009.     The use of an asterisk wildcard before other characters, and
  4010.     of the character ranges discussed below, is unique to NDOS.
  4011.     These wildcards work only with NDOS internal commands, not
  4012.     with external programs that accept filenames and wildcards,
  4013.     unless such programs have been written especially to parallel
  4014.     NDOS features.
  4015.  
  4016.   ##In some cases, the question mark wildcard may be too general.
  4017.     You can also tell NDOS what characters you want to accept (or
  4018.     exclude) in a particular position in the filename by using
  4019.     square brackets.  Inside the brackets, you can put the
  4020.     individual acceptable characters or ranges of characters.  For
  4021.     example, if you wanted to match LETTER0.DOC through
  4022.     LETTER9.DOC, you could use this command:
  4023.  
  4024.          c:\> dir letter[0-9].doc
  4025.  
  4026.     You could find all files that have a vowel as the second
  4027.     letter in their name this way.  This example also demonstrates
  4028.     how to mix the wildcard characters:
  4029.  
  4030.          c:\> dir ?[aeiouy]*.*
  4031.  
  4032.  
  4033.  
  4034. ___________________________________________________________________
  4035. NDOS Reference Manual                                           65
  4036.  
  4037.                                                     File Processing
  4038. ___________________________________________________________________
  4039.  
  4040.     You can exclude a group of characters or a range of characters
  4041.     by using an exclamation mark [!] as the first character inside
  4042.     the brackets.  This example displays all filenames that are at
  4043.     least two characters long except those which have a vowel as the
  4044.     second letter in their names:
  4045.  
  4046.          c:\> dir ?[!aeiouy]*.*
  4047.  
  4048.     The next example, which selects files such as AIP, BIP, and
  4049.     TIP but not NIP, demonstrates how you can use multiple ranges
  4050.     inside the brackets.  It will accept a file that begins with
  4051.     an A, B, C, D, T, U, or V:
  4052.  
  4053.          c:\> dir [a-dt-v]ip
  4054.  
  4055.   ##You may use a question mark character inside the brackets, but
  4056.     its meaning is slightly different than a normal (unbracketted)
  4057.     question mark wildcard.  A normal question mark wildcard
  4058.     matches any character or an implied blank at the end of a name
  4059.     or extension.  NDOS will match a question mark inside brackets
  4060.     with any character but not with an implied blank.  For
  4061.     example,
  4062.  
  4063.          c:\> dir letter[?].doc
  4064.  
  4065.     will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC.
  4066.  
  4067.   ##You can repeat any of the wildcard characters in any
  4068.     combination you desire within a single filename.  For
  4069.     example, the following command lists all files which have an
  4070.     A, B, or C as the third character, followed by zero or more
  4071.     additional characters, followed by a D, E, or F, followed
  4072.     optionally by some additional characters, and with an
  4073.     extension beginning with P or Q.  You probably won't need to
  4074.     do anything this complex, but we've included it to show you
  4075.     the flexibility of NDOS wildcards:
  4076.  
  4077.          c:\> dir ??[abc]*[def]*.[pq]*
  4078.  
  4079.  
  4080.     Multiple Filenames
  4081.  
  4082.     Most NDOS file processing commands can work with multiple
  4083.     files at one time.  To use multiple filenames, you simply
  4084.     list the files one after another on the command line,
  4085.     separated by spaces.  You can use wildcards in any or all of
  4086.     the filenames.  For example, to copy all .TXT  and .DOC files
  4087.     from the current directory to drive A:, you could use this
  4088.     command:
  4089.  
  4090.  
  4091. ___________________________________________________________________
  4092. NDOS Reference Manual                                           66
  4093.  
  4094.                                                     File Processing
  4095. ___________________________________________________________________
  4096.  
  4097.          c:\> copy *.txt *.doc a:
  4098.  
  4099.     If the files you want to work with are not in the default
  4100.     directory, you must include the full path with each filename:
  4101.  
  4102.          c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  4103.  
  4104.   ! Multiple filenames are handy when you want to match a group of
  4105.     files which cannot be defined with a single filename and
  4106.     wildcards.  They let you be very specific about which files
  4107.     you want to work with in a command.  When you use multiple
  4108.     filenames with a command that expects both a source and a
  4109.     destination, like COPY or MOVE, be sure that you always
  4110.     include a specific destination on the command line.  If you
  4111.     don't, the command will assume that the last filename is the
  4112.     destination and may overwrite important files.
  4113.  
  4114.     Like extended wildcards and include lists (see below), the
  4115.     NDOS multiple filename feature will work with internal NDOS
  4116.     commands but not with external programs unless those programs
  4117.     have been written to handle multiple filenames on the command
  4118.     line.
  4119.  
  4120.     If you have a list of files to process that's too long to put
  4121.     on the command line or too time-consuming to type, see the
  4122.     SELECT command on page 275 for another way of passing multiple
  4123.     filenames to a command.
  4124.  
  4125.  
  4126.     Include Lists
  4127.  
  4128.     Any NDOS command that accepts multiple filenames can also
  4129.     accept one or more include lists.  An include list is simply a
  4130.     group of filenames, with or without wildcards, separated by
  4131.     semicolons [;].  All files in the include list must be in the
  4132.     same directory.  You may not add a space on either side of the
  4133.     semicolon.
  4134.  
  4135.     If you used an include list instead of multiple filenames for
  4136.     the previous examples, they would look like this:
  4137.  
  4138.          c:\> copy *.txt;*.doc a:
  4139.          c:\> copy a:\details\*.txt;*.doc c:
  4140.  
  4141.     Include lists are similar to multiple filenames, but have
  4142.     three important differences.  First, you don't have to repeat
  4143.     the path to your files if you use an include list, because all
  4144.     of the included files must be in the same directory.  Second,
  4145.     if you use include lists, you aren't as likely to accidentally
  4146.     overwrite files if you forget a destination path for commands
  4147.  
  4148. ___________________________________________________________________
  4149. NDOS Reference Manual                                           67
  4150.  
  4151.                                                     File Processing
  4152. ___________________________________________________________________
  4153.  
  4154.     like COPY, because the last name in the list will be part of
  4155.     the include list, and won't be seen as the destination
  4156.     filename.  Include lists can only be used as the source
  4157.     parameter (the location files are coming from) for COPY and
  4158.     other similar commands.  They cannot be used to specify a
  4159.     destination for files.
  4160.  
  4161.     Third, multiple filenames and include lists are processed
  4162.     differently by the NDOS DIR and SELECT commands.  If you use
  4163.     multiple filenames, all of the files matching the first
  4164.     filename are processed, then all of the files matching the
  4165.     second name, and so on.  When you use an include list, all
  4166.     files that match any entry in the include list are processed
  4167.     together, and will appear together in the directory display or
  4168.     SELECT list.  You can see this difference most clearly if you
  4169.     experiment with both techniques and the DIR command.  For
  4170.     example,
  4171.  
  4172.          c:\> dir *.txt *.doc
  4173.  
  4174.     will list all the .TXT files with a directory header, the file
  4175.     list, and a summary of the total number of files and bytes
  4176.     used.  Then it will do the same for the .DOC files.  However,
  4177.  
  4178.          c:\> dir *.txt;*.doc
  4179.  
  4180.     will display all the files in one list.
  4181.  
  4182.     Like extended wildcards and multiple filenames (see above),
  4183.     the NDOS include list feature will work with internal NDOS
  4184.     commands but not with external programs unless they have been
  4185.     programmed especially to parallel NDOS features.
  4186.  
  4187.  
  4188.     Executable Extensions
  4189.  
  4190.     Normally, when you type a filename (as opposed to an alias or
  4191.     internal command name) as the first word on the command line,
  4192.     NDOS looks for a .COM, .EXE, .BTM, or .BAT file with that name
  4193.     to execute (.COM and .EXE files are executable programs; .BTM
  4194.     and .BAT files are batch files).  You can add to this list of
  4195.     extensions and have NDOS take the actions you want with files
  4196.     that have other extensions as well.  You could have NDOS start
  4197.     your text editor whenever you type the name of a .DOC file, or
  4198.     start your database manager whenever you type the name of a
  4199.     .DAT file.
  4200.  
  4201.     NDOS uses environment variables to define what program or
  4202.     batch file to run for each defined file extension.  To create
  4203.  
  4204.  
  4205. ___________________________________________________________________
  4206. NDOS Reference Manual                                           68
  4207.  
  4208.                                                     File Processing
  4209. ___________________________________________________________________
  4210.  
  4211.     an executable extension, you use the SET command to create a
  4212.     new environment variable.
  4213.  
  4214.     For example, if you want to run a word processor called EDITOR
  4215.     whenever you type the name of a file that has an extension of
  4216.     .EDT, you could use this command:
  4217.  
  4218.          c:\> set .edt=c:\edit\editor.exe
  4219.  
  4220.     The syntax for creating an executable extension is
  4221.  
  4222.          set .ext=d:\path\program [options]
  4223.  
  4224.     where .EXT is the executable file extension, D:\PATH\PROGRAM
  4225.     is the full name of the program or batch file to run, and
  4226.     [options] are any command-line startup options you want to
  4227.     specify for the program.  The pathname is optional if the
  4228.     program is in a directory on your PATH.  The program to run
  4229.     must be a .COM, .EXE, .BTM, or .BAT file or an internal
  4230.     command.  It cannot be an alias.
  4231.  
  4232.     The following example defines BASICA.COM as the processor for
  4233.     .BAS files:
  4234.  
  4235.          c:\> set .bas=c:\dos\basica.com
  4236.  
  4237.     With this definition, if you have a file named PUSHCART.BAS in
  4238.     the current directory and enter the command:
  4239.  
  4240.          c:\> pushcart
  4241.  
  4242.     NDOS will execute the command:
  4243.  
  4244.          c:\dos\basica.com pushcart
  4245.  
  4246.     The next example defines B.EXE (the Brief text editor) as the
  4247.     processor for .C files:
  4248.  
  4249.          c:\> set .c=c:\brief\b.exe -Mxyz
  4250.  
  4251.     Now, if you have a file called HELLO.C and enter the command
  4252.  
  4253.          c:\> hello -i30
  4254.  
  4255.     NDOS will expand the command line and execute this command:
  4256.  
  4257.          c:\brief\b.exe -Mxyz hello.c -i30
  4258.  
  4259.     Notice that NDOS inserts the value of the environment variable
  4260.     at the beginning of the line, including any options, then
  4261.  
  4262. ___________________________________________________________________
  4263. NDOS Reference Manual                                           69
  4264.  
  4265.                                                     The Environment
  4266. ___________________________________________________________________
  4267.  
  4268.     appends the original filename plus its extension, and then
  4269.     the remainder of the original command line.
  4270.  
  4271.     If the program you want to run doesn't accept a filename on
  4272.     its command line as shown in these examples, then executable
  4273.     extensions won't work with that program.
  4274.  
  4275.   ##NDOS searches for executable commands in the following order:
  4276.     .COM, .EXE, .BTM, .BAT, and executable extensions in the order
  4277.     they appear in the environment.  It first searches the current
  4278.     directory, and then each subdirectory specified by the PATH
  4279.     environment variable (if a "." is used in the PATH the current
  4280.     directory is not searched first; see the PATH command on page
  4281.     257 for details).  NDOS recognizes environment variables as
  4282.     executable extensions if they begin with a period followed by
  4283.     one to three valid filename characters.
  4284.  
  4285.     You may need to take this search order into account when using
  4286.     executable extensions.  Using the .BAS example above, if you
  4287.     had a file FORMAT.BAS in the current directory and entered the
  4288.     command FORMAT A:, NDOS would run the BASIC interpreter
  4289.     specified by the executable extension, instead of finding the
  4290.     standard DOS FORMAT command as you intended.  You can get
  4291.     around this by remembering that the DOS FORMAT command is in
  4292.     the file FORMAT.COM.  If you entered the command FORMAT.COM A:
  4293.     then NDOS would not find a match for the executable extension,
  4294.     and would continue the usual search sequence until it found
  4295.     the FORMAT command.
  4296.  
  4297.   ##Executable extensions may include wildcards, so you could, for
  4298.     example, have NDOS run your text editor for any file with an
  4299.     extension beginning with T by defining an executable extension
  4300.     called .T*.    Extended wildcards (e.g. DO[CT] for .DOC and
  4301.     .DOT files) may also be used.
  4302.  
  4303.  
  4304. The Environment
  4305.  
  4306.     The environment is a collection of information about your
  4307.     computer that every program receives.  You can view the
  4308.     environment by typing SET, and modify it with the ESET, SET,
  4309.     and UNSET commands (see pages 211, 280, and 298).
  4310.  
  4311.     Each entry in the environment consists of a variable name
  4312.     (usually in upper case) followed by an equal sign and a string
  4313.     of text.  Some variables are of general use to many programs;
  4314.     some are used only by one program or group of programs.  The
  4315.     content and form of the text string following the equal sign
  4316.     is defined by the program that uses each particular
  4317.     environment variable.  The text strings can be used from the
  4318.  
  4319. ___________________________________________________________________
  4320. NDOS Reference Manual                                           70
  4321.  
  4322.                                                     The Environment
  4323. ___________________________________________________________________
  4324.  
  4325.     NDOS command line, by application programs, and within aliases
  4326.     and batch files.
  4327.  
  4328.     The text string can include any characters except nulls (ASCII
  4329.     0).  The maximum length for the variable name, equal sign, and
  4330.     text string is 255 characters.
  4331.  
  4332.     NDOS can automatically substitute the text for the variable
  4333.     name in a command.  To create the substitution, include a
  4334.     percent sign [%] and a variable name on the command line or in
  4335.     an alias or batch file.  For example, if you create a variable
  4336.     named BACKUP like this:
  4337.  
  4338.          c:\> set BACKUP=*.bak;*.bk!;*.bk
  4339.  
  4340.     and then type
  4341.  
  4342.          c:\> del %BACKUP
  4343.  
  4344.     NDOS will execute the following command:
  4345.  
  4346.          del *.bak;*.bk!;*.bk
  4347.  
  4348.   ##The variable names you use this way may contain any alphabetic
  4349.     or numeric characters, the underscore character [_], and the
  4350.     dollar sign [$].  You can force NDOS to accept other
  4351.     characters by including the full variable name in square
  4352.     brackets, like this: %[AB##2].  You can also "nest"
  4353.     environment variables using square brackets.  For example
  4354.     %[%var1] means "the contents of the variable whose name is
  4355.     stored in VAR1".  A variable referenced with this technique
  4356.     cannot contain more than 255 characters of information.
  4357.  
  4358.   ##If you want to pass a percent sign, or a string beginning with
  4359.     a percent sign, to a command you must use two percent signs in
  4360.     a row.  Otherwise NDOS will see your single percent sign as
  4361.     the beginning of a variable name, and will not pass it on to
  4362.     the command.  For example, to display the string "We're with
  4363.     you 100%", you would use the command:
  4364.  
  4365.          echo We're with you 100%%
  4366.  
  4367.   ##If you embed an environment variable in the PROMPT, it must
  4368.     also be preceded by two percent signs, or the prompt text must
  4369.     be enclosed in back quotes (see page 261 for details).
  4370.  
  4371.   ##Environment variables may be used to contain alias names.
  4372.     Normally NDOS expands aliases before environment variables.
  4373.     However if you use an environment variable name (with a
  4374.     leading percent sign) as the first word in a command line,
  4375.  
  4376. ___________________________________________________________________
  4377. NDOS Reference Manual                                           71
  4378.  
  4379.                                                     The Environment
  4380. ___________________________________________________________________
  4381.  
  4382.     NDOS will substitute the variable value for the name, then
  4383.     check for any alias name which may have been included within
  4384.     the variable's value.  For example, the following commands
  4385.     would generate a two-column directory of the .TXT files:
  4386.  
  4387.          c:\> alias d2 dir /2
  4388.          c:\> set cmd=d2
  4389.          c:\> %cmd *.txt
  4390.  
  4391.   ##The trailing percent sign that was traditionally required for
  4392.     environment variable names is not usually required in NDOS,
  4393.     which accepts any character that cannot be part of a variable
  4394.     name as the terminator.  However the trailing percent can be
  4395.     used to maintain compatibility.
  4396.  
  4397.     The trailing percent sign is needed if you want to concatenate
  4398.     two variable values.  The following examples show the possible
  4399.     interactions between variables and literal strings.  First,
  4400.     create two environment variables called ONE and TWO this way:
  4401.  
  4402.          c:\> set ONE=abcd
  4403.          c:\> set TWO=efgh
  4404.  
  4405.     Now the following combinations produce the output text shown:
  4406.  
  4407.          %ONE%TWO             abcdTWO   ("%ONE%" + "TWO")
  4408.          %ONE%TWO%            abcdTWO   ("%ONE%" + "TWO%")
  4409.          %ONE%%TWO            abcdefgh  ("%ONE%" + "%TWO")
  4410.          %ONE%%TWO%           abcdefgh  ("%ONE%" + "%TWO%")
  4411.          %ONE%[TWO]           abcd[TWO] ("%ONE%" + "[TWO]")
  4412.          %ONE%[TWO]%          abcd[TWO] ("%ONE%" + "[TWO]%")
  4413.          %[ONE]%TWO           abcdefgh  ("%[ONE]" + "%TWO")
  4414.          %[ONE]%TWO%          abcdefgh  ("%[ONE]" + "%TWO%")
  4415.  
  4416.  
  4417.     NDOS Configuration Variables
  4418.  
  4419.     The following environment variables have special meanings in
  4420.     NDOS.  Chapter 6, "Options and Fine Tuning" (see page 100),
  4421.     explains the details of how to set and use each of them,
  4422.     except COLORDIR which is explained under the DIR and SELECT
  4423.     commands on pages 195 and 275.  You can see the current value
  4424.     of each variable, if it exists, with the SET command.
  4425.  
  4426.          CDPATH tells NDOS where to search for directories
  4427.          specified by the CD and CDD commands and in automatic
  4428.          directory changes.  _CDPATH can be used as an alternative
  4429.          to CDPATH if you are using Microsoft Bookshelf, which
  4430.          uses a CDPATH variable for its own purposes.
  4431.  
  4432.  
  4433. ___________________________________________________________________
  4434. NDOS Reference Manual                                           72
  4435.  
  4436.                                                     The Environment
  4437. ___________________________________________________________________
  4438.  
  4439.          CMDLINE is the fully expanded text (up to 255 characters
  4440.          long) of the currently executing NDOS command line.  NDOS
  4441.          sets CMDLINE just before it invokes any .COM, .EXE, .BTM,
  4442.          or .BAT file.  If a command line is prefaced with an "@"
  4443.          to prevent echoing (see page 50), NDOS also will not
  4444.          attempt to put it in CMDLINE, and will remove any old
  4445.          CMDLINE variable from the environment.  This allows you
  4446.          to squeeze out the last few bytes of environment space
  4447.          before loading TSRs by prefacing each TSR command with an
  4448.          "@".
  4449.  
  4450.          COLORDIR controls directory display colors used by DIR
  4451.          and SELECT.
  4452.  
  4453.          COMSPEC contains the full path and name of NDOS itself.
  4454.          COMSPEC is often used by applications which have a "shell
  4455.          to DOS" feature.
  4456.  
  4457.          PATH is a list of directories that NDOS will search for
  4458.          executable files that aren't in the current directory.
  4459.          PATH may also be used by some application programs to
  4460.          find their own files.
  4461.  
  4462.          PROMPT defines the NDOS command line prompt.
  4463.  
  4464.          TEMP specifies the directory where NDOS should store
  4465.          temporary pipe files if the TEMPNDOS variable doesn't
  4466.          exist.  Some other programs also use TEMP to define where
  4467.          they should place their temporary files.
  4468.  
  4469.          TEMPNDOS specifies where NDOS should store temporary pipe
  4470.          files.
  4471.  
  4472.  
  4473.     ##  NDOS Internal Variables
  4474.  
  4475.     The following variables are not actually stored in the
  4476.     environment, but can be used in commands, aliases, and batch
  4477.     files just like any other environment variable.  The values of
  4478.     these variables are stored internally in NDOS and cannot be
  4479.     changed with the SET, UNSET, or ESET command.  However, you
  4480.     can override any of these variables by defining a new variable
  4481.     with the same name, which will be stored in the environment.
  4482.  
  4483.     These internal variables are often used in NDOS batch files
  4484.     and aliases to examine system resources and adjust to the
  4485.     current computer settings.  You can examine the contents of
  4486.     any internal variable from the command line with a command
  4487.     like this:
  4488.  
  4489.  
  4490. ___________________________________________________________________
  4491. NDOS Reference Manual                                           73
  4492.  
  4493.                                                     The Environment
  4494. ___________________________________________________________________
  4495.  
  4496.          c:\> echo %variablename
  4497.  
  4498.     In the list below, the possible values for most variables are
  4499.     shown in double quotation marks for ease of understanding.
  4500.     The actual values returned by the variables do not include the
  4501.     double quotation marks.
  4502.  
  4503.     ? contains the exit code of the last external command.  Many
  4504.     programs return a zero to indicate success and a non-zero value
  4505.     to signal an error.  However, not all programs return an exit
  4506.     code.  If no exit code is returned, the value of %? is
  4507.     undefined.
  4508.  
  4509.     _? contains the exit code of the last internal NDOS command.
  4510.     It is set to zero if the command was successful, non-zero if
  4511.     not.  You must use or save this value immediately, because it
  4512.     is set by every internal command.
  4513.  
  4514.     _ALIAS contains the free space in the alias list, in bytes.
  4515.  
  4516.     _ANSI contains "1" if certain NDOS internal flags indicate
  4517.     that ANSI.SYS or a compatible driver is installed; "0" if not.
  4518.     The internal flags which determine the value of _ANSI depend
  4519.     on the SETDOS /A option (see page 284) and the ANSI directive
  4520.     in NDOS.INI (see page 118), as shown in the table below.  If
  4521.     SETDOS /A is 0 or ANSI  is set to Auto, NDOS tests for the
  4522.     presence of an ANSI driver.  Because there is no standard and
  4523.     100% reliable way to detect an ANSI driver, you may need to
  4524.     experiment to see if this variable works properly with your
  4525.     particular driver when NDOS is allowed to test for its
  4526.     presence.
  4527.  
  4528.                          ANSI                _ANSI
  4529.          SETDOS /A       Directive           Value
  4530.           0 (default)    Auto (default)      Result of test
  4531.           1              Yes                 1
  4532.           2              No                  0
  4533.  
  4534.     _BATCH is the current batch nesting level.  It is "0" if no
  4535.     batch file is currently being processed.
  4536.  
  4537.     _BOOT is the boot drive letter, without a colon.
  4538.  
  4539.     _BG is a string containing the first three characters of the
  4540.     screen background color at the current cursor location (for
  4541.     example, "Bla").
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547. ___________________________________________________________________
  4548. NDOS Reference Manual                                           74
  4549.  
  4550.                                                     The Environment
  4551. ___________________________________________________________________
  4552.  
  4553.     _CODEPAGE is the current code page number (see CHCP on page
  4554.     179).
  4555.  
  4556.     _COLUMN is the current cursor column (for example, "0" for the
  4557.     left side of the screen).
  4558.  
  4559.     _COLUMNS is the current number of screen columns (for example,
  4560.     "80").
  4561.  
  4562.     _CPU is the cpu type, returned as a string:
  4563.  
  4564.          86     8086 and 8088           286   80286
  4565.          186    80186 and 80188         386   i386
  4566.          200    NEC V20 and V30         486   i486
  4567.  
  4568.     _CWD is the current directory in the format d:\pathname.
  4569.  
  4570.     _CWDS has the same value as CWD, except it ends the pathname
  4571.     with a backslash [\].
  4572.  
  4573.     _CWP is the current directory in the format \pathname.
  4574.  
  4575.     _CWPS has the same value as CWP, except it ends the pathname
  4576.     with a backslash [\].
  4577.  
  4578.     _DATE contains the current system date, in the format mm-dd-yy
  4579.     (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  4580.  
  4581.     _DISK is the current disk drive, without a colon (for example,
  4582.     "C").
  4583.  
  4584.     _DOS is the operating system type ("DOS").  NDOS always
  4585.     returns "DOS".  This is useful if you have batch files running
  4586.     in both modes.
  4587.  
  4588.     _DOSVER is the current DOS version (for example, "5.0").
  4589.  
  4590.     _DOW is the first three characters of the current day of the
  4591.     week ("Mon", "Tue", "Wed", etc.).
  4592.  
  4593.     _DV is "1" if DESQview is loaded or "0" otherwise.
  4594.  
  4595.     _ENV is the free space in the environment, in bytes.
  4596.  
  4597.     _FG is a string containing the first three letters of the
  4598.     screen foreground color at the current cursor position (for
  4599.     example, "Whi").
  4600.  
  4601.     _LASTDISK is the last valid drive letter, without a colon.
  4602.  
  4603.  
  4604. ___________________________________________________________________
  4605. NDOS Reference Manual                                           75
  4606.  
  4607.                                                     The Environment
  4608. ___________________________________________________________________
  4609.  
  4610.     _MONITOR is the monitor type ("mono" or "color").
  4611.  
  4612.     _MOUSE is "1" if a Microsoft-compatible mouse driver is
  4613.     loaded, and "0" otherwise.
  4614.  
  4615.     _NDP is the coprocessor type, returned as a string:
  4616.  
  4617.          0      no coprocessor is installed
  4618.          87     8087
  4619.          287    80287
  4620.          387    80387 or 80486DX
  4621.  
  4622.     _NVER is the current NDOS version (for example, "7.0").
  4623.  
  4624.     _ROW is the current cursor row (for example, "0" for the top
  4625.     of the screen).
  4626.  
  4627.     _ROWS is the current number of screen rows (for example,
  4628.     "25").
  4629.  
  4630.     _SHELL is the current shell nesting level.  The primary shell
  4631.     is level "0", and each subsequent secondary shell increments
  4632.     the level by one.
  4633.  
  4634.     _TIME contains the current system time in the format hh:mm:ss.
  4635.     The separator character may vary depending upon your country
  4636.     information  (see the CHCP command on page 179).
  4637.  
  4638.     _TRANSIENT is "1" if the current shell is transient (started
  4639.     with a /C, see page 105), or "0" otherwise.
  4640.  
  4641.     _VIDEO is the video card type ("mono", "cga", "ega", or
  4642.     "vga").
  4643.  
  4644.     _WIN is the current Microsoft Windows mode.  This variable is
  4645.     always zero except when NDOS is running under Microsoft
  4646.     Windows. The variable can be:
  4647.  
  4648.          0       Windows is not running
  4649.          1       Windows 2
  4650.          2       Windows 3 in 386 enhanced mode
  4651.          3       Windows 3 in real or standard mode
  4652.  
  4653.     The _CWD, _CWDS, _CWP, _CWPS, and _DISK variables will return
  4654.     their result in upper or lower case depending on the value of
  4655.     the SETDOS /U switch (see page 283) or the UpperCase directive
  4656.     in NDOS.INI (see page 120).  The _MONITOR and _VIDEO variables
  4657.     always return lower case.  The _BG, _DOW, and _FG variables
  4658.     return the first letter of the result in upper case and the
  4659.     rest in lower case.
  4660.  
  4661. ___________________________________________________________________
  4662. NDOS Reference Manual                                           76
  4663.  
  4664.                                                     The Environment
  4665. ___________________________________________________________________
  4666.  
  4667.     You can use these variables in a wide variety of ways
  4668.     depending on your needs.  Here are just a few examples.  Some
  4669.     of these examples rely on the IF command (page 227) or the IFF
  4670.     command (page 233) to test the value of a variable and perform
  4671.     different actions based on that value.
  4672.  
  4673.     In a batch file, set the color based on the video card type:
  4674.  
  4675.          iff "%_video"=="mono" then
  4676.            color bright white on black
  4677.          else
  4678.            color bright white on blue
  4679.          endiff
  4680.  
  4681.     Call another batch file if NDOS is running under DESQview:
  4682.  
  4683.          if "%_dv" == "1" call dvstart
  4684.  
  4685.     Store the current date and time in a file, then save the
  4686.     output of a DIR command in the same file:
  4687.  
  4688.          echo Directory as of %_date %_time > dirsave
  4689.          dir >> dirsave
  4690.  
  4691.     Set up a prompt for the primary shell which displays the time
  4692.     and current directory, and a different one for secondary
  4693.     shells which includes the shell level rather than the time.
  4694.     Also set different background colors for the two shells,
  4695.     without changing the foreground color.  You might use a
  4696.     sequence like this in your NSTART file, which is executed each
  4697.     time NDOS starts:
  4698.  
  4699.          iff %_shell==0 then
  4700.            prompt $t $p$g
  4701.            color %_fg on blue
  4702.          else
  4703.            prompt [$z] $p$g
  4704.            color %_fg on cyan
  4705.          endiff
  4706.  
  4707.  
  4708.     ##  NDOS Variable Functions
  4709.  
  4710.     Variable functions are like internal variables, but they take
  4711.     one or more arguments (which can be environment variables or
  4712.     even other variable functions), and they return a value.
  4713.  
  4714.     Like all environment variables, these variable functions must
  4715.     be preceded by a percent sign in normal use (%@EVAL, %@LEN,
  4716.     etc.).  All variable functions must have square brackets
  4717.  
  4718. ___________________________________________________________________
  4719. NDOS Reference Manual                                           77
  4720.  
  4721.                                                     The Environment
  4722. ___________________________________________________________________
  4723.  
  4724.     enclosing their argument(s).  The argument(s) to a variable
  4725.     function cannot exceed 255 characters in length for all
  4726.     arguments taken as a group.  If you embed a variable function
  4727.     in the PROMPT it must be preceded by two percent signs, or the
  4728.     prompt text must be enclosed in back quotes (see page 261 for
  4729.     details).
  4730.  
  4731.     The variable functions are useful in aliases and batch files
  4732.     to check on available system resources, manipulate strings and
  4733.     numbers, and work with filenames.  Some of the variable
  4734.     functions, like @DISKFREE, are shown with "b|k|m" as one of
  4735.     their arguments.  Those functions return a number of bytes,
  4736.     kilobytes, or megabytes based upon a "b|k|m" argument:
  4737.  
  4738.          b     return the number of bytes
  4739.          K     return the number of kilobytes (bytes/1,024)
  4740.          k     return the number of thousands of bytes (bytes/
  4741.          1,000)
  4742.          M     return the number of megabytes (bytes/1,048,576)
  4743.          m     return the number of millions of bytes (bytes/
  4744.          1,000,000)
  4745.  
  4746.     @ALIAS[name]:  Returns the contents of the specified alias as
  4747.     a string, or a null string if the alias doesn't exist.
  4748.  
  4749.     @ASCII[c]:  Returns the numeric value of the specified ASCII
  4750.     character as a string.  For example %@ASCII[A] returns 65.
  4751.     You can put a NDOS escape character [-] before the actual
  4752.     character to process.  This allows quotation marks and other
  4753.     special characters as the argument (e.g. %@ASCII[-]).
  4754.  
  4755.     @ATTRIB[filename,attrib]:  Returns a "1" if the specified file
  4756.     has the matching attribute(s);  otherwise returns a "0".  The
  4757.     attributes are:
  4758.  
  4759.          N     Normal (no attribute bits set)
  4760.          R     Read-only
  4761.          H     Hidden
  4762.          S     System
  4763.          D     Directory
  4764.          A     Archive
  4765.  
  4766.     The attributes (other than N) can be combined (for example
  4767.     %@ATTRIB[MYFILE,HS]); ATTRIB will only return a "1" if all the
  4768.     attributes match.
  4769.  
  4770.     @CHAR[n]:  Returns the character corresponding to an ASCII
  4771.     numeric value.  For example %@CHAR[65] returns A.
  4772.  
  4773.  
  4774.  
  4775. ___________________________________________________________________
  4776. NDOS Reference Manual                                           78
  4777.  
  4778.                                                     The Environment
  4779. ___________________________________________________________________
  4780.  
  4781.     @DATE[mm-dd-yy]:  Returns the number of days since January 1,
  4782.     1980 for the specified date.  DATE uses the date format
  4783.     mandated by your country code (dd-mm-yy in Europe;  yy-mm-dd
  4784.     in Japan).
  4785.  
  4786.     @DESCRIPT[filename]:  Returns the file description for the
  4787.     specified filename (see the DESCRIBE command on page 193).
  4788.  
  4789.     @DEVICE[name]:  Returns "1" if the specified name is a
  4790.     character device (such as a printer or serial port), or "0" if
  4791.     not.
  4792.  
  4793.     @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on
  4794.     the specified drive.
  4795.  
  4796.     @DISKTOTAL[d:,b|k|m]: Returns the total disk space on the
  4797.     specified drive.
  4798.  
  4799.     @DISKUSED[d:,b|k|m]: Returns the amount of disk space in use
  4800.     by files and directories on the specified drive.
  4801.  
  4802.     @DOSMEM[b|k|m]:  Returns the amount of free base memory.
  4803.  
  4804.     @EMS[b|k|m]:  Returns the amount of free EMS memory.
  4805.  
  4806.     @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL
  4807.     supports addition (+), subtraction (-), multiplication (*),
  4808.     division (/), and modulo (%%).  The expression can contain
  4809.     environment variables and other variable functions.  @EVAL
  4810.     also supports parentheses, commas, and decimal places.
  4811.     Parentheses can be nested.  The maximum number size is 16
  4812.     digits to the left of the decimal point and eight digits to the
  4813.     right of the decimal point.  @EVAL will strip leading and
  4814.     trailing zeros from the result.  When evaluating expressions,
  4815.     *, /, and %% take precedence over + and -.  For example, 3 + 4
  4816.     * 2 will be interpreted as 3 + 8  = 11, not as (3 + 4) * 2 =
  4817.     14.  To change this order of evaluation, use parentheses to
  4818.     specify the order you want.
  4819.  
  4820.     @EXEC[command]:  Execute the command.  The command can be a
  4821.     NDOS alias, internal command, external command, .BTM file, or
  4822.     .BAT file.  This function is a "back-door" entry into NDOS
  4823.     command processing and should be used with extreme caution.
  4824.     Incorrect or recursive use of @EXEC may cause stack overflows
  4825.     or hang your system.  @EXEC is primarily intended for running
  4826.     a program from within the PROMPT, where it should also be used
  4827.     with caution.
  4828.  
  4829.     @EXT[filename]:  Returns the extension from a filename,
  4830.     without a leading period.
  4831.  
  4832. ___________________________________________________________________
  4833. NDOS Reference Manual                                           79
  4834.  
  4835.                                                     The Environment
  4836. ___________________________________________________________________
  4837.  
  4838.     @EXTENDED[b|k|m]:  Returns the amount of extended memory.
  4839.  
  4840.     @FILEDATE[filename]:  Returns the date a file was last
  4841.     modified, in the default country format (mm-dd-yy for the US).
  4842.  
  4843.     @FILESIZE[filename,b|k|m]: Returns the size of a file, or
  4844.     "- 1" if the file does not exist.
  4845.  
  4846.     @FILETIME[filename]:  Returns the time a file was last
  4847.     modified, in hh:mm format.  The separator character will vary
  4848.     with the country definition in use on your system.
  4849.  
  4850.     @FULL[filename]:  Returns the fully qualified path name of a
  4851.     file.
  4852.  
  4853.     @INDEX[string1,string2]:  Returns the position of string2
  4854.     within string1, or "-1" if string2 is not found.  The first
  4855.     position in string1 is numbered 0.
  4856.  
  4857.     @INT[n]:  Returns the integer part of the number n.
  4858.  
  4859.     @LABEL[d:]:  Returns the volume label of the specified disk
  4860.     drive.
  4861.  
  4862.     @LEN[string]:  Returns the length of a string.
  4863.  
  4864.     @LINE[filename,n]:  Returns line "n" from the specified file.
  4865.     The first line in the file is numbered zero.  "**EOF**" is
  4866.     returned for all line numbers beyond the end of the file.
  4867.     @LINE will retrieve input from STDIN if you specify CON as the
  4868.     filename.  If you are redirecting input to @LINE using this
  4869.     feature, you must use command grouping (see page 84) or the
  4870.     redirection will not work properly.  For example:
  4871.  
  4872.          (echo %@line[con,0]) < myfile.dat
  4873.  
  4874.     @LINES[filename]:  Returns the line number of the last line in
  4875.     the file, or "-1" if the file is empty.  The first line in the
  4876.     file is numbered zero, so (for example) @LINES will return
  4877.     zero for a file containing one line.
  4878.  
  4879.     @LOWER[string]:  Returns the string converted to lower case.
  4880.  
  4881.     @LPT[n]:  Returns a "1" if the specified printer is ready;
  4882.     otherwise, returns "0".  n=1 checks the printer connected to
  4883.     LPT1, n=2 checks LPT2, and n=3 checks LPT3.
  4884.  
  4885.     @MAKEDATE[n]:  Returns a date (formatted according to the
  4886.     current country settings).  "n" is the number of days since
  4887.     1/1/80.  This is the opposite of @DATE.
  4888.  
  4889. ___________________________________________________________________
  4890. NDOS Reference Manual                                           80
  4891.  
  4892.                                                     The Environment
  4893. ___________________________________________________________________
  4894.  
  4895.     @MAKETIME[n]:  Returns a time (formatted according to the
  4896.     current country settings).  "n" is the number of seconds since
  4897.     midnight.  This is the opposite of @TIME.
  4898.  
  4899.     @NAME[filename]:  Returns the base name of a file, without the
  4900.     path or extension.
  4901.  
  4902.     @PATH[filename]:  Returns the path from a filename, including
  4903.     the drive letter and a trailing backslash but not including
  4904.     the base name or extension.
  4905.  
  4906.     @READSCR[row,col,length]:  Returns the text displayed on the
  4907.     screen at the specified location.  The upper left corner of
  4908.     the screen is location 0,0.
  4909.  
  4910.     @READY[d:]:  Returns "1" if the specified drive is ready;
  4911.     otherwise returns "0".
  4912.  
  4913.     @REMOTE[d:]:  Returns "1" if the specified drive is a remote
  4914.     (network) drive; otherwise returns "0".
  4915.  
  4916.     @REMOVABLE[d:]:  Returns "1" if the specified drive is
  4917.     removable (i.e., a floppy disk or removable hard disk);
  4918.     otherwise returns "0".
  4919.  
  4920.     @SEARCH[filename]:  Searches for the filename using the PATH
  4921.     environment variable, appending an extension (.COM, .EXE,
  4922.     .BAT, .BTM, or executable extension) if one isn't specified.
  4923.     Returns the fully-expanded name of the file including drive,
  4924.     path, base name, and extension, or an empty string if a
  4925.     matching file is not found.  If wildcards are used in the
  4926.     filename, @SEARCH will search for the first file that matches
  4927.     the wildcard specification, and return the drive and path for
  4928.     that file plus the wildcard filename (e.g., E:\UTIL\*.COM).
  4929.  
  4930.     @SELECT[filename,top,left,bottom,right,title]:  Pops up a
  4931.     selection window with the lines from the specified file.
  4932.     Returns the text of the line the scrollbar is on if you press
  4933.     RETURN, or an empty string if you press ESCAPE.  @SELECT can
  4934.     be used to display menus or other selection lists from inside
  4935.     a batch file.  To select from lines passed through a pipe, use
  4936.     CON as the filename.
  4937.  
  4938.     @SUBSTR[string,start,length]:  Returns a substring, starting
  4939.     at the position "start" and continuing for "length"
  4940.     characters.  If the length is omitted, it will default to the
  4941.     remainder of the string.  If the length is negative, the start
  4942.     is relative to the right side of the string.  The first
  4943.     character in the string is numbered zero; if the length is
  4944.     negative, the last character is numbered zero.  For example,
  4945.  
  4946. ___________________________________________________________________
  4947. NDOS Reference Manual                                           81
  4948.  
  4949.                                                     The Environment
  4950. ___________________________________________________________________
  4951.  
  4952.     %@SUBSTR[%_time,0,2] gets the current time and extracts the
  4953.     hour.  If the string includes commas, it must be quoted with
  4954.     double quotation marks (") or back quotes (`).  The quotation
  4955.     marks do count in calculating the position of the substring to
  4956.     be extracted.
  4957.  
  4958.     @TIME[hh:mm:ss]:  Returns the number of seconds since midnight
  4959.     for the specified time.  The time must be in 24-hour format;
  4960.     "am" and "pm" cannot be used.
  4961.  
  4962.     @TRUENAME[filename]:  Returns the true, fully-expanded name
  4963.     for a file.  TRUENAME will see "through" a JOIN or SUBST, and
  4964.     requires DOS 3.0 or above.  Wildcards may not be used in the
  4965.     filename.
  4966.  
  4967.     @UNIQUE[d:\path]:  Creates a zero-length file with a unique
  4968.     name in the specified directory, and returns the full name and
  4969.     path.  If no path is specified, the file will be created in
  4970.     the current directory.  This function allows you to create a
  4971.     temporary file without overwriting an existing file.  @UNIQUE
  4972.     only works in DOS 3.0 and above.
  4973.  
  4974.     @UPPER[string]:  Returns the string converted to upper case.
  4975.  
  4976.     @WORD[n,string]:  Returns the "nth" word in a string.  The
  4977.     first word is numbered zero.  If "n" is negative, words are
  4978.     returned from the end of the string.  Only spaces, tabs, and
  4979.     commas are considered to be word separators.  For example:
  4980.  
  4981.          %@WORD[2,NOW IS THE TIME]      returns "THE"
  4982.          %@WORD[-0,NOW IS THE TIME]     returns "TIME"
  4983.          %@WORD[-2,NOW IS THE TIME]     returns "IS"
  4984.  
  4985.     @XMS[b|k|m]:  Returns the amount of free XMS memory.
  4986.  
  4987.     You can use these variable functions in a wide variety of ways
  4988.     depending on your needs.  We've included a few examples below
  4989.     to give you an idea of what's possible.
  4990.  
  4991.     To set the prompt to show the amount of free base memory (see
  4992.     the PROMPT command, page 261,  for details on including
  4993.     variable functions in your prompt):
  4994.  
  4995.          c:\> prompt (%%@dosmem[K]K) $p$g
  4996.  
  4997.     Set up a simple command line calculator.  The calculator is
  4998.     used with a command like CALC 3 * (4 + 5):
  4999.  
  5000.          c:\> alias calc echo The answer is:  %@eval[%&]
  5001.  
  5002.  
  5003. ___________________________________________________________________
  5004. NDOS Reference Manual                                           82
  5005.  
  5006.                                                   Advanced Features
  5007. ___________________________________________________________________
  5008.  
  5009.     The following batch file uses variable functions to implement
  5010.     "once a day" execution of a group of commands.  It works by
  5011.     constructing a six-digit number "yymmdd" from today's date, and
  5012.     comparing that to a number of the same type stored in the file
  5013.     C:\ONCEADAY.DAT.  If today's date is numerically larger than
  5014.     the saved date, and the time is after 6:00 AM, then the "once
  5015.     a day" commands are run, and today's date is saved in the file
  5016.     as the new date for comparison.  Otherwise, no action is
  5017.     taken.  You can make this file simpler using the %@DATE and
  5018.     %@TIME functions instead of using %@SUBSTR to extract
  5019.     substrings of the %_DATE and %_TIME variables; we used the
  5020.     approach shown to demonstrate the use of %@SUBSTR.
  5021.  
  5022.          rem  Temporary variables used to shorten example lines:
  5023.          rem    DD is _date, DY is yymmdd date, TM is _time
  5024.          set dd=%_date
  5025.          set
  5026.          dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  5027.          set lastdate=0
  5028.          iff exist c:\onceaday.dat then
  5029.            set lastdate=%@line[onceaday.dat,0]
  5030.          endiff
  5031.          iff %dy gt %lastdate then
  5032.            set tm=%_time
  5033.            iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  5034.              rem Commands to be executed once a day go here
  5035.              echo %dy > c:\onceaday.dat
  5036.            endiff
  5037.          endiff
  5038.  
  5039.  
  5040. ##  Advanced Features
  5041.  
  5042.     The next four NDOS features are designed for advanced users of
  5043.     DOS and NDOS.  If you are a novice user, you might want to
  5044.     skim over this section and return to it as your computing
  5045.     skills and needs progress.
  5046.  
  5047.  
  5048.     Conditional Commands
  5049.  
  5050.     When an internal command or external program finishes, it
  5051.     returns a result called the exit code.  The NDOS conditional
  5052.     commands allow you to perform tasks based upon the previous
  5053.     command's exit code.  Most programs return a zero if they are
  5054.     successful and a non-zero value if they encounter an error.
  5055.  
  5056.     If you separate two commands by && (AND), the second command
  5057.     will be executed only if the first returns an exit code of zero.
  5058.  
  5059.  
  5060. ___________________________________________________________________
  5061. NDOS Reference Manual                                           83
  5062.  
  5063.                                                   Advanced Features
  5064. ___________________________________________________________________
  5065.  
  5066.     For example, the following command will only erase files if
  5067.     the BACKUP operation succeeds:
  5068.  
  5069.          c:\> backup c:\ a: && del c:\*.bak;*.lst
  5070.  
  5071.     If you separate two commands by || (OR), the second command
  5072.     will be executed only if the first returns a non-zero exit
  5073.     code.  For example, if the following BACKUP operation fails,
  5074.     then ECHO will display a message:
  5075.  
  5076.          c:\> backup c:\ a: || echo Error in the backup!
  5077.  
  5078.     All NDOS internal commands return an explicit exit code, but
  5079.     not all application programs do.  Conditional commands will
  5080.     behave unpredictably if you use them with programs which do
  5081.     not return an explicit exit code.
  5082.  
  5083.  
  5084.     Command Grouping
  5085.  
  5086.     Command grouping allows you to logically group a set of
  5087.     commands together by enclosing them in parentheses.  The
  5088.     parentheses are similar in function to the BEGIN and END block
  5089.     statements in some programming languages.  Command grouping is
  5090.     a feature which NDOS makes available to you as well.
  5091.  
  5092.     There are two primary uses for command grouping.  One is to
  5093.     execute multiple commands in a place where normally only a
  5094.     single command is allowed.  For example, suppose you want to
  5095.     copy then rename all the .WKQ files on drives A: and B: using
  5096.     the FOR command.  You could do it like this:
  5097.  
  5098.          c:\> for %drv in (A B) do copy %drv:*.wkq d:\wksave\
  5099.          c:\> for %drv in (A B) do ren %drv:*.wkq *.old
  5100.  
  5101.     But with command grouping you can do the same thing in one
  5102.     command (enter this on one line):
  5103.  
  5104.          c:\> for %drv in (A B) do (copy %drv:*.wkq d:\wksave\ ^
  5105.               ren %drv:*.wkq *.sav)
  5106.  
  5107.     The COPY and REN commands enclosed in the parentheses appear
  5108.     to FOR as if they were a single command, so both commands are
  5109.     executed for every element of the FOR list.
  5110.  
  5111.     This kind of command grouping is most useful with the EXCEPT,
  5112.     FOR, GLOBAL, and IF commands.  You can not use command
  5113.     grouping to make SELECT execute several commands, because
  5114.     SELECT will assume that the parentheses are marking the list
  5115.     of files from which to select, and will display an error
  5116.  
  5117. ___________________________________________________________________
  5118. NDOS Reference Manual                                           84
  5119.  
  5120.                                                   Advanced Features
  5121. ___________________________________________________________________
  5122.  
  5123.     message or give incorrect results if you try to use
  5124.     parentheses for command grouping instead.  (You can use a
  5125.     SELECT command inside the command grouping parentheses, you
  5126.     just can't use command grouping to specify a group of commands
  5127.     for SELECT to execute.)
  5128.  
  5129.     The second common use of command grouping is to redirect input
  5130.     or output for several commands without repeatedly using the
  5131.     redirection symbols.  For example, consider the following
  5132.     batch file fragment which places some header lines (including
  5133.     today's date) and directory displays in an output file using
  5134.     redirection.  The first ECHO command creates the file using >,
  5135.     and the other commands append to the file using >>:
  5136.  
  5137.          echo Data files %_date > filelist
  5138.          dir *.dat >> filelist
  5139.          echo. >> filelist
  5140.          echo Text files %_date >> filelist
  5141.          dir *.txt >> filelist
  5142.  
  5143.     Using command grouping, these commands can be written much
  5144.     more simply (enter this on one line):
  5145.  
  5146.          (echo Data files %_date ^ dir *.dat ^ echo. ^ echo Text
  5147.          files %_date ^ dir *.txt) > filelist
  5148.  
  5149.     The redirection, which appears outside the parentheses,
  5150.     applies to all the commands within the parentheses.  The same
  5151.     approach can be used for input redirection and for piping.
  5152.  
  5153.     You can also use command grouping in a batch file or at the
  5154.     prompt to split commands over several lines.  This last
  5155.     example is like the redirection example above, but is entered
  5156.     at the prompt.  Note that NDOS displays a "More? prompt after
  5157.     each incomplete line.  None of the commands are executed until
  5158.     the command group is completed with the closing parenthesis.
  5159.     This example does not have to be entered on one line:
  5160.  
  5161.          c:\> (echo Data files %_date
  5162.          More? dir *.dat
  5163.          More? echo.
  5164.          More? echo Text files %_date
  5165.          More? dir *.txt) > filelist
  5166.          c:\>
  5167.  
  5168.     A group of commands in parentheses is like a long command
  5169.     line.  The total length of the group may not exceed 511
  5170.     characters, whether the commands are entered from the prompt,
  5171.     an alias, or a batch file.  The 511-character limit includes
  5172.  
  5173.  
  5174. ___________________________________________________________________
  5175. NDOS Reference Manual                                           85
  5176.  
  5177.                                                   Advanced Features
  5178. ___________________________________________________________________
  5179.  
  5180.     the space required to expand aliases and environment variables
  5181.     invoked within the group.
  5182.  
  5183.  
  5184.     Escape Character
  5185.  
  5186.     NDOS recognizes a user-definable escape character.  This
  5187.     character gives the following character a special meaning;  it
  5188.     is not the same as the ASCII ESC that is often used in ANSI
  5189.     sequences.  The default NDOS escape character is Ctrl-X (ASCII
  5190.     24), which will be displayed here -- and on your screen -- as
  5191.     an up arrow [].  You can use the SETDOS /E command or the
  5192.     EscapeChar directive in NDOS.INI to select a different escape
  5193.     character if you wish.
  5194.  
  5195.     NDOS recognizes six special characters if they are preceded by
  5196.     the escape character.  The combination of the escape character
  5197.     and one of these characters is translated to a single
  5198.     character by NDOS, as shown below.  These are useful for
  5199.     redirecting codes to the printer; e is also useful to
  5200.     generate ANSI "escape sequences" in your PROMPT, ECHO, or
  5201.     other output commands; and r is used in keystroke aliases:
  5202.  
  5203.          b    backspace
  5204.          e    the ASCII ESC character (ASCII 27)
  5205.          f    form feed
  5206.          n    line feed
  5207.          r    carriage return
  5208.          t    tab character
  5209.  
  5210.     If you follow the escape character with any other character,
  5211.     the escape character is removed and the second character is
  5212.     copied directly to the command line.  This allows you to
  5213.     suppress the normal meaning of special characters (such as ? *
  5214.     / \ | "  > < and &).
  5215.  
  5216.     For example, to send a form feed followed by the sequence ESC
  5217.     Y to the printer, you can use this command:
  5218.  
  5219.          c:\> echos feY > prn
  5220.  
  5221.  
  5222.     Argument Quoting
  5223.  
  5224.     When it begins to parse the command line, NDOS looks for
  5225.     carets [^] to break the line into individual commands, for
  5226.     redirection symbols, and for white space (blanks, tabs, and
  5227.     commas) to separate commands from arguments.  It also looks
  5228.     for percent signs [%] which designate alias or batch file
  5229.     replaceable parameters (%1, %2, etc.), or environment
  5230.  
  5231. ___________________________________________________________________
  5232. NDOS Reference Manual                                           86
  5233.  
  5234.                                                   Advanced Features
  5235. ___________________________________________________________________
  5236.  
  5237.     variables, and substitutes the appropriate value for each
  5238.     variable (this process is called variable expansion).
  5239.     Normally, the separation characters and the percent sign
  5240.     cannot be passed to a command as part of an argument.
  5241.     However, you can include any of these special characters in an
  5242.     argument by enclosing the entire argument in back quotes (`)
  5243.     or double quotation marks (").  Although both back quotes and
  5244.     double quotation marks will let you build arguments that
  5245.     include special characters, they do not work the same way.
  5246.  
  5247.     No alias or variable expansion will be performed on an
  5248.     argument enclosed in back quotes.  Redirection symbols inside
  5249.     the back quotes will be ignored.  The back quotes will be
  5250.     removed from the command line before the command is executed.
  5251.  
  5252.     No alias expansion will be performed on expressions enclosed
  5253.     in double quotation marks.  Redirection symbols inside double
  5254.     quotation marks will be ignored.  However, variable expansion
  5255.     will be performed on expressions inside double quotation
  5256.     marks.  The double quotation marks themselves will be passed
  5257.     through to the command as part of the argument.
  5258.  
  5259.     For example, suppose the batch file QUOTES.BAT contains the
  5260.     following commands:
  5261.  
  5262.          @echo off
  5263.          echo Arg1 = %1
  5264.          echo Arg2 = %2
  5265.          echo Arg3 = %3
  5266.  
  5267.     and that the environment variable FORVAR has been defined with
  5268.     this command:
  5269.  
  5270.          c:\> set FORVAR=for
  5271.  
  5272.     Now, if you enter the command
  5273.  
  5274.          c:\> quotes Now is the time %forvar all good
  5275.  
  5276.     the output from QUOTES.BAT will look like this:
  5277.  
  5278.          Arg1 = `Now is the time %forvar`
  5279.          Arg2 = all
  5280.          Arg3 = good
  5281.  
  5282.     But if you enter the command
  5283.  
  5284.          c:\> quotes "Now is the time %forvar" all good
  5285.  
  5286.     the output from QUOTES.BAT will look like this:
  5287.  
  5288. ___________________________________________________________________
  5289. NDOS Reference Manual                                           87
  5290.  
  5291.                                                             Aliases
  5292. ___________________________________________________________________
  5293.  
  5294.          Arg1 = "Now is the time for"
  5295.          Arg2 = all
  5296.          Arg3 = good
  5297.  
  5298.     Notice that in both cases, the quotation marks keep characters
  5299.     together and reduce the number of arguments in the line.
  5300.  
  5301.     The following example has seven command line arguments, while
  5302.     the examples above only have three:
  5303.  
  5304.          c:\> quotes Now is the time %forvar all good
  5305.  
  5306.     When an alias is defined in a batch file or from the command
  5307.     line, its argument should be enclosed in back quotes to
  5308.     prevent the expansion of replaceable parameters, variables,
  5309.     and multiple commands until the alias is invoked.  Back quotes
  5310.     should not be used when defining aliases to be read in an
  5311.     ALIAS /R file.
  5312.  
  5313.  
  5314. Aliases
  5315.  
  5316.     Much of the power of NDOS comes together in aliases, which
  5317.     give you the ability to create your own commands.  An alias is
  5318.     a name that you select for a command or group of commands.
  5319.     Simple aliases substitute a new name for an existing command.
  5320.     More complex aliases can redefine the default settings of NDOS
  5321.     commands, operate as very fast in-memory batch files, and
  5322.     perform actions based on the results of other actions.
  5323.  
  5324.     This section of the manual will show you some examples of the
  5325.     power of aliases.  You can use these examples as the basis for
  5326.     your own aliases.  See the ALIAS command (page 159) for
  5327.     complete details about writing your own aliases.
  5328.  
  5329.     The simplest type of alias gives a new name to an existing
  5330.     command.  For example, you could create a command called ROOT
  5331.     to switch to the root directory this way:
  5332.  
  5333.          c:\> alias root = `cd \`
  5334.  
  5335.     After the alias has been defined this way, every time you type
  5336.     the command ROOT, NDOS will execute the command CD \.
  5337.  
  5338.     Aliases can also create customized versions of NDOS commands.
  5339.     For example, the NDOS DIR command can sort a directory in
  5340.     various ways.  You can create an alias called DE that means
  5341.     "sort the directory by filename extension, and pause after
  5342.     each page while displaying it" like this:
  5343.  
  5344.  
  5345. ___________________________________________________________________
  5346. NDOS Reference Manual                                           88
  5347.  
  5348.                                                             Aliases
  5349. ___________________________________________________________________
  5350.  
  5351.          c:\> alias de = `dir /oe /p`
  5352.  
  5353.     Aliases can be used to execute sequences of commands as well.
  5354.     The following command creates an alias called W which saves
  5355.     the current drive and directory, changes to the WP directory
  5356.     on drive C:, runs the program E:\WP51\WP.EXE, and, when the
  5357.     program terminates, returns to the original drive and
  5358.     directory:
  5359.  
  5360.          c:\> alias w = `pushd c:\wp ^ e:\wp51\wp.exe ^ popd`
  5361.  
  5362.     Aliases can be nested, that is, one alias can invoke another.
  5363.     For example, the alias above could also be written as:
  5364.  
  5365.          c:\> alias wp = `e:\wp51\wp.exe`
  5366.          c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  5367.  
  5368.     If you enter the W command, NDOS will execute the PUSHD
  5369.     command, detect that the next command (WP) is another alias,
  5370.     execute the program E:\WP51\WP.EXE, and -- when the program
  5371.     exits -- return to the first alias, execute the POPD command,
  5372.     and finally return to the prompt.
  5373.  
  5374.     You can use aliases to change the default options for both
  5375.     internal NDOS commands and external commands.  Suppose that
  5376.     you always want the DEL command to prompt before it erases a
  5377.     file:
  5378.  
  5379.          c:\> alias del = `*del /p`
  5380.  
  5381.     You may have a program on your system that has the same name
  5382.     as an internal NDOS command.  Normally, NDOS will run the
  5383.     internal command and not let you run the program you desire,
  5384.     unless you explicitly add its full path on the command line
  5385.     (type C:\UTIL\LIST.COM, for example).  Aliases give you two
  5386.     ways to get around this problem.
  5387.  
  5388.     First, you could define an alias that runs the program in
  5389.     question, but with a different name.  For example, if you want
  5390.     to run a program called NDOSHELP.EXE when you type HLP, this
  5391.     alias will do the trick:
  5392.  
  5393.          c:\> alias hlp = `c:\dos\ndoshelp.exe`
  5394.  
  5395.     Another approach you could take would be to rename the
  5396.     internal NDOS command and use the original name for the
  5397.     external program.  The following example renames the NDOS LIST
  5398.     command as DISPLAY and then uses a second alias to run
  5399.     LIST.COM whenever you type LIST:
  5400.  
  5401.  
  5402. ___________________________________________________________________
  5403. NDOS Reference Manual                                           89
  5404.  
  5405.                                                             Aliases
  5406. ___________________________________________________________________
  5407.  
  5408.          c:\> alias display = `*list`
  5409.          c:\> alias list = `c:\util\list.com`
  5410.  
  5411.     You can also assign an alias to a key, so that every time you
  5412.     press the key, the command will be invoked.  After you enter
  5413.     this next example, NDOS will display a two-column directory with
  5414.     paging whenever you press Shift plus F5:
  5415.  
  5416.          c:\> alias @Shift-F5 = `*dir /2/p`
  5417.  
  5418.     That example will put the DIR command on the command line when
  5419.     you press F5 and wait for you to enter filenames to display
  5420.     and then press Enter.  This next example clears the screen
  5421.     whenever you press Alt-F1.  The up arrow character [] is the
  5422.     NDOS escape character, which you enter by pressing Ctrl-X (it
  5423.     is entered twice before the r at the end of this alias):
  5424.  
  5425.          c:\> alias @Alt-F1 = `clsr`
  5426.  
  5427.     Aliases have many other capabilities as well.  This example
  5428.     creates a simple command-line calculator.  Once you have
  5429.     entered the example, you can type CALC 4*19, for example, and
  5430.     NDOS will display the answer:
  5431.  
  5432.          c:\> alias calc = `echo The answer is:  %@eval[%&]`
  5433.  
  5434.     Our last example in this section creates an alias called IN.
  5435.     It will temporarily change directories, run an internal or
  5436.     external command, and then return to the current directory
  5437.     when the command is finished:
  5438.  
  5439.          c:\> alias in = `pushd %1 ^ %2& ^ popd`
  5440.  
  5441.     Now if you type
  5442.  
  5443.          c:\> in c:\letters wp letter.txt
  5444.  
  5445.     NDOS will change to the C:\LETTERS subdirectory, execute the
  5446.     command WP LETTER.TXT and then return to the current
  5447.     directory.
  5448.  
  5449.     Your copy of NDOS includes a sample alias file called ALIASES
  5450.     which contains several useful aliases and demonstrates many
  5451.     alias techniques.  Also, see the ALIAS and UNALIAS commands on
  5452.     pages 159 and 297 for more information and examples.  See page
  5453.     95 for tips about using aliases inside your batch files.
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459. ___________________________________________________________________
  5460. NDOS Reference Manual                                           90
  5461.  
  5462.                                                         Batch Files
  5463. ___________________________________________________________________
  5464.  
  5465. Batch Files
  5466.  
  5467.     A batch file is a file that contains a list of commands for
  5468.     NDOS to execute.  NDOS reads and interprets each line as if it
  5469.     had been typed at the keyboard.  Like aliases, batch files are
  5470.     handy for automating computing tasks.  Unlike aliases, batch
  5471.     files can be as long as you wish.  Batch files take up
  5472.     separate disk space for each file, and can't usually execute
  5473.     quite as quickly as aliases, since they must be read from the
  5474.     disk.
  5475.  
  5476.  
  5477.     .BAT Files and .BTM Files
  5478.  
  5479.     NDOS can execute a batch file in two different modes.  In the
  5480.     first, traditional mode, NDOS reads and executes the lines of
  5481.     the batch file individually.  In the second mode, NDOS reads
  5482.     the entire batch file into memory at once.  The second mode
  5483.     can be five to ten times faster, especially if most of the
  5484.     commands in the batch file are internal NDOS commands.
  5485.     However, only the first mode can be used for self-modifying
  5486.     batch files (which are rare), for batch files which install
  5487.     memory-resident utilities, and for batch files larger than 64K
  5488.     bytes.
  5489.  
  5490.     NDOS decides which batch file mode to use by the file's
  5491.     extension.  It runs files with a .BAT extension in the slower,
  5492.     traditional mode.  Files that have a .BTM extension are run in
  5493.     the faster, more efficient mode.  You can change the execution
  5494.     mode inside of a batch file (of either type) with the LOADBTM
  5495.     command (see page 247).
  5496.  
  5497.  
  5498.     Echoing
  5499.  
  5500.     By default, NDOS displays or "echoes" every batch file line as
  5501.     it is executed.  You can change this behavior, if you want, in
  5502.     several different ways:
  5503.  
  5504.          Any batch file line that begins with an [@] symbol will
  5505.          not be displayed.
  5506.  
  5507.          The display can be turned off and on within a batch file
  5508.          with the ECHO OFF and ECHO ON commands.
  5509.  
  5510.          The default setting can be changed with the SETDOS /V
  5511.          command (see page 283) or the BatchEcho directive in
  5512.          NDOS.INI (see page 118).
  5513.  
  5514.  
  5515.  
  5516. ___________________________________________________________________
  5517. NDOS Reference Manual                                           91
  5518.  
  5519.                                                         Batch Files
  5520. ___________________________________________________________________
  5521.  
  5522.     For example, the following line turns off echoing inside a
  5523.     batch file.  The [@] symbol keeps the batch file from
  5524.     displaying the ECHO OFF command:
  5525.  
  5526.          @echo off
  5527.  
  5528.     NDOS also has a command line echo that is unrelated to the
  5529.     batch file echo setting.  See the ECHO command on page 207 for
  5530.     details about both settings.
  5531.  
  5532.  
  5533.     Batch File Variables
  5534.  
  5535.     Like aliases and application programs, batch files can examine
  5536.     the command line that is used to invoke them.  NDOS separates
  5537.     the command tail (everything on the command line after the
  5538.     batch filename) into individual parameters or variables by
  5539.     scanning for the spaces, tabs, and commas that separate the
  5540.     parameters.  A batch file can work with individual parameters
  5541.     or with the command tail as a whole.
  5542.  
  5543.     NDOS numbers these replaceable parameters from %1 to %127.  It
  5544.     is up to the batch file to determine the meaning of each
  5545.     parameter.  Parameters that are referred to in a batch file,
  5546.     but which are missing on the command line, appear as empty
  5547.     strings inside the batch file.
  5548.  
  5549.     A batch file can also work with three special parameters: %0
  5550.     contains the name of the batch file as it was entered on the
  5551.     command line, %# contains the number of command-line
  5552.     arguments, and %n& contains the complete command line tail
  5553.     starting with argument number "n".  The default value of "n"
  5554.     is one, so %& contains the entire command tail.  The values of
  5555.     these special parameters can change if you use the SHIFT
  5556.     command (see page 288).
  5557.  
  5558.     For example, suppose the batch file interprets the first
  5559.     argument as a subdirectory name.  Then the following line
  5560.     would move to the specified directory:
  5561.  
  5562.          cd %1
  5563.  
  5564.     A friendlier batch file would check to make sure the directory
  5565.     exists and take some special action if it doesn't:
  5566.  
  5567.          iff isdir %1 then ^ cd %1
  5568.          else ^ echo Subdirectory %1 does not exist ^ quit
  5569.          endiff
  5570.  
  5571.     (see the IF and IFF commands on pages 227 and 233).
  5572.  
  5573. ___________________________________________________________________
  5574. NDOS Reference Manual                                           92
  5575.  
  5576.                                                         Batch Files
  5577. ___________________________________________________________________
  5578.  
  5579.   ##Batch files can also use environment variables, internal
  5580.     variables, and variable functions.  See pages 73 - 83 for a
  5581.     complete list of the internal variables and variable functions
  5582.     available.  You can use these variables and functions to
  5583.     determine system status (e.g., the type of CPU in the system),
  5584.     resource levels (e.g., the amount of free disk space), file
  5585.     information (e.g., the date and time  a file was last
  5586.     modified) and other information (e.g., the current date and
  5587.     time).  You can also perform arithmetic (including date
  5588.     arithmetic), manipulate strings and substrings, extract parts
  5589.     of a filename, and perform simple file access.
  5590.  
  5591.   ##To create temporary variables for use inside a batch file,
  5592.     just use the SET command to store the information you want in
  5593.     an environment variable.  Pick a variable name that isn't
  5594.     likely to be in use by some other program (for example, PATH
  5595.     would be a bad choice), and use the UNSET command (page 298)
  5596.     to remove these variables from the environment at the end of
  5597.     your batch file.  You can also use SETLOCAL and ENDLOCAL
  5598.     (pages 287 and 210) to create a "local" environment so that
  5599.     the original environment will be restored when your batch file
  5600.     is finished.
  5601.  
  5602.   ##Environment variables used in a batch file may contain either
  5603.     numbers or text.  It is up to you to keep track of what's in
  5604.     each variable and use it appropriately; if you don't (for
  5605.     example, if you use %@EVAL to add a number to a text string),
  5606.     you'll get an error message.
  5607.  
  5608.   ##Be careful not to confuse the various kinds of variables that
  5609.     NDOS provides.  Replaceable parameters, environment variables,
  5610.     internal variables, and variable functions look similar and
  5611.     have similar uses but they are not the same.
  5612.  
  5613.  
  5614.     Batch File Commands
  5615.  
  5616.     Several NDOS commands are particularly suited to batch file
  5617.     processing.  Each command is explained in detail in the
  5618.     Command Reference section of this manual, beginning on page
  5619.     153.  Here is a list of some of the commands you might find
  5620.     most useful:
  5621.  
  5622.          BEEP produces a sound of any pitch and duration through
  5623.          the computer's speaker.
  5624.  
  5625.          CALL executes one batch file from within another.
  5626.  
  5627.          CANCEL terminates all batch file processing.
  5628.  
  5629.  
  5630. ___________________________________________________________________
  5631. NDOS Reference Manual                                           93
  5632.  
  5633.                                                         Batch Files
  5634. ___________________________________________________________________
  5635.  
  5636.          CLS and COLOR set the screen display colors.
  5637.  
  5638.          DRAWBOX draws a box on the screen.
  5639.  
  5640.          DRAWHLINE and DRAWVLINE draw horizontal and vertical
  5641.          lines on the screen.
  5642.  
  5643.          ECHO and ECHOS print text on the screen (the text can be
  5644.          redirected to a file or device).
  5645.  
  5646.          GOSUB executes a subroutine inside a batch file.  The
  5647.          RETURN command terminates the subroutine.
  5648.  
  5649.          GOTO branches to a different location in the batch file.
  5650.  
  5651.          FOR executes commands for each file that matches a set of
  5652.          wildcards, or each entry in a list.
  5653.  
  5654.          IF and IFF execute commands based on a test of string or
  5655.          numeric values, program exit codes, or other conditions.
  5656.  
  5657.          INKEY and INPUT collect keyboard input from the user and
  5658.          store it in environment variables.
  5659.  
  5660.          KEYSTACK places keystrokes into the NDOS Keystack.
  5661.  
  5662.          LOADBTM changes the batch file operating mode.
  5663.  
  5664.          PAUSE displays a message and waits for the user to press
  5665.          a key.
  5666.  
  5667.          QUIT ends the current batch file and optionally returns
  5668.          an exit code.
  5669.  
  5670.          REM places a remark in a batch file.
  5671.  
  5672.          SCREEN positions the cursor on the screen and optionally
  5673.          prints a message at the new location.
  5674.  
  5675.          SCRPUT displays a message in color.
  5676.  
  5677.          SETLOCAL saves the current disk drive, default directory,
  5678.          environment, and alias list.  ENDLOCAL restores the
  5679.          settings that were saved.
  5680.  
  5681.          SHIFT changes the numbering of the replaceable
  5682.          parameters.
  5683.  
  5684.          TEXT displays a block of text.  ENDTEXT ends the block.
  5685.  
  5686.  
  5687. ___________________________________________________________________
  5688. NDOS Reference Manual                                           94
  5689.  
  5690.                                                         Batch Files
  5691. ___________________________________________________________________
  5692.  
  5693.          TIMER starts or reads a stopwatch.
  5694.  
  5695.          VSCRPUT displays a vertical message in color.
  5696.  
  5697.     These commands, along with the NDOS internal variables and
  5698.     variable functions, make the NDOS batch file language
  5699.     extremely powerful.  The distribution floppy disk contains a
  5700.     number of sample batch files that demonstrate some of the
  5701.     things you can do with NDOS batch files.
  5702.  
  5703.  
  5704.     Interrupting a Batch File
  5705.  
  5706.     You can usually interrupt a batch file by pressing Ctrl-C or
  5707.     Ctrl-Break.  Whether and when these keystrokes are recognized
  5708.     will depend on whether NDOS or an application is running, how
  5709.     the application (if any) was written, and whether BREAK is ON
  5710.     or OFF (see page 172).
  5711.  
  5712.     Once NDOS detects a Ctrl-C or Ctrl-Break, it will display a
  5713.     prompt, for example:
  5714.  
  5715.          Cancel batch job C:\CHARGE.BTM ? (Y/N/A) :
  5716.  
  5717.     Enter N to continue, Y to terminate the current batch file and
  5718.     continue with any batch file which called it, or A to end all
  5719.     batch file processing regardless of the batch file nesting
  5720.     level.  Answering Y is similar to the QUIT command (page 266);
  5721.     answering A is similar to the CANCEL command (page 174).
  5722.  
  5723.  
  5724.     ##  Batch File Tips
  5725.  
  5726.     This section gives you some tips on batch file programming,
  5727.     including a few things we've found useful and a few that you
  5728.     should stay away from.
  5729.  
  5730.     One way to simplify batch file programming is to use aliases.
  5731.     Not aliases that can be used from the command line, but
  5732.     aliases that hide unnecessary detail inside a batch file.  For
  5733.     example, suppose you want to implement a multiple choice list
  5734.     in a batch file that will let you select among several
  5735.     different applications.  This example shows one way to do so:
  5736.  
  5737.          alias in `pushd %1 ^ %2& ^ popd`
  5738.          alias choice `elseiff "%userchoice"=="%1" then`
  5739.          :dispmenu
  5740.          screen 8 0
  5741.          text
  5742.           Enter your choice:
  5743.  
  5744. ___________________________________________________________________
  5745. NDOS Reference Manual                                           95
  5746.  
  5747.                                                         Batch Files
  5748. ___________________________________________________________________
  5749.  
  5750.                1. Word Processing
  5751.                2. Spreadsheet
  5752.                3. Communications
  5753.          endtext
  5754.          inkey %%userchoice
  5755.          iff "1"=="2" then ^ rem  Always fail and go to next line
  5756.          choice 1 ^ in d:\letters  c:\wp51\wp.exe
  5757.          choice 2 ^ in d:\finance  c:\quattro\q.exe
  5758.          choice 3 ^ in d:\comm  c:\comsw\pcplus.exe
  5759.          else
  5760.            scrput 23 0 bri whi on red Invalid choice, try again
  5761.            goto dispmenu
  5762.          endiff
  5763.  
  5764.     The first alias, IN, expects two or more command-line arguments.
  5765.     It uses the first as a new working directory and changes to
  5766.     that directory with a PUSHD command.  The rest of the command
  5767.     line is interpreted as the name of an application program plus
  5768.     possible command line parameters, which the alias executes.
  5769.     This alias could be used from the command line.
  5770.  
  5771.     The second alias, CHOICE, expects one command line argument.  It
  5772.     tests whether an environment variable called userchoice has
  5773.     the same value as the command line argument.  But the test
  5774.     comes between ELSEIFF and THEN statements.  If you try to use
  5775.     CHOICE from the command line, NDOS will generate an error
  5776.     because it will see ELSEIFF and THEN without the necessary IFF
  5777.     and ENDIFF to define a block.
  5778.  
  5779.     The next nine lines print a menu on the screen and then get a
  5780.     keystroke from the user and store the keystroke in an
  5781.     environment variable called userchoice.  Then the batch file
  5782.     tests the user's keystroke to decide what action to take.
  5783.  
  5784.     Since the CHOICE alias starts with an ELSEIFF command, there
  5785.     has to be an IFF.  But the first condition must fail in order
  5786.     to get to the CHOICE aliases, so the IFF statement starts with
  5787.     a condition that will always be false.  The three lines after
  5788.     the IFF are easy to follow and much shorter than they would be
  5789.     without the aliases.  If it had to be typed in full, the first
  5790.     choice line would look like this:
  5791.  
  5792.          elseiff "%userchoice"=="1" then pushd d:\letters ^
  5793.          c:\wp\wp51.exe ^ popd
  5794.  
  5795.     There's another side to aliases in batch files.  If you're
  5796.     going to distribute your NDOS batch files to others, you need
  5797.     to remember that they may have aliases defined for the
  5798.     commands you're going to use.  For example if the user has
  5799.     aliased CD to CDD and you aren't expecting this, your file may
  5800.  
  5801. ___________________________________________________________________
  5802. NDOS Reference Manual                                           96
  5803.  
  5804.                                                         Batch Files
  5805. ___________________________________________________________________
  5806.  
  5807.     not work as you intended.  There are two ways to address this
  5808.     problem.  First, you can use SETLOCAL, ENDLOCAL, and UNALIAS
  5809.     to clear out aliases before your batch file starts and restore
  5810.     them at the end.  For example:
  5811.  
  5812.          setlocal
  5813.          unalias *
  5814.          rem Aliases cleared, set up new aliases
  5815.          alias ...
  5816.          rem Other batch file commands go here
  5817.          endlocal
  5818.  
  5819.     Remember that SETLOCAL and ENDLOCAL will save and restore not
  5820.     only the aliases but also the environment and the current
  5821.     drive and directory.
  5822.  
  5823.     If this method isn't appropriate or necessary for the batch
  5824.     file you're working on, you can also use an asterisk [*]
  5825.     before the name of any command.  The asterisk tells NDOS not
  5826.     to interpret the command that follows it as an alias.  For
  5827.     example the following command redirects a list of filenames
  5828.     to the file FILELIST:
  5829.  
  5830.          dir /b > filelist
  5831.  
  5832.     However if the user has redefined DIR with an alias this
  5833.     command may not do what you want.  To get around this just
  5834.     use:
  5835.  
  5836.          *dir /b > filelist
  5837.  
  5838.     The same can be done for any command in your batch file.  If
  5839.     you use the asterisk, NDOS will skip alias processing, discard
  5840.     the asterisk, and process the rest of the command normally as
  5841.     an internal command, external command, or batch file.  Using
  5842.     an asterisk before a command will work whether or not there is
  5843.     actually an alias defined with the same name as the command.
  5844.     If there is no alias with that name, the asterisk will be
  5845.     ignored and the command will be processed as if the asterisk
  5846.     wasn't there.
  5847.  
  5848.     There are several tricks you can use in debugging batch files.
  5849.     Probably the simplest is to turn ECHO on at the beginning of
  5850.     the file while you're testing it, or use SETDOS /V2 to force
  5851.     ECHO on even if an ECHO OFF command is used in the batch file.
  5852.     This will give you a picture of what NDOS is doing when it
  5853.     executes the file.  It will make your output look messy of
  5854.     course, so just turn it off once things are working.  You can
  5855.     also turn ECHO on at the beginning of a group of commands you
  5856.  
  5857.  
  5858. ___________________________________________________________________
  5859. NDOS Reference Manual                                           97
  5860.  
  5861.                                                         Batch Files
  5862. ___________________________________________________________________
  5863.  
  5864.     want to "watch", and off at the end, just by adding ECHO
  5865.     commands at the appropriate spots in your file.
  5866.  
  5867.     Another trick is to insert PAUSE commands wherever you need
  5868.     them in order to be able to watch what's happening.  For
  5869.     complex debugging, you can make an alias that uses INKEY for a
  5870.     similar purpose, but helps you out a little more.  For example
  5871.     (enter this on one line):
  5872.  
  5873.          alias step set skey=^inkey Step:  %%skey^iff
  5874.          "%skey"=="S" then ^ set /P ^ elseiff "%skey"=="X" then ^
  5875.          quit ^ endiff
  5876.  
  5877.     Now anywhere you insert a STEP command in your file you'll get
  5878.     the Step: prompt during execution.  At that point you can type
  5879.     S to do a SET /P and display the current contents of your
  5880.     environment variables, X to exit the batch file, and any other
  5881.     key to go on.  Of course you'll need to create an alias
  5882.     tailored to your particular needs, but this gives you the
  5883.     basic idea.
  5884.  
  5885.     If you can't figure out how NDOS is expanding your aliases and
  5886.     variables, try turning LOG on at the start of the batch file.
  5887.     LOG keeps track of all commands after alias and variable
  5888.     expansion  are completed, and gives you a record in a file
  5889.     that you can examine after the batch file is done.
  5890.  
  5891.     You may also want to consider using redirection to capture
  5892.     your batch file output.  Simply type the batch filename
  5893.     followed by the redirection symbols, for example:
  5894.  
  5895.          c:\> mybatch >& testout
  5896.  
  5897.     This records all batch file output, including error messages,
  5898.     in the file TESTOUT, so you can go back and examine it.  If
  5899.     you have ECHO ON in the batch file you'll get the batch
  5900.     commands intermingled with the output, which can provide a
  5901.     very useful trace of what's happening.  Of course output from
  5902.     full-screen commands and programs that don't write to the
  5903.     standard DOS output devices can't be recorded, but you can
  5904.     still gain a lot of useful information if your batch file does
  5905.     much output.
  5906.  
  5907.     If you're using redirection to see the output, remember that
  5908.     any prompts for input will probably go to the output file and
  5909.     not to the screen, so you need to know in advance the sequence
  5910.     of keystrokes required to get through the entire batch file,
  5911.     and enter them by hand or with KEYSTACK.  (As an example, the
  5912.     raw text for the NDOS tour in this manual was created by
  5913.     writing a batch file containing the demonstration commands,
  5914.  
  5915. ___________________________________________________________________
  5916. NDOS Reference Manual                                           98
  5917.  
  5918.                                                         Batch Files
  5919. ___________________________________________________________________
  5920.  
  5921.     testing it to get the proper keystroke sequence, and executing
  5922.     a command which used KEYSTACK to send the keystrokes and
  5923.     redirected the batch file's output to a disk file.)
  5924.  
  5925.     Because of the power of the NDOS batch language, some
  5926.     programmers begin to treat it as a full, general-purpose
  5927.     language.  But the batch language is interpreted one line at a
  5928.     time, which can lead the unwary into some subtle traps.
  5929.  
  5930.     In particular, the IFF and GOTO instructions may not work
  5931.     together as many programmers expect.  NDOS has no way of
  5932.     telling whether a GOTO is branching within the same IFF block,
  5933.     into another IFF block, or out of all IFF blocks, so it has to
  5934.     make an assumption.  It assumes that the branch is leaving the
  5935.     IFF block and it therefore cancels all pending IFF processing.
  5936.     For example, the following commands will NOT work:
  5937.  
  5938.          iff "%_monitor" == "color" then
  5939.            iff %@diskfree[c:,K] gt 100 then
  5940.              set var1=Y
  5941.              goto point1
  5942.            else
  5943.              set var1=N
  5944.            endiff
  5945.          else
  5946.            :point1
  5947.            rem  do something else here
  5948.          endiff
  5949.  
  5950.     If the GOTO in the fourth line is executed, the commands after
  5951.     :POINT1 will execute properly.  But NDOS will generate an
  5952.     error message when it reaches the last ENDIFF, because it
  5953.     assumed that the GOTO branched outside of all IFF blocks.  You
  5954.     can override this restriction with GOTO /I, but do so only if
  5955.     you are absolutely certain that your GOTO command is branching
  5956.     entirely within the current active IFF statement, and not into
  5957.     another IFF statement or a different IFF nesting level.  Using
  5958.     /I under any other conditions will cause an error later in
  5959.     your batch file.
  5960.  
  5961.     Because the IFF state is saved whenever a GOSUB occurs or
  5962.     whenever another batch file is CALLed, GOTO only cancels IFF
  5963.     processing within the current subroutine or batch file.  This
  5964.     allows you to use GOTO inside a subroutine without affecting
  5965.     any IFF blocks that surround the GOSUB statement which called
  5966.     the subroutine.
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972. ___________________________________________________________________
  5973. NDOS Reference Manual                                           99
  5974.  
  5975.                                                 Configuration Files
  5976. ___________________________________________________________________
  5977.  
  5978.  
  5979. ##  CHAPTER 6, OPTIONS AND TUNING
  5980.  
  5981.  
  5982. Normally, the Norton Utilities install or NUCONFIG program will
  5983. properly set up your system to run NDOS.  It must, however, make
  5984. certain assumptions about your computer and the way that you will
  5985. use NDOS.  This chapter explains how you can tune NDOS to make it
  5986. as efficient and as useful as possible in your computing
  5987. environment.
  5988.  
  5989. Nearly everything in this chapter is for advanced users and those
  5990. with unusual needs.  If NDOS works the way you want it to after the
  5991. installation, you can skip this chapter.  You may, however, want to
  5992. skim this material to see what options are available.
  5993.  
  5994.  
  5995. Configuration Files
  5996.  
  5997.     NDOS uses five configuration files.  Two are for general DOS
  5998.     configuration;  the other three are unique to NDOS.  The
  5999.     general DOS files are CONFIG.SYS and AUTOEXEC.BAT.  The
  6000.     specialized NDOS files are called NSTART.BTM, NEXIT.BTM, and
  6001.     NDOS.INI.  These five files are discussed in order in this
  6002.     section.
  6003.  
  6004.   ! Anytime you change a configuration file, a typographical
  6005.     mistake or other error could make your system lock up or run
  6006.     erratically.  Before you make any changes to any of these
  6007.     files, we strongly urge you to take some precautions.
  6008.  
  6009.     First, create a boot floppy disk (you can use the FORMAT /S
  6010.     command) and make sure that you can use it to boot your
  6011.     computer.  Second, make a backup copy of all five
  6012.     configuration files.  You might want to create copies that
  6013.     have the same base name plus an extension of .BAK.  Copy the
  6014.     .BAK files to your boot floppy disk for safe keeping.  You also
  6015.     might want to make a copy of your computer's SETUP information
  6016.     (on 80286, 386, and 486 computers) and save it on this floppy
  6017.     disk.  If the battery that keeps that data in your computer
  6018.     fails, this file will be invaluable after you install a new
  6019.     battery.  The CMOS setup can easily be saved using the Norton
  6020.     Utilities Rescue Disk program; refer to the Norton Utilities
  6021.     User's Guide for more information.
  6022.  
  6023.     With these two precautions, if something goes wrong, you will
  6024.     be able to boot with your floppy disk and copy the files
  6025.     back to their original names.  You'll only have to spend a few
  6026.     minutes recovering your system.  You probably will want to
  6027.     follow the same precautions each time you install a new
  6028.     application program that changes your DOS or NDOS
  6029.     configuration files.
  6030. ___________________________________________________________________
  6031. NDOS Reference Manual                                          100
  6032.  
  6033.                                               Setting up CONFIG.SYS
  6034. ___________________________________________________________________
  6035.  
  6036. Setting up CONFIG.SYS
  6037.  
  6038.     The CONFIG.SYS file contains instructions for DOS to execute
  6039.     before it loads a command processor.  Only one line in the
  6040.     CONFIG.SYS file affects NDOS.  It tells DOS to use NDOS as the
  6041.     command processor instead of COMMAND.COM.  The format of this
  6042.     line is:
  6043.  
  6044.          SHELL=d:\path\NDOS.COM [d:\path] [@d:\path\inifile]
  6045.           [/E:nnnn] [/F] [/P] [//iniline]...  [[/K]command]
  6046.  
  6047.     "SHELL=" identifies this line as defining the command
  6048.     processor that DOS will load after it finishes executing the
  6049.     commands in CONFIG.SYS.  It is required.
  6050.  
  6051.     If NDOS is not in the root directory of the boot drive,
  6052.     replace the first "d:\path\" (immediately after "SHELL=") with
  6053.     the NDOS drive and directory (if you are using DOS 2.x, NDOS
  6054.     must be in the root directory of the boot drive).  The drive
  6055.     and path must be correct or your system won't boot (and you'll
  6056.     be very happy that you made the boot-up floppy we suggested).
  6057.     The remainder of the items on this line are optional.  If they
  6058.     are used, you should not include the square brackets.  In the
  6059.     descriptions below, "d:" means a drive letter and "\path"
  6060.     means a subdirectory name.
  6061.  
  6062.     d:\path      This is the "d:\path" option shown in square
  6063.                  brackets above (not the "d:\path" immediately
  6064.                  after "SHELL=").  It sets the drive and directory
  6065.                  where NDOS is stored.  NDOS uses this path to set
  6066.                  the COMSPEC environment variable.  When running
  6067.                  under MS-DOS or PC-DOS 3.0 or above, NDOS will
  6068.                  normally find itself automatically and this
  6069.                  option will not be needed.  When running under
  6070.                  DR-DOS this option is required unless NDOS.COM is
  6071.                  in the root directory of the boot drive.  When
  6072.                  NDOS is running as the primary command processor,
  6073.                  you can tell if COMSPEC has been set correctly by
  6074.                  typing the following line at the NDOS prompt:
  6075.  
  6076.                          echo %comspec
  6077.  
  6078.                  If NDOS has properly located itself, the location
  6079.                  of NDOS.COM will be correctly displayed.  If the
  6080.                  COMSPEC is incorrect, you can set it yourself in
  6081.                  AUTOEXEC.BAT, or add this "d:\path" option on the
  6082.                  SHELL= line.
  6083.  
  6084.     @d:\path\inifile
  6085.  
  6086.  
  6087. ___________________________________________________________________
  6088. NDOS Reference Manual                                          101
  6089.  
  6090.                                               Setting up CONFIG.SYS
  6091. ___________________________________________________________________
  6092.  
  6093.                  This option sets the path and name of the
  6094.                  NDOS.INI file, which is discussed below.  If the
  6095.                  INI file is in the same directory as NDOS.COM, or
  6096.                  is in the root directory of the boot drive, and
  6097.                  named NDOS.INI, or of you aren't using an INI
  6098.                  file at all, then this option is not needed.
  6099.                  Otherwise, it must be included.
  6100.  
  6101.     /E:nnnn      This option sets the size of the environment, in
  6102.                  bytes.  If you don't use this option, NDOS will
  6103.                  allocate 512 bytes for the environment.  You can
  6104.                  use any value from 256 to 32000 as the
  6105.                  environment size.  For example, to set an
  6106.                  environment of 1,000 bytes, you would enter the
  6107.                  option this way:
  6108.  
  6109.                          /E:1000
  6110.  
  6111.                  You can also set the environment size with the
  6112.                  Environment directive in the NDOS.INI file (see
  6113.                  below).
  6114.  
  6115.     /F           This option tells NDOS to automatically provide a
  6116.                  Fail response to all critical errors, without
  6117.                  prompting or waiting for a user response.  It is
  6118.                  rarely used except on systems that must run
  6119.                  unattended, like bulletin boards.  We do not
  6120.                  recommend use of this option on a normal system,
  6121.                  because you will not have a chance to react to a
  6122.                  critical error and correct the problem that
  6123.                  caused it.  For more information on critical
  6124.                  errors see page 138.  /F only affects critical
  6125.                  errors detected by NDOS, and will not affect
  6126.                  critical error handling for many application
  6127.                  programs which perform this function themselves.
  6128.  
  6129.     /P           This option tells NDOS to load permanently and to
  6130.                  run AUTOEXEC.BAT.  When NDOS is loaded from the
  6131.                  SHELL= command in CONFIG.SYS, it will detect that
  6132.                  it is the primary shell and set the /P option
  6133.                  automatically.  Under very rare circumstances you
  6134.                  may want to load NDOS permanently and have it run
  6135.                  AUTOEXEC even though you are not loading it from
  6136.                  CONFIG.SYS; in such cases you must set /P
  6137.                  yourself.  NDOS will not run AUTOEXEC.BAT without
  6138.                  a /P.  Do not use this option in secondary
  6139.                  shells, or you will be unable to return to the
  6140.                  primary shell.
  6141.  
  6142.  
  6143.  
  6144. ___________________________________________________________________
  6145. NDOS Reference Manual                                          102
  6146.  
  6147.                                               Setting up CONFIG.SYS
  6148. ___________________________________________________________________
  6149.  
  6150.     //iniline    This option tells NDOS to treat the text
  6151.                  appearing between the // and the next space or
  6152.                  tab as a NDOS.INI directive (see page 108 for
  6153.                  information on NDOS.INI directives).  The
  6154.                  directive should be in the same format as a line
  6155.                  in NDOS.INI, but may not contain spaces, tabs, or
  6156.                  comments.  Directives on the SHELL= line override
  6157.                  any corresponding directive in NDOS.INI.  This is
  6158.                  a convenient way to place one or two simple
  6159.                  directives on the SHELL= line without having to
  6160.                  modify or create a NDOS.INI file, but is
  6161.                  primarily intended for use in secondary shells
  6162.                  (see below).
  6163.  
  6164.     command      This option tells NDOS to run the command
  6165.                  included on the SHELL= line.  The command will be
  6166.                  run after NSTART and AUTOEXEC.BAT but before
  6167.                  displaying the prompt.  It can be any valid
  6168.                  alias, internal or external command, or batch
  6169.                  file, and can include multiple commands (but see
  6170.                  the Caution below).  All other startup options
  6171.                  (such as /F and /P) must be placed before the
  6172.                  command, because NDOS will treat characters after
  6173.                  the command as part of the command and not as
  6174.                  additional startup options.  Use this option if
  6175.                  you want NDOS to run a file other than
  6176.                  AUTOEXEC.BAT when your system boots:  simply
  6177.                  rename AUTOEXEC.BAT and place the new name,
  6178.                  including its full path, at the end of the SHELL=
  6179.                  line.
  6180.  
  6181.  
  6182.     Caution
  6183.  
  6184.   ! In all versions of MS-DOS and PC-DOS from 2.0 through 4.01,
  6185.     the SHELL= line in the CONFIG.SYS file may not contain more
  6186.     than 31 characters following the name of the shell program
  6187.     (i.e., beginning with the space after the "M" in "NDOS.COM").
  6188.     If the line is too long, the options will not be passed
  6189.     properly to NDOS and a variety of errors can occur.  You can
  6190.     set all necessary NDOS options without exceeding this limit,
  6191.     especially if you put NDOS.COM and NDOS.INI in the root
  6192.     directory of your boot drive.  This limit is not present in
  6193.     MS-DOS 5.0 and above or in DR-DOS.
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201. ___________________________________________________________________
  6202. NDOS Reference Manual                                          103
  6203.  
  6204.                                               Setting up CONFIG.SYS
  6205. ___________________________________________________________________
  6206.  
  6207.  
  6208.     Startup Options for Secondary Shells
  6209.  
  6210.     In most cases, secondary shells do not use or require any of
  6211.     the startup options defined for the primary shell in
  6212.     CONFIG.SYS.  Usually, you can only set explicit options for a
  6213.     NDOS secondary shell when you define a NDOS window in a
  6214.     multitasking system such as Back & Forth, DESQview, Windows,
  6215.     or the MS-DOS shell (DOSSHELL); or in rare cases when you run
  6216.     a secondary copy of NDOS directly from the command line.  If
  6217.     you do need to set options for secondary shells, you can use
  6218.     any of the following:
  6219.  
  6220.     @d:\path\inifile
  6221.                  Set INI filename, as in CONFIG.SYS (see above).
  6222.                  This option is not necessary if you want NDOS to
  6223.                  use the same INI file that you used for the
  6224.                  primary shell, as values from that file --
  6225.                  including those in its [Secondary] section --
  6226.                  will be passed automatically to secondary shells.
  6227.  
  6228.     /E:nnnn      Set the environment size, as in CONFIG.SYS (see
  6229.                  above).
  6230.  
  6231.     /F           Force an automatic "Fail" on critical error, as
  6232.                  in CONFIG.SYS (see above).
  6233.  
  6234.     //iniline    This option tells NDOS to treat the text
  6235.                  appearing between the // and the next space or
  6236.                  tab as a NDOS.INI directive (see page 108 for
  6237.                  more information on NDOS.INI directives).  The
  6238.                  directive should be in the same format as a line
  6239.                  in NDOS.INI, but may not contain spaces, tabs, or
  6240.                  comments.  Directives on the SHELL= line override
  6241.                  any corresponding directive in NDOS.INI.  This
  6242.                  allows you to use NDOS.INI directives directly on
  6243.                  the command line when starting NDOS in a window
  6244.                  of a multitasking system, rather than having to
  6245.                  create separate copies of NDOS.INI to accommodate
  6246.                  small configuration changes in different windows.
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256. ___________________________________________________________________
  6257. NDOS Reference Manual                                          104
  6258.  
  6259.                                                  Using AUTOEXEC.BAT
  6260. ___________________________________________________________________
  6261.  
  6262.  
  6263.     [/C] command
  6264.                  This option tells NDOS to run the command
  6265.                  included on the line.  The command will be run
  6266.                  after NSTART but before any command prompt is
  6267.                  displayed.  It can be any valid alias, internal
  6268.                  or external command, or batch file, and can
  6269.                  include multiple commands.  Use this option if
  6270.                  you want NDOS to run a batch file or execute a
  6271.                  command when it starts, for example to run a
  6272.                  specific batch file when NDOS is started in a
  6273.                  window of a multitasking system.
  6274.  
  6275.                  When the command is preceded by a /C, NDOS will
  6276.                  execute the command and then exit and return to
  6277.                  the parent program.  /C is used by some
  6278.                  applications to start the command processor, run
  6279.                  one command, and the return to the application.
  6280.                  This option can be used when NDOS is run as a
  6281.                  secondary shell, but never in the SHELL statement
  6282.                  in the CONFIG.SYS file.
  6283.  
  6284.  
  6285. Using AUTOEXEC.BAT
  6286.  
  6287.     If NDOS is the primary command processor, it is up and running
  6288.     before AUTOEXEC.BAT is executed.  You generally won't need to
  6289.     make any changes to AUTOEXEC.BAT to make it run properly under
  6290.     NDOS, although once you get used to some of the NDOS batch
  6291.     file enhancements, you may want to use them to streamline
  6292.     AUTOEXEC.BAT.
  6293.  
  6294.     If you want to use the NDOS KEYSTACK command, you will
  6295.     normally load the program KSTACK.COM from your AUTOEXEC.BAT
  6296.     file.  To do so, include the following line in your file.  Its
  6297.     location in the file is unimportant as long as you place it
  6298.     before any KEYSTACK commands:
  6299.  
  6300.          d:\path\kstack.com
  6301.  
  6302.     Replace the "d:\path" with the path to the KSTACK.COM program,
  6303.     which will normally be stored in your NU directory.
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310. ___________________________________________________________________
  6311. NDOS Reference Manual                                          105
  6312.  
  6313.                                                  Using AUTOEXEC.BAT
  6314. ___________________________________________________________________
  6315.  
  6316.  
  6317.     You may want to use AUTOEXEC.BAT to configure NDOS the way you
  6318.     want it by setting some of the environment variables that NDOS
  6319.     uses.  You may also want to include a SETDOS command (see page
  6320.     283) to set configuration variables (most of these variables
  6321.     can also be set in the NDOS.INI file discussed below).  All of
  6322.     these settings are optional.
  6323.  
  6324.     NDOS uses seven environment variables.  Five of the seven (all
  6325.     except PATH and PROMPT) are created with the SET command (see
  6326.     page 280) using this format:
  6327.  
  6328.          set name=value
  6329.  
  6330.     The seven variables and their uses are explained below:
  6331.  
  6332.          COMSPEC:  The COMSPEC variable is the path and filename
  6333.          that programs use to launch a secondary shell.  Normally,
  6334.          this will be set automatically by NDOS as it installs
  6335.          itself.  However, in rare circumstances you may wish to
  6336.          load NDOS.COM for secondary shells from a directory other
  6337.          than the one it's in when you boot (for example, from a
  6338.          RAM disk).  In these cases, you will need to reset the
  6339.          COMSPEC variable.  For example, if you want to load
  6340.          secondary copies of NDOS.COM from the root directory of
  6341.          drive D:, you would use this command:
  6342.  
  6343.               set comspec=D:\NDOS.COM
  6344.  
  6345.          PATH:  The PATH variable lists the directories that NDOS
  6346.          should search for executable files that aren't in the
  6347.          current directory (executable files include .COM, .EXE,
  6348.          .BTM, and .BAT files and files with executable
  6349.          extensions).  The PATH variable is normally set with the
  6350.          PATH command.  See PATH on page 257 for more details.
  6351.  
  6352.          PROMPT:  The prompt variable defines the NDOS command
  6353.          prompt.  It is normally set with the PROMPT command.  See
  6354.          PROMPT on page 261 for details about the options
  6355.          available.
  6356.  
  6357.          TEMPNDOS:  This variable contains the drive and directory
  6358.          that NDOS will use to store temporary pipe files (see
  6359.          page 60).  If you have a RAM disk, piping will be faster
  6360.          if you direct NDOS to use it for the pipe files.  This
  6361.          variable should hold a single path.  The path can be
  6362.          terminated with a backslash [\] if you choose, but this
  6363.  
  6364.  
  6365. ___________________________________________________________________
  6366. NDOS Reference Manual                                          106
  6367.  
  6368.                                              Using NSTART and NEXIT
  6369. ___________________________________________________________________
  6370.  
  6371.          is not required.  For example, to direct pipe temporary
  6372.          files to the TEMP directory on drive D:
  6373.  
  6374.               set tempndos=d:\temp
  6375.  
  6376.          TEMP:  If TEMPNDOS does not exist, NDOS looks for this
  6377.          variable to find the path for temporary pipe files (if
  6378.          neither exists, NDOS uses the root directory of the drive
  6379.          from which it was started).  TEMP is also used by some
  6380.          other programs to set a path for their temporary files.
  6381.          The format of TEMP is the same as TEMPNDOS.
  6382.  
  6383.          COLORDIR:  This variable sets the colors that NDOS will
  6384.          use for directories displayed by the DIR and SELECT
  6385.          commands.  See those commands (page 195 and 275) for
  6386.          details about COLORDIR.
  6387.  
  6388.          CDPATH:  This variable defines default directories to be
  6389.          used by the CD and CDD commands, and by automatic
  6390.          directory changes.  If CD, CDD, or an automatic directory
  6391.          entry cannot find the path you specify on the command
  6392.          line, NDOS will try appending the command line path to
  6393.          each path in this variable.  For example, you may have a
  6394.          C:\LETTERS directory that has subdirectories named JAN,
  6395.          FEB, MARCH, etc.  You can put C:\LETTERS into CDPATH and
  6396.          get to the FEB directory from anywhere on your system by
  6397.          typing CDD FEB or FEB\.
  6398.  
  6399.          The format of the CDPATH variable is the same as the PATH
  6400.          variable:  a list of directories separated by semicolons.
  6401.          For example:
  6402.  
  6403.               set cdpath=c:\letters;c:\data;c:\memos
  6404.  
  6405.  
  6406. Using NSTART and NEXIT
  6407.  
  6408.     NDOS runs two special batch files automatically, NSTART.BTM
  6409.     and NEXIT.BTM (you can make them .BAT files, if you prefer).
  6410.     NSTART is executed whenever NDOS is started as a primary or
  6411.     secondary shell.  In the primary shell, it is executed before
  6412.     AUTOEXEC.BAT.  If NDOS is started as a secondary shell with
  6413.     the /C command option, NSTART is executed before the command.
  6414.  
  6415.     A NSTART file is normally very short.  You should NOT load any
  6416.     memory-resident programs (TSRs) from NSTART because they will
  6417.     be reloaded every time a secondary shell is started.
  6418.     Normally, NSTART is used to vary the PROMPT setting or screen
  6419.     colors from shell to shell.  The LOG command is sometimes used
  6420.     in NSTART to record that a new shell has begun.  A PAUSE
  6421.  
  6422. ___________________________________________________________________
  6423. NDOS Reference Manual                                          107
  6424.  
  6425.                                             Using the NDOS.INI File
  6426. ___________________________________________________________________
  6427.  
  6428.     command inserted temporarily in NSTART will let you see if a
  6429.     particular program is running a secondary shell with the /C
  6430.     command option to accomplish some of its own work.  Do not
  6431.     load aliases from NSTART -- NDOS passes them along to a
  6432.     secondary shell automatically, so you only need to load them
  6433.     once, in AUTOEXEC.BAT.
  6434.  
  6435.     The NEXIT batch file is executed every time a secondary NDOS
  6436.     command processor ends.  A secondary shell can end because of
  6437.     an EXIT command or after completing the command specified with
  6438.     a /C command startup option.  Normally, NEXIT is used to LOG a
  6439.     record that the shell has ended.  You might also use NEXIT to
  6440.     view the results of the command that an application has given
  6441.     to NDOS, or to save the history accumulated during that shell
  6442.     with the HISTORY command with output redirected to a file.
  6443.  
  6444.     NDOS looks for the NSTART and NEXIT batch files in three
  6445.     places:
  6446.  
  6447.          *  If the NDOS.INI file has a NSTARTPath entry, NDOS will
  6448.             use it, and will not look elsewhere.
  6449.  
  6450.          *  If NSTARTPath is not set, NDOS will look in the
  6451.             directory where NDOS.COM is stored.  For the primary
  6452.             shell, NDOS determines this directory automatically, or
  6453.             you can set it yourself by placing a COMSPEC directory
  6454.             name on the SHELL= line in CONFIG.SYS (see page 101).
  6455.             For secondary shells, the directory is determined from
  6456.             the COMSPEC environment variable (see page 106).
  6457.  
  6458.          *  If the COMSPEC directory search fails, NDOS will look
  6459.             in the root directory of the boot drive.
  6460.  
  6461.     The easiest way to make sure that NDOS finds the NSTART and
  6462.     NEXIT batch files is to specify their location with the
  6463.     NSTARTPath directive in the NDOS.INI file (see below).  If you
  6464.     don't, put NSTART and NEXIT in the root directory of the boot
  6465.     drive.  If the COMSPEC drive is not the same as the boot
  6466.     drive, then you should also put a copy of NSTART and NEXIT in
  6467.     the root directory of the COMSPEC drive.
  6468.  
  6469.  
  6470. Using the NDOS.INI File
  6471.  
  6472.     NDOS uses a file of initialization information called the
  6473.     NDOS.INI file.  You can create, add to, and edit this file
  6474.     with any ASCII text editor to set NDOS options and alter the
  6475.     way that NDOS works.  The installation process will create a
  6476.     NDOS.INI file for you if one does not already exist on your
  6477.     system.  Most of this section explains the options available
  6478.  
  6479. ___________________________________________________________________
  6480. NDOS Reference Manual                                          108
  6481.  
  6482.                                             Using the NDOS.INI File
  6483. ___________________________________________________________________
  6484.  
  6485.     through NDOS.INI.  You only need to include entries in NDOS.INI
  6486.     for any settings that you want to change from their default
  6487.     values.  If you are happy with all of the NDOS default values,
  6488.     you don't need a NDOS.INI file at all.
  6489.  
  6490.     Some settings in NDOS.INI are initialized when you install
  6491.     NDOS, so you may have a NDOS.INI file even if you didn't
  6492.     create one yourself.  You should not delete this file unless
  6493.     you've checked carefully to be sure that you don't need any of
  6494.     the settings the initialization program put there.
  6495.  
  6496.     When NDOS is loaded as the primary shell, it searches for
  6497.     NDOS.INI in three places:
  6498.  
  6499.          *  If there is an "@d:\path\inifile" option on the SHELL=
  6500.             line in CONFIG.SYS (see page 101), NDOS will use the
  6501.             path and filename specified there, and will not look
  6502.             elsewhere.
  6503.  
  6504.          *  If there is no INI filename on the SHELL= line, NDOS
  6505.             will look in the same directory where NDOS.COM is
  6506.             stored (this is the "normal" location for NDOS.INI).
  6507.             NDOS determines this directory automatically, or you
  6508.             can set it yourself by placing a COMSPEC directory name
  6509.             on the SHELL= line in CONFIG.SYS (see page 101).
  6510.  
  6511.          *  If the NDOS.INI is not found in the directory where
  6512.             NDOS.COM is stored, NDOS will look in the root
  6513.             directory of the boot drive.
  6514.  
  6515.     When NDOS is loaded as a secondary shell, it does not search
  6516.     for the NDOS.INI file.  Instead, it retrieves the primary
  6517.     shell's INI file data, processes the [Secondary] section of
  6518.     the original INI file if necessary, and then processes any
  6519.     "@d:\path\inifile" option on the secondary shell command line
  6520.     (see page 104).  You can override this behavior with the
  6521.     NextINIFile directive (see page 128).
  6522.  
  6523.     Most lines in the NDOS.INI file consist of a one-word
  6524.     directive, an equal sign [=], and a value.  For example, in
  6525.     the following line, the word "Environment" is the directive
  6526.     and "2048" is the value:
  6527.  
  6528.          Environment = 2048
  6529.  
  6530.     Any spaces before or after the equal sign are ignored.
  6531.  
  6532.     If you have a long string to enter in NDOS.INI (for example,
  6533.     for the ColorDir directive), you must enter it all on one
  6534.  
  6535.  
  6536. ___________________________________________________________________
  6537. NDOS Reference Manual                                          109
  6538.  
  6539.                                             Using the NDOS.INI File
  6540. ___________________________________________________________________
  6541.  
  6542.     line.  Strings cannot be "continued" to a second line.  Each
  6543.     line may be up to 511 characters long.
  6544.  
  6545.     The format of the value part of a directive line depends on
  6546.     the individual directive.  It may be a numeric value, a single
  6547.     character, a choice (like "Yes" or "No"), a color setting, a
  6548.     key name, a path, a filename, or a text string.  The value
  6549.     begins with the first non-blank character after the equal sign
  6550.     and ends at the end of the line or the beginning of a comment.
  6551.  
  6552.     Blank lines are ignored in the NDOS.INI file and can be used
  6553.     to separate groups of directives.  You can place comments in
  6554.     the file by beginning a line with a semicolon [;].  You can
  6555.     also place comments at the end of any line except one
  6556.     containing a text string value.  To do so, enter at least one
  6557.     space or tab after the value, a semicolon, and your comment,
  6558.     like this:
  6559.  
  6560.          Environment = 2048        ;set standard environment size
  6561.  
  6562.     If you try to place a comment at the end of a string value,
  6563.     the comment will become part of the string and will probably
  6564.     cause an error.
  6565.  
  6566.     When NDOS detects an error while processing the NDOS.INI file,
  6567.     it displays an error message, ignores the line that caused the
  6568.     error, and prompts you to press a key to continue processing
  6569.     the file.  This allows you to note any errors before the
  6570.     startup process continues.  The directive in error will retain
  6571.     its previous or default value.  Only the most catastrophic
  6572.     errors (like a disk read failure) will cause NDOS to ignore
  6573.     all or a large part of the NDOS.INI file.  If you don't want
  6574.     NDOS to pause after each error, use a "PauseOnError = No"
  6575.     directive at the beginning of the file.
  6576.  
  6577.     The NDOS.INI file has two sections, which are identified by a
  6578.     name in square brackets on a line by itself.  The section
  6579.     names are
  6580.  
  6581.          [Primary]:  Directives in this section will be used when
  6582.          NDOS is running as the primary shell.  The same values
  6583.          will be passed automatically to all secondary shells,
  6584.          unless overridden by a directive with the same name in
  6585.          the [Secondary] section.
  6586.  
  6587.          [Secondary]:  Directives in this section are used in
  6588.          secondary shells only, and override any corresponding
  6589.          primary shell settings.  For example, if your NDOS.INI
  6590.          file contains the lines:
  6591.  
  6592.  
  6593. ___________________________________________________________________
  6594. NDOS Reference Manual                                          110
  6595.  
  6596.                                             Using the NDOS.INI File
  6597. ___________________________________________________________________
  6598.  
  6599.               ScreenRows = 25
  6600.               [Secondary]
  6601.               ScreenRows = 50
  6602.  
  6603.          then NDOS will assume that you have 25 rows on the screen
  6604.          in the primary shell and 50 lines in all secondary
  6605.          shells.
  6606.  
  6607.     Lines that precede a section name are used in both primary and
  6608.     secondary shells.
  6609.  
  6610.     The SETDOS command can override several of the NDOS.INI file
  6611.     directives.  For example, the number of rows on the screen can
  6612.     be adjusted with SETDOS /R.  The correspondence between SETDOS
  6613.     options and INI file directives is noted under each directive
  6614.     below, and under each option of the SETDOS command.
  6615.  
  6616.     The NDOS.INI file normally should be stored in the root
  6617.     directory of the boot drive.  You can specify a different
  6618.     location for the primary NDOS shell with the
  6619.     "@d:\path\inifile" startup option in your CONFIG.SYS file (see
  6620.     page 101).
  6621.  
  6622.     Secondary shells automatically inherit the configuration
  6623.     settings currently in effect in the previous shell.  If values
  6624.     have been changed by SETDOS since NDOS started, the new values
  6625.     will be passed to the secondary shell.  If the previous
  6626.     shell's INI file had a [Secondary] section, it will then be
  6627.     read and processed.  If not, the previous shell's settings
  6628.     will remain in effect.  For example, if you set BatchEcho to
  6629.     Yes in NDOS.INI, do not include a [Secondary] section, and use
  6630.     SETDOS /V0 to turn off batch file echoing in the primary
  6631.     shell, then secondary shells will inherit the SETDOS setting,
  6632.     i.e. batch files will default to no echo.
  6633.  
  6634.     If you want to force secondary shells to start with the same
  6635.     value as the primary shell for a particular directive,
  6636.     regardless of any changes made with SETDOS, repeat the
  6637.     directive in the [Secondary] section of NDOS.INI.  You can
  6638.     also place the directive outside any section of NDOS.INI, then
  6639.     include an empty [Secondary] section.  The inclusion of a
  6640.     [Secondary] section will force NDOS to re-read NDOS.INI, and
  6641.     the directives outside any section will be reprocessed as they
  6642.     apply to both primary and secondary shells.  Because NDOS.INI
  6643.     is processed after values from the previous shell are
  6644.     inherited, the value in NDOS.INI will override the inherited
  6645.     value.  Using the BatchEcho example above, either of the
  6646.     following sets of NDOS.INI directives would work to ensure
  6647.     that BatchEcho is set to Yes in secondary shells:
  6648.  
  6649.  
  6650. ___________________________________________________________________
  6651. NDOS Reference Manual                                          111
  6652.  
  6653.                                             Using the NDOS.INI File
  6654. ___________________________________________________________________
  6655.  
  6656.           Same directive                Empty
  6657.           in both sections                   [Secondary]
  6658.          [Primary]                      BatchEcho = Yes
  6659.          BatchEcho = Yes                  ... <other
  6660.            ... <other directives>         ...  directives>
  6661.          [Secondary]                    [Secondary]
  6662.          BatchEcho = Yes                <End of File>
  6663.            ... <other directives>
  6664.  
  6665.     If you start a secondary shell from a task switching program
  6666.     like Windows, DESQview, or Back & Forth, you can specify an
  6667.     alternate location and name for NDOS.INI by passing the
  6668.     "@d:\path\inifile" option to NDOS as a command-line parameter
  6669.     (see page 101).  In this case, the configuration settings in
  6670.     the alternate NDOS.INI file will supersede any settings
  6671.     inherited from the previous shell.  Any values which are not
  6672.     explicitly set in the alternate file will retain the value
  6673.     they had in the previous shell.  Any [Primary] section in the
  6674.     alternate file will be ignored because it is being run from a
  6675.     secondary shell.
  6676.  
  6677.     The first section below lists the different types of
  6678.     directives.  Subsequent sections list all the individual
  6679.     directives, divided by function and then alphabetically by
  6680.     directive name.  At the end we have included a few examples of
  6681.     how to use NDOS.INI directives (see page 129).
  6682.  
  6683.  
  6684.     Types of Directives
  6685.  
  6686.     There are eight types of directives in NDOS.INI.  When you
  6687.     look at the descriptions below, you can tell the directive
  6688.     type by the way in which the allowable values are shown.
  6689.  
  6690.          *  Name = nnnn (1234):  This directive takes a numeric
  6691.             value which replaces the "nnnn."  The default value is
  6692.             shown in parentheses.
  6693.  
  6694.          *  Name = c (X):  This directive accepts a single
  6695.             character as its value.  The default character is shown
  6696.             in parentheses.  You must type in the actual character,
  6697.             you cannot use a key name.
  6698.  
  6699.          *  Name = CHOICE1 | Choice2 | ... :  This directive takes
  6700.             a choice value.  The possible choices are listed,
  6701.             separated by vertical bars.  The default value is shown
  6702.             in all upper case letters in the directive description,
  6703.             but in your file any of the choices can be entered in
  6704.             upper case or lower case.  For example, if the choices
  6705.             were shown as "YES | No" then "YES" is the default.
  6706.  
  6707. ___________________________________________________________________
  6708. NDOS Reference Manual                                          112
  6709.  
  6710.                                             Using the NDOS.INI File
  6711. ___________________________________________________________________
  6712.  
  6713.          *  Name = color:  This directive takes a color
  6714.             specification in the form:
  6715.  
  6716.               [BRIght] [BLInk] fg ON bg [BORder bc]
  6717.  
  6718.             Where:
  6719.  
  6720.                fg is the foreground color.
  6721.                bg is the background color.
  6722.                bc is the border color.
  6723.  
  6724.             The allowable color names are:
  6725.  
  6726.               Black         Blue          Green         Red
  6727.               Magenta       Cyan          Yellow        White
  6728.  
  6729.             The color names and the keywords BRIGHT, BLINK, and
  6730.             BORDER can be shortened to three letters.
  6731.  
  6732.          *  Name = Key (Default):  This directive takes a key
  6733.             specification in the form:
  6734.  
  6735.               [Prefix-]Keyname
  6736.  
  6737.             The default value, if any, is shown in parentheses.
  6738.             The key prefix can be left out, or it can be any one of
  6739.             the following:
  6740.  
  6741.               Alt        followed by A - Z, 0 - 9, F1 - F12, or
  6742.                          Bksp
  6743.               Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  6744.                          Left, Right, Home, End, PageUp,
  6745.                          PageDown, Ins, or Del
  6746.               Shift      followed by F1 - F12 or Tab.
  6747.  
  6748.             The possible key names are:
  6749.  
  6750.               A - Z         Enter         PgDn
  6751.               0 - 9         Up            Home
  6752.               F1 - F12      Down          End
  6753.               Esc           Left          Ins
  6754.               Bksp          Right         Del
  6755.               Tab           PgUp
  6756.  
  6757.             All key names must be spelled as shown.  Alphabetic
  6758.             keys can be specified in upper-case or lower-case.  You
  6759.             cannot specify a punctuation key.
  6760.  
  6761.             The prefix and key name must be separated by a dash.
  6762.             For example:
  6763.  
  6764. ___________________________________________________________________
  6765. NDOS Reference Manual                                          113
  6766.  
  6767.                                             Using the NDOS.INI File
  6768. ___________________________________________________________________
  6769.  
  6770.               AddFile = Alt-F10    ; This is okay
  6771.               AddFile = Alt F10    ; The space will cause an error
  6772.  
  6773.             If you prefer, you can use a numeric value instead of a
  6774.             key name.  Use the ASCII code for an ASCII, extended
  6775.             ASCII, or control character.  Use the scan code
  6776.             preceded by an at-sign [@] for extended key codes like
  6777.             F1 or the cursor keys.  In general, you will find it
  6778.             easier to use the names described above rather than key
  6779.             numbers.
  6780.  
  6781.          *  Name = Path:  This directive takes a path
  6782.             specification, but not a filename.  The path should
  6783.             include both a drive and path (e.g., C:\NDOS) to avoid
  6784.             any possible ambiguities.  A trailing backslash [\] at
  6785.             the end of the path name is acceptable but not
  6786.             required.  Any default path is described in the text.
  6787.  
  6788.          *  Name = File:  This directive takes a filename.  We
  6789.             recommend that you use a full filename including the
  6790.             drive letter and path to avoid any possible
  6791.             ambiguities.  Any default filename is described in the
  6792.             text.
  6793.  
  6794.          *  Name = Anything else:  This directive takes a string in
  6795.             the format shown.  The text describes the default value
  6796.             and any additional requirements for formatting the
  6797.             string correctly.  No comments are allowed.
  6798.  
  6799.     NDOS contains a fixed-length area for storing strings entered
  6800.     in NDOS.INI, including filenames, paths, and other strings.
  6801.     This area is large and is unlikely to overflow; if it does,
  6802.     you will receive an error message.  If this occurs, reduce the
  6803.     complexity of your NDOS.INI file or contact our technical
  6804.     support department for assistance.
  6805.  
  6806.  
  6807.     Initialization Directives
  6808.  
  6809.     The directives in this section control how NDOS starts and
  6810.     where it looks for its files.
  6811.  
  6812.          NSTARTPath = Path:  Sets the drive and directory where
  6813.          NDOS should look for the NSTART and NEXIT batch files.
  6814.  
  6815.          Alias = nnnn  (1024):  Sets the amount of memory in bytes
  6816.          allocated for the alias list.  The allowable range of
  6817.          values is 256 to 32767 bytes.
  6818.  
  6819.  
  6820.  
  6821. ___________________________________________________________________
  6822. NDOS Reference Manual                                          114
  6823.  
  6824.                                             Using the NDOS.INI File
  6825. ___________________________________________________________________
  6826.  
  6827.          AutoExecPath = Path:  Sets the path used to find
  6828.          AUTOEXEC.BAT if NDOS is started as a primary shell with
  6829.          the /P option in CONFIG.SYS (see page 102).  The default
  6830.          is the root directory of the boot drive.
  6831.  
  6832.          Environment = nnnn  (512):  Sets the amount of memory
  6833.          allocated to the environment in bytes.  The allowable
  6834.          range of values is 256 to 32000 bytes.
  6835.  
  6836.          EnvFree = nnnn  (128):  Sets the minimum amount of memory
  6837.          in bytes that will be available in the environment for
  6838.          secondary shells.  NDOS will enlarge the environment for
  6839.          each secondary shell, if necessary, so that there is at
  6840.          least this much free environment space when the shell
  6841.          starts.  The allowable range of values is 128 to 32000
  6842.          bytes.
  6843.  
  6844.          History = nnnn  (1024):  Sets the amount of memory
  6845.          allocated to the history list in bytes.  The allowable
  6846.          range of values is 512 to 8192 bytes.
  6847.  
  6848.          LogName = File:  Sets the log filename and/or path. If
  6849.          only a path is given, NDOS will use the default log
  6850.          filename (NDOSLOG).  Using LogName does not turn logging
  6851.          on, you must use a LOG ON command to do so.
  6852.  
  6853.          PauseOnError = YES | No:  "Yes" tells NDOS to pause with
  6854.          the message "Error in NDOS.INI, press any key to continue
  6855.          processing" after displaying any error message related to
  6856.          a specific line in the NDOS.INI file.  "No" continues
  6857.          processing with no pause after an error message is
  6858.          displayed.
  6859.  
  6860.          Swapping = swap type [, swap type] ...:  Sets the type of
  6861.          swapping NDOS should use.  NDOS runs in two parts, a
  6862.          resident portion that is always in memory and a transient
  6863.          portion that can be stored in EMS memory, in XMS memory,
  6864.          on a RAM disk, or on your hard disk while application
  6865.          programs are running.  The resident portion uses about 4K
  6866.          of memory in the primary shell and about 1.5K in
  6867.          secondary shells.  The transient portion uses about 90K
  6868.          of memory.  NDOS will perform most quickly if the
  6869.          transient portion is swapped to the fastest memory or
  6870.          device available.  See page 42 for explanations of XMS
  6871.          and EMS memory.
  6872.  
  6873.  
  6874.  
  6875.  
  6876. ___________________________________________________________________
  6877. NDOS Reference Manual                                          115
  6878.  
  6879.                                             Using the NDOS.INI File
  6880. ___________________________________________________________________
  6881.  
  6882.  
  6883.          Swapping for the primary shell normally requires about
  6884.          96K of EMS memory, or 90K of XMS memory or disk space.
  6885.          Secondary shells normally require 32K of EMS, or 25K of
  6886.          XMS or disk space.  If you have a large environment,
  6887.          alias list, or history list, more memory will be required
  6888.          in both primary and secondary shells.  The EMS
  6889.          requirements are larger because EMS memory is allocated
  6890.          in 16K increments; NDOS does not actually use more memory
  6891.          when swapping to EMS.
  6892.  
  6893.          The swap type may be:
  6894.  
  6895.                EMS:  NDOS will swap to EMS expanded memory if it is
  6896.                available.  You must have expanded memory and an EMS
  6897.                memory manager (version 3.2 or later) for this
  6898.                option.
  6899.  
  6900.                XMS:  NDOS will swap to XMS extended memory if it is
  6901.                available (you must have an 80286, 386, or 486
  6902.                computer for this option, and an XMS memory
  6903.                manager).
  6904.  
  6905.                d:\path:  NDOS will create a swap file in the drive
  6906.                and directory specified.  The file will be called
  6907.                NDOSSWAP.NNN where "NNN" is the shell number (unless
  6908.                you use the UniqueSwapName directive to generate a
  6909.                unique swap filename; see page 129).  This swap
  6910.                file is created as a hidden system file to avoid
  6911.                accidental deletion and will not be visible with a
  6912.                normal DIR command.  Swapping to a RAM disk will
  6913.                generally be faster than swapping to a hard disk.
  6914.                Do not use a floppy disk for swapping because its
  6915.                performance is likely to be unacceptably slow.
  6916.  
  6917.                None:  No swapping.  The transient portion of NDOS
  6918.                will remain in memory at all times.  This option
  6919.                will reduce memory available for application
  6920.                programs by about 90K compared to the other swap
  6921.                types, and should be used only when no other
  6922.                swapping options are available.
  6923.  
  6924.          You can specify multiple swap types and NDOS will try
  6925.          them in the order listed.  Swap type "None" is always
  6926.          appended to your list of possible swap types as a "last
  6927.          resort", even if you don't include it explicitly.  This
  6928.          allows NDOS to start even if the other swap types you
  6929.          specify don't work.
  6930.  
  6931.  
  6932.  
  6933. ___________________________________________________________________
  6934. NDOS Reference Manual                                          116
  6935.  
  6936.                                             Using the NDOS.INI File
  6937. ___________________________________________________________________
  6938.  
  6939.  
  6940.          For example, if your system has EMS memory and a RAM disk
  6941.          set up as drive D:, the directive:
  6942.  
  6943.                Swapping = EMS, D:\, C:\SWAP
  6944.  
  6945.          will tell NDOS to try EMS memory first, then the RAM
  6946.          disk, and finally the \SWAP directory on drive C:.  If all
  6947.          of these options fail (because there isn't enough free
  6948.          space available), the transient portion of NDOS will
  6949.          remain in memory (swap type "None").
  6950.  
  6951.          The default Swapping specification is:
  6952.  
  6953.                Swapping = EMS, XMS, x:\, None
  6954.  
  6955.          where "x" is the boot drive (for the primary shell) or
  6956.          the COMSPEC drive (for secondary shells).  (Disk swapping
  6957.          will not be included as part of the default if the boot
  6958.          drive is A: or B:, because floppy disk swapping is too
  6959.          slow to be useful on most systems.)  The default is
  6960.          usually adequate for most systems.
  6961.  
  6962.          UMBEnvironment = Yes | NO:  "Yes" attempts to load the
  6963.          master environment into a UMB (Upper Memory Block).  This
  6964.          reduces the NDOS base memory requirements but may cause
  6965.          problems with some programs that try to access the master
  6966.          environment directly.  This option requires a 386 or 486
  6967.          computer and appropriate support software.  (See pages 43
  6968.          and 131 for more information on UMBs.)
  6969.  
  6970.          UMBLoad = Yes | NO:  "Yes" attempts to load the resident
  6971.          portion of NDOS into a UMB (Upper Memory Block).  This
  6972.          reduces the size of the resident portion in base memory
  6973.          from about 4K bytes to 448 bytes, plus the environment
  6974.          size (unless you have also enabled UMBEnvironment).  This
  6975.          option requires a 386 or 486 computer and appropriate
  6976.          support software and appropriate support hardware and
  6977.          software.  See pages 43 and 131 for more information on
  6978.          UMBs.
  6979.  
  6980.  
  6981.     Configuration Directives
  6982.  
  6983.     These directives control the way that NDOS operates.  Some can
  6984.     be changed with the SETDOS command while NDOS is running.  Any
  6985.  
  6986.  
  6987.  
  6988. ___________________________________________________________________
  6989. NDOS Reference Manual                                          117
  6990.  
  6991.                                             Using the NDOS.INI File
  6992. ___________________________________________________________________
  6993.  
  6994.     corresponding SETDOS command is listed in the description of
  6995.     each directive;  information on SETDOS is on page 283.
  6996.  
  6997.          ANSI = AUTO | Yes | No:  Tells NDOS whether an ANSI
  6998.          driver is installed and should be used for the CLS and
  6999.          COLOR commands.  NDOS normally determines this itself,
  7000.          but if you are using a non-standard ANSI driver or your
  7001.          loading sequence is unusual, you may need to explicitly
  7002.          inform NDOS.  Also see SETDOS /A.
  7003.  
  7004.          BatchEcho = YES | No:  Sets the default batch ECHO mode.
  7005.          "Yes" enables echoing of all batch file commands unless
  7006.          ECHO is explicitly set off in the batch file.  "No"
  7007.          disables batch file echoing unless ECHO is explicitly set
  7008.          on.  Also see SETDOS /V.
  7009.  
  7010.          BeepFreq = nnnn  (440):  Sets the default BEEP command
  7011.          frequency in Hz.  This is also the frequency for NDOS
  7012.          "error" beeps (if you press an illegal key, for example).
  7013.          To disable all NDOS error beeps set this or BeepLength to
  7014.          zero;  if you do the BEEP command will still be operable,
  7015.          but will not produce sound unless you explicitly specify
  7016.          the frequency and duration.
  7017.  
  7018.          BeepLength = nnnn  (2):  Sets the default BEEP length in
  7019.          system clock ticks (approximately 1/18 of a second per
  7020.          tick).  BeepLength is also the default length for NDOS
  7021.          "error" beeps (if you press an illegal key, for example).
  7022.  
  7023.          CursorIns = nnnn  (100):  This is the shape of the cursor
  7024.          for insert mode during command line editing and all
  7025.          commands which accept line input (DESCRIBE, ESET, etc.).
  7026.          The size is a percentage of the total character cell
  7027.          size, between 0% and 100%.  Because of the way video
  7028.          BIOSes map the cursor shape, you may not get a smooth
  7029.          progression in cursor shapes as CursorIns and CursorOver
  7030.          change.  Also see SETDOS /S.
  7031.  
  7032.          CursorOver = nnnn  (10):  This is the shape of the cursor
  7033.          for overtype mode during command line editing and all
  7034.          commands which accept line input.  The size is a
  7035.          percentage of the total character cell size, between 0%
  7036.          and 100%.  Also see SETDOS /S.
  7037.  
  7038.          DescriptionMax = nnnn (40):  Controls the description
  7039.          length limit for DESCRIBE (see page 193).  The allowable
  7040.          range is 20 to 120 characters.
  7041.  
  7042.          CommandSep = c  (^):  This is the character used to
  7043.          separate multiple commands on the same line.  You cannot
  7044.  
  7045. ___________________________________________________________________
  7046. NDOS Reference Manual                                          118
  7047.  
  7048.                                             Using the NDOS.INI File
  7049. ___________________________________________________________________
  7050.  
  7051.          use any of the redirection characters (| > < ) or any of
  7052.          the whitespace characters (space, tab, comma, or equal
  7053.          sign).  Also see SETDOS /C.
  7054.  
  7055.          EditMode = Insert | OVERSTRIKE:  This directive lets you
  7056.          start the command line editor in either insert or
  7057.          overstrike mode.  Also see SETDOS /M.
  7058.  
  7059.          EscapeChar = c  (Ctrl-X [-]):  Sets the character used to
  7060.          suppress the normal meaning of the following character.
  7061.          See page 86 for a description of the escape character and
  7062.          special escape sequences.  You cannot use any of the
  7063.          redirection characters (| > < ) or the whitespace
  7064.          characters (space, tab, comma, or equal sign) as the
  7065.          escape character.  Also see SETDOS /E.
  7066.  
  7067.          HistMin = nnnn  (0):  Sets the minimum command line size
  7068.          to save in the command history list.  Any command line
  7069.          whose length is less than this value will not be saved.
  7070.          Legal values range from 0 (save everything) to 256
  7071.          (disable all command history saves).
  7072.  
  7073.          HistWinColor = Color:  Sets the default colors for the
  7074.          command line history window.  If this directive is not
  7075.          used the colors will be reversed from the current colors
  7076.          on the screen.
  7077.  
  7078.          HistWinHeight = nn (12):  Sets the height of the command
  7079.          line history window in lines, including the border.
  7080.          Legal values range from 5 to the height of your screen;
  7081.          any value which would cause the bottom of the window to
  7082.          be off the screen will be adjusted so that the entire
  7083.          window remains on the screen.
  7084.  
  7085.          HistWinLeft = nn (40):  Sets the horizontal position of
  7086.          the left side of the command line history window.  Legal
  7087.          values range from zero (the left edge of the screen) to the
  7088.          number of columns on your screen minus ten.  Any value
  7089.          which would cause the right side of a minimum-width
  7090.          window to be off the screen will be adjusted so that the
  7091.          entire window remains on the screen.
  7092.  
  7093.          HistWinTop = nn (1):  Sets the vertical position of the
  7094.          top of the command line history window.  Legal values
  7095.          range from zero (the top of the screen) to the number of
  7096.          rows on your screen minus five.  Any value which would
  7097.          cause the bottom of a minimum-height window to be off the
  7098.          screen will be adjusted so that the entire window remains
  7099.          on the screen.
  7100.  
  7101.  
  7102. ___________________________________________________________________
  7103. NDOS Reference Manual                                          119
  7104.  
  7105.                                             Using the NDOS.INI File
  7106. ___________________________________________________________________
  7107.  
  7108.          HistWinWidth = nn (36):  Sets the width of the command
  7109.          line history window in characters, including the border.
  7110.          Legal values range from ten to the width of your screen;
  7111.          any value which would cause the right side of the window
  7112.          to be off the screen will be adjusted so that the entire
  7113.          window remains on the screen.
  7114.  
  7115.          LineInput = Yes | NO:  This directive controls how NDOS
  7116.          gets its input from the command line.  "Yes" forces NDOS
  7117.          to use line input via the DOS service INT 21H 0AH "Get
  7118.          Line" which is the way that COMMAND.COM gets input.  This
  7119.          will disable command-line editing, history recall, and
  7120.          filename completion, and is normally used only for rare
  7121.          memory-resident programs (TSRs) which do not work
  7122.          properly unless the command processor uses line input.
  7123.          If you have a particular program that requires line
  7124.          input, you can use SETDOS /L to temporarily change modes.
  7125.          See APPNOTES.DOC for any specific programs which require
  7126.          this option.
  7127.  
  7128.          NoClobber = Yes | NO:  If set to Yes, will prevent
  7129.          standard output redirection (see page 59) from
  7130.          overwriting an existing file, and will require that the
  7131.          output file already exist for append redirection.  Also
  7132.          see SETDOS /N.
  7133.  
  7134.          ParameterChar = c.  Sets the character used after a
  7135.          percent sign to specify all or all remaining command line
  7136.          arguments in a batch file or alias (e.g. %& or %n&; see
  7137.          pages 92 and 165) .  The default is the ampersand [&].
  7138.          Also see SETDOS /P.
  7139.  
  7140.          ScreenRows = nnnn:  Sets the number of screen rows used
  7141.          by the video display.  Normally, NDOS detects the screen
  7142.          size automatically, but if you have a non-standard
  7143.          display you may need to set it explicitly.  This value
  7144.          does not affect screen scrolling, which is controlled by
  7145.          your video BIOS or ANSI driver.  ScreenRows is used only
  7146.          by the LIST and SELECT commands, the paged output options
  7147.          of other commands (e.g., TYPE /P), and error checking in
  7148.          the screen output commands.  Also see SETDOS /R.
  7149.  
  7150.          UpperCase = Yes | NO:  "Yes" specifies that filenames
  7151.          should be displayed in the traditional upper-case by
  7152.          internal commands like COPY and DIR.  "No" allows the
  7153.          normal NDOS lower-case style.  Also see SETDOS /U.
  7154.  
  7155.  
  7156.  
  7157.  
  7158.  
  7159. ___________________________________________________________________
  7160. NDOS Reference Manual                                          120
  7161.  
  7162.                                             Using the NDOS.INI File
  7163. ___________________________________________________________________
  7164.  
  7165.     Color Directives
  7166.  
  7167.     These directives control the colors that NDOS uses for its
  7168.     displays.  Screen border colors can only be set in StdColors.
  7169.     "BORder" color specifications included in other directives
  7170.     will be ignored.
  7171.  
  7172.          ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb
  7173.          ...:  Sets the directory colors.  The format is the same
  7174.          as that used for the COLORDIR environment variable (see
  7175.          DIR on page 195 or SELECT on page 275).  If you set the
  7176.          COLORDIR environment variable it will override this
  7177.          directive.  You may find it useful to use the COLORDIR
  7178.          variable for experimenting, then to set permanent
  7179.          directory colors with a ColorDir directive in NDOS.INI.
  7180.  
  7181.          ListColors = Color:  Sets the colors used by the LIST and
  7182.          SELECT commands.  If this directive is not used, LIST and
  7183.          SELECT will use the current default colors set by the CLS
  7184.          or COLOR command or by the StdColors directive, below.
  7185.  
  7186.          StdColors = Color:  Sets the standard colors to be used
  7187.          when CLS is used without a color specification, and for
  7188.          LIST and SELECT if ListColors is not used.  Using this
  7189.          directive is similar to placing a COLOR command in
  7190.          AUTOEXEC.BAT.  StdColors takes effect the first time CLS,
  7191.          LIST, or SELECT is used after the transient portion of
  7192.          NDOS starts (i.e., when NSTART is run), but will not
  7193.          affect the color of error or other messages displayed
  7194.          during the NDOS loading and initialization process.  If
  7195.          ANSI.SYS or a compatible driver is not loaded, the colors
  7196.          will not be "sticky" -- you may lose them when you run an
  7197.          application.
  7198.  
  7199.  
  7200.     Key Mapping Directives
  7201.  
  7202.     The directives in this group allow you to change the keys used
  7203.     for NDOS command line editing and other internal functions.
  7204.     They take effect only inside NDOS itself and do not affect
  7205.     other programs (including the NDOS external help program,
  7206.     NDOSHELP.EXE).
  7207.  
  7208.     The description of each directive below explains the function
  7209.     of the corresponding key.  Using the directive allows you to
  7210.     assign a different or additional key to perform the function
  7211.     described.  For example, to assign function key F3 to invoke
  7212.     the NDOS HELP facility:
  7213.  
  7214.          Help = F3
  7215.  
  7216. ___________________________________________________________________
  7217. NDOS Reference Manual                                          121
  7218.  
  7219.                                             Using the NDOS.INI File
  7220. ___________________________________________________________________
  7221.  
  7222.     Any directive can be used multiple times to assign multiple
  7223.     keys to the same function.  For example:
  7224.  
  7225.          ListFind = F         ;F does a find in LIST
  7226.          ListFind = F5        ;F5 also does a find in LIST
  7227.  
  7228.     Use some care when you reassign keystrokes.  If you assign a
  7229.     default key to a different function, it will no longer be
  7230.     available for its original use.  For example, if you assign F1
  7231.     to the AddFile directive (a part of filename completion), the
  7232.     F1 key will no longer invoke the NDOS HELP facility, so you
  7233.     will probably want to assign a different key to NDOSHELP.
  7234.  
  7235.     Some keys are interpreted by your system's BIOS and are not
  7236.     passed on to NDOS.  For example, Ctrl-S tells the BIOS to
  7237.     pause screen output temporarily, and on some systems Ctrl-P
  7238.     toggles Print Screen mode.  Keys which are interpreted by the
  7239.     BIOS generally cannot be assigned with key mapping directives,
  7240.     because NDOS never receives these keystrokes and therefore
  7241.     cannot act on them.
  7242.  
  7243.     You may not be able to remap the F11 and F12 keys if your
  7244.     keyboard is not 100% IBM-compatible, or if you have an ANSI
  7245.     driver which does not support these keys.  This limitation is
  7246.     usually due to DOS and your ANSI driver, and is not inherent
  7247.     in NDOS.
  7248.  
  7249.     NDOS processes all command line editing key assignments before
  7250.     looking for keystroke aliases.  For example, if you assign
  7251.     Shift-F1 to NDOSHELP and also assign Shift-F1 to a key alias,
  7252.     the key alias will be ignored.
  7253.  
  7254.     Assigning a new keystroke for a function does not deassign the
  7255.     default keystroke for the same function.  If you want to
  7256.     deassign one of the standard NDOS keys without assigning it to
  7257.     another function, use the NormalKey directive described below
  7258.     or the corresponding directive for keys in the other key
  7259.     groups (NormalEditKey, NormalHWinKey, or NormalListKey).
  7260.  
  7261.     General Input Keys
  7262.  
  7263.          This first set of Key Mapping Directives applies to all
  7264.          input.  These directives are effective whenever NDOS
  7265.          requests input from the keyboard, including command line
  7266.          editing and the DESCRIBE, ESET, INPUT, LIST, and SELECT
  7267.          commands.  (Scrolling through the command history list is
  7268.          controlled by NextHist and PrevHist (see page 124-125),
  7269.          not by the Up and Down directives below.)  See page 48
  7270.          for more information about command line editing.
  7271.  
  7272.  
  7273. ___________________________________________________________________
  7274. NDOS Reference Manual                                          122
  7275.  
  7276.                                             Using the NDOS.INI File
  7277. ___________________________________________________________________
  7278.  
  7279.          Backspace = Key  (Bksp):  Deletes the character to the
  7280.          left of the cursor.
  7281.  
  7282.          BeginLine = Key  (Home):  Moves the cursor to the
  7283.          beginning of the line.
  7284.  
  7285.          Del = Key  (Del):  Deletes the character at the cursor.
  7286.  
  7287.          DelToBeginning = Key (Ctrl-Home):  Deletes from the
  7288.          cursor to the start of the line.
  7289.  
  7290.          DelToEnd = Key (Ctrl-End):  Deletes from the cursor to
  7291.          the end of the line.
  7292.  
  7293.          DelWordLeft = Key  (Ctrl-L):  Deletes the word to the
  7294.          left of the cursor.
  7295.  
  7296.          DelWordRight = Key  (Ctrl-R, Ctrl-Bksp):  Deletes the
  7297.          word to the right of the cursor.  See ClearKeyMap in
  7298.          Advanced Directives below if you need to remove the
  7299.          default mapping of Ctrl-Bksp to this function.
  7300.  
  7301.          Down = Key  (Down):  Scrolls the display down one line in
  7302.          LIST; moves the cursor down one line in SELECT and in the
  7303.          command history window.
  7304.  
  7305.          EndLine = Key  (End):  Moves the cursor to the end of the
  7306.          line.
  7307.  
  7308.          EraseLine = Key  (Esc):  Deletes the entire line.
  7309.  
  7310.          ExecLine = Key (Enter):  Executes or accepts a line.
  7311.  
  7312.          Ins = Key (Ins):  Toggles insert/overstrike mode during
  7313.          line editing.
  7314.  
  7315.          Left = Key  (Left):  Moves the cursor left one character;
  7316.          moves the display left eight columns in LIST.
  7317.  
  7318.          NormalKey = Key:  Deassigns a general input key in order
  7319.          to disable the usual meaning of the key within NDOS,
  7320.          and/or make it available for keystroke aliases.  This
  7321.          will cause NDOS to treat the keystroke as a "normal" key
  7322.          with no special function.  For example:
  7323.  
  7324.               NormalKey = Ctrl-End
  7325.  
  7326.          will disable Ctrl-End, which is the standard "delete to
  7327.          beginning of line" key.  Ctrl-End could then be assigned
  7328.          to a keystroke alias.  Another key could be assigned the
  7329.  
  7330. ___________________________________________________________________
  7331. NDOS Reference Manual                                          123
  7332.  
  7333.                                             Using the NDOS.INI File
  7334. ___________________________________________________________________
  7335.  
  7336.          "delete to end of line" function with the DelToEnd
  7337.          directive (above).
  7338.  
  7339.          Right = Key  (Right):  Moves the cursor right one
  7340.          character; scrolls the display right eight columns in
  7341.          LIST.
  7342.  
  7343.          Up = Key  (Up):  Scrolls the display up one line in LIST;
  7344.          moves the cursor up one line in SELECT and in the command
  7345.          history window.
  7346.  
  7347.          WordLeft = Key  (Ctrl-Left):  Moves the cursor left one
  7348.          word;  scrolls the display left 40 columns in LIST.
  7349.  
  7350.          WordRight = Key  (Ctrl-Right):  Moves the cursor right
  7351.          one word;  scrolls the display right 40 columns in LIST.
  7352.  
  7353.  
  7354.     Command Line Editing Keys
  7355.  
  7356.          The following directives apply only to command line
  7357.          editing.  They are only effective at the NDOS prompt.
  7358.  
  7359.          AddFile = Key  (F10):  Keeps the current filename
  7360.          completion entry and inserts the next matching name.
  7361.  
  7362.          CommandEscape = Key  (Alt-255):  Allows direct entry of a
  7363.          keystroke that would normally be interpreted as an editor
  7364.          command.
  7365.  
  7366.          DelHistory = Key  (Ctrl-D):  Deletes the displayed
  7367.          history list entry and displays the previous entry.
  7368.  
  7369.          EndHistory = Key  (Ctrl-E):  Displays the last entry in
  7370.          the history list.
  7371.  
  7372.          Help = Key  (F1):  Invokes the NDOS HELP facility.
  7373.  
  7374.          NextFile = Key  (F9, Tab):  Gets the next matching
  7375.          filename.  See ClearKeyMap in Advanced Directives below
  7376.          if you need to remove the default mapping of Tab to this
  7377.          function.
  7378.  
  7379.          NextHistory = Key  (Down):  Recalls the next command from
  7380.          the command history.
  7381.  
  7382.          NormalEditKey = Key:  Deassigns a command line editing
  7383.          key in order to disable the usual meaning of the key
  7384.          while editing a command line and/or make it available
  7385.          for keystroke aliases.  This will cause NDOS to treat the
  7386.  
  7387. ___________________________________________________________________
  7388. NDOS Reference Manual                                          124
  7389.  
  7390.                                             Using the NDOS.INI File
  7391. ___________________________________________________________________
  7392.  
  7393.          keystroke as a "normal" key with no special function.
  7394.          For an example see the NormalKey directive on page 123.
  7395.  
  7396.          PrevFile = Key  (F8, Shift-Tab):  Gets the previous
  7397.          matching filename.  See ClearKeyMap in Advanced
  7398.          Directives below if you need to remove the default
  7399.          mapping of Tab to this function.
  7400.  
  7401.          PrevHistory = Key  (Up):  Recalls the previous command
  7402.          from the command history.
  7403.  
  7404.          SaveHistory = Key  (Ctrl-K):  Saves the command line in
  7405.          the history list without executing it.
  7406.  
  7407.  
  7408.     History Window Keys
  7409.  
  7410.          HistWinBegin = Key (Ctrl-PageUp):  Moves to the first line
  7411.          of the history when in the history window.
  7412.  
  7413.          HistWinDel = Key (Ctrl-D):  Deletes a line from within
  7414.          the history window.
  7415.  
  7416.          HistWinEdit = Key (Ctrl-Enter):  Moves a line from the
  7417.          history window to the prompt for editing.
  7418.  
  7419.          HistWinEnd = Key (Ctrl-PageDown): Moves to the last line
  7420.          of the history when in the history window.
  7421.  
  7422.          HistWinExec = Key (Enter):  Executes the selected line in
  7423.          the history window.
  7424.  
  7425.          HistWinOpen = Key (PageUp):  Brings up the history window
  7426.          while at the command line.
  7427.  
  7428.          NormalHWinKey = Key:  Deassigns a history window key in
  7429.          order to disable the usual meaning of the key within the
  7430.          history window.  This will cause NDOS to treat the
  7431.          keystroke as a "normal" key with no special function.
  7432.          For an example see the NormalKey directive on page 123.
  7433.  
  7434.  
  7435.     LIST Keys
  7436.  
  7437.          The keys in the last group of Key Mapping Directives are
  7438.          effective only inside the LIST command.
  7439.  
  7440.          ListFind = Key  (F):  Prompts and searches for a string.
  7441.  
  7442.  
  7443.  
  7444. ___________________________________________________________________
  7445. NDOS Reference Manual                                          125
  7446.  
  7447.                                             Using the NDOS.INI File
  7448. ___________________________________________________________________
  7449.  
  7450.          ListHighBit = Key (H):  Toggles the LIST "strip high bit"
  7451.          option, which can aid in displaying files from certain
  7452.          word processors.
  7453.  
  7454.          ListNext = Key  (N):  Finds the next matching string.
  7455.  
  7456.          ListPrint = Key  (P):  Prints the file on LPT1.
  7457.  
  7458.          ListWrap = Key (W):  Toggles the LIST wrap option on and
  7459.          off.  The wrap option wraps text at the right margin.
  7460.  
  7461.          NormalListKey = Key:  Deassigns a LIST key in order to
  7462.          disable the usual meaning of the key within LIST.  This
  7463.          will cause NDOS to treat the keystroke as a "normal" key
  7464.          with no special function.  For an example see the
  7465.          NormalKey directive on page 123.
  7466.  
  7467.  
  7468.     Advanced Directives
  7469.  
  7470.     These directives are generally used for unusual circumstances,
  7471.     or for diagnosing problems.  Most often they are not needed in
  7472.     normal use.
  7473.  
  7474.          ClearKeyMap:  Clears all current key mappings.
  7475.          ClearKeyMap is a special directive which has no value or
  7476.          "=" after it.  Use ClearKeyMap to make one of the keys in
  7477.          the NDOS default map (Tab, Shift-Tab, or Ctrl-Bksp)
  7478.          available for a keystroke alias, or in the [Secondary]
  7479.          section of NDOS.INI to clear key mappings inherited from
  7480.          the primary shell.  ClearKeyMap should appear before any
  7481.          key mapping directives.  If you want to clear some but
  7482.          not all of the default mappings, use ClearKeyMap, then
  7483.          recreate the mappings you want to retain (e.g. with
  7484.          "Tab=NextFile", etc.).
  7485.  
  7486.          CritFail = Yes | NO:  This is the same as /F on the
  7487.          SHELL= line in CONFIG.SYS.  It intercepts all DOS
  7488.          critical errors and returns a Fail to each.  We do not
  7489.          recommend this on a normal system, because you will not
  7490.          have a chance to react to a critical error and correct
  7491.          the problem that caused it.  It is intended for use on
  7492.          bulletin boards or other systems where unattended
  7493.          operation is required without user prompts.
  7494.  
  7495.          DiskReset = Yes | NO:  Enables or disables disk resets
  7496.          after COPY, DEL/ERASE, DESCRIBE, MOVE, and REN/RENAME,
  7497.          and before DIR.  Set to Yes if you have problems with
  7498.          disk change detection on non-standard or cached floppy
  7499.          disk drives, or with network software which doesn't
  7500.  
  7501. ___________________________________________________________________
  7502. NDOS Reference Manual                                          126
  7503.  
  7504.                                             Using the NDOS.INI File
  7505. ___________________________________________________________________
  7506.  
  7507.          always properly flush data to the disk.  Such problems
  7508.          are very rare, so normally No is the best choice.
  7509.          Setting DiskReset to Yes may reduce the performance of
  7510.          DIR, COPY, MOVE, and RENAME when using a "staged-write"
  7511.          disk cache such as SmartDrive 4.0 by Microsoft, PC-Kwik
  7512.          by PC Kwik Corporation, HyperDisk by HyperWare, or the
  7513.          Norton Cache included with Norton Utilities.
  7514.  
  7515.          DRSets = YES | No.  When running under DR-DOS, NDOS will
  7516.          normally retrieve environment variables created by any
  7517.          SET commands in the DR-DOS CONFIG.SYS file and place them
  7518.          in the NDOS master environment.  Set DRSets to No to
  7519.          disable this feature.
  7520.  
  7521.          DVCleanup = YES | No.  Controls the cleanup of NDOS
  7522.          resources (the shell number and any disk swap file) when
  7523.          you Close a NDOS window from the DESQview menu.  See page
  7524.          144 for more details.
  7525.  
  7526.          FineSwap = Yes | NO:  "Yes" enables "fine-grained"
  7527.          checksums during disk swapping.  This should be used only
  7528.          to diagnose unusual swapping problems.
  7529.  
  7530.          FullINT2E = Yes | NO:  Enables full support for the
  7531.          COMMAND.COM "back door" (interrupt 2E) which a few
  7532.          programs use to execute commands.  Effective only in a
  7533.          primary shell loaded via the SHELL= command in
  7534.          CONFIG.SYS.  See Appendix C on page 322 below for details
  7535.          on using INT 2E.  Also, see APPNOTES.DOC for information
  7536.          on any programs known to require this option.  If this
  7537.          directive is not used or is set to NO, INT 2E will return
  7538.          immediately to the calling program without taking any
  7539.          action.  Setting FullINT2E to YES adds about 100 bytes to
  7540.          the resident size of the primary shell.
  7541.  
  7542.          Inherit = YES | No:  Aliases and the history list are
  7543.          normally passed to secondary shells automatically.  "No"
  7544.          disables this feature.
  7545.  
  7546.          MessageServer = YES | No:  For compatibility with
  7547.          COMMAND.COM in MS-DOS 4.x and 5.x, NDOS includes a
  7548.          "message server" that retrieves error message text for
  7549.          DOS external commands like DISKCOPY and FORMAT.  The
  7550.          message server increases the size of the resident portion
  7551.          of NDOS by about 200 bytes.  "No" disables the message
  7552.          server and saves this space, but will cause more cryptic
  7553.          error messages such as "Parse error 3" or "Extended error
  7554.          7" from some DOS external commands.  The message server
  7555.          is automatically disabled by NDOS except in the primary
  7556.          NDOS shell loaded from CONFIG.SYS when running under DOS
  7557.          4.x or 5.x.
  7558. ___________________________________________________________________
  7559. NDOS Reference Manual                                          127
  7560.  
  7561.                                             Using the NDOS.INI File
  7562. ___________________________________________________________________
  7563.  
  7564.          NetwareNames = Yes | NO.  Set to Yes to include strings
  7565.          in the resident portion of NDOS which Novell Netware
  7566.          searches for when it loads.  NetwareNames should be Yes
  7567.          for Netware systems to avoid problems with destroyed
  7568.          environment variables during LOGIN.  If NetwareNames is
  7569.          set to Yes and you boot from a Netware drive (a rare
  7570.          situation), the TEMPNDOS or TEMP variables must be SET
  7571.          explicitly to an appropriate drive and directory for each
  7572.          user to avoid conflicts with pipe files.  In all other
  7573.          circumstances, NDOS and Netware will automatically set
  7574.          the proper drive and directory for pipe files.  Setting
  7575.          NetwareNames to Yes increases NDOS low DOS memory usage
  7576.          by 128 bytes.
  7577.  
  7578.          NextINIFile = File.  The full path and name of the file
  7579.          must be specified.  All subsequent shells will read the
  7580.          specified INI file, and ignore any [Secondary] section in
  7581.          the original NDOS.INI.  If you have a diskless or floppy-
  7582.          based workstation, NextINIFile will allow you to shift
  7583.          NDOS.INI to a network drive for secondary shells, and
  7584.          avoid all access to the original boot drive.
  7585.  
  7586.          Reduce = YES | No:  Set to "No" to disable the smaller
  7587.          swap size used by NDOS secondary shells.  For diagnosing
  7588.          unusual swapping problems only.
  7589.  
  7590.          ReserveTPA = YES | No:  Set to "No" to prevent NDOS from
  7591.          reserving memory for its transient portion while at the
  7592.          command prompt.  For diagnosing unusual TSR or swapping
  7593.          problems only.  ReserveTPA is forced to YES regardless of
  7594.          any INI file setting if you are running under Windows 3
  7595.          in real or standard mode.  This is necessary to avoid
  7596.          undesirable interactions between NDOS and Windows.
  7597.  
  7598.          StackSize= nnnn (4096):  Set the NDOS internal stack
  7599.          size.  The allowable range of values is 4096 to 8192.
  7600.          You may need to increase the stack size if you are using
  7601.          extremely complex combinations of batch files and nested
  7602.          "prefix" commands like EXCEPT, FOR, GLOBAL, IF, and
  7603.          SELECT on the same command line, and you receive a "NDOS
  7604.          internal stack overflow" error.  For virtually all users
  7605.          the default stack size will be sufficient.  Increasing
  7606.          this value also increases the size of the NDOS transient
  7607.          portion and the size of the NDOS swap area.
  7608.  
  7609.          SwapReopen = Yes | NO:  Set to "Yes" to enable reopening
  7610.          of the NDOS swap file if it is closed by another program.
  7611.          This is required when swapping NDOS to Novell Netware
  7612.          drives or when using other applications which close the
  7613.          NDOS swap file.  In all other circumstances, it is only
  7614.  
  7615. ___________________________________________________________________
  7616. NDOS Reference Manual                                          128
  7617.  
  7618.                                             Using the NDOS.INI File
  7619. ___________________________________________________________________
  7620.  
  7621.          useful for diagnostic purposes.  Setting SwapReopen to
  7622.          "Yes" also disables the reduced swapping size normally
  7623.          used in NDOS secondary shells.
  7624.  
  7625.          UniqueSwapName = Yes | NO.  Set to Yes to change the disk
  7626.          swap filename from NDOSSWAP.nnn to a unique name
  7627.          generated by NDOS, with an extension of "NSW" (eg
  7628.          A1GD6NNW.NSW).  This prevents conflicts between swap
  7629.          files in different shells; it is only necessary when you
  7630.          are using disk swapping with a COMMAND.COM primary shell.
  7631.          The default is No.  UniqueSwapName only works in DOS 3.0
  7632.          and above and applies only to disk swapping.
  7633.  
  7634.  
  7635.     Examples
  7636.  
  7637.     The following examples will give you an idea of the types of
  7638.     things that can be done with the NDOS.INI file.  The comments
  7639.     on each directive explain what it does.
  7640.  
  7641.     First, a very simple example that just sets up swapping and
  7642.     environment size, leaving everything else at its default
  7643.     value:
  7644.  
  7645.          Swapping = ems, c:\
  7646.                                         ;try EMS, then C: root
  7647.          Environment = 1024             ;set environment size
  7648.  
  7649.     Here's something a little fancier that changes a number of the
  7650.     default settings:
  7651.  
  7652.          Swapping = xms, h:\, c:\
  7653.                                         ;try XMS, then RAM disk,
  7654.                                         ;  then C: root
  7655.          Environment = 1792             ;set env size
  7656.          Alias = 6144                   ;set alias size
  7657.          History = 1024                 ;set history size
  7658.          UmbEnv=Y                       ;master environment in UMB
  7659.          BatchEcho = No                 ;default is ECHO OFF
  7660.          EditMode = Insert              ;editor in insert mode
  7661.          CursorO = 100                  ;overstrike cursor 100%
  7662.          CursorI = 10                   ;insert cursor 10%
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672. ___________________________________________________________________
  7673. NDOS Reference Manual                                          129
  7674.  
  7675.                                                            Hardware
  7676. ___________________________________________________________________
  7677.  
  7678.  
  7679. CHAPTER 7, USING NDOS WITH YOUR HARDWARE AND SOFTWARE
  7680.  
  7681.  
  7682. This section of the manual explains how to get the most from NDOS
  7683. with your particular system.  A few general techniques and concepts
  7684. are explained here, but if you have questions about how to make
  7685. NDOS run most efficiently with a particular hardware setup or a
  7686. specific application, you should also see the file called
  7687. APPNOTES.DOC which comes with NDOS.
  7688.  
  7689. If you have questions about some of the terms and concepts here,
  7690. see Chapter 4, "General Concepts," on page 34, the Glossary on page
  7691. 329, and the Index.
  7692.  
  7693. This section begins with a discussion of hardware considerations
  7694. and includes some tips for installing NDOS most effectively to run
  7695. with several types of software, as well as certain popular
  7696. programs.  It concludes with some techniques for resolving
  7697. unintended interactions between programs, even if those
  7698. interactions do not include NDOS itself.
  7699.  
  7700.  
  7701. Hardware
  7702.  
  7703. This section discusses hardware considerations.
  7704.  
  7705.     The CPU
  7706.  
  7707.     The CPU or "Central Processing Unit" is the chip which
  7708.     performs or directs all of the work done by your computer.
  7709.     All PC CPU chips are part of or compatible with the Intel
  7710.     "80x86" family.  These include the 8088, 8086, 80188, 80186,
  7711.     80286, 386, 486, NEC V20, and NEC V30, plus "SX" versions and
  7712.     other variations of some of those chips.  NDOS is compatible
  7713.     with and will run equally well on all of these chips.
  7714.  
  7715.     Some systems have a numeric coprocessor as a companion to the
  7716.     CPU.  The numeric coprocessor performs many arithmetic
  7717.     calculations faster than the CPU.  NDOS does not use or access
  7718.     the numeric coprocessor in any way.
  7719.  
  7720.     You can determine which CPU chip your system has by using the
  7721.     NDOS _CPU internal variable:
  7722.  
  7723.          c:\> echo %_cpu
  7724.  
  7725.     Similarly, you can find out if you have a numeric coprocessor
  7726.     with _NDP:
  7727.  
  7728.          c:\> echo %_ndp
  7729. ___________________________________________________________________
  7730. NDOS Reference Manual                                          130
  7731.  
  7732.                                                            Hardware
  7733. ___________________________________________________________________
  7734.  
  7735.     See pages 75-76 for details about _CPU and _NDP.
  7736.  
  7737.  
  7738.     Memory
  7739.  
  7740.     NDOS does its best to detect and properly access all types of
  7741.     memory that your computer can have:  Base memory, Expanded
  7742.     (EMS) Memory, Extended (XMS) Memory, and Upper Memory Blocks
  7743.     (UMBs).  NDOS always uses standard, documented methods to use
  7744.     the memory that you have installed.
  7745.  
  7746.     NDOS uses base memory (the area from 0 to 640K on most
  7747.     machines, which is sometimes called "low memory" or "DOS
  7748.     memory") for its resident portion and the master environment,
  7749.     and to hold its transient portion while your system is at the
  7750.     command prompt or executing a NDOS command or batch file.
  7751.     NDOS may use EMS memory or an XMS Extended Memory Block (EMB)
  7752.     to swap its transient portion, according to the Swapping
  7753.     directive in your NDOS.INI file (see page 115).
  7754.  
  7755.     NDOS uses UMBs for several purposes:
  7756.  
  7757.          *  to move the NDOS resident portion out of base memory,
  7758.             if you specify "UMBLoad = Yes" in your NDOS.INI file.
  7759.  
  7760.          *  to move the master environment out of base memory, if
  7761.             you specify "UMBEnvironment = Yes" in your NDOS.INI
  7762.             file.
  7763.  
  7764.          *  to load memory-resident programs (TSRs) "high" using
  7765.             the LOADHIGH or LH command under MS-DOS 5.0 or above.
  7766.  
  7767.     To load NDOS or the master environment into a UMB, you must be
  7768.     using a memory manager or XMS driver which provides both the
  7769.     ability to remap memory into the area between 640K and 1MB (to
  7770.     create the UMBs) and XMS or DOS 5.0 UMB support (to manage the
  7771.     UMBs).  These are generally the same requirements which must
  7772.     be met to load TSRs "high."
  7773.  
  7774.     To give NDOS access to UMBs, you need hardware and software
  7775.     combinations like the following:
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786. ___________________________________________________________________
  7787. NDOS Reference Manual                                          131
  7788.  
  7789.                                                            Hardware
  7790. ___________________________________________________________________
  7791.  
  7792.     386 and 486 systems (including 386SX computers):
  7793.  
  7794.          Hardware:  Sufficient installed RAM.
  7795.  
  7796.          Software:  386MAX or Blue Max by Qualitas, QEMM 5.0 or
  7797.          later by Quarterdeck, EMM386.SYS from DOS 5.0, or a
  7798.          similar 386 memory manager.  HIMEM.SYS alone is not
  7799.          sufficient.
  7800.  
  7801.     80286 systems:
  7802.  
  7803.          Hardware:  Chips and Technologies NEAT chip set, or an
  7804.          EMS 4.0 or EEMS memory board, plus sufficient installed
  7805.          RAM.
  7806.  
  7807.          Software:  Qualitas' MOVE-EM 1.02 or later with HIMEM.SYS
  7808.          by Microsoft, or QRAM and QEXT by Quarterdeck.
  7809.  
  7810.     Other memory-management software may also work.  The lists
  7811.     above are examples only.  Look for specific information about
  7812.     your memory management program in APPNOTES.DOC.
  7813.  
  7814.     If you want to use the NDOS LOADHIGH command as well as put
  7815.     NDOS and the master environment in high memory, you must also
  7816.     be running MS-DOS 5.0 or above.
  7817.  
  7818.     NDOS never accesses extended memory directly.  It always uses
  7819.     an XMS driver like HIMEM.SYS, EMM386.SYS, 386MAX, QEXT, or
  7820.     QEMM.  NDOS can also access any RAM disk you create in
  7821.     extended memory by using a program like VDISK.SYS or
  7822.     RAMDRIVE.SYS.  NDOS does not use the XMS "High Memory Area"
  7823.     (HMA), a 64K byte area just above 1 MB on 80286, 386, and 486
  7824.     systems.
  7825.  
  7826.     If you want to know whether NDOS sees your system's memory
  7827.     accurately, check the output of the MEMORY command.  It should
  7828.     correspond to your computer's memory configuration.
  7829.  
  7830.     The MEMORY command's output depends to some extent on your
  7831.     memory manager.  If you are using QEMM, the report may not be
  7832.     the same as you expect.  Because QEMM turns your extended
  7833.     memory into either XMS or EMS memory as required, the same
  7834.     memory is shown both ways in the MEMORY report.  If 1 MB of
  7835.     extended memory managed by QEMM is available, MEMORY will
  7836.     report 1 MB of free XMS memory and 1 MB of free EMS memory as
  7837.     well, even though it is all the same memory.  This is not a
  7838.     bug but a result of QEMM flexibility.
  7839.  
  7840.     Memory-related problems with NDOS are usually due to programs
  7841.     which overwrite the extended memory block (EMB) that NDOS uses
  7842.  
  7843. ___________________________________________________________________
  7844. NDOS Reference Manual                                          132
  7845.  
  7846.                                                            Hardware
  7847. ___________________________________________________________________
  7848.  
  7849.     for swapping its transient portion.  When you exit from such a
  7850.     program, your system will hang, because NDOS tried to swap
  7851.     itself back into base memory but its code and data in XMS have
  7852.     been destroyed by the program.  The same problem can occur
  7853.     with EMS swapping but is less common because EMS memory is
  7854.     generally better defended against wayward programs.  You can
  7855.     diagnose this kind of problem easily by changing to disk
  7856.     swapping with the NDOS.INI Swapping directive, and rebooting.
  7857.     If the problem goes away with disk swapping, then the program
  7858.     in question is probably destroying the NDOS swap area in XMS
  7859.     or EMS memory.
  7860.  
  7861.     NDOS EMS swapping sometimes has difficulty with EMS drivers
  7862.     which do not fully meet the EMS 3.2 specification (NDOS
  7863.     supports, but does not require, EMS 4.0 drivers).  If you have
  7864.     trouble accessing EMS for swapping, check APPNOTES.DOC to see
  7865.     if there are any known problems with your EMS board or the
  7866.     associated driver software.
  7867.  
  7868.  
  7869.     Video
  7870.  
  7871.     NDOS is compatible with most display adapters and monitors.
  7872.     Although NDOS can normally detect your video parameters
  7873.     automatically, you may have to configure it to use the system
  7874.     most efficiently.
  7875.  
  7876.     NDOS uses two methods of displaying text on the screen:
  7877.  
  7878.          *  NDOS calls DOS to write the text of prompts and normal
  7879.             messages.  If you use an ANSI driver, DOS will transmit
  7880.             the calls to it.  Otherwise, DOS will use your BIOS to
  7881.             display text on the screen.  DOS text display calls
  7882.             will work on all DOS systems, regardless of video type.
  7883.  
  7884.          *  The DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT,
  7885.             SCRPUT, and VSCRPUT commands bypass DOS, the BIOS, and
  7886.             any ANSI driver.  They write directly to video memory.
  7887.             These commands will only work on systems with 100% IBM-
  7888.             compatible video systems.  On other computers, results
  7889.             will be unpredictable at best.  If you have such a
  7890.             system you probably know it already, because most
  7891.             application programs have similar problems.
  7892.  
  7893.     EGA and VGA systems can display text in standard 25-line mode,
  7894.     plus modes with 43, 50, or more lines.  NDOS normally detects
  7895.     the number of lines automatically.  If it doesn't, you can use
  7896.     the NDOS.INI ScreenRows directive or the SETDOS /R command to
  7897.     set the NDOS screen length.    NDOS uses ScreenRows or SETDOS
  7898.     /R to set the display length that it uses for the LIST and
  7899.  
  7900. ___________________________________________________________________
  7901. NDOS Reference Manual                                          133
  7902.  
  7903.                                                            Hardware
  7904. ___________________________________________________________________
  7905.  
  7906.     SELECT command, as well as commands that have a "pause" option
  7907.     (TYPE /P, DIR /P, etc.).
  7908.  
  7909.     NDOS never attempts to manipulate your video hardware in order
  7910.     to set the number of rows actually displayed on the screen
  7911.     (the "video mode");  to do so, you must use the software that
  7912.     came with your video board or other software tailored to your
  7913.     system.
  7914.  
  7915.     NDOS does not handle display scrolling at the command prompt.
  7916.     If you put the screen in 43-line or 50-line mode and find that
  7917.     it still scrolls at the 25th line, your ANSI driver is
  7918.     probably not properly supporting your extended screen length.
  7919.     This is not a bug in NDOS.
  7920.  
  7921.     The video cursor shape that NDOS uses is defined as a
  7922.     percentage of a character cell height.  You can set the height
  7923.     independently for insert and overstrike mode with the
  7924.     CursorIns and CursorOver directives in NDOS.INI or with the
  7925.     SETDOS /S command.  If you don't use either, NDOS sets the
  7926.     height to 10% of the character cell height for overstrike mode
  7927.     and 100% (a block cursor) for insert mode.
  7928.  
  7929.     If you have trouble with the cursor, use SETDOS /S to find the
  7930.     values that work for your system.  Some video boards may not
  7931.     give a "smooth" response to varying SETDOS /S values.  For
  7932.     example, a value of 20% may generate a very small cursor while
  7933.     a value of 30% may generate a half-height cursor.  NDOS can't
  7934.     do anything about this behavior, so you will have to
  7935.     experiment to find the cursor values that you want to use.
  7936.  
  7937.     If the cursor disappears and you can't fix it with SETDOS /S,
  7938.     you probably have a screen color problem.  The cursor is shown
  7939.     in the color of the underlying character cell.  If that cell
  7940.     has (for example) the color attribute of black on black, the
  7941.     cursor will be invisible.  If you are using an ANSI driver,
  7942.     you can fix this problem easily by clearing the screen to a
  7943.     known color with the CLS command.  If the cursor still doesn't
  7944.     reappear, you will have to determine what is setting your
  7945.     screen attributes to an invisible color.  For example, you
  7946.     might be using an ANSI driver that assumes a 25-line video
  7947.     mode on an EGA/VGA system running in 43-line or 50-line mode.
  7948.     This can cause the driver to set portions of the screen to an
  7949.     invisible color when the screen is cleared.
  7950.  
  7951.     If you are using an EGA or VGA adapter, we encourage you to
  7952.     try UltraVision from Personics Corp.  It gives you excellent
  7953.     control over your video system, includes a wide variety of
  7954.     text-mode screen fonts, has its own ANSI driver, and works
  7955.     superbly with NDOS.  We use it and wouldn't be without it.  A
  7956.  
  7957. ___________________________________________________________________
  7958. NDOS Reference Manual                                          134
  7959.  
  7960.                                                            Hardware
  7961. ___________________________________________________________________
  7962.  
  7963.     special version for laptop and notebook computers dramatically
  7964.     improves the readability of their smaller displays.
  7965.  
  7966.     Most versions of DOS include a copy of ANSI.SYS, a device
  7967.     driver that is normally installed with a DEVICE= line in your
  7968.     CONFIG.SYS file.  There are a number of more powerful and
  7969.     faster versions available as public-domain, shareware, and
  7970.     retail products.  We use the free utility by PC Magazine,
  7971.     ANSI.COM, because it can be enabled, disabled, loaded, and
  7972.     unloaded without rebooting, and because it is small and fast
  7973.     and works well inside windows of multitasking systems.  It is
  7974.     available on most bulletin boards and online systems.  Another
  7975.     excellent choice is ANSI-UV.SYS which is included with
  7976.     UltraVision.
  7977.  
  7978.     NDOS normally detects automatically whether an ANSI driver is
  7979.     installed.  If you have an ANSI driver installed and NDOS
  7980.     doesn't recognize it, try the command SETDOS /A1 which forces
  7981.     NDOS to use ANSI commands.  Use SETDOS /A2 to tell NDOS you do
  7982.     not have an ANSI driver installed.  These options can also be
  7983.     set with the ANSI directive in NDOS.INI.
  7984.  
  7985.  
  7986.     Hard Drives and Floppy Disks
  7987.  
  7988.     NDOS uses your disks for a wide variety of purposes, and many
  7989.     NDOS commands are designed to help you create, move, delete,
  7990.     view, and otherwise manage disk files.  NDOS never tries to
  7991.     manipulate the structure of your hard disk directly.  It never
  7992.     modifies the FAT, root directory, or other system areas of the
  7993.     disk directly, and it doesn't read or write data on your disk
  7994.     itself.  It always calls on DOS to perform these actions, just
  7995.     like most application programs do.  As a result, NDOS is
  7996.     compatible with all disk sizes, formats, and structures that
  7997.     your DOS version supports.
  7998.  
  7999.     One common question we're asked about NDOS and disks is
  8000.     whether NDOS will handle a hard disk larger than 32 MB.
  8001.     The answer depends on how your system is configured.  Early
  8002.     versions of DOS do not support hard disks over 32 MB unless a
  8003.     disk partitioning driver like SpeedStor or Disk Manager is
  8004.     used.  Later versions of DOS support large hard disks
  8005.     directly, without a partitioning driver.  If your system
  8006.     supports large hard disks, either directly through DOS or
  8007.     with a partitioning driver, NDOS will support them also.  If
  8008.     your system doesn't support large hard disks, neither will
  8009.     NDOS.
  8010.  
  8011.     NDOS will generally access your disk very quickly, but the
  8012.     speed depends on what you are trying to do.  If you find that
  8013.  
  8014. ___________________________________________________________________
  8015. NDOS Reference Manual                                          135
  8016.  
  8017.                                                            Hardware
  8018. ___________________________________________________________________
  8019.  
  8020.     NDOS is slower at performing a particular function than you
  8021.     are used to, you may have asked it to do more than you ask of
  8022.     traditional DOS commands.  In particular, if you use file
  8023.     descriptions, remember that NDOS has to access the description
  8024.     file as well as the actual files that you are manipulating.
  8025.  
  8026.     Some users notice that the common commands DEL and DIR appear
  8027.     slower with NDOS under certain circumstances.  With DEL, this
  8028.     slowdown may be because NDOS uses a newer method of file
  8029.     deletion instead of an older method that is no longer
  8030.     recommended (but is commonly used).  The new method is
  8031.     necessary to enable NDOS to display the names of the files you
  8032.     are deleting, and to support NDOS "extended wildcards" (see
  8033.     page 64).  You can force NDOS to use the older method with the
  8034.     DEL /Q option as long as you don't use extended wildcards.
  8035.  
  8036.     For DIR, any perceived speed decrease is from NDOS directory
  8037.     sorting.  NDOS must read all filenames before it can display
  8038.     any of them.  The sort itself is quite fast, but DOS is
  8039.     relatively slow at retrieving the entire list of filenames
  8040.     and passing them on to NDOS.  Once the NDOS DIR display
  8041.     starts, it should go as fast as or faster than the traditional
  8042.     DIR display.
  8043.  
  8044.     Whenever NDOS is interrupted by a Ctrl-C or Ctrl-Break, it
  8045.     performs a "disk reset" to clear out DOS disk buffers and
  8046.     reset internal DOS disk parameters.  This helps ensure that
  8047.     modified data has been written to disk even though the
  8048.     operation was interrupted.  A disk reset is also performed
  8049.     before a REBOOT command.  If you have trouble with recognition
  8050.     of floppy disk changes, with CD-ROM drivers, or with network
  8051.     disk access, you can try forcing NDOS to perform a disk reset
  8052.     after file processing commands, and before a DIR.  To do so
  8053.     use a DiskReset = Yes directive in NDOS.INI (see page 126).
  8054.     Such problems are very rare and normally DiskReset = Yes is
  8055.     not necessary.
  8056.  
  8057.  
  8058.     Laptop and Notebook Computers
  8059.  
  8060.     NDOS makes a great addition to any laptop or notebook
  8061.     computer, but some of these systems have unusual
  8062.     characteristics which you must consider when you install NDOS
  8063.     or make any change to your CONFIG.SYS file.
  8064.  
  8065.     Many of these computers boot from a floppy drive or a hard
  8066.     disk just like a desktop computer.  On these machines, you can
  8067.     generally install NDOS just as you would on any other
  8068.     computer.  However, some laptop and notebook computers,
  8069.     including many Tandy laptops, boot from ROM ("Read Only
  8070.  
  8071. ___________________________________________________________________
  8072. NDOS Reference Manual                                          136
  8073.  
  8074.                                                            Hardware
  8075. ___________________________________________________________________
  8076.  
  8077.     Memory" chips inside the computer).  You need to take some
  8078.     precautions with these machines.
  8079.  
  8080.     First, systems which boot from ROM often can be configured to
  8081.     use either the ROM boot feature or a standard floppy or hard
  8082.     drive boot up.  The following comments only apply when you use
  8083.     the ROM boot feature.
  8084.  
  8085.   ! If your system allows you to boot from ROM but load CONFIG.SYS
  8086.     and AUTOEXEC.BAT from a hard disk or floppy, you need to be
  8087.     cautious.  If you make a mistake in a hard-disk based
  8088.     CONFIG.SYS that keeps your system from booting, there may be
  8089.     no way to tell the ROM boot program to ignore the bad
  8090.     CONFIG.SYS file.  You may have to take drastic measures like
  8091.     opening the case and disconnecting the hard drive to get the
  8092.     system to ignore your mistaken CONFIG.SYS and boot properly.
  8093.  
  8094.     If you have a system that boots from ROM and reads CONFIG.SYS
  8095.     from the hard disk, we strongly recommend that you change the
  8096.     configuration to boot from the hard disk or a floppy before
  8097.     you make any change to your CONFIG.SYS file, whether it is
  8098.     related to NDOS or not.  This will allow you to boot from a
  8099.     boot-up floppy disk if you make an error in the CONFIG.SYS on
  8100.     your hard drive.  Once you are satisfied that everything is
  8101.     working properly, you can switch back to ROM bootup.
  8102.  
  8103.     The second, and related, issue with systems that boot from ROM
  8104.     is that they may consider the ROM to be a disk drive of sorts.
  8105.     A system with drive C: as the hard disk may view the ROM as
  8106.     drive D:.  When you boot from ROM, the ROM drive is the current
  8107.     drive, and that is where NDOS will look for the NSTART and
  8108.     AUTOEXEC.BAT files.  But they will be on your hard drive or
  8109.     floppy disk, and NDOS won't be able to find them.  (This
  8110.     doesn't happen with COMMAND.COM on these systems because the
  8111.     manufacturer has modified it to get around the problem.)
  8112.  
  8113.     If you run into this problem, you can fix it easily with some
  8114.     changes to your CONFIG.SYS and NDOS.INI files.  First, modify
  8115.     the SHELL= line in CONFIG.SYS so that it tells NDOS where to
  8116.     find NDOS.INI.  You can do this by placing the full path to
  8117.     NDOS.INI on the line, like this (see page 101 for more
  8118.     details):
  8119.  
  8120.          shell=c:\nu\ndos.com @c:\ndos.ini /p
  8121.  
  8122.     (change the drive and path shown if NDOS.COM is not in the
  8123.     directory C:\NDOS on your system).  This tells NDOS to look
  8124.     for NDOS.INI on drive C:, even though the boot drive might be
  8125.     (for example) drive D:.  Then add two lines to the NDOS.INI
  8126.     file (see pages 114-115 for details on these directives):
  8127.  
  8128. ___________________________________________________________________
  8129. NDOS Reference Manual                                          137
  8130.  
  8131.                                                            Hardware
  8132. ___________________________________________________________________
  8133.  
  8134.          NSTARTPath=c:\
  8135.          AutoExecPath=c:\
  8136.  
  8137.     These tell NDOS to look for NSTART and AUTOEXEC.BAT in the
  8138.     root directory of drive C:, even though the boot drive may be
  8139.     different.
  8140.  
  8141.     If you have a system like this, NDOS may set the COMSPEC to
  8142.     the ROM drive.  You can avoid this by setting the COMSPEC
  8143.     yourself on the SHELL= line in CONFIG.SYS (see page 101).  For
  8144.     example, the SHELL= line above could be modified to read:
  8145.  
  8146.          shell=c:\nu\ndos.com c:\nu @c:\ndos.ini /p
  8147.  
  8148.     The second "C:\NDOS" tells NDOS to use this directory as the
  8149.     COMSPEC path.
  8150.  
  8151.     Finally, if you have a laptop or notebook computer with a
  8152.     color (CGA, EGA, or VGA) video board and a monochrome screen,
  8153.     you may need to use the NDOSHELP /BW option or run NUCONFIG to
  8154.     adjust the HELP colors.
  8155.  
  8156.  
  8157.     Critical Errors
  8158.  
  8159.     A "critical" error is an error that gives you the "Abort,
  8160.     Retry, Fail" message.  With NDOS running, this message appears
  8161.     as follows:
  8162.  
  8163.          [Error message]
  8164.          R(etry), I(gnore), F(ail), or A(bort)?
  8165.  
  8166.     The error message on the first line explains the error that
  8167.     has occurred, and the device on which it occurred.  The second
  8168.     line prompts for your choice of action (the Fail choice will
  8169.     not be displayed under DOS 2).
  8170.  
  8171.     A critical error usually indicates a hardware malfunction.
  8172.     The error may be that the device doesn't exist, there is no
  8173.     disk in the drive, the network has gone down, or a data error
  8174.     occurred.  In most cases you will choose R to retry the
  8175.     operation, or A to abort the operation.
  8176.  
  8177.   ! Choosing I(gnore) can be risky:  it will cause NDOS to proceed
  8178.     as if the error had not occurred.  This can produce additional
  8179.     errors, and may lead the command which generated the original
  8180.     error to perform its functions improperly.
  8181.  
  8182.  
  8183.  
  8184. ___________________________________________________________________
  8185. NDOS Reference Manual                                          138
  8186.  
  8187.                                                            Software
  8188. ___________________________________________________________________
  8189.  
  8190.     F(ail) will tell NDOS that the operation it was attempting has
  8191.     failed, which will generally produce another error message.
  8192.     For example, if you attempt to do a directory on drive A: with
  8193.     no disk in the drive, and answer F to the resulting critical
  8194.     error, you will get an additional error message, "Invalid
  8195.     drive A".
  8196.  
  8197.     Many programs install their own critical error handlers.  If
  8198.     you get a critical error message within an application and the
  8199.     second line does not read as shown above, the message did not
  8200.     come from NDOS.  Any problem in handling your response
  8201.     properly is due to the application, not to NDOS.
  8202.  
  8203.     Choosing A(bort) within an application may abort the entire
  8204.     application and not just the operation being performed.  The
  8205.     specific action depends on which critical error handler is in
  8206.     use (the one by NDOS or the application), and how the
  8207.     application's critical error handler (if any) is designed.
  8208.  
  8209.     If you are using NDOS on a system that must run unattended
  8210.     (for example, a bulletin board), you can use the /F startup
  8211.     option in CONFIG.SYS or the CritFail directive in NDOS.INI
  8212.     (see pages 101 and 126) to provide an automatic F(ail)
  8213.     response to all critical errors.  However, we do not recommend
  8214.     this on a normal system, because you will not have a chance to
  8215.     react to a critical error and correct the problem that caused
  8216.     it.
  8217.  
  8218.  
  8219. Software
  8220.  
  8221.     You should find that NDOS is compatible with all your PC
  8222.     software.  We have designed it carefully so that it uses only
  8223.     standard, documented methods to do its job.  It works properly
  8224.     with application software, utilities, networks, multitaskers
  8225.     and task switchers, memory-resident (TSR) programs, and system
  8226.     software like disk caches, memory managers, and device
  8227.     drivers.  We test NDOS regularly with hundreds of popular
  8228.     software products in order to catch and correct compatibility
  8229.     problems before you encounter them.
  8230.  
  8231.     The following sections discuss using NDOS with two major kinds
  8232.     of software:  multitasking and task switching programs, and
  8233.     networks.  For specific information about any individual
  8234.     software package, including the latest information about
  8235.     products mentioned here, see the APPNOTES.DOC file distributed
  8236.     with NDOS.  It contains the latest information we have
  8237.     available when your copy of NDOS was shipped.
  8238.  
  8239.  
  8240.  
  8241. ___________________________________________________________________
  8242. NDOS Reference Manual                                          139
  8243.  
  8244.                                                            Software
  8245. ___________________________________________________________________
  8246.  
  8247.     If you need to diagnose a problem that isn't covered below or
  8248.     in APPNOTES.DOC, see page 4.
  8249.  
  8250.  
  8251.     NDOS and DOS
  8252.  
  8253.     NDOS is compatible with all versions of MS-DOS and PC-DOS from
  8254.     3.3 through 6.0, and with DR-DOS 3.4, 5.0, and above.  Some
  8255.     specific considerations for DR-DOS users are discussed in
  8256.     APPNOTES.DOC.  MS-DOS users using the APPEND command may need
  8257.     to set up some aliases to invoke APPEND; see APPNOTES.DOC for
  8258.     details.
  8259.  
  8260.     If you use the FORMAT /S command from MS-DOS or PC-DOS,
  8261.     version 4.0 or above, FORMAT will copy the file pointed to by
  8262.     the COMSPEC environment variable (see page 106) and name it
  8263.     COMMAND.COM.  In most cases this means that NDOS.COM will be
  8264.     copied to the floppy disk, but with the name COMMAND.COM.
  8265.     Such a disk should boot properly and start NDOS, but its
  8266.     contents is sure to be confusing to others.  We recommend that
  8267.     you use the Norton SAFE FORMAT in place of DOS's FORMAT
  8268.     command.  SAFE FORMAT will transfer MS-DOS's COMMAND.COM file
  8269.     to the floppy disk.  Alternatively, you can copy COMMAND.COM
  8270.     manually to the floppy disk (use an alias or batch file if you
  8271.     format bootable disks frequently), or rename the file that
  8272.     FORMAT copies to NDOS.COM and place a proper CONFIG.SYS file
  8273.     for NDOS on the floppy disk.
  8274.  
  8275.  
  8276.     Using NDOS with Task Switchers and Multitaskers
  8277.  
  8278.     Task switchers are programs that allow you to switch quickly
  8279.     among multiple applications, with one application running at a
  8280.     time.  Multitaskers are more complex programs which appear to
  8281.     run multiple applications at the same time, with one or more
  8282.     programs executing "in the background" while you work with
  8283.     another program on the screen.
  8284.  
  8285.     For convenience, in the text below we will refer to both
  8286.     multitaskers and task switchers as "multitaskers," and to each
  8287.     window or partition they use as a "window," even though some
  8288.     do not have windowed displays.
  8289.  
  8290.     NDOS works well as both the primary shell (loaded when your
  8291.     system boots) and the secondary shell (loaded in a window)
  8292.     with most multitaskers.
  8293.  
  8294.     Most multitaskers have a pre-configured "DOS" window.  In some
  8295.     programs, this window always runs COMMAND.COM.  Others run
  8296.     whatever program COMSPEC points to, which means they will run
  8297.     NDOS if you boot up with NDOS.  We recommend that you always
  8298.  
  8299. ___________________________________________________________________
  8300. NDOS Reference Manual                                          140
  8301.  
  8302.                                                            Software
  8303. ___________________________________________________________________
  8304.  
  8305.     set up a NDOS window explicitly, with the configuration you
  8306.     want, rather that relying on the multitasker's generic "DOS"
  8307.     window.
  8308.  
  8309.     Many multitaskers also run the command processor when you
  8310.     start certain kinds of windows, such as windows that run a
  8311.     .BAT file.  In general, this use of the command processor is
  8312.     transparent.  The multitasker will run NDOS for you
  8313.     automatically when it needs to, and you won't need to do
  8314.     anything about it.
  8315.  
  8316.     If you find that your multitasker is running COMMAND.COM when
  8317.     you meant to run NDOS, check the COMSPEC setting that is in
  8318.     effect when you start the multitasker.  You may also need to
  8319.     check the way a particular window is configured.
  8320.  
  8321.     When you set up a NDOS window, be sure to specify the full
  8322.     path to NDOS.COM, and any command-line options you want (see
  8323.     page 104 for information on command line options).  To set
  8324.     parameters (swapping, alias space, etc.) to be used by all
  8325.     NDOS secondary shells run by your multitasker, use the
  8326.     [Secondary] section in NDOS.INI (see page 110).  To set these
  8327.     parameters separately for a specific window, create a copy of
  8328.     NDOS.INI just for that window and use the @d:\path\inifile
  8329.     option on your command line for the window to tell NDOS where
  8330.     to find NDOS.INI.  To change the configuration of a specific
  8331.     window without creating a separate copy of NDOS.INI, use the
  8332.     //iniline option on your command line for the window (see
  8333.     example below).
  8334.  
  8335.     NDOS allows you to place a command to be executed as the last
  8336.     parameter on your NDOS command line.  This command is executed
  8337.     before NDOS displays its first prompt.  You can use this
  8338.     feature to run a batch file (or any other command) each time a
  8339.     NDOS window is started by your multitasker.  For example, if
  8340.     you are setting up NDOS to run as a DOS application under
  8341.     Windows 3.1, your command line might look this:
  8342.  
  8343.          c:\nu\ndos.com //swapping=f:\ c:\winstart.btm
  8344.  
  8345.     This tells Windows to load NDOS, includes a NDOS.INI directive
  8346.     to tell NDOS to swap to drive F:, and passes NDOS the command
  8347.     C:\WINSTART.BTM.  You can place commands in C:\WINSTART.BTM to
  8348.     be executed whenever such a window is started (for example, to
  8349.     change your PROMPT to show that you're in a window, or to load
  8350.     a TSR for just that window).  The command to be executed
  8351.     (C:\WINSTART.BTM in this example), must be the last thing on
  8352.     the NDOS command line;  no NDOS switches or options can be
  8353.     placed after it because anything after the command will be
  8354.     interpreted as parameters for the command.
  8355.  
  8356. ___________________________________________________________________
  8357. NDOS Reference Manual                                          141
  8358.  
  8359.                                                            Software
  8360. ___________________________________________________________________
  8361.  
  8362.     This command feature is similar to what's provided by the
  8363.     NSTART batch file, but NSTART is executed every time NDOS
  8364.     loads, whereas a file like WINSTART will be executed only when
  8365.     a NDOS window is started from your multitasker.  A batch file
  8366.     started this way will be run after NSTART.
  8367.  
  8368.     If you use KEYSTACK inside a window of a multitasker, and the
  8369.     KSTACK.COM program has been loaded before the multitasker, you
  8370.     may find that stacked keystrokes "bleed through" from one
  8371.     window to another.  You can solve this problem by loading
  8372.     KSTACK.COM in a startup batch file (see above) for each window
  8373.     where it is needed.  If KSTACK is loaded before the
  8374.     multitasker as well, include a /I on the command line when
  8375.     loading KSTACK inside the window.  If you don't, KSTACK will
  8376.     detect that it is already installed and will not install
  8377.     again.
  8378.  
  8379.  
  8380.     Multitasking and Disk Swapping
  8381.  
  8382.     When NDOS is loaded as the primary shell, it acts as a
  8383.     "traffic cop" for copies of the transient portion of NDOS
  8384.     swapped to disk.  Each secondary shell is assigned a unique
  8385.     shell number, which is used as the extension of its disk swap
  8386.     file (NDOSSWAP.001, NDOSSWAP.002, etc.).  These shell numbers
  8387.     avoid filename conflicts between multiple copies of NDOS
  8388.     running in different windows but creating swap files in the
  8389.     same disk directory.
  8390.  
  8391.     However, if NDOS is not loaded before the multitasker, this
  8392.     capability will not be available.  In this case, the copy of
  8393.     NDOS in each window will use a swap file called NDOSSWAP.000.
  8394.     To avoid a conflict in this situation, you must either use the
  8395.     UniqueSwapName directive in NDOS.INI, or force every copy of
  8396.     NDOS to place its swap file in its own unique directory by
  8397.     using the "Swapping=d:\path" directive in NDOS.INI.  If you
  8398.     don't follow this rule, your system will hang when you switch
  8399.     windows or when you exit from an application.
  8400.  
  8401.     This problem will occur only in those rare situations where
  8402.     NDOS is loaded within a window but is not loaded as your
  8403.     primary shell, and if NDOS disk swapping is used in more than
  8404.     one window at a time.  The problem will not occur if NDOS is
  8405.     loaded as the primary shell (the usual case), or if NDOS can
  8406.     use EMS or XMS swapping for all simultaneous shells.  Note
  8407.     that since the default swapping option uses disk swapping if
  8408.     insufficient EMS or XMS memory is available, you can be
  8409.     invoking disk swapping in your multitasker's windows without
  8410.     specifically requesting it.
  8411.  
  8412.  
  8413. ___________________________________________________________________
  8414. NDOS Reference Manual                                          142
  8415.  
  8416.                                                            Software
  8417. ___________________________________________________________________
  8418.  
  8419.     NDOS and Microsoft Windows
  8420.  
  8421.     NDOS works well as both the primary shell, loaded before
  8422.     Windows 3.0 or 3.1, and as a secondary shell loaded inside any
  8423.     window.  It works in any Windows mode (Real, Standard, or
  8424.     Enhanced).  The previous general information about
  8425.     multitaskers applies to Windows as well.  You should read it
  8426.     before continuing with this section.
  8427.  
  8428.     To run NDOS as a secondary shell from within Windows, you will
  8429.     need to create a Program Manager icon to run NDOS.  The
  8430.     generic "DOS Prompt" icon supplied by Microsoft will only run
  8431.     COMMAND.COM.  You can set up an NDOS icon from the Program
  8432.     Manager File, New menu selection.
  8433.  
  8434.     First, create a new program item and set the command line to
  8435.     "C:\NDOS\NDOS.COM" (use the appropriate drive and path for
  8436.     your system).  As discussed above, you can put the name of a
  8437.     batch file at the end of the command line.
  8438.  
  8439.     To install a special NDOS icon, use the Program Manager
  8440.     File, Properties menu selection.  Click on the Change Icon
  8441.     button and type in the full path name of your new NDOS icon
  8442.     file.  We supply the NDOS.ICO Windows icons with NDOS. Of
  8443.     course, you can create your own with any icon editor.
  8444.  
  8445.     For more flexibility, you can use the Windows PIF editor to
  8446.     create an NDOS.PIF file.
  8447.  
  8448.     If you run Windows in 386 Enhanced mode, NDOS will work
  8449.     properly in either a full-screen or a windowed session.  The
  8450.     .PIF file determines the mode that NDOS will start in.  If you
  8451.     don't use a .PIF file, NDOS will always start in full-screen
  8452.     mode.
  8453.  
  8454.     Your batch files can determine whether they are running in a
  8455.     secondary shell under Windows, and the current Windows mode,
  8456.     with the NDOS _WIN environment variable (see page 76).
  8457.  
  8458.     You can easily set up the Windows File Manager so that it will
  8459.     consider .BTM files to be "executable".  Open your WIN.INI
  8460.     file with any editor and find the section labeled
  8461.     "[extensions]".  Add the following line to the end of the
  8462.     section:
  8463.  
  8464.          btm=c:\nu\ndos.com /c ^.btm
  8465.  
  8466.     (adjust this to show the proper path for NDOS.COM on your
  8467.     system).  It is not possible to execute .BTM files from the
  8468.     Program Manager by modifying the Programs= setting in WIN.INI;
  8469.     if you try to do so, the system will hang when you attempt to
  8470.     actually invoke a BTM file.
  8471.  
  8472. ___________________________________________________________________
  8473. NDOS Reference Manual                                          143
  8474.  
  8475.                                                            Software
  8476. ___________________________________________________________________
  8477.  
  8478.  
  8479.     NDOS and DESQview
  8480.  
  8481.     NDOS works well as both the primary shell loaded before
  8482.     DESQview, and as the secondary shell loaded inside any
  8483.     DESQview window.  The previous general information about
  8484.     multitaskers applies to DESQview as well.  You should read it
  8485.     before continuing with this section.
  8486.  
  8487.     To use NDOS as a secondary shell with DESQview, you must add
  8488.     it to your DESQview "Open Window" menu.  To do this, select
  8489.     the Add a Program option, then press the "O" key (for Other
  8490.     Program).  Press Enter and you will get an Add a Program
  8491.     window.  You'll need to modify settings on the standard first
  8492.     screen, and on the second "advanced options" screen.  Set the
  8493.     Program Name to C:\NDOS\NDOS.COM (adjust the drive and path
  8494.     for your own computer).  Set the Parameters to whatever NDOS
  8495.     startup options you want, but do not use /C or /P.  For other
  8496.     DESQview parameters, the defaults are workable with the
  8497.     following changes:
  8498.  
  8499.          To run NDOS in a full-screen window:
  8500.  
  8501.                Writes Text Directly to Screen:    Y
  8502.                Virtualize Text/Graphics:          N
  8503.                Close on Exit to DOS:              Y
  8504.                Uses its Own Colors:               Y
  8505.  
  8506.          To run NDOS in a window smaller than the full screen:
  8507.  
  8508.                Writes Text Directly to Screen:    N
  8509.                Virtualize Text/Graphics:          Y or T
  8510.                Close on Exit to DOS:              Y
  8511.                Uses its Own Colors:               Y
  8512.  
  8513.     NDOS is written to be "DESQview-aware", and will not "bleed
  8514.     through" to other windows when running full-screen commands
  8515.     such as NDOSHELP, LIST, or SELECT.
  8516.  
  8517.     If you use NDOS commands that work with an ANSI driver (CLS,
  8518.     COLOR, and the COLORDIR environment variable), you will need
  8519.     to load the ANSI driver in your NDOS window.  Drivers like PC
  8520.     Magazine's ANSI.COM may work in full-screen windows, but we've
  8521.     found that the only ANSI driver which works properly in a
  8522.     window smaller than the full screen is Quarterdeck's
  8523.     DVANSI.COM.
  8524.  
  8525.     You can set up a startup batch file to load your ANSI driver
  8526.     or take other actions when a DESQview NDOS window is opened,
  8527.     as discussed in the general section on multitaskers above.
  8528.     Just place the batch filename (with drive and path if
  8529.     necessary) as the last thing on the Parameters line.
  8530.  
  8531. ___________________________________________________________________
  8532. NDOS Reference Manual                                          144
  8533.  
  8534.                                                            Software
  8535. ___________________________________________________________________
  8536.  
  8537.  
  8538.     You should normally exit a DESQview NDOS window with the EXIT
  8539.     command, rather than with the Close option on DESQview's main
  8540.     menu.  If you do use the Close option while at the NDOS
  8541.     prompt, NDOS will be notified of your action and will clean up
  8542.     its resources (for example, the shell number and disk swap
  8543.     file in use in that window).  However this notification has a
  8544.     side-effect:  it disables the Quit option on the DESQview main
  8545.     menu (this is a feature of DESQview).  To disable the
  8546.     notification and reenable the Quit option, you can use a
  8547.     DVCleanup = No directive in NDOS.INI.  If you do so, be sure
  8548.     to exit NDOS windows with the EXIT command to avoid leaving
  8549.     stray swap files on your disk or inadvertently using up NDOS
  8550.     shell numbers.
  8551.  
  8552.     DESQview will work properly with the UMBLoad and
  8553.     UMBEnvironment directives set to Yes for the primary shell in
  8554.     NDOS.INI, but may not work properly if these directives are
  8555.     also active in secondary shells.  If you have trouble with
  8556.     secondary shells and are using either of these directives, try
  8557.     placing the following lines in the [Secondary] section of
  8558.     NDOS.INI:
  8559.  
  8560.          UMBLoad = No
  8561.          UMBEnvironment = No
  8562.  
  8563.     If you want to use DESQview's DOS Services program, check
  8564.     APPNOTES.DOC for the details on how to set it up for use with
  8565.     NDOS.
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.  
  8587.  
  8588.  
  8589.  
  8590. ___________________________________________________________________
  8591. NDOS Reference Manual                                          145
  8592.  
  8593.                                                            Software
  8594. ___________________________________________________________________
  8595.  
  8596.     Using NDOS on a Network
  8597.  
  8598.     NDOS works well with DOS-compatible networks.  This section
  8599.     will give you some tips on using NDOS properly on a network,
  8600.     and on the locations to use for NDOS files on a network.
  8601.  
  8602.     In general, you'll find that you can load and run your network
  8603.     software normally under NDOS.  Network drives will be
  8604.     accessible as normal drives once the network is loaded, and
  8605.     files on the network will be accessible just as if they were
  8606.     on a local hard disk.
  8607.  
  8608.     Some networks support file and directory names beginning with
  8609.     a double backslash, or with a server name followed by a colon,
  8610.     to identify files by their location on the network.  NDOS
  8611.     detects such names and passes them through to the network
  8612.     unaltered, allowing the network software to process them
  8613.     properly.
  8614.  
  8615.     In rare situations, you may have trouble loading network
  8616.     software under NDOS.  To the best of our knowledge, all DOS-
  8617.     compatible networks do work with NDOS.  If yours doesn't, our
  8618.     experience suggests that the most common cause is a network
  8619.     bug, an old version of your network software, or a conflict in
  8620.     the way NDOS and your network are configured.  Most bugs have
  8621.     now been corrected by network vendors, and should not appear
  8622.     on your system.  If you have any questions about compatibility
  8623.     with your particular network, first check for a listing in
  8624.     APPNOTES.DOC; then of course feel free to contact our
  8625.     technical support department for assistance.
  8626.  
  8627.     If you need to boot a diskless workstation from a network
  8628.     drive, you must have the network drive accessible at boot
  8629.     time.  If this condition is satisfied (so NDOS can find its
  8630.     files on the network drives), the normal approach can be used
  8631.     to start NDOS from the network.
  8632.  
  8633.     Some networks with large server disk drives (256 MB or more)
  8634.     may report values that are too small if the FREE command and
  8635.     the %@DISKFREE, %@DISKTOTAL, and %@DISKUSED variable functions
  8636.     are used for the server drive.  If this occurs, it is because
  8637.     the network software does not provide a way to return larger
  8638.     values to NDOS.
  8639.  
  8640.   ! When you use NDOS on a network, pay attention to where files
  8641.     are stored in order to ensure that two NDOS users do not
  8642.     attempt to access the same NDOS file at the same time.  You
  8643.     will need to pay particular attention to disk swapping and
  8644.     pipes.
  8645.  
  8646.  
  8647. ___________________________________________________________________
  8648. NDOS Reference Manual                                          146
  8649.  
  8650.                             Solving Software Compatibility Problems
  8651. ___________________________________________________________________
  8652.  
  8653.     If NDOS uses disk swapping (either because of an explicit
  8654.     directive in NDOS.INI or because default swapping is used and
  8655.     no EMS or XMS memory is available), you should be sure that
  8656.     two users don't use the same directory simultaneously for
  8657.     their disk swap files.  If they do, the filenames
  8658.     (NDOSSWAP.000, NDOSSWAP.001, etc.) will conflict and each user
  8659.     will write over the other's files, possibly causing one or
  8660.     both systems to hang.  To take care of this, use the Swapping
  8661.     directive in NDOS.INI to assign each user's swap files to a
  8662.     different directory on the network drive.
  8663.  
  8664.     Pipes are a method of passing information from one program to
  8665.     another, and are invoked with the pipe symbol [|] on the
  8666.     command line (see page 60).  Pipes work by taking the output
  8667.     from one program, storing it in a temporary file, then telling
  8668.     a second program to obtain its input from that file.  The
  8669.     temporary files, with names like P1.$00 and P2.$00, are placed
  8670.     by default in the root directory of the boot drive, but can be
  8671.     placed on a different drive and directory by setting the TEMP
  8672.     or TEMPNDOS environment variable (see page 106).
  8673.  
  8674.     The same cautions given for disk swapping must be followed for
  8675.     pipe temporary files; that is, you must ensure that each
  8676.     user's temporary pipe files go to a separate directory.  To do
  8677.     this, just be sure that each network user running NDOS has
  8678.     TEMP or TEMPNDOS set to a unique directory.  If you boot NDOS
  8679.     from a local hard disk, the pipe temporary files will go to
  8680.     that disk and the environment variable setting will not be
  8681.     necessary.
  8682.  
  8683.  
  8684. Solving Software Compatibility Problems
  8685.  
  8686.     Any DOS program running on your computer can potentially
  8687.     interact with any other program running at the same time.  Of
  8688.     course, most program interactions are ones you want: your
  8689.     print spooler intercepts printer output and saves it to print
  8690.     later, or your disk cache intercepts disk requests and speeds
  8691.     them up by retrieving data from memory.
  8692.  
  8693.     If you've used the PC for any length of time, however, you'll
  8694.     know that you can also get interactions you don't want.  If
  8695.     you load just the wrong combination of TSRs and device
  8696.     drivers, your system may slow to a crawl.  Perhaps you can't
  8697.     load your favorite Personal Information Manager with Windows
  8698.     running.  And so on.
  8699.  
  8700.     As publishers of a product that replaces part of the operating
  8701.     system, we're very familiar with these issues -- not because
  8702.     NDOS is more likely to cause problems, but because it
  8703.  
  8704. ___________________________________________________________________
  8705. NDOS Reference Manual                                          147
  8706.  
  8707.                             Solving Software Compatibility Problems
  8708. ___________________________________________________________________
  8709.  
  8710.     sometimes gets blamed first when a problem appears.  Our
  8711.     technical support department has developed a set of reliable
  8712.     techniques for finding out what's causing an apparent
  8713.     compatibility problem with NDOS and other software.
  8714.  
  8715.     We are presenting these techniques here as a series of things
  8716.     to try when there seems to be a compatibility problem.  Some
  8717.     may not make sense for the particular problem you're
  8718.     investigating.  Others may not yield useful results.  But as a
  8719.     group, they'll help you resolve many of the common software
  8720.     interactions that do appear, whether with NDOS or anything
  8721.     else.
  8722.  
  8723.     Some of our suggestions help you figure out what's going on,
  8724.     but aren't intended to help you fix it.  For example, when we
  8725.     suggest that you remove all your TSRs to look for the problem,
  8726.     we aren't suggesting that as a permanent solution, but only as
  8727.     a diagnostic test.  Before you get started, be sure to check
  8728.     APPNOTES.DOC to see if we've already solved the problem you're
  8729.     facing.
  8730.  
  8731.     The first thing to consider is whether the particular
  8732.     combination of software that's not working used to work
  8733.     together.  If so, think carefully about what you have changed
  8734.     and see if reversing the change solves the problem.  If it
  8735.     does, then you can narrow your search, using the following
  8736.     techniques to find out what it is about that specific change
  8737.     that is causing the problem.
  8738.  
  8739.     Second, make sure that your problem can be reproduced
  8740.     relatively easily, and make sure you know exactly what
  8741.     sequence of commands or other steps reproduces it.  Most
  8742.     interactions are very easy to reproduce, but if you think
  8743.     there's an interaction and it occurs once every ten days, it's
  8744.     going to be difficult to know when you have fixed it.  Also,
  8745.     the process of carefully documenting how to reproduce a
  8746.     problem often helps you realize what the problem is without
  8747.     further effort.
  8748.  
  8749.     Third, if you have a problem with a specific application
  8750.     hanging or working improperly, try cleaning up the
  8751.     "atmosphere" in which that program runs.  This is the single
  8752.     most useful tool we know for finding compatibility problems.
  8753.     By "cleaning up the atmosphere" we mean all of the following,
  8754.     and any other similar things you may be able to think of about
  8755.     your particular system after reading our suggestions below:
  8756.  
  8757.          Check the length of your PATH variable.  NDOS lets you
  8758.          make it longer than the standard limit of 123 characters.
  8759.          Some programs can't handle long PATHs and may behave
  8760.  
  8761. ___________________________________________________________________
  8762. NDOS Reference Manual                                          148
  8763.  
  8764.                             Solving Software Compatibility Problems
  8765. ___________________________________________________________________
  8766.  
  8767.          strangely.  If your PATH is over the normal limit, reduce
  8768.          its size using the PATH or ESET command and see if the
  8769.          application starts working.  If so, use a batch file or
  8770.          alias to set up an alternate path for running that one
  8771.          program, for example:
  8772.  
  8773.               setlocal
  8774.               path d:\myprog
  8775.               d:\myprog\myprog.exe
  8776.               endlocal
  8777.  
  8778.          The SETLOCAL/ENDLOCAL pair saves and restores the
  8779.          environment;  when you're done, the old PATH will be
  8780.          restored automatically (see page 287).
  8781.  
  8782.          Next, check how much environment space is in use in your
  8783.          system.  The NDOS MEMORY command reports the total
  8784.          environment space and the amount free; a simple
  8785.          subtraction tells you how much is in use.  Some programs
  8786.          use outdated techniques and simply don't work right if
  8787.          there's a lot of information in the environment (these
  8788.          programs don't usually care how big the total environment
  8789.          space is, only how much of it is actually in use).  In
  8790.          most cases, these problems show up when the amount of
  8791.          space in use gets up to around 1K (1024) bytes or so, but
  8792.          they can occur at any point. To test for this, use the
  8793.          following simple batch file:
  8794.  
  8795.               setlocal
  8796.               unset var1 var2 var3 ...
  8797.               [command to run the program in question]
  8798.               endlocal
  8799.  
  8800.          where VAR1, VAR2, etc. are variables you can remove from
  8801.          the environment to decrease the space in use before
  8802.          running the program.  If reducing the environment space
  8803.          in use makes things work, contact the program's
  8804.          manufacturer and report the problem.  You have found a
  8805.          legitimate bug.  DOS allows an environment of up to 32K
  8806.          and all programs should be able to work with an
  8807.          environment that large.  Until the manufacturer fixes the
  8808.          bug, use the batch file above as a workaround.
  8809.  
  8810.          Next, look for a multi-program interaction.  Remove all
  8811.          the device drivers and TSRs you possibly can and still
  8812.          have enough software present to demonstrate the problem.
  8813.          For example, you can't look for a network problem if you
  8814.          don't load the network, but you probably can check it
  8815.          without your disk cache running.  When you do this, and
  8816.  
  8817.  
  8818. ___________________________________________________________________
  8819. NDOS Reference Manual                                          149
  8820.  
  8821.                             Solving Software Compatibility Problems
  8822. ___________________________________________________________________
  8823.  
  8824.          any time you modify your boot configuration, be sure you
  8825.          have a bootable floppy disk handy.
  8826.  
  8827.          If you run a partitioning disk driver like SpeedStor,
  8828.          Vfeature, or Disk Manager, you probably can't remove it
  8829.          for diagnostic purposes without temporarily losing access
  8830.          to some or all of your hard disk.  The same may be true
  8831.          of disk compression programs like Stacker, depending on
  8832.          the mode in which they are installed.  Most other device
  8833.          drivers and TSRs can be removed without causing trouble.
  8834.          Check your system and software manuals if you are unsure
  8835.          of which programs can safely be removed.
  8836.  
  8837.          Once you know what you can take out, don't skimp or guess
  8838.          where the interaction might be.  Take out everything you
  8839.          possibly can from CONFIG.SYS, NSTART, and AUTOEXEC.BAT
  8840.          that loads or accesses another program .  In CONFIG.SYS,
  8841.          remove all possible DEVICE and INSTALL statements.  In
  8842.          AUTOEXEC.BAT, remove all the lines you can that load
  8843.          memory-resident programs (and remember that some DOS
  8844.          utilities, like MODE, can be memory-resident).  Of
  8845.          course, save copies of your configuration files before
  8846.          you delete anything.  Better yet, use the REM command to
  8847.          remove lines temporarily without deleting them.  REM can
  8848.          be used on any line in AUTOEXEC.BAT, in NSTART, and in
  8849.          CONFIG.SYS if you are running DOS 4.0 or above.  In
  8850.          earlier versions, REM will work in CONFIG.SYS but will
  8851.          also generate a harmless "unrecognized command" error
  8852.          message during bootup.  If you want to remove everything
  8853.          in AUTOEXEC.BAT you can simply rename it to any other
  8854.          name, and rename it back when you are done testing.
  8855.  
  8856.          Clean out your configuration files all at once, not one
  8857.          line at a time.  If that solves the problem, you're on
  8858.          the right track, and you can put the lines back one at a
  8859.          time until you find the culprit.  If it doesn't solve the
  8860.          problem, you won't waste time removing lines one by one.
  8861.  
  8862.          If you do find a suspect program, first try booting your
  8863.          system with COMMAND.COM, without changing anything else
  8864.          about your configuration.  If the problem remains, then
  8865.          it's not related to an interaction with NDOS.
  8866.  
  8867.          If the problem isn't there under COMMAND.COM, try
  8868.          fiddling with the program's configuration. If you were
  8869.          loading it high, try loading it low.  If you can change
  8870.          the way it uses memory, try doing so.  If it's a driver
  8871.          that's used by other programs (like your mouse driver)
  8872.          and is quite old, consider obtaining an update from the
  8873.          manufacturer. All of these techniques will help you
  8874.  
  8875. ___________________________________________________________________
  8876. NDOS Reference Manual                                          150
  8877.  
  8878.                             Solving Software Compatibility Problems
  8879. ___________________________________________________________________
  8880.  
  8881.          narrow down what it is about the program that's causing a
  8882.          problem.  Once you have done that, you may have a simple
  8883.          workaround.  If not, contact our technical support crew
  8884.          and we'll try to verify the problem, then resolve it with
  8885.          the manufacturer of the other software.
  8886.  
  8887.          Rarely, some problems can be resolved by modifying the
  8888.          order in which you load drivers and TSRs.  If you've
  8889.          found a problem with a particular driver or TSR, try
  8890.          loading it earlier or later than you were and see if the
  8891.          problem goes away.
  8892.  
  8893.     Next, try modifying the atmosphere in another way:  change the
  8894.     way NDOS is configured.  In particular, try changing the NDOS
  8895.     swapping type using the Swapping directive in NDOS.INI (see
  8896.     page 115).  This technique is especially appropriate if the
  8897.     system hangs every time you exit a particular application.  If
  8898.     that solves the problem, there's probably a memory conflict.
  8899.     Another program is trying to use the same memory space NDOS
  8900.     uses for swapping.  See if you can control the other program's
  8901.     memory usage.
  8902.  
  8903.     If you can configure NDOS and the other program to work
  8904.     together, you're all set.  If they work together only in a
  8905.     useless combination (for example, with NDOS swapping turned
  8906.     off), contact us.  We'll try to figure out what the other
  8907.     program is doing to damage the NDOS swap space and get the
  8908.     manufacturer to take care of the problem.
  8909.  
  8910.     You can also change the UMB-related configuration settings
  8911.     (UMBLoad and UMBEnvironment) to help diagnose compatibility
  8912.     problems.  Problems with these directives are rare, but if
  8913.     you're at an impasse, try setting both of these values to "No"
  8914.     in NDOS.INI.
  8915.  
  8916.     Some of the advanced directives in NDOS.INI (see page 126) may
  8917.     help solve very rare configuration problems, but unless you
  8918.     are an experienced DOS user and understand the side effects of
  8919.     each directive, they should be used only as diagnostic tools,
  8920.     and not as a workaround or fix. Any of the following can be
  8921.     tried:
  8922.  
  8923.          FineSwap = Yes
  8924.          FullINT2E = Yes
  8925.          Inherit = No
  8926.          LineInput = Yes      (or SETDOS /L1)
  8927.          Reduce = No
  8928.          ReserveTPA = No
  8929.          SwapReopen = Yes
  8930.          StackSize = nnnn     (increase value to 5120 or more)
  8931.  
  8932. ___________________________________________________________________
  8933. NDOS Reference Manual                                          151
  8934.  
  8935.                             Solving Software Compatibility Problems
  8936. ___________________________________________________________________
  8937.  
  8938.     If you've tried all these techniques and haven't found the
  8939.     problem, contact our technical support department.  We have
  8940.     more tricks up our sleeve, and a very high success rate at
  8941.     resolving software interactions.
  8942.  
  8943.  
  8944.  
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.  
  8984.  
  8985.  
  8986.  
  8987.  
  8988.  
  8989. ___________________________________________________________________
  8990. NDOS Reference Manual                                          152
  8991.  
  8992.  
  8993.                                                       NDOS Commands
  8994. ___________________________________________________________________
  8995.  
  8996. CHAPTER 8, COMMAND REFERENCE GUIDE
  8997.  
  8998.  
  8999. The following pages are a complete guide and reference to the NDOS
  9000. commands that are available from the command line, in aliases, and
  9001. in batch files.  Nearly all of these commands are internal NDOS
  9002. commands, which means that NDOS performs the activity you have
  9003. requested without running another program.  External commands
  9004. require loading and running a separate program, either an
  9005. executable (.EXE or .COM) program or a batch (.BTM or .BAT)
  9006. program.  DOS is shipped with a number of external utility programs
  9007. (such as FORMAT and DISKCOPY), and any program or application you
  9008. install on your system becomes a new external command.
  9009.  
  9010. The advantage of internal commands is that they run almost
  9011. instantly.  When you give NDOS an internal command, it interprets
  9012. the command line and carries out the necessary activities without
  9013. having to look for, load, and run another program.
  9014.  
  9015. The advantage of external commands is that they can be large,
  9016. varied, and complex without taking space inside the system command
  9017. processor.  External commands can also be renamed or replaced
  9018. easily.  If you want to rename the external DOS command XCOPY to
  9019. MYCOPY, for example, all you need to do is find the file called
  9020. XCOPY.EXE on your DOS disk or directory and change its name to
  9021. MYCOPY.EXE.  If you want to replace XCOPY with a more efficient
  9022. program, you can do so.  NDOS adds this flexibility to internal
  9023. commands.  You can rename or replace any internal command by using
  9024. an ALIAS, and you can enable or disable internal commands whenever
  9025. you wish.
  9026.  
  9027.  
  9028. NDOS Commands
  9029.  
  9030.     NDOS has over 80 internal commands, many more than any version
  9031.     of DOS.  NDOS neither replaces nor interferes with external
  9032.     DOS commands like ASSIGN, BACKUP, CHKDSK, DISKCOPY, SUBST, or
  9033.     XCOPY.  Once NDOS is installed, you can continue to use those
  9034.     utilities like you always have.  Also, NDOS has been designed
  9035.     so that it is compatible with virtually all traditional
  9036.     internal commands, even though it enhances many of those
  9037.     commands with additional options and capabilities.  Once you
  9038.     have installed NDOS, you can continue using the commands that
  9039.     you already know and get the same results.
  9040.  
  9041.     A few of the NDOS commands are the same as traditional
  9042.     commands, some are enhanced with new features, and many are
  9043.     unique to NDOS.  The best way to learn the NDOS commands is to
  9044.     use them and experiment with them.  The following lists
  9045. ___________________________________________________________________
  9046. NDOS Reference Manual                                          153
  9047.  
  9048.  
  9049.                                                       NDOS Commands
  9050. ___________________________________________________________________
  9051.     categorize the available commands by topic and will help you
  9052.     find the ones that you need.  Most of this chapter is an
  9053.     alphabetic list of the commands and how to use each one.  We
  9054.     urge you to browse through this chapter occasionally and look
  9055.     for commands that might help simplify your computing life.
  9056.  
  9057.     In the following summary lists, commands that are unique to
  9058.     NDOS are marked with a  number sign [#].  Those which are
  9059.     enhanced traditional commands are marked with an asterisk [*].
  9060.     And those which are identical to traditional commands have no
  9061.     marks at all.
  9062.  
  9063.     System Configuration Commands:
  9064.  
  9065.        BREAK          CHCP           CTTY           DATE
  9066.        FREE #         LH/LOADHIGH    MEMORY #       PROMPT *
  9067.        REBOOT #       SETDOS #       SWAPPING #     TIME
  9068.        VER            VERIFY         VOL *
  9069.  
  9070.     File and directory management:
  9071.  
  9072.        ATTRIB *       COPY *         DEL/ERASE *    DESCRIBE #
  9073.        MOVE #         REN/RENAME *   TRUENAME #
  9074.  
  9075.     Subdirectory management:
  9076.  
  9077.        CD/CHDIR *     CDD #          DIR *          DIRS #
  9078.        MD/MKDIR *     POPD #         PUSHD #        RD/RMDIR *
  9079.  
  9080.     Commands normally used in batch files and aliases (many are
  9081.     also useful at the command line):
  9082.  
  9083.        ALIAS #        BEEP #         CALL           CANCEL #
  9084.        COLOR #        DELAY #        DRAWBOX #      DRAWHLINE #
  9085.        DRAWVLINE #    ECHO *         ECHOS #        ENDLOCAL #
  9086.        GOSUB #        GOTO *         FOR *          IF *
  9087.        IFF #          INKEY #        INPUT #        KEYSTACK #
  9088.        LOADBTM #      PAUSE *        QUIT #         REM *
  9089.        RETURN #       SCREEN #       SCRPUT #       SETLOCAL #
  9090.        SHIFT *        TEXT #         TIMER #        UNALIAS #
  9091.        VSCRPUT #
  9092.  
  9093.     Other commands:
  9094.  
  9095.        ? #            CLS *          ESET #         EXCEPT #
  9096.        EXIT *         GLOBAL #       HISTORY #      LIST #
  9097.        LOG #          NDOSHELP #     PATH *         SELECT #
  9098.        SET *          TEE #          TYPE *         UNSET #
  9099.        Y #
  9100.  
  9101. ___________________________________________________________________
  9102. NDOS Reference Manual                                          154
  9103.  
  9104.  
  9105.                                 How to Use the Command Descriptions
  9106. ___________________________________________________________________
  9107.     As you can see, most NDOS commands are either enhanced
  9108.     traditional commands or are entirely new.  If you are
  9109.     comfortable using traditional commands, you can switch to NDOS
  9110.     without making any changes in your habits.  But you will miss
  9111.     many powerful NDOS enhancements and new commands unless you
  9112.     take a few minutes to see what's available here.  Make sure
  9113.     you don't skip a section of this reference just because you
  9114.     already know how to use a traditional command with the same
  9115.     name.
  9116.  
  9117.     We have made no attempt to document external DOS commands in
  9118.     this reference, partly because they are explained in your DOS
  9119.     manual, and partly because the number and name of DOS external
  9120.     commands, and the options available with each command, vary
  9121.     widely from one version of DOS to another and from one
  9122.     computer manufacturer to another.  The NDOS HELP system does
  9123.     include information on standard DOS external commands.
  9124.  
  9125.     If you come across terms or concepts in this chapter that you
  9126.     are unsure about, please refer to Chapter 4, "General
  9127.     Concepts," the Glossary on page 329, or the Index.
  9128.  
  9129.  
  9130. How to Use the Command Descriptions
  9131.  
  9132.     Each of the NDOS commands is described in detail on the
  9133.     following pages.  The descriptions are arranged
  9134.     alphabetically, and each includes examples that will help you
  9135.     learn to use the commands.
  9136.  
  9137.     Each description begins with the name of the command on the
  9138.     left side of the page and a word in parentheses on the right
  9139.     side.  The commands marked "New" are unique to NDOS.  Those
  9140.     marked "Enhanced" are similar to traditional commands but add
  9141.     new features and options.  The commands marked "Compatible"
  9142.     follow the syntax and features of the traditional command with
  9143.     the same name.
  9144.  
  9145.     The name is followed by a sentence or two that briefly
  9146.     describes the command's purpose or major function.  That
  9147.     sentence should help you determine quickly whether you have
  9148.     found the command you are seeking.
  9149.  
  9150.     The next part of each description shows the command's format
  9151.     or syntax.  The format line uses certain conventions to
  9152.     describe how the command should be entered and to create
  9153.     reference points for the text describing the command:
  9154.  
  9155.          Words in UPPER CASE must be spelled exactly as they are
  9156.          shown (although you can type them in using either upper
  9157.  
  9158. ___________________________________________________________________
  9159. NDOS Reference Manual                                          155
  9160.  
  9161.  
  9162.                                 How to Use the Command Descriptions
  9163. ___________________________________________________________________
  9164.          or lower case, or a combination).  If a word is shown
  9165.          partly in upper case (for example BLInk), only the upper
  9166.          case portion is required, the rest is optional.
  9167.  
  9168.          Words shown in italics (for example source or filename)
  9169.          are meant to be replaced by other words or values.  Each
  9170.          of these words is explained directly beneath the format
  9171.          line, and discussed in more detail in the text
  9172.          description of the command.  When the word stands for a
  9173.          filename, the name may be a simple filename like
  9174.          MYFILE.TXT or it may include a drive letter and/or a full
  9175.          path, like C:\MYDIR1\MYDIR2\MYFILE.TXT.  If the command
  9176.          can work on multiple files, you can use the NDOS
  9177.          wildcards, multiple filenames, or an include list (see
  9178.          pages 64, 66, and 67).
  9179.  
  9180.          Anything followed by an ellipsis (three periods [...])
  9181.          may be repeated as often as you wish.
  9182.  
  9183.          Text shown in [square brackets] is optional.  Text
  9184.          outside of square brackets must be entered literally (if
  9185.          it is capitalized) or replaced by other words or values
  9186.          (if it is in italics).
  9187.  
  9188.          Vertical bars | represent a choice;  you can pick one
  9189.          option or another but not both.  For example, the
  9190.          following format shows that the command may be followed
  9191.          by the word ON or the word OFF, but not both:
  9192.  
  9193.               COMMAND [ ON | OFF ]
  9194.  
  9195.          A slash followed by a letter, like [/X], is an "option"
  9196.          or "switch" which controls the effect of a command.  Many
  9197.          commands have several switches, and you are usually free
  9198.          to use none, one, or several to make a command behave as
  9199.          you wish.  If you use a single switch, you must precede
  9200.          it with a slash.  If you use several switches, in most
  9201.          cases you can put them together with one slash or use
  9202.          separate slashes.  For example, if you wanted to use
  9203.          switches X, Y, and Z for a command, you could type them
  9204.          three different ways:
  9205.  
  9206.               command /x /y /z
  9207.               command /x/y/z
  9208.               command /xyz
  9209.  
  9210.          A few switches, particularly in the DIR and SELECT
  9211.          commands,  use two or more characters.  If you need to
  9212.          follow a multi-letter switch with another switch, the
  9213.          second switch must have its own slash to avoid ambiguity.
  9214.  
  9215. ___________________________________________________________________
  9216. NDOS Reference Manual                                          156
  9217.  
  9218.  
  9219.                                 How to Use the Command Descriptions
  9220. ___________________________________________________________________
  9221.     Included in the format section is an explanation of each
  9222.     replaceable argument and a one or two word explanation of each
  9223.     switch.  Many descriptions also list related commands to help
  9224.     you find the exact command you want.
  9225.  
  9226.     After the command format, you'll find a description of the
  9227.     command's usage.  This description normally starts with the
  9228.     basic functions of a command and gradually adds more details.
  9229.     We've also included many examples to help you see the command
  9230.     in action.  In the examples, characters in normal type
  9231.     represent input from the user as well as NDOS prompts,
  9232.     responses, or lines in a batch file.
  9233.  
  9234.     The last part of each description is a detailed explanation of
  9235.     the options or switches available for each command, in
  9236.     alphabetical order.  Occasionally, we've included more
  9237.     examples in this section to demonstrate how a switch is used
  9238.     or how multiple switches interact.
  9239.  
  9240.     Pay careful attention to the information about switch
  9241.     placement.  Some switches have different effects based on
  9242.     where they appear in the command line.  The effects of
  9243.     switches occasionally vary from one command to another in
  9244.     order to retain compatibility with traditional commands.
  9245.  
  9246.     In the Usage and Options sections you may see the symbol ##.
  9247.     This indicates a more in-depth discussion or an advanced topic
  9248.     which you can skip if you are new to the command; come back to
  9249.     this topic later for more details, or if you're having trouble
  9250.     with the command.  In most cases the remainder of the section
  9251.     after such a symbol is devoted to similar information.
  9252.  
  9253.     The ## doesn't mean that only advanced users will need the
  9254.     information -- you may find it useful even if you're
  9255.     relatively new to computers or to NDOS.  But it does mean that
  9256.     you can skip the marked section and still understand and use
  9257.     the basic features of the command.  If a ## appears before the
  9258.     "Usage" heading, it indicates that the entire command is
  9259.     generally used only in unusual situations or by more advanced
  9260.     users.
  9261.  
  9262.     When you see a ## in the list of options, remember that the
  9263.     options are listed alphabetically, so there may be more basic
  9264.     options discussed later in the list, after a more complex or
  9265.     advanced option marked with ##.  Don't stop reading the option
  9266.     list the first time you see the mark.
  9267.  
  9268.     A ! to the left of a paragraph means that paragraph contains a
  9269.     caution or warning you may need to observe when using the
  9270.     feature it discusses.
  9271.  
  9272. ___________________________________________________________________
  9273. NDOS Reference Manual                                          157
  9274.  
  9275.  
  9276. ___________________________________________________________________
  9277.  
  9278. ?                                                             (New)
  9279.  
  9280. Purpose:    Display a list of NDOS commands.
  9281.  
  9282. Format:     ?
  9283.  
  9284. Usage:      ? displays a list of NDOS internal commands.  For help
  9285.             with these commands, and with external DOS commands,
  9286.             see the NDOSHELP command.
  9287.  
  9288.             When you use the ? command, you will see a display like
  9289.             this:
  9290.  
  9291.                  c:\> ?
  9292.                  ?            ALIAS       ATTRIB       BEEP
  9293.                  BREAK        CALL        CANCEL       CD
  9294.                  CDD          CHCP        CHDIR        CLS
  9295.                  COLOR        COPY        CTTY         DATE
  9296.                  DEL          DELAY       DESCRIBE     DIR
  9297.                  DIRS         DRAWBOX     DRAWHLINE    DRAWVLINE
  9298.                  ECHO         ECHOS       ENDLOCAL     ERASE
  9299.                  ESET         EXCEPT      EXIT         FOR
  9300.                  FREE         GLOBAL      GOSUB        GOTO
  9301.                  HELP         HISTORY     IF           IFF
  9302.                  INKEY        INPUT       KEYSTACK     LH
  9303.                  LIST         LOADBTM     LOADHIGH     LOG
  9304.                  MD           MEMORY      MKDIR        MOVE
  9305.                  PATH         PAUSE       POPD         PROMPT
  9306.                  PUSHD        QUIT        RD           REBOOT
  9307.                  REM          REN         RENAME       RETURN
  9308.                  RMDIR        SCREEN      SCRPUT       SELECT
  9309.                  SET          SETDOS      SETLOCAL     SHIFT
  9310.                  SWAPPING     TEE         TEXT         TIME
  9311.                  TIMER        TRUENAME    TYPE         UNALIAS
  9312.                  UNSET        VER         VERIFY       VOL
  9313.                  VSCRPUT      Y
  9314.  
  9315.             If you have disabled a command with the SETDOS /I
  9316.             command, it will not appear in the list.
  9317.  
  9318.  
  9319.  
  9320.  
  9321.  
  9322.  
  9323.  
  9324.  
  9325.  
  9326.  
  9327.  
  9328.  
  9329. ___________________________________________________________________
  9330. NDOS Reference Manual                                          158
  9331.  
  9332.  
  9333. ___________________________________________________________________
  9334.  
  9335. ALIAS                                                         (New)
  9336.  
  9337. Purpose:    Create new command names that execute one or more
  9338.             commands or redefine default options for existing
  9339.             commands;  assign commands to keystrokes;  load or
  9340.             display the list of defined alias names.
  9341.  
  9342. Format:     ALIAS [/P /R file...] [name[=][value]]
  9343.  
  9344.             file:  One or more files to read for alias definitions.
  9345.             name:  Name for an alias, or the key to execute the
  9346.             alias.
  9347.             value:  Text (commands, etc.) to be substituted for the
  9348.             alias name.
  9349.  
  9350.             /P(ause)                    /R(ead file)
  9351.  
  9352.             See also: UNALIAS and page 88.
  9353.  
  9354. Usage:      The ALIAS command lets you create new command names or
  9355.             redefine the NDOS internal commands.  It also lets you
  9356.             assign one or more commands to a single keystroke.  An
  9357.             alias is often used to execute a complex series of
  9358.             commands with a few keystrokes or to create "in memory
  9359.             batch files" that run much faster than disk-based batch
  9360.             files.
  9361.  
  9362.             For example, if you would rather type D instead of DIR
  9363.             /W you would use the command:
  9364.  
  9365.                  c:\> alias d = dir /w
  9366.  
  9367.             Now when you type a single d as a command, NDOS will
  9368.             translate it into a DIR /W command.  The marks around
  9369.             DIR /W in the ALIAS command are back quotes, below the
  9370.             tilde [~] on most PC keyboards.  They are NOT single
  9371.             quotes ['].
  9372.  
  9373.             An alias can represent more than one command.  For
  9374.             example:
  9375.  
  9376.                  c:\> alias letters = `cd \letters ^ text`
  9377.  
  9378.             creates a new command called LETTERS.  The command
  9379.             first uses CD to change to a subdirectory called
  9380.             \LETTERS and then runs a program called TEXT.  The
  9381.             caret [^] is the NDOS command separator and tells NDOS
  9382.             that the two commands are distinct and should be
  9383.             executed sequentially.
  9384.  
  9385.  
  9386. ___________________________________________________________________
  9387. NDOS Reference Manual                                          159
  9388.  
  9389.  
  9390. ___________________________________________________________________
  9391.  
  9392.             When you type alias commands at the command line or in
  9393.             a batch file, you MUST use back quotes around the
  9394.             definition if it contains multiple commands or any
  9395.             replaceable parameters (which are discussed below) to
  9396.             prevent premature expansion of the arguments.  You MAY
  9397.             use back quotes [`] around other definitions, but they
  9398.             are not required.  To avoid confusion, we recommend
  9399.             that you always use back quotes around alias
  9400.             definitions you type at the command line or enter in a
  9401.             batch file.
  9402.  
  9403.             Aliases may invoke internal NDOS commands, external
  9404.             commands, or other aliases.  (However, an alias may not
  9405.             invoke itself, except in special cases where an IF or
  9406.             IFF command is used to prevent an infinite loop.)  The
  9407.             two aliases below demonstrate alias nesting (one alias
  9408.             invoking another).  The first line defines an alias
  9409.             which runs a program called WP.EXE that is in the
  9410.             E:\WP51\ subdirectory.  The second alias changes
  9411.             directories with the PUSHD command, runs the WP alias,
  9412.             and then returns to the original directory with the
  9413.             POPD command:
  9414.  
  9415.                  c:\> alias wp = e:\wp51\wp.exe
  9416.                  c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  9417.  
  9418.             The second alias above could have included the full
  9419.             path and name of the WP.EXE program instead of calling
  9420.             the WP alias.  However, writing two aliases makes the
  9421.             second one easier to read and understand, and makes the
  9422.             first alias available for independent use.  If you
  9423.             rename the WP.EXE program or move it to a new
  9424.             directory, only the first alias needs to rewritten.
  9425.  
  9426.             If you put an asterisk [*] immediately before a command
  9427.             in the value of an alias definition (the part after the
  9428.             equal sign), it tells NDOS not to attempt to interpret
  9429.             that command as another (nested) alias.  An asterisk
  9430.             used this way must be preceded by a space or caret [^]
  9431.             and followed immediately by an internal or external
  9432.             command name.  The asterisk is used to make sure that
  9433.             NDOS interprets the following word as the name of an
  9434.             internal or external command instead of as an alias
  9435.             which may have the same name.  It also allows two
  9436.             popular uses of aliases.
  9437.  
  9438.             By using an asterisk, you can redefine the default
  9439.             options for any NDOS command.  For example, suppose
  9440.             that you always want to use the DIR command with the /2
  9441.  
  9442.  
  9443. ___________________________________________________________________
  9444. NDOS Reference Manual                                          160
  9445.  
  9446.  
  9447. ___________________________________________________________________
  9448.  
  9449.             (two column) and /P (pause at the end of each page)
  9450.             options.  The following line will do just that:
  9451.  
  9452.                  c:\> alias dir = *dir /2/p
  9453.  
  9454.             If you didn't include the asterisk, NDOS would
  9455.             interpret the second DIR on the line as the name of the
  9456.             alias itself and attempt to repeatedly re-invoke the
  9457.             DIR alias, rather than running the DIR command.  This
  9458.             would cause an "Alias loop" or "Command line too long"
  9459.             error.  The asterisk tells NDOS to interpret the second
  9460.             DIR as a command but not as an alias.
  9461.  
  9462.             An asterisk also helps you keep the names of internal
  9463.             NDOS commands from conflicting with the names of
  9464.             external programs.  For example, suppose you have a
  9465.             program called LIST.COM.  Normally, the NDOS internal
  9466.             command will run anytime you type LIST.  But two simple
  9467.             aliases will give you access to both the LIST.COM
  9468.             program and the LIST command:
  9469.  
  9470.                  c:\> alias list = c:\util\list.com
  9471.                  c:\> alias display = *list
  9472.  
  9473.             The first line above defines LIST as an alias for the
  9474.             LIST.COM program.  If you stopped there, the external
  9475.             program would run every time you typed LIST and you
  9476.             would not have easy access to the internal NDOS LIST
  9477.             command.  The second line renames the internal LIST
  9478.             command as DISPLAY.  The asterisk is needed in the
  9479.             second command to tell NDOS that the following word
  9480.             means the internal command LIST, not the LIST alias
  9481.             which runs your external program.
  9482.  
  9483.             Another way to understand the asterisk is to remember
  9484.             that when NDOS processes a command it always checks for
  9485.             an alias first, then looks for an internal or external
  9486.             command, or a batch file (see page 36).  The asterisk
  9487.             at the beginning of a command name simply tells NDOS to
  9488.             skip over the usual check for aliases when processing
  9489.             that command, and go straight to checking for an
  9490.             internal command, external command, or batch file.
  9491.  
  9492.             You can also use an asterisk before a command that you
  9493.             enter at the command line or in a batch file.  If you
  9494.             do, NDOS won't try to interpret that command as an
  9495.             alias.  This can be useful when you want to be sure you
  9496.             are running the true, original command and not an alias
  9497.             with the same name, or temporarily defeat the purpose
  9498.             of an alias which changes the meaning or behavior of a
  9499.  
  9500. ___________________________________________________________________
  9501. NDOS Reference Manual                                          161
  9502.  
  9503.  
  9504. ___________________________________________________________________
  9505.  
  9506.             command.  For example, above we defined an alias for
  9507.             DIR which made directories display in two-column paged
  9508.             mode by default.  If you wanted to see a directory
  9509.             display in the normal single-column, non-paged mode,
  9510.             you could enter the command *DIR and the alias would be
  9511.             ignored during that one command.
  9512.  
  9513.             You can also use an asterisk in the name of an alias.
  9514.             When you do, the characters following the asterisk are
  9515.             optional when you invoke the alias command.  (Use of an
  9516.             asterisk in the alias name is unrelated to the use of
  9517.             an asterisk in the alias value discussed above.)  For
  9518.             example, with this alias:
  9519.  
  9520.                  c:\> alias wher*eis = dir /sp
  9521.  
  9522.             the new command, WHEREIS, can be invoked as WHER,
  9523.             WHERE, WHEREI, or WHEREIS.  Now if you type:
  9524.  
  9525.                  c:\> where myfile.txt
  9526.  
  9527.             NDOS will expand the WHEREIS alias and process the
  9528.             command:
  9529.  
  9530.                  dir /sp myfile.txt
  9531.  
  9532.             If you want to assign an alias to a keystroke, use the
  9533.             keyname on the left side of the equal sign, preceded by
  9534.             an at-sign [@].  For example, to assign the command DIR
  9535.             /W to the F5 key, type
  9536.  
  9537.                  c:\> alias @F5 = dir /w
  9538.  
  9539.             Keynames must be in the form
  9540.  
  9541.                  [Prefix-]Keyname
  9542.  
  9543.             The key prefix can be any one of the following:
  9544.  
  9545.               No prefix  followed by F1 - F12
  9546.               Alt        followed by A - Z, 0 - 9, or F1 - F12
  9547.               Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  9548.                          Left, Right, Home, End, PageUp, PageDn,
  9549.                          Ins, or Del
  9550.               Shift      followed by F1 - F12
  9551.  
  9552.             The possible key names are:
  9553.  
  9554.               A - Z         Left          PageDown
  9555.               0 - 9         Right         Home
  9556.  
  9557. ___________________________________________________________________
  9558. NDOS Reference Manual                                          162
  9559.  
  9560.  
  9561. ___________________________________________________________________
  9562.  
  9563.               F1 - F12      PageUp        End
  9564.  
  9565.             All key names must be spelled as shown.  Alphabetic
  9566.             keys can be specified in upper-case or lower-case.  You
  9567.             cannot specify a punctuation key.
  9568.  
  9569.             The prefix and key name must be separated by a dash.
  9570.             You can also define a keystroke alias by using "@" plus
  9571.             a scan code for one of the permissible keys (see
  9572.             Appendix B on page 315 for a list of scan codes).
  9573.  
  9574.             Some keys are interpreted by your system's BIOS and are
  9575.             not passed on to NDOS (for example, Ctrl-S tells the
  9576.             BIOS to pause screen output temporarily).  Such
  9577.             keystrokes cannot normally be used for keystroke
  9578.             aliases, because NDOS never receives them.  You may not
  9579.             be able to remap F11 and F12 if your keyboard is not
  9580.             100% IBM-compatible, or if you have an ANSI driver
  9581.             which does not support these keys.  This limitation is
  9582.             due to DOS and your ANSI driver, not NDOS.
  9583.  
  9584.             When you define keystroke aliases, the assignments will
  9585.             only be in effect at the NDOS command line, not inside
  9586.             application programs.  Be careful not to assign aliases
  9587.             to keys that are already used at the command-line (like
  9588.             F1 for Help).  The command-line meanings take
  9589.             precedence and the keystroke alias will never be
  9590.             invoked.  If you want to use one of the command-line
  9591.             keys for an alias instead of its normal meaning, you
  9592.             must first disable its regular use with the NormalKey
  9593.             or NormalEditKey directive in your NDOS.INI file.  See
  9594.             page 122 for instructions.
  9595.  
  9596.             If you define a keystroke alias like this:
  9597.  
  9598.                  c:\> alias @f5 = dir /w
  9599.  
  9600.             then, when you press the F5 key, NDOS will enter the
  9601.             value, "dir /w" on the command line for you.  You can
  9602.             type additional parameters if you wish and then press
  9603.             Enter to execute the command.  With this particular
  9604.             alias, you can define the files that you want to
  9605.             display after pressing F5 and before pressing Enter to
  9606.             execute the command.
  9607.  
  9608.             If you want the keystroke alias to take action
  9609.             automatically without waiting for you to edit the
  9610.             command line or press Enter, you must end the value
  9611.             with a carriage return.  To enter the carriage return
  9612.             into your alias use the NDOS escape character (normally
  9613.  
  9614. ___________________________________________________________________
  9615. NDOS Reference Manual                                          163
  9616.  
  9617.  
  9618. ___________________________________________________________________
  9619.  
  9620.             Ctrl-X, shown here as an up arrow []) twice, followed
  9621.             by an "r."  For example, this command will assign an
  9622.             alias to the F6 key that uses the CDD command to take
  9623.             you back to the previous default directory:
  9624.  
  9625.                  c:\> alias @f6 = cdd -r
  9626.  
  9627.             If you define a keystroke alias in an ALIAS /R file and
  9628.             you want an the alias to start automatically, use a
  9629.             single  character before the "r" at the end of the
  9630.             line.  The double  is only required when the alias is
  9631.             defined on the command line or in a batch file.
  9632.  
  9633.             If you want to see a list of all current ALIAS
  9634.             commands, type
  9635.  
  9636.                  c:\> alias
  9637.  
  9638.             You can also view the definition of a single alias.  If
  9639.             you want to see the definition of the alias LIST, you
  9640.             can type
  9641.  
  9642.                  c:\> alias list
  9643.  
  9644.             You can save the list to a file called ALIAS.LST this
  9645.             way:
  9646.  
  9647.                  c:\> alias > alias.lst
  9648.  
  9649.             You can then reload all the alias definitions in the
  9650.             file the next time you boot up with the command
  9651.  
  9652.                  c:\> alias /r alias.lst
  9653.  
  9654.             This is much faster than defining each alias
  9655.             individually in a batch file.  If you keep your alias
  9656.             definitions in a separate file which you load from
  9657.             AUTOEXEC.BAT, you can edit them with a text editor,
  9658.             reload the edited file with the ALIAS /R command, and
  9659.             know that the same alias list will be loaded the next
  9660.             time you boot your computer.
  9661.  
  9662.             When you define aliases in a file that will be read
  9663.             with the ALIAS /R command, you should NOT use back
  9664.             quotes around the value, even if back quotes would
  9665.             normally be required when defining the same alias at
  9666.             the command line or in a batch file.
  9667.  
  9668.             To remove an alias, use the UNALIAS command.
  9669.  
  9670.  
  9671. ___________________________________________________________________
  9672. NDOS Reference Manual                                          164
  9673.  
  9674.  
  9675. ___________________________________________________________________
  9676.  
  9677.         ##  Alias commands can use command-line arguments or
  9678.             replaceable parameters like those in batch files.  NDOS
  9679.             numbers the command line arguments from %1 to %127.  It
  9680.             is up to the alias to determine the meaning of each
  9681.             argument.  Arguments that are referred to in an alias,
  9682.             but which are missing on the command line, appear as
  9683.             empty strings inside the alias.
  9684.  
  9685.             The parameter %n& has a special meaning.  NDOS
  9686.             interprets it to mean "the entire command line, from
  9687.             argument n to the end."  If n is not specified, it has
  9688.             a default value of one, so %& means "the entire command
  9689.             line after the alias name."  The special parameter %#
  9690.             contains the number of command line arguments.
  9691.  
  9692.             For example, the following alias will change
  9693.             directories, perform a command, and return to the
  9694.             original directory:
  9695.  
  9696.                  c:\> alias in `pushd %1 ^ %2& ^ popd`
  9697.  
  9698.             When this alias is invoked as:
  9699.  
  9700.                  c:\> in c:\comm mycomm /xmodem /2400
  9701.  
  9702.             the first replaceable parameter, %1, has the value
  9703.             "c:\comm."  %2 is "mycomm," %3 is "/xmodem," and %4 is
  9704.             "/2400".  NDOS expands the command line into these
  9705.             three separate commands:
  9706.  
  9707.                  pushd c:\comm
  9708.                  mycomm /xmodem /2400
  9709.                  popd
  9710.  
  9711.         ##  This next example uses the IFF command to redefine the
  9712.             defaults for SET only if no other options are entered
  9713.             on the command line.  This ALIAS command should be
  9714.             entered on one line:
  9715.  
  9716.                  c:\> alias set = `iff %#==0 then ^ *set /p ^
  9717.                       else ^ *set %& ^ endiff`
  9718.  
  9719.             This example modifies the SET command so that if SET is
  9720.             entered with no arguments, it is replaced by SET /P
  9721.             (pause after displaying each page), but if SET is
  9722.             followed by an argument, it behaves normally.  Note the
  9723.             use of asterisks (*set) to prevent alias loops.
  9724.  
  9725.         ##  If an alias uses replaceable parameters, NDOS will
  9726.             delete command line arguments up to and including the
  9727.  
  9728. ___________________________________________________________________
  9729. NDOS Reference Manual                                          165
  9730.  
  9731.  
  9732. ___________________________________________________________________
  9733.  
  9734.             highest referenced argument.  For example, if you have
  9735.             an alias which refers only to %1 and %4, then the first
  9736.             and fourth arguments passed to the alias will be used,
  9737.             the second and third arguments will be discarded, and
  9738.             any additional arguments beyond the fourth will be
  9739.             appended to the end of the expanded command after the
  9740.             value portion of the alias.  If an alias uses no
  9741.             replaceable parameters, all of the command line
  9742.             arguments will be appended to the expanded command.
  9743.  
  9744.         ##  Aliases also have full access to all variables in the
  9745.             environment, NDOS internal variables, and NDOS variable
  9746.             functions.  For example, you can create a simple
  9747.             command-line calculator this way (enter this on one
  9748.             line):
  9749.  
  9750.                  c:\> alias calc = echo The answer is:
  9751.                       %@eval[%&]
  9752.  
  9753.             Now, if you enter
  9754.  
  9755.                  c:\> calc 5 * 6
  9756.  
  9757.             NDOS will display
  9758.  
  9759.                  The answer is: 30
  9760.  
  9761.         ##  Aliases created in the primary shell will be inherited
  9762.             automatically in a secondary shell.  However, an alias
  9763.             created in a secondary shell will not be passed back to
  9764.             a primary or parent shell.
  9765.  
  9766. Options:    /P(ause):  This option is only effective when ALIAS is
  9767.             used to display existing definitions.  It pauses the
  9768.             display after each page and waits for a keystroke
  9769.             before continuing.
  9770.  
  9771.             /R(ead file):  This option loads an alias list from a
  9772.             file.  The format of the file is the same as that of
  9773.             the ALIAS display:
  9774.  
  9775.                       name=value
  9776.  
  9777.             where name is the name of the alias and value is its
  9778.             value.  You can use an equal sign [=] or space to
  9779.             separate the name and value.  Back quotes should NOT be
  9780.             used around the value.  You can add comments to the
  9781.             file by starting each comment line with a colon [:].
  9782.             You can load multiple files with one ALIAS /R command
  9783.  
  9784.  
  9785. ___________________________________________________________________
  9786. NDOS Reference Manual                                          166
  9787.  
  9788.  
  9789. ___________________________________________________________________
  9790.  
  9791.             by placing the names one after another on the command
  9792.             line, separated by spaces:
  9793.  
  9794.                  c:\> alias /r alias1.lst alias2.lst
  9795.  
  9796.             Lines in an ALIAS /R file can be up to 511 characters
  9797.             long.
  9798.  
  9799.  
  9800.  
  9801.  
  9802.  
  9803.  
  9804.  
  9805.  
  9806.  
  9807.  
  9808.  
  9809.  
  9810.  
  9811.  
  9812.  
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.  
  9842. ___________________________________________________________________
  9843. NDOS Reference Manual                                          167
  9844.  
  9845.  
  9846. ___________________________________________________________________
  9847.  
  9848. ATTRIB                                                        (New)
  9849.  
  9850. Purpose:    Change or view file and subdirectory attributes.
  9851.  
  9852. Format:     ATTRIB [/D /P /Q /S] [+|-[AHRS]] files
  9853.  
  9854.             files: A file, directory, or list of files or
  9855.             directories, on which to operate.
  9856.  
  9857.             /D(irectories)              /Q(uiet)
  9858.             /P(ause)                    /S(ubdirectories)
  9859.  
  9860.             Attribute flags:
  9861.  
  9862.                  +A   Set the archive attribute
  9863.                  -A   Clear the archive attribute
  9864.                  +H   Set the hidden attribute
  9865.                  -H   Clear the hidden attribute
  9866.                  +R   Set the read-only attribute
  9867.                  -R   Clear the read-only attribute
  9868.                  +S   Set the system attribute
  9869.                  -S   Clear the system attribute
  9870.  
  9871. Usage:      Every file and subdirectory has four attributes that can
  9872.             be turned on (set) or turned off (cleared): Archive,
  9873.             Hidden, Read-only, and System.  DOS sets the Archive
  9874.             attribute every time a file is updated or changed.
  9875.             Backup utilities often use this attribute to find files
  9876.             that have changed since the last general backup.  DOS
  9877.             prevents programs from altering or erasing files that
  9878.             have the Read-only attribute set (but applications can
  9879.             change the attribute first and then update or erase the
  9880.             file).  Files with Hidden and/or System attributes are
  9881.             normally not visible in directory listings.
  9882.  
  9883.             The ATTRIB command lets you set or clear any
  9884.             attribute(s) for any file, group of files, or
  9885.             subdirectory.  You can view file attributes by entering
  9886.             ATTRIB without specifying new attributes (i.e. without
  9887.             the [+|-[AHRS]] part of the format), or with the DIR /T
  9888.             command.
  9889.  
  9890.             For example, you can set the read-only and hidden
  9891.             attributes for the file MEMO:
  9892.  
  9893.                  c:\> attrib +rh memo
  9894.  
  9895.             Attribute options apply to the file(s) that follow the
  9896.             options on the ATTRIB command line.  The example below
  9897.             shows how to set different attributes on different
  9898.  
  9899. ___________________________________________________________________
  9900. NDOS Reference Manual                                          168
  9901.  
  9902.  
  9903. ___________________________________________________________________
  9904.  
  9905.             files with a single command.  It sets the archive
  9906.             attribute for all .TXT files, and changes TEST.COM to
  9907.             system and not modified:
  9908.  
  9909.                  c:\> attrib +a *.txt +s -a test.com
  9910.  
  9911.         ##  You may know that DOS also supports "D" (subdirectory)
  9912.             and "V" (volume label) attributes.  These attributes
  9913.             cannot be altered with ATTRIB;  they are designed to be
  9914.             controlled only by DOS itself.
  9915.  
  9916. Options:    /D(irectories):  If you don't use this option, ATTRIB
  9917.             will only modify file attributes.  If you use the /D
  9918.             option, ATTRIB will also modify the attributes of
  9919.             subdirectories (yes, you can have a hidden
  9920.             subdirectory):
  9921.  
  9922.                  c:\> attrib /d +h c:\mydir
  9923.  
  9924.             /P(ause):  Wait for a key to be pressed after each
  9925.             screen page before continuing the display.
  9926.  
  9927.             /Q(uiet):  This option turns off the ATTRIB normal
  9928.             screen output.  It is most useful in batch files.
  9929.  
  9930.             /S(ubdirectories):  If you use the /S option, the
  9931.             ATTRIB command will be applied to all matching files in
  9932.             the current or named directory and all of its
  9933.             subdirectories.
  9934.  
  9935.  
  9936.  
  9937.  
  9938.  
  9939.  
  9940.  
  9941.  
  9942.  
  9943.  
  9944.  
  9945.  
  9946.  
  9947.  
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956. ___________________________________________________________________
  9957. NDOS Reference Manual                                          169
  9958.  
  9959.  
  9960. ___________________________________________________________________
  9961.  
  9962. BEEP                                                          (New)
  9963.  
  9964. Purpose:    Beep the speaker or play simple music.
  9965.  
  9966. Format:     BEEP [frequency duration ...]
  9967.  
  9968.             frequency  is in Hertz (cycles per second).
  9969.             duration  is in 1/18th second intervals
  9970.  
  9971. Usage:      BEEP generates a sound through your computer's speaker.
  9972.             It is normally used in batch files to signal that an
  9973.             operation has been completed, or that the computer
  9974.             needs attention.
  9975.  
  9976.             Because BEEP allows you to specify the frequency and
  9977.             duration of the sound, you can also use it to play
  9978.             simple music or to create different kinds of signals
  9979.             for the user.
  9980.  
  9981.             You can include as many frequency and duration pairs as
  9982.             you wish.  No sound will be generated for frequencies
  9983.             less than 20 Hz, allowing you to insert short delays.
  9984.             The default value for frequency is 440 Hz; the default
  9985.             value for duration is two.
  9986.  
  9987.             This batch file fragment runs a program called DEMO,
  9988.             then plays a few notes and waits for you to press a
  9989.             key:
  9990.  
  9991.                  demo ^ beep 440 4  600 2  1040 6
  9992.                  pause Finished with the demo - hit a key...
  9993.  
  9994.             The following table gives the frequency values for a
  9995.             five octave range (middle C is 262 Hz):
  9996.  
  9997.  
  9998.                  C      131   262   523   1046  2093
  9999.  
  10000.                  C#/Db  139   277   554   1108  2217
  10001.  
  10002.                  D      147   294   587   1174  2349
  10003.  
  10004.                  D#/Eb  156   311   622   1244  2489
  10005.  
  10006.                  E      165   330   659   1318  2637
  10007.  
  10008.                  F      175   349   698   1397  2794
  10009.  
  10010.                  F#/Gb  185   370   740   1480  2960
  10011.  
  10012.  
  10013. ___________________________________________________________________
  10014. NDOS Reference Manual                                          170
  10015.  
  10016.  
  10017. ___________________________________________________________________
  10018.  
  10019.  
  10020.                  G      196   392   784   1568  3136
  10021.  
  10022.                  G#/Ab  208   415   831   1662  3322
  10023.  
  10024.                  A      220   440   880   1760  3520
  10025.  
  10026.                  A#/Bb  233   466   932   1864  3729
  10027.  
  10028.                  B      248   494   988   1976  3951
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.  
  10035.  
  10036.  
  10037.  
  10038.  
  10039.  
  10040.  
  10041.  
  10042.  
  10043.  
  10044.  
  10045.  
  10046.  
  10047.  
  10048.  
  10049.  
  10050.  
  10051.  
  10052.  
  10053.  
  10054.  
  10055.  
  10056.  
  10057.  
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.  
  10066.  
  10067.  
  10068.  
  10069.  
  10070. ___________________________________________________________________
  10071. NDOS Reference Manual                                          171
  10072.  
  10073.  
  10074. ___________________________________________________________________
  10075.  
  10076. BREAK                                                  (Compatible)
  10077.  
  10078. Purpose:    Display, enable, or disable Ctrl-C and Ctrl-BREAK
  10079.             checking.
  10080.  
  10081. Format:     BREAK [ON | OFF]
  10082.  
  10083. Usage:      The Ctrl-C and Ctrl-Break keys are used by many
  10084.             programs (including NDOS) as a signal to interrupt the
  10085.             current operation.  BREAK controls how often DOS checks
  10086.             to see if you've entered one of these keystrokes.
  10087.  
  10088.             Normally, BREAK is turned off, and DOS only checks for
  10089.             Ctrl-C and Ctrl-Break keystrokes during normal DOS
  10090.             input or output operations involving the screen,
  10091.             keyboard, serial port, and printer.  However many
  10092.             programs don't use DOS for these operations, and it can
  10093.             be difficult to interrupt them.
  10094.  
  10095.             When BREAK is turned ON, DOS checks for Ctrl-C and
  10096.             Ctrl-Break every time a program calls DOS.  Since most
  10097.             programs use DOS to access files and perform other
  10098.             functions, turning BREAK on makes it much more likely
  10099.             that a Ctrl-C or Ctrl-Break will be noticed.  If you
  10100.             turn BREAK on, programs will run slightly slower than
  10101.             normal (the difference is not usually noticeable), but
  10102.             you will be able to break out of some programs more
  10103.             easily.
  10104.  
  10105.             Turning BREAK on or off only affects when DOS detects
  10106.             Ctrl-C and Ctrl-Break and notifies the program you're
  10107.             running.  Any program can choose to ignore these
  10108.             signals, in which case the BREAK setting won't affect
  10109.             that program's behavior.  Also, any external program
  10110.             can change the BREAK setting on its own.
  10111.  
  10112.             Type BREAK by itself to display the current BREAK
  10113.             status:
  10114.  
  10115.                  c:\> break
  10116.                  BREAK is OFF
  10117.  
  10118.             Type BREAK plus ON or OFF to set the BREAK status:
  10119.  
  10120.                  c:\> break on
  10121.  
  10122.             BREAK is off by default.  You can change the default by
  10123.             adding a BREAK=ON command to your CONFIG.SYS file.
  10124.  
  10125.  
  10126.  
  10127. ___________________________________________________________________
  10128. NDOS Reference Manual                                          172
  10129.  
  10130.  
  10131. ___________________________________________________________________
  10132.  
  10133. CALL                                                   (Compatible)
  10134.  
  10135. Purpose:    Execute one batch file from within another.
  10136.  
  10137. Format:     CALL file
  10138.  
  10139.             file: The batch file to execute.
  10140.  
  10141.             See also CANCEL and QUIT.
  10142.  
  10143. Usage:      CALL allows batch files to call other batch files
  10144.             (batch file nesting) without starting a secondary copy
  10145.             of the command processor.  The calling batch file is
  10146.             suspended while the called (second) batch file runs.
  10147.             When the second batch file finishes, the original batch
  10148.             file resumes execution at the next command.  If you
  10149.             execute a batch file from inside another batch file
  10150.             without using CALL, the first batch file is terminated
  10151.             before the second one starts.
  10152.  
  10153.             The following batch file fragment compares an input
  10154.             line to "wp" and calls another batch file if it
  10155.             matches:
  10156.  
  10157.                  input  Enter your choice:  %%option
  10158.                  if "%option" == "wp" call wp.bat
  10159.  
  10160.             NDOS supports batch file nesting up to ten levels deep.
  10161.  
  10162.             The current ECHO state will be inherited by a called
  10163.             batch file.
  10164.  
  10165.         ##  A called batch file will return to the calling file
  10166.             after processing the last line in the called file, or
  10167.             when a QUIT command is executed.  A called batch file
  10168.             should always return in this way, or terminate all
  10169.             batch files with CANCEL.  Restarting (or CALLing) the
  10170.             original batch file from within a called file will
  10171.             prevent NDOS from detecting that you've left the second
  10172.             file, and it may cause an infinite loop or a stack
  10173.             overflow.
  10174.  
  10175.         ##  CALL returns an exit code which matches the batch file
  10176.             return code.  You can test this exit code with the %_?
  10177.             environment variable (see page 74), and use it with
  10178.             conditional commands (&& and ||; see page 83).
  10179.  
  10180.  
  10181.  
  10182.  
  10183.  
  10184. ___________________________________________________________________
  10185. NDOS Reference Manual                                          173
  10186.  
  10187.  
  10188. ___________________________________________________________________
  10189.  
  10190. CANCEL                                                        (New)
  10191.  
  10192. Purpose:    Terminate batch file processing.
  10193.  
  10194. Format:     CANCEL
  10195.  
  10196.             See also: CALL and QUIT.
  10197.  
  10198. Usage:      The CANCEL command ends all batch file processing,
  10199.             regardless of the batch file nesting level.  Use QUIT
  10200.             to end a nested batch file and return to the previous
  10201.             batch file.
  10202.  
  10203.             You can CANCEL at any point in a batch file.  If CANCEL
  10204.             is used from within an alias it will end execution of
  10205.             both the alias and any batch file(s) which are running
  10206.             at the time.
  10207.  
  10208.             The following batch file fragment compares an input
  10209.             line to "end" and terminates all batch file processing
  10210.             if it matches:
  10211.  
  10212.                  input Enter your choice:  %%option
  10213.                  if "%option" == "end" cancel
  10214.  
  10215.  
  10216.  
  10217.  
  10218.  
  10219.  
  10220.  
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.  
  10228.  
  10229.  
  10230.  
  10231.  
  10232.  
  10233.  
  10234.  
  10235.  
  10236.  
  10237.  
  10238.  
  10239.  
  10240.  
  10241. ___________________________________________________________________
  10242. NDOS Reference Manual                                          174
  10243.  
  10244.  
  10245. ___________________________________________________________________
  10246.  
  10247. CD/CHDIR                                                 (Enhanced)
  10248.  
  10249. Purpose:    Display or change the current directory.
  10250.  
  10251. Format:     CD [ path | - ]
  10252.                  or
  10253.             CHDIR [ path | - ]
  10254.  
  10255.             path: The directory to change to, including an optional
  10256.             drive name.
  10257.  
  10258.             See also: CDD, MD, PUSHD, RD, and CDPATH on page 107.
  10259.  
  10260. Usage:      CD and CHDIR are synonyms.  You can use either one.
  10261.  
  10262.             CD lets you navigate through the DOS subdirectory
  10263.             structure by changing the current working directory.
  10264.             If you enter CD and a directory name, the named
  10265.             directory becomes the new current directory.  For
  10266.             example, to change to the subdirectory
  10267.             C:\FINANCE\MYFILES:
  10268.  
  10269.                  c:\> cd \finance\myfiles
  10270.                  c:\finance\myfiles>
  10271.  
  10272.             Every disk drive on the system has its own current
  10273.             directory.  Specifying both a drive and a directory in
  10274.             the CD command will change the current directory on the
  10275.             specified drive, but will not change the default drive.
  10276.             For example, to change the default directory on drive
  10277.             A:
  10278.  
  10279.                  c:\> cd a:\utility
  10280.                  c:\>
  10281.  
  10282.             Notice that this command does not change to drive A:.
  10283.             Use the CDD command to change both the drive and
  10284.             directory together.
  10285.  
  10286.             You can change to the parent directory with CD ..; you
  10287.             can also go up one additional directory level with each
  10288.             additional [.].  For example, CD .... will go up three
  10289.             levels in the directory tree.  You can move to a
  10290.             sibling directory -- one that branches from the same
  10291.             parent directory as the current subdirectory -- with
  10292.             the command CD ..\newdir.
  10293.  
  10294.             If you enter CD with no argument or with only a disk
  10295.             drive name, it will display the current directory on
  10296.             the default or named drive.
  10297.  
  10298. ___________________________________________________________________
  10299. NDOS Reference Manual                                          175
  10300.  
  10301.  
  10302. ___________________________________________________________________
  10303.  
  10304.             CD saves the current directory before changing to a new
  10305.             directory.  You can switch back to the previous
  10306.             directory by entering CD -.  (There must be a space
  10307.             between the CD command and the hyphen.)  You can switch
  10308.             back and forth between two directories by repeatedly
  10309.             entering CD -.  The saved directory is the same for
  10310.             both the CD and CDD commands.  Automatic directory
  10311.             changes (see page 54) also modify the saved directory,
  10312.             so you can use CD - to return to a directory that you
  10313.             exited with an automatic directory change.
  10314.  
  10315.         ##  CD never changes the default drive.  If you change
  10316.             directories on one drive, switch to another drive, and
  10317.             then enter CD -, the directory will be restored on the
  10318.             first drive but the current drive will not be changed.
  10319.  
  10320.         ##  If CD can't change to the specified directory, it will
  10321.             look for the CDPATH environment variable.  CD will
  10322.             append the specified directory name to each directory
  10323.             in CDPATH and attempt to change to that directory,
  10324.             until the first match or the end of the CDPATH
  10325.             argument.  This lets you use CDPATH as a quick way to
  10326.             find commonly used subdirectories which have unique
  10327.             names.  For example, if you are currently in the
  10328.             directory C:\WP\LETTERS\JANUARY and you'd like to
  10329.             change to C:\FINANCE\REPORTS, you could enter the
  10330.             command:
  10331.  
  10332.                  c:\wp\letters\january> cd \finance\reports
  10333.  
  10334.             However if the C:\FINANCE directory is listed in your
  10335.             CDPATH variable, and is the first directory in the list
  10336.             with a REPORTS subdirectory, you can simply enter the
  10337.             command:
  10338.  
  10339.                  c:\wp\letters\january> cd reports
  10340.  
  10341.             and NDOS will change to C:\FINANCE\REPORTS.
  10342.  
  10343.         ##  DOS will not accept directory names longer than 64
  10344.             characters.  You must be sure that the complete
  10345.             directory name from the root to your deepest
  10346.             subdirectory fits within the 64 character restriction.
  10347.  
  10348.  
  10349.  
  10350.  
  10351.  
  10352.  
  10353.  
  10354.  
  10355. ___________________________________________________________________
  10356. NDOS Reference Manual                                          176
  10357.  
  10358.  
  10359. ___________________________________________________________________
  10360.  
  10361. CDD                                                           (New)
  10362.  
  10363. Purpose:    Change the current disk drive and directory.
  10364.  
  10365. Format:     CDD path
  10366.  
  10367.             path:  The name of the directory (or drive and
  10368.             directory) to change to.
  10369.  
  10370.             See also: CD, MD, PUSHD, RD, and CDPATH on page 107.
  10371.  
  10372. Usage:      CDD is similar to the CD command, except that it also
  10373.             changes the default disk drive if one is specified.
  10374.             CDD will change to the directory and drive you name.
  10375.             To change from the root directory on drive A: to the
  10376.             subdirectory C:\WP:
  10377.  
  10378.                  a:\> cdd c:\wp
  10379.                  c:\wp>
  10380.  
  10381.             You can change to the parent directory with CDD ..; you
  10382.             can also go up one additional directory level with each
  10383.             additional [.].  For example, CDD .... will go up three
  10384.             levels in the directory tree.
  10385.  
  10386.             CDD saves the current drive and directory before
  10387.             changing to a new directory.  You can switch back to
  10388.             the previous drive and directory by entering CDD -.
  10389.             (There must be a space between the CDD command and the
  10390.             hyphen.)  You can switch back and forth between two
  10391.             drives and directories by repeatedly entering CDD -.
  10392.             The saved directory is the same for both the CD and CDD
  10393.             commands.  Drive changes and automatic directory
  10394.             changes (see page 54) also modify the saved directory,
  10395.             so you can use CDD - to return to a directory that you
  10396.             exited with a drive change or an automatic directory
  10397.             change.
  10398.  
  10399.         ##  If CDD can't change to the specified directory, it will
  10400.             look for the CDPATH environment variable.  CDD will
  10401.             append the specified directory name to each directory
  10402.             in CDPATH and attempt to change to that drive and
  10403.             directory, until the first match or the end of the
  10404.             CDPATH argument.  This allows you to use CDPATH as a
  10405.             quick way to find commonly used subdirectories which
  10406.             have unique names.  For example, if you are currently
  10407.             in the directory C:\WP\LETTERS\JANUARY and you'd like
  10408.             to change to D:\SOFTWARE\UTIL, you could enter the
  10409.             command:
  10410.  
  10411.  
  10412. ___________________________________________________________________
  10413. NDOS Reference Manual                                          177
  10414.  
  10415.  
  10416. ___________________________________________________________________
  10417.  
  10418.                  c:\wp\letters\january> cdd d:\software\util
  10419.  
  10420.             However if the D:\SOFTWARE directory is listed in your
  10421.             CDPATH variable, and is the first directory in the list
  10422.             with a UTIL subdirectory, you can simply enter the
  10423.             command:
  10424.  
  10425.                  c:\wp\letters\january> cdd util
  10426.  
  10427.             and NDOS will change to D:\SOFTWARE\UTIL.
  10428.  
  10429.         ##  DOS will not accept directory names longer than 64
  10430.             characters.  You must be sure that the complete
  10431.             directory name from the root to your deepest
  10432.             subdirectory fits within the 64 character restriction.
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.  
  10441.  
  10442.  
  10443.  
  10444.  
  10445.  
  10446.  
  10447.  
  10448.  
  10449.  
  10450.  
  10451.  
  10452.  
  10453.  
  10454.  
  10455.  
  10456.  
  10457.  
  10458.  
  10459.  
  10460.  
  10461.  
  10462.  
  10463.  
  10464.  
  10465.  
  10466.  
  10467.  
  10468.  
  10469. ___________________________________________________________________
  10470. NDOS Reference Manual                                          178
  10471.  
  10472.  
  10473. ___________________________________________________________________
  10474.  
  10475. CHCP                                                   (Compatible)
  10476.  
  10477. Purpose:    Display or change the current system code page.
  10478.  
  10479. Format:     CHCP [n]
  10480.  
  10481.             n: A system code page number.
  10482.  
  10483. ## Usage:   Code page switching allows you to select different
  10484.             character sets for language support.  To use
  10485.             code page switching, you must have an EGA or VGA
  10486.             display and MS-DOS or PC-DOS 3.3 or above.
  10487.  
  10488.             If you enter CHCP without a number, the current code
  10489.             page is displayed.
  10490.  
  10491.                  c:\> chcp
  10492.                  Active code page: 437
  10493.  
  10494.             If you enter CHCP plus a code page number, the system
  10495.             code page is changed.  For example, to set the code
  10496.             page to multilingual:
  10497.  
  10498.                  c:\> chcp 850
  10499.  
  10500.             Before using CHCP, you must first load the device
  10501.             drivers (in CONFIG.SYS); make sure the information file
  10502.             (COUNTRY.SYS) is available; load national language
  10503.             support (using the NLSFUNC command); and prepare the
  10504.             specified code page for the devices (using the MODE
  10505.             command with the CODEPAGE PREPARE option).
  10506.  
  10507.             CHCP accepts one of the two prepared system code pages.
  10508.             An error message is displayed if a code page is
  10509.             selected that has not been prepared for the system.
  10510.  
  10511.             See your DOS manual for more information on CHCP.
  10512.  
  10513.  
  10514.  
  10515.  
  10516.  
  10517.  
  10518.  
  10519.  
  10520.  
  10521.  
  10522.  
  10523.  
  10524.  
  10525.  
  10526. ___________________________________________________________________
  10527. NDOS Reference Manual                                          179
  10528.  
  10529.  
  10530. ___________________________________________________________________
  10531.  
  10532. CLS                                                      (Enhanced)
  10533.  
  10534. Purpose:    Clear the video display and move the cursor to the
  10535.             upper left corner;  optionally change the default
  10536.             display and border colors.
  10537.  
  10538. Format:     CLS [[BRIght] [BLInk] fg ON bg] [BORder bc]
  10539.  
  10540.             fg:  The new foreground color
  10541.             bg:  The new background color
  10542.             bc:  The new border color
  10543.  
  10544.             The available colors are:
  10545.  
  10546.               Black         Blue          Green         Red
  10547.               Magenta       Cyan          Yellow        White
  10548.  
  10549.             See also: COLOR.
  10550.  
  10551. Usage:      CLS can be used to clear the screen without changing
  10552.             colors, or to clear the screen and change the screen
  10553.             colors simultaneously.  These three examples show how
  10554.             to clear the screen to the default colors, to bright
  10555.             white letters on a blue background, and to bright
  10556.             yellow letters on a magenta background with a blue
  10557.             border:
  10558.  
  10559.                  c:\> cls
  10560.                  c:\> cls bright white on blue
  10561.                  c:\> cls bri yel on mag bor blu
  10562.  
  10563.             As shown in the last example, color names plus the
  10564.             words BRIGHT, BLINK, and BORDER may be shortened to the
  10565.             first three letters.
  10566.  
  10567.             If you use BRIGHT and/or BLINK, NDOS will apply the
  10568.             appropriate attribute to the foreground characters (PC
  10569.             displays do not allow a bright or blinking background).
  10570.  
  10571.             CLS is often used in batch files to clear the screen
  10572.             before displaying text.
  10573.  
  10574.         ##  If ANSI.SYS or a compatible driver is not loaded, the
  10575.             colors will not be "sticky" -- you may lose them after
  10576.             you run an application.  If NDOS thinks you have an
  10577.             ANSI driver loaded, it first tries an ANSI clear
  10578.             screen.  If that doesn't work, NDOS will call the BIOS
  10579.             to clear the screen.  You can force NDOS to recognize
  10580.             the ANSI state with the SETDOS /A option (see page 283)
  10581.             or the ANSI directive in NDOS.INI (see page 118).
  10582.  
  10583. ___________________________________________________________________
  10584. NDOS Reference Manual                                          180
  10585.  
  10586.  
  10587. ___________________________________________________________________
  10588.  
  10589.             If your display accommodates more than 25 rows by 80
  10590.             columns and CLS doesn't clear the whole screen, your
  10591.             ANSI driver probably does not support the large display
  10592.             size properly.
  10593.  
  10594.  
  10595.  
  10596.  
  10597.  
  10598.  
  10599.  
  10600.  
  10601.  
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.  
  10620.  
  10621.  
  10622.  
  10623.  
  10624.  
  10625.  
  10626.  
  10627.  
  10628.  
  10629.  
  10630.  
  10631.  
  10632.  
  10633.  
  10634.  
  10635.  
  10636.  
  10637.  
  10638.  
  10639.  
  10640. ___________________________________________________________________
  10641. NDOS Reference Manual                                          181
  10642.  
  10643.  
  10644. ___________________________________________________________________
  10645.  
  10646. COLOR                                                         (New)
  10647.  
  10648. Purpose:    Change the default display colors.
  10649.  
  10650. Format:     COLOR [BRIght] [BLInk] fg ON bg [BORder bc]
  10651.  
  10652.             fg:  The new foreground color
  10653.             bg:  The new background color
  10654.             bc:  The new border color
  10655.  
  10656.             The available colors are:
  10657.  
  10658.               Black         Blue          Green         Red
  10659.               Magenta       Cyan          Yellow        White
  10660.  
  10661.             See also: CLS.
  10662.  
  10663. Usage:      COLOR is normally used in batch files before displaying
  10664.             text.  To set screen colors to bright white on blue,
  10665.             you can use either of these commands:
  10666.  
  10667.                  c:\> color bright white on blue
  10668.                  c:\> color bri whi on blu
  10669.  
  10670.             As the examples show, you may shorten color names plus
  10671.             the words BRIGHT, BLINK, and BORDER to the first three
  10672.             letters.
  10673.  
  10674.             If you have an ANSI driver (such as ANSI.SYS)
  10675.             installed, COLOR will not change anything on the
  10676.             screen.  It will only set the default colors for
  10677.             subsequent screen displays.
  10678.  
  10679.             If you are not using an ANSI driver, COLOR will change
  10680.             the display colors of every character on the screen.
  10681.             However, the colors will not be "sticky" -- you may
  10682.             lose them after you run an application.
  10683.  
  10684.         ##  If you see odd characters like "[44;37m" when you try
  10685.             to set the screen colors, NDOS probably thinks you have
  10686.             an ANSI driver loaded when you don't.  Use SETDOS /A2,
  10687.             or ANSI = No in NDOS.INI, to tell NDOS you have no ANSI
  10688.             driver.
  10689.  
  10690.  
  10691.  
  10692.  
  10693.  
  10694.  
  10695.  
  10696.  
  10697. ___________________________________________________________________
  10698. NDOS Reference Manual                                          182
  10699.  
  10700.  
  10701. ___________________________________________________________________
  10702.  
  10703. COPY                                                     (Enhanced)
  10704.  
  10705. Purpose:    Copy data between disks, directories, files, or
  10706.             physical hardware devices (such as your printer or
  10707.             serial port).
  10708.  
  10709. Format:     COPY [/C /H /M /N /P /Q /S /R /U /V] source[+] ... [/A
  10710.             /B]
  10711.                  destination [/A /B]
  10712.  
  10713.             source: A file or list of files or a device to copy
  10714.             from.
  10715.             destination: A file, directory, or device to copy to.
  10716.  
  10717.             /A(SCII)                    /P(rompt)
  10718.             /B(inary)                   /Q(uiet)
  10719.             /C(hanged)                  /R(eplace)
  10720.             /H(idden)                   /S(ubdirectories)
  10721.             /M(odified)                      /U(pdate)
  10722.             /N(othing)                  /V(erify)
  10723.  
  10724.             See also: ATTRIB, MOVE, and REN.
  10725.  
  10726. Usage:      The NDOS COPY command accepts all traditional syntax
  10727.             and options and adds several new features.
  10728.  
  10729.             The simplest use of COPY is to make a copy of a file,
  10730.             like this example which makes a copy of a file called
  10731.             file1.abc:
  10732.  
  10733.                  c:\> copy file1.abc file2.def
  10734.  
  10735.             You can also copy a file to another drive and/or
  10736.             directory.  The following command copies file1 to the
  10737.             \MYDIR directory on drive E:
  10738.  
  10739.                  c:\> copy file1 e:\mydir
  10740.  
  10741.             You can copy several files at once by using wildcards:
  10742.  
  10743.                  c:\> copy *.txt e:\mydir
  10744.  
  10745.             (See page 64 for an explanation of how NDOS interprets
  10746.             the wildcard characters [*] and [?].)
  10747.  
  10748.             NDOS also lets you copy several files at one time.  The
  10749.             following command copies three files from the current
  10750.             directory to the \MYDIR directory on drive E:
  10751.  
  10752.                  c:\> copy file1 file2 file3 e:\mydir
  10753.  
  10754. ___________________________________________________________________
  10755. NDOS Reference Manual                                          183
  10756.  
  10757.  
  10758. ___________________________________________________________________
  10759.  
  10760.             The way COPY interprets your command line depends on
  10761.             how many arguments (file, directory, or device names)
  10762.             are on the line, and whether the arguments are
  10763.             separated with [+] signs or spaces.
  10764.  
  10765.             If there is only one argument on the line, COPY assumes
  10766.             it is the source, and uses the current drive and
  10767.             directory as the destination.  For example, the
  10768.             following command copies all the .DAT files on drive A:
  10769.             to the current directory on drive C:
  10770.  
  10771.                  c:\> copy a:*.dat
  10772.  
  10773.             If there are two or more arguments on the line and [+]
  10774.             signs are not used, then COPY assumes that the last
  10775.             argument is the destination and copies all source files
  10776.             to this new location.  If the destination is a drive,
  10777.             directory, or device name then the source files are
  10778.             copied individually to the new location.  If the
  10779.             destination is a filename, the first source file is
  10780.             copied to the destination, and any additional source
  10781.             files are then appended to the new destination file.
  10782.  
  10783.             For example, the first of these commands copies the
  10784.             .DAT files from the current directory on drive A:
  10785.             individually to C:\MYDIR (which must already exist as a
  10786.             directory);  the second appends all the .DAT files
  10787.             together into one large file called C:\DATA (assuming
  10788.             C:\DATA is not a directory):
  10789.  
  10790.                  c:>\ copy a:*.dat c:\mydir\
  10791.                  c:>\ copy a:*.dat c:\data
  10792.  
  10793.             When you copy to a directory, if you add a backslash
  10794.             [\] to the end of the name as shown in the first
  10795.             example above, COPY will display an error message if
  10796.             the name does not refer to an existing directory.  You
  10797.             can use this feature to keep COPY from treating a
  10798.             mistyped destination directory name as a filename and
  10799.             attempting to append all your source files to a
  10800.             destination file, when you really meant to copy them
  10801.             individually to a destination directory.
  10802.  
  10803.         ##  A plus [+] tells COPY to append two or more files to a
  10804.             single destination file.  If you list several source
  10805.             files separated with [+] and don't specify a
  10806.             destination, COPY will use the name of the first source
  10807.             file as the destination, and append each subsequent
  10808.             file to the first file.  In this case the destination
  10809.             file will always be created in the current directory,
  10810.  
  10811. ___________________________________________________________________
  10812. NDOS Reference Manual                                          184
  10813.  
  10814.  
  10815. ___________________________________________________________________
  10816.  
  10817.             even if the first source file is in another directory
  10818.             or on another drive.
  10819.  
  10820.             For example, the following command will append the
  10821.             contents of C:\MEMO2 and C:\MEMO3 to C:\MEMO1 and leave
  10822.             the combined contents in the file named C:\MEMO1:
  10823.  
  10824.                  c:\> copy memo1+memo2+memo3
  10825.  
  10826.             To append the same three files but store the result in
  10827.             BIGMEMO:
  10828.  
  10829.                  c:\> copy memo1+memo2+memo3 bigmemo
  10830.  
  10831.             To append C:\MEM\MEMO2 and C:\MEM\MEMO3 to
  10832.             D:\DATA\MEMO1, and leave the result in C:\MEM\MEMO1:
  10833.  
  10834.                  c:\mem> copy d:\data\memo1+memo2+memo3
  10835.  
  10836.         ##  You cannot append files to a device (such as a
  10837.             printer);  if you try to do so, COPY will ignore the
  10838.             [+] signs and copy the files individually.  If you
  10839.             attempt to append several source files to a destination
  10840.             directory or disk, COPY will append the files and place
  10841.             the copy in the new location with the same name as the
  10842.             first source file.
  10843.  
  10844.         ##  If your destination has wildcards in it, COPY will
  10845.             attempt to match them with the source names.  For
  10846.             example, this command copies the .DAT files from drive
  10847.             A: to C:\MYDIR and gives the new copies the extension
  10848.             .DX:
  10849.  
  10850.                  c:\> copy a:*.dat c:\mydir\*.dx
  10851.  
  10852.             This feature can give you unexpected results if you use
  10853.             it with multiple source filenames.  For example,
  10854.             suppose that drive A: contains XYZ.DAT and XYZ.TXT.  The
  10855.             command
  10856.  
  10857.                  c:\> copy a:\*.dat a:\*.txt c:\mydir\*.dx
  10858.  
  10859.             will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will
  10860.             copy A:XYZ.TXT to C:\MYDIR\XYZ.DX, overwriting the
  10861.             first file it copied.
  10862.  
  10863.         ##  COPY also understands include lists (see page 67), so
  10864.             you can specify several different kinds of files in the
  10865.             same command.  This command copies the .TXT, .DOC, and
  10866.  
  10867.  
  10868. ___________________________________________________________________
  10869. NDOS Reference Manual                                          185
  10870.  
  10871.  
  10872. ___________________________________________________________________
  10873.  
  10874.             .BAT files from the E:\MYDIR directory to the root
  10875.             directory of drive A:
  10876.  
  10877.                  c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  10878.  
  10879.         ##  COPY does not change a file's attributes.  The
  10880.             destination file will have the same attributes as the
  10881.             source file.
  10882.  
  10883. Options:    The /A(SCII) and /B(inary) options apply to the
  10884.             preceding filename and to all subsequent filenames on
  10885.             the command line until another /A or /B is entered.
  10886.             The other options (/C, /H, /M, /N, /P, /Q, /R, /S, /U,
  10887.             /V) apply to all filenames on the command line, no
  10888.             matter where you put them.  For example, either of the
  10889.             following commands could be used to copy a font file to
  10890.             the printer in binary mode:
  10891.  
  10892.                  c:\> copy /b myfont.dat prn
  10893.                  c:\> copy myfont.dat /b prn
  10894.  
  10895.             Some options do not make sense in certain contexts, in
  10896.             which case COPY will ignore them.  For example, you
  10897.             cannot prompt before replacing an existing file when
  10898.             the destination is a device such as the printer --
  10899.             there's no such thing as an "existing file" on the
  10900.             printer.  If you use conflicting output options, like
  10901.             /Q and /P, NDOS will take a "conservative" approach and
  10902.             give priority to the option which generates more
  10903.             prompts or more information.
  10904.  
  10905.             Options used in less common situations have been marked
  10906.             with ## below.  Remember that the options are in
  10907.             alphabetical order, so more basic options are
  10908.             interspersed with those marked with ##.
  10909.  
  10910.         ##  /A(SCII):  If you use /A with a source filename, NDOS
  10911.             will copy the file up to, but not including, the first
  10912.             Ctrl-Z (Control-Z or ASCII 26) character in the file.
  10913.             If you use /A with a destination filename, NDOS will
  10914.             add a Ctrl-Z to the end of the file (some application
  10915.             programs use the Ctrl-Z to mark the end of a file).
  10916.             NDOS defaults to /A when appending files.
  10917.  
  10918.         ##  /B(inary):  If you use /B with a source filename, NDOS
  10919.             will copy the entire file.  Using /B with a destination
  10920.             filename prevents NDOS from adding a Ctrl-Z to the end
  10921.             of the destination file.  NDOS defaults to /B for
  10922.             normal file copies.
  10923.  
  10924.  
  10925. ___________________________________________________________________
  10926. NDOS Reference Manual                                          186
  10927.  
  10928.  
  10929. ___________________________________________________________________
  10930.  
  10931.             /C(hanged files):  Copy files only if the destination
  10932.             file exists and is older than the source (see also /U).
  10933.             This option is useful for updating the files in one
  10934.             directory from those in another without copying any
  10935.             newly created files.
  10936.  
  10937.         ##  /H(idden):  Copy all matching files including those
  10938.             with the hidden and/or system attribute set (see
  10939.             ATTRIB).
  10940.  
  10941.             /M(odified):  Copy only those files with the archive
  10942.             bit set (see ATTRIB), i.e. those which have been
  10943.             modified since the last backup.  The archive bit will
  10944.             NOT be cleared after copying.
  10945.  
  10946.         ##  /N(othing):  Do everything except actually perform the
  10947.             copy.  This option is most useful for testing what the
  10948.             result of a complex COPY command will be.
  10949.  
  10950.             /P(rompt):  Ask the user to confirm each source file by
  10951.             pressing Y or N.  An N response will skip that
  10952.             particular file and continue with the rest of the
  10953.             command.
  10954.  
  10955.             /Q(uiet):  Turn off the display of the files copied.
  10956.             This option is most often used in batch files.
  10957.  
  10958.             /R(eplace):  Prompt the user before overwriting an
  10959.             existing file.
  10960.  
  10961.             /S(ubdirectories):  Copy the subdirectory tree starting
  10962.             with the files in the source directory plus each
  10963.             subdirectory below that.  The destination must be a
  10964.             directory;  if it doesn't exist, COPY will attempt to
  10965.             create it.  COPY will also attempt to create needed
  10966.             subdirectories on the tree below the destination,
  10967.             including empty source directories.
  10968.  
  10969.             /U(pdate):  Copy each source file only if it is newer
  10970.             than a matching destination file or if a matching
  10971.             destination file does not exist (see also /C).  This
  10972.             option is useful for keeping one directory matched with
  10973.             another with a minimum of copying.
  10974.  
  10975.         ##  /V(erify):  Verify each disk write.  This is the same
  10976.             as executing the VERIFY ON command, but is only active
  10977.             during the COPY.  /V does not read back the file and
  10978.             compare its contents with what was written;  it only
  10979.             verifies that the data written to disk is physically
  10980.             readable.
  10981.  
  10982. ___________________________________________________________________
  10983. NDOS Reference Manual                                          187
  10984.  
  10985.  
  10986. ___________________________________________________________________
  10987.  
  10988. CTTY                                                   (Compatible)
  10989.  
  10990. Purpose:    Change the default console device.
  10991.  
  10992. Format:     CTTY device
  10993.  
  10994.             device:  The new console device.
  10995.  
  10996. ##  Usage:  Normally, NDOS uses the keyboard as the standard input
  10997.             device and the display as the standard output device.
  10998.             Together, the keyboard and display are known as the
  10999.             console or CON.  The CTTY command allows you to
  11000.             substitute another device that can perform standard
  11001.             character I/O for the console.
  11002.  
  11003.             For example to change the console to the first serial
  11004.             port:
  11005.  
  11006.                  c:\> ctty com1
  11007.  
  11008.             Change the console back to the standard keyboard and
  11009.             display (this command must be entered from the current
  11010.             console, e.g. a terminal attached to COM1, or from a
  11011.             batch file):
  11012.  
  11013.                  c:\> ctty con
  11014.  
  11015.             CTTY works only for programs and commands that use
  11016.             standard DOS input and output functions.  This includes
  11017.             all NDOS internal commands except DRAWBOX, DRAWHLINE,
  11018.             DRAWVLINE, LIST, SCREEN, SCRPUT, SELECT, and VSCRPUT.
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.  
  11029.  
  11030.  
  11031.  
  11032.  
  11033.  
  11034.  
  11035.  
  11036.  
  11037.  
  11038.  
  11039. ___________________________________________________________________
  11040. NDOS Reference Manual                                          188
  11041.  
  11042.  
  11043. ___________________________________________________________________
  11044.  
  11045. DATE                                                   (Compatible)
  11046.  
  11047. Purpose:    Display and optionally change the system date.
  11048.  
  11049. Format:     DATE [mm-dd-yy]
  11050.  
  11051.             mm:  The month (01 - 12)
  11052.  
  11053.             dd:  The day  (01 - 31)
  11054.  
  11055.             yy:  The year (80 - 99 = 1980 - 1999, or enter a four-
  11056.             digit year)
  11057.  
  11058.             See also: TIME.
  11059.  
  11060. Usage:      If you simply type DATE without any parameters, NDOS
  11061.             will display the current system date and time, and
  11062.             prompt you for a new date.  Press ENTER if you don't
  11063.             wish to change the date.  If you type a new date, it
  11064.             will become the current system date, which is included
  11065.             in the directory entry of each file as it is created or
  11066.             altered:
  11067.  
  11068.                  c:\> date
  11069.                  Wed  Sep 16, 1992  9:30:06
  11070.                  Enter new date (mm-dd-yy):
  11071.  
  11072.             You can also enter a new system date by typing the DATE
  11073.             command plus the new date on the command line:
  11074.  
  11075.                  c:\> date 9/16/92
  11076.  
  11077.             You can use hyphens, slashes, or periods to separate
  11078.             the month, day, and year entries.  A full four-digit
  11079.             year can be entered if you wish.
  11080.  
  11081.             The format for the date entry depends on the country
  11082.             code defined in the CONFIG.SYS file or by the CHCP
  11083.             command.  The default format is U.S. (mm-dd-yy).  The
  11084.             European format is dd-mm-yy; the Japanese is yy-mm-dd.
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.  
  11092.  
  11093.  
  11094.  
  11095.  
  11096. ___________________________________________________________________
  11097. NDOS Reference Manual                                          189
  11098.  
  11099.  
  11100. ___________________________________________________________________
  11101.  
  11102. DEL/ERASE                                                (Enhanced)
  11103.  
  11104. Purpose:    Erase one file, a group of files, or entire
  11105.             subdirectories.
  11106.  
  11107. Format:     DEL [/N /P /Q /S /X /Y /Z] file...
  11108.                  or
  11109.             ERASE [/N /P /Q /S /X /Y /Z] file...
  11110.  
  11111.             file:  The file, subdirectory, or list of files or
  11112.             subdirectories to erase.
  11113.  
  11114.             /N(othing)           /X (remove empty subdirectories)
  11115.             /P(rompt)            /Y(es to all prompts)
  11116.             /Q(uiet)             /Z(ap hidden and read-only files)
  11117.             /S(ubdirectories)
  11118.  
  11119. Usage:      DEL and ERASE are synonyms, you can use either one.
  11120.  
  11121.             Use the DEL and ERASE commands with caution; the files
  11122.             and subdirectories that you erase may be impossible to
  11123.             recover without specialized utilities and a lot of
  11124.             work.
  11125.  
  11126.             To erase a single file, simply enter the filename:
  11127.  
  11128.                  c:\> del letters.txt
  11129.  
  11130.             Like all NDOS file processing commands, DEL accepts
  11131.             multiple filenames, wildcards (see page 64), and
  11132.             include lists (see page 67).  For example, to erase all
  11133.             the files in the current directory with a .BAK or .PRN
  11134.             extension:
  11135.  
  11136.                  c:\> del *.bak *.prn
  11137.  
  11138.             If you enter a subdirectory name, or a filename
  11139.             composed only of wildcards (* and/or ?), DEL asks for
  11140.             confirmation (Y or N) unless you specified the /Y
  11141.             option.  If you respond with a Y, DEL will delete all
  11142.             the files in that subdirectory (except hidden, system,
  11143.             and read-only files, unless you have used the /Z
  11144.             option).
  11145.  
  11146.         ##  DEL returns a non-zero exit code if no files are
  11147.             deleted.  You can test this exit code with the %_?
  11148.             environment variable (see page 74), and use it with
  11149.             conditional commands (&& and ||; see page 83).
  11150.  
  11151. ___________________________________________________________________
  11152. NDOS Reference Manual                                          190
  11153.  
  11154.  
  11155. ___________________________________________________________________
  11156.  
  11157. Options:##  /N(othing):  Do everything except actually delete the
  11158.             file(s).  This is useful for testing what the result of
  11159.             a DEL would be.
  11160.  
  11161.             /P(rompt):  Ask the user to confirm each erasure by
  11162.             pressing Y or N.  An N response will skip that
  11163.             particular erasure.
  11164.  
  11165.             /Q(uiet):  Don't display filenames as they are deleted.
  11166.             DEL will run fastest if you specify the /Q option and
  11167.             the filename doesn't use the extended NDOS wildcards.
  11168.  
  11169.             /S(ubdirectories):  Delete the specified files in this
  11170.             directory and all of its subdirectories.  This is like
  11171.             a GLOBAL DEL, and can be used to delete all the files
  11172.             in a subdirectory tree or even a whole disk.  It should
  11173.             be used with caution!
  11174.  
  11175.         ##  /X (remove empty subdirectories):  Remove empty
  11176.             subdirectories after deleting (only useful when used
  11177.             with /S).
  11178.  
  11179.         ! ##/Y(es):  The reverse of /P -- it assumes a Y
  11180.             response to everything, including deleting an entire
  11181.             subdirectory tree.  NDOS normally prompts before
  11182.             deleting files when the name consists only of wildcards
  11183.             or a subdirectory name (see above); /Y overrides this
  11184.             protection, and should be used with extreme caution!
  11185.  
  11186.         ! ##/Z(ap):  Delete read-only, hidden, and system
  11187.             files as well as normal files.  Files with the read-
  11188.             only, hidden, or system attribute set are normally
  11189.             protected from deletion; /Z overrides this protection,
  11190.             and should be used with extreme caution.  Because
  11191.             EXCEPT works by hiding files, /Z will override an
  11192.             EXCEPT command.
  11193.  
  11194.             For example, to delete the entire subdirectory tree
  11195.             starting with C:\UTIL, including hidden and read-only
  11196.             files, without prompting (use this command with
  11197.             CAUTION!):
  11198.  
  11199.                  c:\> del /s/x/y/z c:\util\
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208. ___________________________________________________________________
  11209. NDOS Reference Manual                                          191
  11210.  
  11211.  
  11212. ___________________________________________________________________
  11213.  
  11214. DELAY                                                         (New)
  11215.  
  11216. Purpose:    Pause for a specified length of time.
  11217.  
  11218. Format:     DELAY [seconds]
  11219.  
  11220.             seconds: the number of seconds to delay.
  11221.  
  11222. Usage:      DELAY is useful in batch file loops while waiting for
  11223.             something to occur.  To wait for ten seconds:
  11224.  
  11225.                  delay 10
  11226.  
  11227.             A simple loop could make a tone with the BEEP command
  11228.             to get the operator's attention and then DELAY for 60
  11229.             seconds while it waits for the user to respond.
  11230.  
  11231.         ##  For delays shorter than one second, use the BEEP
  11232.             command with an inaudible frequency (below 20 Hz).
  11233.  
  11234.             You can cancel a delay by pressing Ctrl-C or Ctrl-
  11235.             Break.
  11236.  
  11237.  
  11238.  
  11239.  
  11240.  
  11241.  
  11242.  
  11243.  
  11244.  
  11245.  
  11246.  
  11247.  
  11248.  
  11249.  
  11250.  
  11251.  
  11252.  
  11253.  
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265. ___________________________________________________________________
  11266. NDOS Reference Manual                                          192
  11267.  
  11268.  
  11269. ___________________________________________________________________
  11270.  
  11271. DESCRIBE                                                      (New)
  11272.  
  11273. Purpose:    Create, modify, or delete file and subdirectory
  11274.             descriptions.
  11275.  
  11276. Format:     DESCRIBE file ["description"] ...
  11277.  
  11278.             file:  The file or files to operate on.
  11279.             "description":  The description to attach to the file.
  11280.  
  11281. Usage:      DESCRIBE adds descriptions to DOS files and
  11282.             subdirectories.  The descriptions are displayed by DIR
  11283.             in single-column mode and by SELECT.  Descriptions let
  11284.             you identify your files in much more meaningful ways
  11285.             than DOS allows in an eight-character filename.
  11286.  
  11287.             You enter a description on the command line by typing
  11288.             the DESCRIBE command, the filename, and the description
  11289.             in quotation marks, like this:
  11290.  
  11291.                  c:\> describe memo.txt "Memo to Bob about party"
  11292.  
  11293.             If you don't put a description on the command line,
  11294.             DESCRIBE will prompt you for it:
  11295.  
  11296.                  c:\> describe memo.txt
  11297.                  Describe "memo.txt" : Memo to Bob about party
  11298.  
  11299.             If you use wildcards or multiple filenames with the
  11300.             DESCRIBE command and don't include the description
  11301.             text, you will be prompted to enter a description for
  11302.             each file.  If you do include the description on the
  11303.             command line, all matching files will be given the same
  11304.             description.
  11305.  
  11306.             Each description can be up to 40 characters long.  You
  11307.             can change this limit with the DescriptionMax directive
  11308.             in NDOS.INI (see page 118).  DESCRIBE can edit
  11309.             descriptions longer than DescriptionMax (up to a limit
  11310.             of 120 characters), but will not allow you to lengthen
  11311.             the existing text.
  11312.  
  11313.             NDOS stores the descriptions in each directory in a
  11314.             hidden file called DESCRIPT.ION.  Use the ATTRIB
  11315.             command to "unhide" this file if you need to copy or
  11316.             delete it.
  11317.  
  11318.             The description file is modified appropriately whenever
  11319.             you perform an internal command which affects it (such
  11320.  
  11321.  
  11322. ___________________________________________________________________
  11323. NDOS Reference Manual                                          193
  11324.  
  11325.  
  11326. ___________________________________________________________________
  11327.  
  11328.             as COPY, MOVE, DEL, or RENAME), but not if you use an
  11329.             external program (such as XCOPY) or a visual shell.
  11330.  
  11331.  
  11332.  
  11333.  
  11334.  
  11335.  
  11336.  
  11337.  
  11338.  
  11339.  
  11340.  
  11341.  
  11342.  
  11343.  
  11344.  
  11345.  
  11346.  
  11347.  
  11348.  
  11349.  
  11350.  
  11351.  
  11352.  
  11353.  
  11354.  
  11355.  
  11356.  
  11357.  
  11358.  
  11359.  
  11360.  
  11361.  
  11362.  
  11363.  
  11364.  
  11365.  
  11366.  
  11367.  
  11368.  
  11369.  
  11370.  
  11371.  
  11372.  
  11373.  
  11374.  
  11375.  
  11376.  
  11377.  
  11378.  
  11379. ___________________________________________________________________
  11380. NDOS Reference Manual                                          194
  11381.  
  11382.  
  11383. ___________________________________________________________________
  11384.  
  11385. DIR                                                      (Enhanced)
  11386.  
  11387. Purpose:    Display information about files and subdirectories.
  11388.  
  11389. Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /C /D /F /J /K /L /M
  11390.                  /N /O[[:][-]deginsu] /P /S /T /U /V /W] [file...]
  11391.  
  11392.             file:  The file, directory, or list of files or
  11393.             directories to display.
  11394.  
  11395.             /1 (one column)             /L(ower case)
  11396.             /2 (two columns)            /M (suppress footer display)
  11397.             /4 (four columns)           /N (reset DIR options)
  11398.             /A(ttribute select)         /O (sort order )
  11399.             /B(are)                     /P(ause)
  11400.             /C(ompression specs)        /S(ubdirectories)
  11401.             /D(isable colorization)     /T (aTtribute display)
  11402.             /E (use upper case display) /U (sUmmary information)
  11403.             /F(ull path)                /V(ertical sort)
  11404.             /J(ustify names)            /W(ide)
  11405.             /K (suppress header display)
  11406.  
  11407.             See also: ATTRIB, DESCRIBE, SELECT, and SETDOS.
  11408.  
  11409. Usage:      DIR can be used to display information about files from
  11410.             one or more of your disk directories, in a wide range
  11411.             of formats.  Depending on the options chosen, you can
  11412.             display the filename, attributes, and size; the time
  11413.             and date of the last change to the file; and the file
  11414.             description.  You can also display information in one,
  11415.             two, four, or five columns, sort the files several
  11416.             different ways, use color to distinguish file types,
  11417.             and pause after each full screen.
  11418.  
  11419.             The various DIR displays are controlled through options
  11420.             or switches.  The best way to learn how to use the many
  11421.             options available with the DIR command is to
  11422.             experiment.  You will soon know which options you want
  11423.             to use regularly.  You can select those options
  11424.             permanently by using the ALIAS command.  You may want
  11425.             to mix several options.  For example, to display all
  11426.             the files in the current directory, in 2 columns,
  11427.             sorted vertically (down one column then down the next),
  11428.             and with a pause at the end of each page:
  11429.  
  11430.                  c:\> dir /2/p/v
  11431.  
  11432. ___________________________________________________________________
  11433. NDOS Reference Manual                                          195
  11434.  
  11435.  
  11436. ___________________________________________________________________
  11437.  
  11438.             To set up this format as the default, using an alias:
  11439.  
  11440.                  c:\> alias dir=*dir /2/p/v
  11441.  
  11442.             You can also preset DIR parameters and switches by
  11443.             including the SET command with the DIRCMD environment
  11444.             variable. You can use any valid combination of DIR
  11445.             parameters and switches with the SET DIRCMD command,
  11446.             including the location and name of a file.  Do not
  11447.             place any spaces before or between parameters and
  11448.             switches in the SET DIRCMD command.
  11449.  
  11450.             For example, to use the DIRCMD environment variable to
  11451.             set the wide display format (/w) as the default format,
  11452.             include the following command in your  AUTOEXEC.BAT
  11453.             file:
  11454.  
  11455.                  set dircmd=/w
  11456.  
  11457.             If you use DIR with other parameters on the command
  11458.             line after setting the DIRCMD, these additional
  11459.             parameters are inserted before the parameters in the
  11460.             SET DIRCMD command. All parameters are then executed as
  11461.             if you typed them all out on the command line.
  11462.  
  11463.             You can change the DIRCMD default settings by typing
  11464.             the SET command at the command prompt with a new
  11465.             parameter or switch after the equal sign [=]. The new
  11466.             default settings are effective for all subsequent DIR
  11467.             commands until you use SET DIRCMD again on the command
  11468.             line or until you restart NDOS.
  11469.  
  11470.             To clear all default settings, type the following:
  11471.  
  11472.                  set dircmd=
  11473.  
  11474.             For more information about setting environment
  11475.             variables, see the SET command.
  11476.  
  11477.             This next example displays all the files on all
  11478.             directories of drive C:, including hidden and system
  11479.             files, pausing after each page:
  11480.  
  11481.                  c:\> dir /s/a/p c:\
  11482.  
  11483.             DIR allows wildcard characters (* and ?) in the
  11484.             filename.  If you don't specify a filename, DIR
  11485.             defaults to *.* (display all non-hidden files and
  11486.             subdirectories in the current directory).  To display
  11487.             all of the .WKS files in the current directory:
  11488.  
  11489. ___________________________________________________________________
  11490. NDOS Reference Manual                                          196
  11491.  
  11492.  
  11493. ___________________________________________________________________
  11494.  
  11495.                  c:\> dir *.wks
  11496.  
  11497.             If you link two or more filenames together with spaces,
  11498.             DIR will display all of the files that match the first
  11499.             name and then all of the files that match the second
  11500.             name.  You may use a different drive and path for each
  11501.             filename.  This example lists all of the .WKS and then
  11502.             all of the .WK1 files in the current directory:
  11503.  
  11504.                  c:\> dir *.wks *.wk1
  11505.  
  11506.             If you link multiple filenames with a semicolon [;]
  11507.             (an "include list", see page 67), DIR will display the
  11508.             matching filenames in a single listing.  Only the first
  11509.             filename in an include list can have a path; the other
  11510.             files must be in the same path.  This example displays
  11511.             the same files as the previous example, but the .WKS
  11512.             and .WK1 files are intermixed:
  11513.  
  11514.                  c:\> dir *.wks;*.wk1
  11515.  
  11516.             If you have an ANSI driver loaded, you can display the
  11517.             file and subdirectory names in color by setting the
  11518.             COLORDIR environment variable.  The format for COLORDIR
  11519.             is:
  11520.  
  11521.                  ext ... :[BRIght][BLInk] fg [ON bg]; ...
  11522.  
  11523.             where "ext" is a file extension (one to three
  11524.             characters) or one of the following file types:
  11525.  
  11526.                  DIRS - directories
  11527.                  RDONLY - read-only files
  11528.                  HIDDEN - hidden files
  11529.                  SYSTEM - system files
  11530.                  ARCHIVE - files modified since the last backup
  11531.  
  11532.             For example, to display the .COM and .EXE files in red,
  11533.             the .C and .ASM files in bright cyan, and the read-only
  11534.             files in blinking green (this should be entered on one
  11535.             line):
  11536.  
  11537.                  c:\> set colordir=com exe:red; c asm:bright cyan;
  11538.                       rdonly:blink green
  11539.  
  11540.             If you don't specify a background color, DIR will use
  11541.             the current screen background color.  COLORDIR will not
  11542.             work properly unless you have an ANSI driver loaded.
  11543.  
  11544.  
  11545.  
  11546. ___________________________________________________________________
  11547. NDOS Reference Manual                                          197
  11548.  
  11549.  
  11550. ___________________________________________________________________
  11551.  
  11552.             If you have COLORDIR set and attempt to redirect the
  11553.             output of DIR to a character device, such as a serial
  11554.             port or the printer, non-colorized filenames will be
  11555.             displayed on the device but colorized names will still
  11556.             be displayed on the screen.  This will not occur if the
  11557.             output of DIR is redirected to a disk file.
  11558.  
  11559.             When displaying file descriptions, DIR adds a right
  11560.             arrow [] at the end of the line if the description is
  11561.             too long to fit on the screen.  This symbol will alert
  11562.             you to the existence of additional description text.
  11563.  
  11564.         ##  The DIRCMD environment variable switches are appended
  11565.             to the command you type at command line. Therefore, if
  11566.             a switch from the DIRCMD conflicts with one you type at
  11567.             the command line, the conflict is handled in the same
  11568.             way as if you typed both conflicting switches at the
  11569.             command line. DIR usually chooses one to use.
  11570.  
  11571.         ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  11572.             .BAX, and .BAC files) can be used in directory color
  11573.             specifications.  See page 64 for more information on
  11574.             extended wildcards.
  11575.  
  11576.         ##  When sorting filenames and extensions, NDOS normally
  11577.             assumes that sequences of digits should be sorted
  11578.             numerically (for example, the file DRAW2 would come
  11579.             before DRAW03 because 2 is numerically smaller than
  11580.             03), rather than strictly alphabetically (where DRAW2
  11581.             would come second because "2" is after "0" in
  11582.             alphanumeric order).  You can defeat this behavior and
  11583.             force a strict alphabetic sort with the /O:a option.
  11584.  
  11585.         ##  If a country code was defined in the CONFIG.SYS file or
  11586.             by the CHCP command, DIR will display the date in the
  11587.             format for that country.  The default date format is
  11588.             U.S. (mm-dd-yy).  The separator character in the file
  11589.             time will also be affected by the country code.
  11590.  
  11591.         ##  DIR can handle directories of any size, limited only by
  11592.             available memory.  Each filename requires 32 bytes of
  11593.             free base memory plus the size of the description (if
  11594.             any); a system with 128K of free base memory can
  11595.             display up to 4,000 files per directory.
  11596.  
  11597.         ##  Options on the command line apply only to the filenames
  11598.             which follow the option, and options at the end of the
  11599.             line apply to the preceding filename only.  This allows
  11600.             you to specify different options for different groups
  11601.             of files, yet retains compatibility with the
  11602.  
  11603. ___________________________________________________________________
  11604. NDOS Reference Manual                                          198
  11605.  
  11606.  
  11607. ___________________________________________________________________
  11608.  
  11609.             traditional DIR command when a single filename is
  11610.             specified.
  11611.  
  11612. Options:    /1:  Single column display -- display the filename,
  11613.             size, date, time, and description.  This is the
  11614.             default.
  11615.  
  11616.             /2:  Two column display -- display the filename, size,
  11617.             date, and time.
  11618.  
  11619.             /4:  Four column display -- display the filename and
  11620.             size, in K (kilobytes) or MB (megabytes).
  11621.  
  11622.         ##  /A(ttribute select): Display only those files that have
  11623.             the specified attribute(s) set.  Preceding the
  11624.             attribute character with a hyphen [-] will display
  11625.             those files that don't have that attribute set.  The
  11626.             attributes are:
  11627.  
  11628.                  R    Read-only         D    Subdirectory
  11629.                  H    Hidden            A    Archive
  11630.                  S    System
  11631.  
  11632.             If no attributes are listed at all (e.g. DIR /A), DIR
  11633.             will display all files and subdirectories including
  11634.             hidden and system files.  If attributes are combined,
  11635.             all the specified attributes must match for a file to
  11636.             be included in the listing.  For example, /A:RHS will
  11637.             display only those files with all three attributes set.
  11638.             See page 168 for more information on file attributes.
  11639.  
  11640.         ##  /B(are):  Suppress the header and summary lines, and
  11641.             display file or subdirectory names only, in a single
  11642.             column.  This option is most useful when you want to
  11643.             redirect a list of names to a file or another program.
  11644.  
  11645.             /C(ompression):  Display compression specifications for
  11646.             filenames, if applicable.  Use /CH to display file
  11647.             compression ratio; /CH uses host allocation unit size.
  11648.  
  11649.         ##  /D(isable colorization):  Temporarily disable directory
  11650.             colorization.  Required when COLORDIR is set and DIR
  11651.             output is redirected to a character device like the
  11652.             printer (e.g. PRN or LPT1) or serial port (e.g. COM1 or
  11653.             COM2).
  11654.  
  11655.             /E  (case):  Display filenames in the traditional upper
  11656.             case; also see SETDOS /U (page 283) and the UpperCase
  11657.             directive in NDOS.INI (page 120).
  11658.  
  11659.  
  11660. ___________________________________________________________________
  11661. NDOS Reference Manual                                          199
  11662.  
  11663.  
  11664. ___________________________________________________________________
  11665.  
  11666.         ##  /F(ull path):  Display each filename with its drive
  11667.             letter and path in a single column, without other
  11668.             information.
  11669.  
  11670.             /J(ustify):  Justify (align) filename extensions and
  11671.             display them in the traditional format.
  11672.  
  11673.         ##  /K:  Suppress the header (disk and directory name)
  11674.             display.
  11675.  
  11676.             /L(ower case):  Display filenames in lower case; also
  11677.             see SETDOS /U (page 283) and the UpperCase directive in
  11678.             NDOS.INI (page 120).
  11679.  
  11680.         ##  /M:  Suppress the footer (file and byte count total)
  11681.             display.
  11682.  
  11683.             /N:  Reset the DIR options to the default values.  This
  11684.             is useful when you want to display some files in one
  11685.             format, and then change back to the defaults for
  11686.             another set of files.
  11687.  
  11688.             /O(rder):  Set the sorting order.  You may use any
  11689.             combination of the following sorting options; if
  11690.             multiple options are used the listing will be sorted
  11691.             with the first sort option as the primary key, the next
  11692.             as the secondary key, and so on:
  11693.  
  11694.                  -    Reverse the sort order for the next option
  11695.                  a    Sort names and extensions in standard ASCII
  11696.                       order, rather than sorting numerically when
  11697.                       digits are included in the name or extension
  11698.                  d    Sort by date and time (oldest first)
  11699.                  e    Sort by extension
  11700.                  g    Group subdirectories together
  11701.                  i    Sort by the file description
  11702.                  n    Sort by filename (this is the default)
  11703.                  r    Reverse the sort order for all options
  11704.                  s    Sort by size
  11705.                  u    Unsorted
  11706.  
  11707.             /P(ause):  Wait for a key to be pressed after each
  11708.             screen page before continuing the display.
  11709.  
  11710.             /S(ubdirectories):  Display file information from the
  11711.             current directory and all of its subdirectories.  DIR
  11712.             will only display headers and summaries for those
  11713.             directories with files that match the filename(s) and
  11714.             attributes (if /A is used) that you specify on the
  11715.             command line.
  11716.  
  11717. ___________________________________________________________________
  11718. NDOS Reference Manual                                          200
  11719.  
  11720.  
  11721. ___________________________________________________________________
  11722.  
  11723.         ##  /T  (aTtribute display):  Display the filenames and
  11724.             attributes only.  The attributes are displayed in the
  11725.             format RHSA, where:
  11726.  
  11727.                  R    Read-only
  11728.                  H    Hidden
  11729.                  S    System
  11730.                  A    Archive
  11731.  
  11732.             /U (sUmmary information):  Only display the number of
  11733.             files, the total file size, and the total amount of
  11734.             disk space used.
  11735.  
  11736.             /V(ertical sort):  Display the filenames sorted
  11737.             vertically rather than horizontally (used with the /2,
  11738.             /4 or /W options).
  11739.  
  11740.             /W(ide):  Display filenames only, horizontally across
  11741.             the screen (five columns on an 80-character wide
  11742.             display).
  11743.  
  11744.  
  11745.  
  11746.  
  11747.  
  11748.  
  11749.  
  11750.  
  11751.  
  11752.  
  11753.  
  11754.  
  11755.  
  11756.  
  11757.  
  11758.  
  11759.  
  11760.  
  11761.  
  11762.  
  11763.  
  11764.  
  11765.  
  11766.  
  11767.  
  11768.  
  11769.  
  11770.  
  11771.  
  11772.  
  11773.  
  11774. ___________________________________________________________________
  11775. NDOS Reference Manual                                          201
  11776.  
  11777.  
  11778. ___________________________________________________________________
  11779.  
  11780. DIRS                                                          (New)
  11781.  
  11782. Purpose:    Display the current directory stack.
  11783.  
  11784. Format:     DIRS
  11785.  
  11786.             See also: PUSHD and POPD.
  11787.  
  11788. Usage:      The PUSHD command adds the current default drive and
  11789.             directory to the directory stack, a list that NDOS
  11790.             maintains in memory.  The POPD command removes the top
  11791.             entry of the directory stack and makes that drive and
  11792.             directory the new default.  The DIRS command displays
  11793.             the contents of the directory stack, with the most
  11794.             recent entries on top (i.e., the next POPD will
  11795.             retrieve the first entry that DIRS displays).
  11796.  
  11797.             For example, to change directories and then display the
  11798.             directory stack:
  11799.  
  11800.                  c:\> pushd c:\database
  11801.                  c:\database> pushd d:\wordp\memos
  11802.                  d:\wordp\memos> dirs
  11803.                  c:\database
  11804.                  c:\
  11805.  
  11806.             The directory stack holds 255 characters, enough for
  11807.             about 10 to 20 typical drive and directory entries.
  11808.  
  11809.  
  11810.  
  11811.  
  11812.  
  11813.  
  11814.  
  11815.  
  11816.  
  11817.  
  11818.  
  11819.  
  11820.  
  11821.  
  11822.  
  11823.  
  11824.  
  11825.  
  11826.  
  11827.  
  11828.  
  11829.  
  11830.  
  11831. ___________________________________________________________________
  11832. NDOS Reference Manual                                          202
  11833.  
  11834.  
  11835. ___________________________________________________________________
  11836.  
  11837. DRAWBOX                                                       (New)
  11838.  
  11839. Purpose:    Draw a box on the screen.
  11840.  
  11841. Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk]
  11842.                  fg ON bg [FILl bgfill] [SHAdow]
  11843.  
  11844.             ulrow:  Row for upper left corner
  11845.             ulcol:  Column for upper left corner
  11846.             lrrow:  Row for lower right corner
  11847.             lrcol:  Column for lower right corner
  11848.             style:  Box drawing style:
  11849.                  0    No lines (box is drawn with blanks)
  11850.                  1    Single line
  11851.                  2    Double line
  11852.                  3    Single line on top and bottom, double on
  11853.                       sides
  11854.                  4    Double line on top and bottom, single on
  11855.                       sides
  11856.             fg:  Foreground character color
  11857.             bg:  Background character color
  11858.             bgfill:  Background fill color (for the inside of the
  11859.             box)
  11860.  
  11861.             The available colors are:
  11862.  
  11863.               Black         Blue          Green         Red
  11864.               Magenta       Cyan          Yellow        White
  11865.  
  11866.             See also: DRAWHLINE and DRAWVLINE.
  11867.  
  11868. Usage:      DRAWBOX is useful for creating attractive screen
  11869.             displays in batch files.  DRAWBOX detects other lines
  11870.             and boxes on the display, and creates the appropriate
  11871.             connector characters when possible (not all types of
  11872.             lines can be connected with the available characters).
  11873.  
  11874.             For example, to draw a box around the entire screen
  11875.             with bright white lines on a blue background (enter
  11876.             this on one line):
  11877.  
  11878.                  drawbox 0 0 24 79 1 bri whi on blu fill blu
  11879.  
  11880.             Only the first three characters of the color name and
  11881.             the keywords BRIGHT, BLINK, FILL, and SHADOW are
  11882.             required.
  11883.  
  11884.             If you use SHADOW, a drop shadow is created by changing
  11885.             the characters in the row under the box and the two
  11886.             columns to the right of the box to normal intensity
  11887.  
  11888. ___________________________________________________________________
  11889. NDOS Reference Manual                                          203
  11890.  
  11891.  
  11892. ___________________________________________________________________
  11893.  
  11894.             text with a black background (this will make characters
  11895.             displayed in black disappear entirely).
  11896.  
  11897.             The row and column values are zero-based, so on a
  11898.             standard 25 line by 80 column display, valid rows are 0
  11899.             - 24 and valid columns are 0 - 79.
  11900.  
  11901.             DRAWBOX checks for valid row and column values, and
  11902.             displays a "Usage" error message if any values are out
  11903.             of range.
  11904.  
  11905.  
  11906.  
  11907.  
  11908.  
  11909.  
  11910.  
  11911.  
  11912.  
  11913.  
  11914.  
  11915.  
  11916.  
  11917.  
  11918.  
  11919.  
  11920.  
  11921.  
  11922.  
  11923.  
  11924.  
  11925.  
  11926.  
  11927.  
  11928.  
  11929.  
  11930.  
  11931.  
  11932.  
  11933.  
  11934.  
  11935.  
  11936.  
  11937.  
  11938.  
  11939.  
  11940.  
  11941.  
  11942.  
  11943.  
  11944.  
  11945. ___________________________________________________________________
  11946. NDOS Reference Manual                                          204
  11947.  
  11948.  
  11949. ___________________________________________________________________
  11950.  
  11951. DRAWHLINE                                                     (New)
  11952.  
  11953. Purpose:    Draw a horizontal line on the screen.
  11954.  
  11955. Format:     DRAWHLINE row column len style [BRIght] [BLInk]
  11956.                  fg ON bg
  11957.  
  11958.             row:  Starting row
  11959.             column:  Starting column
  11960.             len:  Length of line
  11961.             style:  Line drawing style:
  11962.                  1    Single line
  11963.                  2    Double line
  11964.             fg:  Foreground character color
  11965.             bg:  Background character color
  11966.  
  11967.             The available colors are:
  11968.  
  11969.               Black         Blue          Green         Red
  11970.               Magenta       Cyan          Yellow        White
  11971.  
  11972.             See also: DRAWBOX and DRAWVLINE.
  11973.  
  11974. Usage:      DRAWHLINE is useful for creating attractive screen
  11975.             displays in batch files.  It detects other lines and
  11976.             boxes on the display, and creates the appropriate
  11977.             connector characters when possible (not all types of
  11978.             lines can be connected with the available characters).
  11979.  
  11980.             For example, the following command draws a double line
  11981.             along the top row of the display with green characters
  11982.             on a blue background:
  11983.  
  11984.                  drawhline 0 0 80 2 green on blue
  11985.  
  11986.             Only the first three characters of the color name and
  11987.             the attributes BRIGHT and BLINK are required.
  11988.  
  11989.             The row and column values are zero-based, so on a
  11990.             standard 25 line by 80 column display, valid rows are 0
  11991.             - 24 and valid columns are 0 - 79.
  11992.  
  11993.             DRAWHLINE checks for a valid row and column, and
  11994.             displays a "Usage" error message if either value is out
  11995.             of range.
  11996.  
  11997.  
  11998.  
  11999.  
  12000.  
  12001.  
  12002. ___________________________________________________________________
  12003. NDOS Reference Manual                                          205
  12004.  
  12005.  
  12006. ___________________________________________________________________
  12007.  
  12008. DRAWVLINE                                                     (New)
  12009.  
  12010. Purpose:    Draw a vertical line on the screen.
  12011.  
  12012. Format:     DRAWVLINE row column len style [BRIght][BLInk]
  12013.                  fg ON bg
  12014.  
  12015.             row:  Starting row
  12016.             column:  Starting column
  12017.             len:  Length of line
  12018.             style:  Line drawing style:
  12019.                  1    Single line
  12020.                  2    Double line
  12021.             fg:  Foreground character color
  12022.             bg:  Background character color
  12023.  
  12024.             The available colors are:
  12025.  
  12026.               Black         Blue          Green         Red
  12027.               Magenta       Cyan          Yellow        White
  12028.  
  12029.             See also: DRAWBOX and DRAWHLINE.
  12030.  
  12031. Usage:      DRAWVLINE is useful for creating attractive screen
  12032.             displays in batch files.  It detects other lines and
  12033.             boxes on the display, and creates the appropriate
  12034.             connector characters when possible (not all types of
  12035.             lines can be connected with the available characters).
  12036.  
  12037.             For example, to draw a double width line along the left
  12038.             margin of the display with bright red characters on a
  12039.             black background:
  12040.  
  12041.                  drawvline 0 0 25 2 bright red on black
  12042.  
  12043.             Only the first three characters of the color name and
  12044.             the attributes BRIGHT and BLINK are required.
  12045.  
  12046.             The row and column values are zero-based, so on a
  12047.             standard 25 line by 80 column display, valid rows are 0
  12048.             - 24 and valid columns are 0 - 79.
  12049.  
  12050.             DRAWVLINE checks for a valid row and column, and
  12051.             displays a "Usage" error message if either value is out
  12052.             of range.
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059. ___________________________________________________________________
  12060. NDOS Reference Manual                                          206
  12061.  
  12062.  
  12063. ___________________________________________________________________
  12064.  
  12065. ECHO                                                     (Enhanced)
  12066.  
  12067. Purpose:    Display a message, enable or disable batch file or
  12068.             command line echoing, or display the echo status.
  12069.  
  12070. Format:     ECHO [ON | OFF | message]
  12071.  
  12072.             message:  Text to display.
  12073.  
  12074.             See also: ECHOS, SCREEN, SCRPUT, SETDOS and TEXT.
  12075.  
  12076. Usage:      NDOS has a separate echo capability for batch files and
  12077.             for the command line.
  12078.  
  12079.             In a batch file, if you turn ECHO on, each line of the
  12080.             file is displayed before it is executed.  If you turn
  12081.             ECHO off, each line is executed without being
  12082.             displayed.  ECHO can also be used in a batch file to
  12083.             display a message on the screen.  Regardless of the
  12084.             ECHO state, a batch file line that begins with the [@]
  12085.             character will not be displayed.  To turn off batch
  12086.             file echoing, without displaying the ECHO command, use
  12087.             this line:
  12088.  
  12089.                  @echo off
  12090.  
  12091.             ECHO commands in a batch file will send messages to the
  12092.             screen while the batch file executes, even if ECHO is
  12093.             set OFF.  For example, this line will display a message
  12094.             in a batch file:
  12095.  
  12096.                  echo Processing your print files...
  12097.  
  12098.             If you want to echo a blank line from within a batch
  12099.             file, enter:
  12100.  
  12101.                  echo.
  12102.  
  12103.             You cannot use the command separator character [^] or
  12104.             the NDOS redirection symbols (| > <) in an ECHO
  12105.             message, unless you enclose them in quotation marks or
  12106.             precede them with the escape character (see page 86).
  12107.  
  12108.             NDOS defaults to ECHO ON in batch files.  The current
  12109.             ECHO state is inherited by called batch files.  You can
  12110.             change the default setting to ECHO OFF with the SETDOS
  12111.             /V0 command or the BatchEcho directive in NDOS.INI (see
  12112.             page 118).
  12113.  
  12114.  
  12115.  
  12116. ___________________________________________________________________
  12117. NDOS Reference Manual                                          207
  12118.  
  12119.  
  12120. ___________________________________________________________________
  12121.  
  12122.             If you turn the command line ECHO on, NDOS will display
  12123.             each command before it is executed.  This will let you
  12124.             see the command line after NDOS has expanded all
  12125.             aliases and variables.  The command line ECHO is most
  12126.             useful when you are learning how to use the advanced
  12127.             features of NDOS.  This example will turn command line
  12128.             echoing on:
  12129.  
  12130.                  c:\> echo on
  12131.  
  12132.             NDOS defaults to ECHO OFF during keyboard input.  The
  12133.             keyboard ECHO state is independent of the batch file
  12134.             ECHO state;  changing ECHO in a batch file has no
  12135.             effect on the display at the command prompt, and vice
  12136.             versa.
  12137.  
  12138.             To see the current echo state, use the ECHO command
  12139.             with no arguments.  This displays either the batch file
  12140.             or command line echo state, depending on where the ECHO
  12141.             command is performed.
  12142.  
  12143.  
  12144.  
  12145.  
  12146.  
  12147.  
  12148.  
  12149.  
  12150.  
  12151.  
  12152.  
  12153.  
  12154.  
  12155.  
  12156.  
  12157.  
  12158.  
  12159.  
  12160.  
  12161.  
  12162.  
  12163.  
  12164.  
  12165.  
  12166.  
  12167.  
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173. ___________________________________________________________________
  12174. NDOS Reference Manual                                          208
  12175.  
  12176.  
  12177. ___________________________________________________________________
  12178.  
  12179. ECHOS                                                         (New)
  12180.  
  12181. Purpose:    Display a message without a trailing carriage return
  12182.             and line feed.
  12183.  
  12184. Format:     ECHOS message
  12185.  
  12186.             See also: ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT.
  12187.  
  12188. Usage:      ECHOS is useful for outputting text when you don't want
  12189.             NDOS to add a carriage return/linefeed pair.  You can
  12190.             use ECHOS when you need to redirect control sequences
  12191.             to your printer; this example sends the sequence "Esc
  12192.             P" to the printer on LPT1:
  12193.  
  12194.                  c:\> echos eP > lpt1:
  12195.  
  12196.             You cannot use the command separator character [^] or
  12197.             the NDOS redirection symbols [|><] in an ECHOS message,
  12198.             unless you enclose them in quotation marks or preceded
  12199.             them with the escape character (see page 86).
  12200.  
  12201.         ##  ECHOS does not translate or modify the message text.
  12202.             For example, carriage return characters are not
  12203.             translated to carriage return/linefeed pairs.  ECHOS
  12204.             sends only the characters you enter (after NDOS escape
  12205.             character and back quote processing as described
  12206.             above).  The only character you cannot put into an
  12207.             ECHOS message is the NUL character (ASCII 0).
  12208.  
  12209.  
  12210.  
  12211.  
  12212.  
  12213.  
  12214.  
  12215.  
  12216.  
  12217.  
  12218.  
  12219.  
  12220.  
  12221.  
  12222.  
  12223.  
  12224.  
  12225.  
  12226.  
  12227.  
  12228.  
  12229.  
  12230. ___________________________________________________________________
  12231. NDOS Reference Manual                                          209
  12232.  
  12233.  
  12234. ___________________________________________________________________
  12235.  
  12236. ENDLOCAL                                                      (New)
  12237.  
  12238. Purpose:    Restore the saved disk drive, directory, environment,
  12239.             and alias list.
  12240.  
  12241. Format:     ENDLOCAL
  12242.  
  12243.             See also: SETLOCAL.
  12244.  
  12245. ## Usage:   The SETLOCAL command in a batch file saves the current
  12246.             disk drive, default directory, all environment
  12247.             variables, and the alias list.  ENDLOCAL restores
  12248.             everything that was saved by the previous SETLOCAL
  12249.             command.
  12250.  
  12251.             For example, this batch file fragment saves the drive,
  12252.             current working directory, and environment variables,
  12253.             changes the drive and directory, sets some environment
  12254.             variables, runs the program TEST1, and then restores
  12255.             the original values:
  12256.  
  12257.                  setlocal
  12258.                  cdd d:\test
  12259.                  set path=c:\;c:\dos;c:\util
  12260.                  set lib=d:\lib
  12261.                  test1
  12262.                  endlocal
  12263.  
  12264.             SETLOCAL and ENDLOCAL can only be used in batch files,
  12265.             not in aliases or from the command line.
  12266.  
  12267.  
  12268.  
  12269.  
  12270.  
  12271.  
  12272.  
  12273.  
  12274.  
  12275.  
  12276.  
  12277.  
  12278.  
  12279.  
  12280.  
  12281.  
  12282.  
  12283.  
  12284.  
  12285.  
  12286.  
  12287. ___________________________________________________________________
  12288. NDOS Reference Manual                                          210
  12289.  
  12290.  
  12291. ___________________________________________________________________
  12292.  
  12293. ESET                                                          (New)
  12294.  
  12295. Purpose:    Edit environment variables and aliases.
  12296.  
  12297. Format:     ESET [/M] variable name...
  12298.  
  12299.             variable name:  The name of an environment variable or
  12300.             alias to edit.
  12301.  
  12302.             /M(aster environment)
  12303.  
  12304.             See also: ALIAS, UNALIAS, SET, and UNSET.
  12305.  
  12306. Usage:      ESET allows you to edit environment variables and
  12307.             aliases using the NDOS line editing commands (see page
  12308.             48).
  12309.  
  12310.             For example, to edit the executable file search path:
  12311.  
  12312.                  c:\> eset path
  12313.                  path=c:\;c:\dos;c:\util
  12314.  
  12315.             To create and then edit an alias:
  12316.  
  12317.                  c:\> alias d dir /d/j/p
  12318.                  c:\> eset d
  12319.                  d=dir /d/j/p
  12320.  
  12321.             ESET will search for environment variables first and
  12322.             then aliases.  If you have an environment variable and
  12323.             an alias with the same name, ESET will only be able to
  12324.             edit the environment variable.
  12325.  
  12326.             NDOS normally limits environment variable and alias
  12327.             names to 80 characters, and their contents to 255
  12328.             characters.  However if you use special techniques to
  12329.             create a longer environment variable, ESET will edit it
  12330.             provided the variable contains no more than 511
  12331.             characters of text.
  12332.  
  12333. Option: ##  /M(aster environment): Edit an environment variable in
  12334.             the master environment rather than the local
  12335.             environment.  This option is only useful from a
  12336.             secondary command shell (for example, when an
  12337.             application has "shelled to DOS").  /M only works for
  12338.             environment variables; it cannot be used to edit the
  12339.             primary shell's aliases.
  12340.  
  12341.  
  12342.  
  12343.  
  12344. ___________________________________________________________________
  12345. NDOS Reference Manual                                          211
  12346.  
  12347.  
  12348. ___________________________________________________________________
  12349.  
  12350. EXCEPT                                                        (New)
  12351.  
  12352. Purpose:    Perform a command on all available files except those
  12353.             specified.
  12354.  
  12355. Format:     EXCEPT (file) command
  12356.  
  12357.             file:  The file or files to exclude from the command.
  12358.             command:  The command to execute, including all
  12359.             appropriate arguments and switches.
  12360.  
  12361.             See also: ATTRIB.
  12362.  
  12363. Usage:      EXCEPT provides a means of executing a command on a
  12364.             group of files and/or subdirectories, and excluding a
  12365.             subgroup from the operation.  The command can be a NDOS
  12366.             internal command or alias, an external command, or a
  12367.             batch file.
  12368.  
  12369.             You may use wildcards to specify the files to exclude
  12370.             from the command.  The first example erases all the
  12371.             files in the current directory except those beginning
  12372.             with MEMO and those ending in .WKS.  The second example
  12373.             copies all the files and subdirectories on drive C: to
  12374.             drive D: except those in C:\MSC and C:\DOS, using the
  12375.             COPY command:
  12376.  
  12377.                  c:\> except (memo*.* *.wks) erase *.*
  12378.                  c:\> except (c:\msc c:\dos) copy c:\*.* d:\ /s
  12379.  
  12380.         ##  If you use EXCEPT with filename completion (see page
  12381.             52) to get the filenames inside the parentheses, type a
  12382.             space after the open parenthesis before entering a
  12383.             partial filename or pressing Tab.  Otherwise, the
  12384.             command line editor will treat the open parenthesis as
  12385.             the first character of the filename to be completed.
  12386.  
  12387.         ##  EXCEPT prevents operations on the specified file(s) by
  12388.             setting the hidden attribute, performing the command,
  12389.             and then clearing the hidden attribute.  If the command
  12390.             is aborted in an unusual way, you may need to use the
  12391.             ATTRIB command to "unhide" (-H) the file(s).
  12392.  
  12393.         ##  EXCEPT will not work with programs or commands that
  12394.             ignore the hidden attribute or which work explicitly
  12395.             with hidden files, including DEL /Z and the /H (process
  12396.             hidden files) switch available in some NDOS file
  12397.             processing commands.
  12398.  
  12399.  
  12400.  
  12401. ___________________________________________________________________
  12402. NDOS Reference Manual                                          212
  12403.  
  12404.  
  12405. ___________________________________________________________________
  12406.  
  12407.         ##  You can use command grouping (see page 84) to execute
  12408.             multiple commands with a single EXCEPT.  For example,
  12409.             the following command copies all files in the current
  12410.             directory whose extensions begin with .DA, except the
  12411.             .DAT files, to the D:\SAVE directory, then changes the
  12412.             first two characters of the extension of the copied
  12413.             files to .SA.  This example should be entered on one
  12414.             line:
  12415.  
  12416.                  c:\data> except (*.dat) (copy *.da* d:\save ^
  12417.                           ren *.da* *.sa*)
  12418.  
  12419.         ##  You may need to increase the NDOS internal stack size
  12420.             using the StackSize directive in NDOS.INI if you use
  12421.             extremely complex combinations of commands like EXCEPT,
  12422.             FOR, GLOBAL, IF, and SELECT on the same command line,
  12423.             or use complex combinations of these commands in nested
  12424.             batch files or nested GOSUBs.  See the StackSize
  12425.             directive on page 128 for more information.
  12426.  
  12427.  
  12428.  
  12429.  
  12430.  
  12431.  
  12432.  
  12433.  
  12434.  
  12435.  
  12436.  
  12437.  
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.  
  12447.  
  12448.  
  12449.  
  12450.  
  12451.  
  12452.  
  12453.  
  12454.  
  12455.  
  12456.  
  12457.  
  12458. ___________________________________________________________________
  12459. NDOS Reference Manual                                          213
  12460.  
  12461.  
  12462. ___________________________________________________________________
  12463.  
  12464. EXIT                                                     (Enhanced)
  12465.  
  12466. Purpose:    Return from a secondary command processor.
  12467.  
  12468. Format:     EXIT [value]
  12469.  
  12470.             value:  The exit code to return (0 - 255).
  12471.  
  12472. Usage:      Some application programs will start a secondary copy
  12473.             of the command processor to allow you to execute DOS
  12474.             commands.  To return to the application again, type:
  12475.  
  12476.                  c:\> exit
  12477.  
  12478.         ##  If you specify a value, EXIT will return that value to
  12479.             the program that started NDOS.  For example:
  12480.  
  12481.                  c:\> exit 255
  12482.  
  12483.         ##  The value is a number you can use to inform the program
  12484.             of some result, such as the success or failure of a
  12485.             batch file.  This feature is most useful for systems
  12486.             which use batch files to automate their operation, such
  12487.             as bulletin boards, or custom application programs like
  12488.             databases that shell to NDOS to perform certain tasks.
  12489.  
  12490.         ##  You cannot EXIT from the primary command processor.
  12491.  
  12492.  
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515. ___________________________________________________________________
  12516. NDOS Reference Manual                                          214
  12517.  
  12518.  
  12519. ___________________________________________________________________
  12520.  
  12521. FOR                                                      (Enhanced)
  12522.  
  12523. Purpose:    Repeat a command for several values of a variable.
  12524.  
  12525. Format:     FOR [/A[[:][-]rhsda]] %var IN ([@]set) [DO] command ...
  12526.  
  12527.             %var:  The variable to be used in the command ("FOR
  12528.             variable").
  12529.             set:  A set of values for the variable.
  12530.             command:  A command or group of commands to be executed
  12531.             for each value of the variable.
  12532.  
  12533.             /A(ttribute select)
  12534.  
  12535. Usage:      NDOS begins the FOR command by creating a set.  It then
  12536.             executes a command for every member of the set.  The
  12537.             command can be a NDOS internal command or alias, an
  12538.             external command, or a batch file.
  12539.  
  12540.             Normally, the set is a list of files specified with
  12541.             wildcards.  For example, if you use this line in a
  12542.             batch file:
  12543.  
  12544.                  for %x in (*.txt) do list %x
  12545.  
  12546.             NDOS will create a list of all files in the current
  12547.             directory with the extension .TXT.  It sets the FOR
  12548.             variable %x equal to each of the filenames in turn,
  12549.             and executes the LIST command for each of the files.
  12550.  
  12551.             The set can include multiple files or an include list,
  12552.             like this:
  12553.  
  12554.                  for %x in (d:\*.txt;*.doc;*.asc) do type %x
  12555.  
  12556.             The set can also be made up of text instead of
  12557.             filenames.  For example, to display the free space on
  12558.             drives C:, D:, and E:, you could use:
  12559.  
  12560.                  for %drive in (c d e) do free %drive:
  12561.  
  12562.             When the set is made up of text or several separate
  12563.             filenames (not an include list), the elements must be
  12564.             separated by spaces, tabs, commas, or the switch
  12565.             character (normally a slash [/]).
  12566.  
  12567.         ##  You can also set the FOR variable equal to each line in
  12568.             a file by placing an [@] in front of the filename.  If
  12569.             you have a file called DRIVES.TXT that contains a list
  12570.             of drives on your computer, one drive name per line
  12571.  
  12572. ___________________________________________________________________
  12573. NDOS Reference Manual                                          215
  12574.  
  12575.  
  12576. ___________________________________________________________________
  12577.  
  12578.             (with a ":" after each drive letter), you can print the
  12579.             free space on each drive this way:
  12580.  
  12581.                  for %d in (@drives.txt) do free %d > prn
  12582.  
  12583.         ##  Because the [@] is also a valid filename character, FOR
  12584.             first checks to see if the file exists with the [@] in
  12585.             its name (e.g., @DRIVES.TXT).  If so, the filename is
  12586.             treated as a normal argument.  If it doesn't exist, FOR
  12587.             uses the filename (without the [@]) as the file from
  12588.             which to retrieve text.
  12589.  
  12590.         ##  NDOS will accept either % or %% in front of the
  12591.             variable name.  You can use either form whether the FOR
  12592.             command is typed from the command line or is part of an
  12593.             alias or batch file.  The variable name can be up to 80
  12594.             characters long.  The word DO is optional.
  12595.  
  12596.         ##  If you use a single-character FOR variable name NDOS
  12597.             will give that name priority over any environment
  12598.             variable which starts with the same letter, in order to
  12599.             maintain compatibility with the traditional FOR
  12600.             command.  For example, the following command tries to
  12601.             add a: and b: to the end of the PATH, but will not work
  12602.             as intended:
  12603.  
  12604.                  c:\> for %p in (a: b:) do path %path;%p
  12605.  
  12606.             The "%p" in "%path" will be interpreted as the FOR
  12607.             variable %p followed by the text "ath", which is not
  12608.             what was intended.  To get around this, use a different
  12609.             letter or a longer name for the FOR variable, or use
  12610.             square brackets around the variable name (see page 71).
  12611.  
  12612.         ##  The following example uses FOR with variable functions
  12613.             to delete the .BAK files for which a corresponding .TXT
  12614.             file exists in the current directory (this should be
  12615.             entered on one line):
  12616.  
  12617.                  c:\docs> for %file in (*.txt) do if exist
  12618.                           %@name[%file].txt del %@name[%file].bak
  12619.  
  12620.         ##  You can use command grouping (see page 84) to execute
  12621.             multiple commands for each element in the list.  For
  12622.             example, the following command copies each .WKQ file in
  12623.             the current directory to the D:\WKSAVE directory, and
  12624.             then changes the extension of each file in the current
  12625.             directory to .SAV.  This example should be entered on
  12626.             one line:
  12627.  
  12628.  
  12629. ___________________________________________________________________
  12630. NDOS Reference Manual                                          216
  12631.  
  12632.  
  12633. ___________________________________________________________________
  12634.  
  12635.                  c:\text> for %file in (*.wkq) do (copy %file
  12636.                           d:\wksave\ ^ ren %file *.sav)
  12637.  
  12638.         ##  In a batch file you can use GOSUB to execute a
  12639.             subroutine for every element in the set.  Within the
  12640.             subroutine the FOR variable can be used just like any
  12641.             environment variable.  This is a convenient way to
  12642.             execute a complex sequence of commands for every
  12643.             element in the set without CALLing another batch file.
  12644.  
  12645.         ##  One unusual use of FOR is to execute a collection of
  12646.             batch files or other commands with the same parameter.
  12647.             For example, you might want to have three batch files
  12648.             all operate on the same data file.  The FOR command
  12649.             could look like this (this should all be entered on one
  12650.             line):
  12651.  
  12652.                  c:\> for %x in (filetest fileform fileprnt)
  12653.                       do %x datafile
  12654.  
  12655.             NDOS will expand this to three separate commands:
  12656.  
  12657.                  filetest datafile
  12658.                  fileform datafile
  12659.                  fileprnt datafile
  12660.  
  12661.         ##  The variable that FOR uses (the %X in the example
  12662.             above) is created in the environment and then erased
  12663.             when the FOR command is done.  Because of this, you
  12664.             must be careful not to use the name of one of your
  12665.             environment variables as a FOR variable.  For example,
  12666.             a command that begins
  12667.  
  12668.                  c:\> for %path in (...
  12669.  
  12670.             will write over your current path setting and then
  12671.             erase the path variable completely.
  12672.  
  12673.         ##  FOR statements can be nested.  The permissible nesting
  12674.             level depends on the amount of free space in the NDOS
  12675.             internal stack.
  12676.  
  12677.         ##  You may need to increase the NDOS internal stack size
  12678.             using the StackSize directive in NDOS.INI if you use
  12679.             extremely complex combinations of commands like EXCEPT,
  12680.             FOR, GLOBAL, IF, and SELECT on the same command line,
  12681.             or use complex combinations of these commands in nested
  12682.             batch files or nested GOSUBs.  See the StackSize
  12683.             directive on page 128 for more information.
  12684.  
  12685.  
  12686. ___________________________________________________________________
  12687. NDOS Reference Manual                                          217
  12688.  
  12689.  
  12690. ___________________________________________________________________
  12691.  
  12692. Options: ## /A(ttribute select): Process only those files that have
  12693.             the specified attribute(s).  /A will be used only when
  12694.             processing wildcard filenames in the set.  It will be
  12695.             ignored for filenames without wildcards or other items
  12696.             in the set.  Preceding the attribute character with a
  12697.             hyphen [-] will process those files that DON'T have
  12698.             that attribute set.  The attributes are:
  12699.  
  12700.                  R    Read-only         D    Subdirectory
  12701.                  H    Hidden            A    Archive
  12702.                  S    System
  12703.  
  12704.             If no attributes are listed at all (e.g. FOR /A ...),
  12705.             FOR will process all files including hidden and system
  12706.             files.  If attributes are combined, all the specified
  12707.             attributes must match for a file to be included.  For
  12708.             example, /A:RHS will include only those files with all
  12709.             three attributes set.  See page 168 for more
  12710.             information on file attributes.
  12711.  
  12712.             For example, to process only those files with the
  12713.             archive attribute:
  12714.  
  12715.                  for /a:a %%f in (*.*) echo %%f needs a backup!
  12716.  
  12717.  
  12718.  
  12719.  
  12720.  
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743. ___________________________________________________________________
  12744. NDOS Reference Manual                                          218
  12745.  
  12746.  
  12747. ___________________________________________________________________
  12748.  
  12749. FREE                                                          (New)
  12750.  
  12751. Purpose:    Display the total disk space, total bytes used, and
  12752.             total bytes free on the specified (or default)
  12753.             drive(s).
  12754.  
  12755. Format:     FREE [drive: ...]
  12756.  
  12757.             drive:  One or more drives to include in the report.
  12758.  
  12759.             See also: MEMORY.
  12760.  
  12761. Usage:      FREE provides the same disk information as the external
  12762.             DOS command CHKDSK, but without the wait, since it does
  12763.             not check the integrity of the file and directory
  12764.             structure of the disk.
  12765.  
  12766.             A colon [:] is required after each drive letter.  This
  12767.             example displays the status of drives A: and C:
  12768.  
  12769.                  c:\> free a: c:
  12770.                   Volume in drive A: is unlabeled
  12771.                    1,213,952 bytes total disk space
  12772.                    1,115,136 bytes used
  12773.                       98,816 bytes free
  12774.                   Volume in drive C: is DEVELOPMENT
  12775.                   42,496,000 bytes total disk space
  12776.                   36,851,712 bytes used
  12777.                    5,644,288 bytes free
  12778.  
  12779.             If you are using DOS 4.0 or later, the disk serial
  12780.             number will appear after the drive label or name.
  12781.  
  12782.             Some networks with large server disk drives (256 MB or
  12783.             more) may report disk space values that are too small
  12784.             when FREE is used.  If this occurs, it is because the
  12785.             network software does not provide a way to return
  12786.             larger values to NDOS.
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800. ___________________________________________________________________
  12801. NDOS Reference Manual                                          219
  12802.  
  12803.  
  12804. ___________________________________________________________________
  12805.  
  12806. GLOBAL                                                        (New)
  12807.  
  12808. Purpose:    Execute a command in the current directory and its
  12809.             subdirectories.
  12810.  
  12811. Format:     GLOBAL [/H /I /Q] command
  12812.  
  12813.             command:  The command to execute, including arguments
  12814.             and switches.
  12815.  
  12816.             /H(idden directories)            /Q(uiet)
  12817.             /I(gnore exit codes)
  12818.  
  12819. Usage:      GLOBAL performs the command first in the current
  12820.             directory and then in every subdirectory under the
  12821.             current directory.  The command can be a NDOS internal
  12822.             command or alias, an external command, or a batch file.
  12823.  
  12824.             The first example erases all the files with a .BAK
  12825.             extension in every directory on C.  The second example
  12826.             copies the files in every directory on drive A: to the
  12827.             directory C:\TEMP:
  12828.  
  12829.                  c:\> global erase *.bak
  12830.                  a:\> global copy *.* c:\temp
  12831.  
  12832.         ##  You can use command grouping (see page 84) to execute
  12833.             multiple commands in each subdirectory.  For example,
  12834.             the following command copies each .TXT file in the
  12835.             current directory and all of its subdirectories to
  12836.             drive A:.  It then changes the extension of each of the
  12837.             copied files to .SAV:
  12838.  
  12839.                  c:\> global (copy *.txt a: ^ ren *.txt *.sav)
  12840.  
  12841.         ##  You may need to increase the NDOS internal stack size
  12842.             using the StackSize directive in NDOS.INI if you use
  12843.             extremely complex combinations of commands like EXCEPT,
  12844.             FOR, GLOBAL, IF, and SELECT on the same command line,
  12845.             or use complex combinations of these commands in nested
  12846.             batch files or nested GOSUBs.  See the StackSize
  12847.             directive on page 128 for more information.
  12848.  
  12849. Options:##  /H(idden directories):  Forces GLOBAL to look for
  12850.             hidden directories.  If you don't use this switch,
  12851.             hidden directories are ignored.
  12852.  
  12853.         ##  /I(gnore exit codes):  If this option is not specified,
  12854.             GLOBAL will terminate if the command returns a non-zero
  12855.             exit code.  Use /I if you want command to continue in
  12856.  
  12857. ___________________________________________________________________
  12858. NDOS Reference Manual                                          220
  12859.  
  12860.  
  12861. ___________________________________________________________________
  12862.  
  12863.             additional subdirectories even if it returns an error
  12864.             in a previous subdirectory.
  12865.  
  12866.             /Q(uiet):  Do not display the directory names as each
  12867.             directory is processed.
  12868.  
  12869.  
  12870.  
  12871.  
  12872.  
  12873.  
  12874.  
  12875.  
  12876.  
  12877.  
  12878.  
  12879.  
  12880.  
  12881.  
  12882.  
  12883.  
  12884.  
  12885.  
  12886.  
  12887.  
  12888.  
  12889.  
  12890.  
  12891.  
  12892.  
  12893.  
  12894.  
  12895.  
  12896.  
  12897.  
  12898.  
  12899.  
  12900.  
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914. ___________________________________________________________________
  12915. NDOS Reference Manual                                          221
  12916.  
  12917.  
  12918. ___________________________________________________________________
  12919.  
  12920. GOSUB                                                         (New)
  12921.  
  12922. Purpose:    Execute a subroutine in the current batch file.
  12923.  
  12924. Format:     GOSUB label
  12925.  
  12926.             label:  The batch file line label at the beginning of
  12927.             the subroutine.
  12928.  
  12929.             See also: CALL, GOTO and RETURN.
  12930.  
  12931. ## Usage:   NDOS allows subroutines in batch files.  A subroutine
  12932.             begins with a label (a colon followed by a word) and
  12933.             ends with a RETURN command.  The subroutine is invoked
  12934.             with a GOSUB command from another part of the batch
  12935.             file.  The RETURN command ends a subroutine; execution
  12936.             of the batch file will continue with the command
  12937.             following the original GOSUB.  GOSUB allows you to
  12938.             create subroutines within a batch file (to call other
  12939.             batch files, see CALL).
  12940.  
  12941.             The subroutine must start with a label that begins with
  12942.             a colon [:] and which appears on a line by itself.
  12943.             NDOS ignores case differences when matching labels.
  12944.  
  12945.             The subroutine must end with a RETURN statement.  After
  12946.             the RETURN, NDOS will continue processing the batch
  12947.             file with the command following the GOSUB command.
  12948.  
  12949.             The following batch file fragment calls a subroutine
  12950.             which displays the directory and returns:
  12951.  
  12952.                  echo Calling a subroutine
  12953.                  gosub subr1
  12954.                  echo Returned from the subroutine
  12955.                  quit
  12956.                  :subr1
  12957.                  dir /a/w
  12958.                  return
  12959.  
  12960.             If the label doesn't exist, the batch file is
  12961.             terminated with the error message "Label not found."
  12962.  
  12963.             GOSUB saves the IFF state, so IFF statements inside a
  12964.             subroutine won't interfere with IFF statements in the
  12965.             part of the batch file from which the subroutine was
  12966.             called.
  12967.  
  12968.  
  12969.  
  12970.  
  12971. ___________________________________________________________________
  12972. NDOS Reference Manual                                          222
  12973.  
  12974.  
  12975. ___________________________________________________________________
  12976.  
  12977.             Subroutines can be nested.  The permissible nesting
  12978.             level depends on the amount of free space in the NDOS
  12979.             internal stack.
  12980.  
  12981.         ##  You may need to increase the NDOS internal stack size
  12982.             using the StackSize directive in NDOS.INI if you use
  12983.             extremely complex combinations of commands like EXCEPT,
  12984.             FOR, GLOBAL, IF, and SELECT on the same command line,
  12985.             or use complex combinations of these commands in nested
  12986.             batch files or nested GOSUBs.  See the StackSize
  12987.             directive on page 128 for more information.
  12988.  
  12989.  
  12990.  
  12991.  
  12992.  
  12993.  
  12994.  
  12995.  
  12996.  
  12997.  
  12998.  
  12999.  
  13000.  
  13001.  
  13002.  
  13003.  
  13004.  
  13005.  
  13006.  
  13007.  
  13008.  
  13009.  
  13010.  
  13011.  
  13012.  
  13013.  
  13014.  
  13015.  
  13016.  
  13017.  
  13018.  
  13019.  
  13020.  
  13021.  
  13022.  
  13023.  
  13024.  
  13025.  
  13026.  
  13027.  
  13028. ___________________________________________________________________
  13029. NDOS Reference Manual                                          223
  13030.  
  13031.  
  13032. ___________________________________________________________________
  13033.  
  13034. GOTO                                                   (Compatible)
  13035.  
  13036. Purpose:    Branch to a specified line inside the current batch
  13037.             file.
  13038.  
  13039. Format:     GOTO [/I] label
  13040.  
  13041.             label:  The batch file line label to branch to.
  13042.  
  13043.             /I(FF continues)
  13044.  
  13045.             See also: GOSUB.
  13046.  
  13047. Usage:      After a GOTO command in a batch file, the next line to
  13048.             be executed will be the one immediately after the
  13049.             label.  The label must begin with a colon [:] and
  13050.             appear on a line by itself.  NDOS ignores case
  13051.             differences when matching labels.
  13052.  
  13053.             This batch file fragment checks for the existence of
  13054.             the file CONFIG.SYS.  If the file exists, NDOS jumps to
  13055.             C_EXISTS and copies all the files from the current
  13056.             directory to the root directory on A:.  Otherwise, NDOS
  13057.             prints an error message and exits.
  13058.  
  13059.                  if exist config.sys goto C_EXISTS
  13060.                  echo CONFIG.SYS doesn't exist - exiting.
  13061.                  quit
  13062.                  :C_EXISTS
  13063.                  copy *.* a:\
  13064.  
  13065.             If the label doesn't exist, the batch file is
  13066.             terminated with the error message "Label not found."
  13067.  
  13068.             To avoid errors in the processing of nested IFF
  13069.             statements, if /I is not used GOTO cancels all active
  13070.             IFF statements.  This means that a normal GOTO (without
  13071.             /I) inside an IFF statement must branch outside all IFF
  13072.             statements, and  may not branch to any label that is
  13073.             between an IFF and the corresponding ENDIFF.  This
  13074.             includes branches inside the current IFF statement.
  13075.  
  13076. Options:##  /I(FF continues):  Prevents GOTO from canceling IFF
  13077.             statements.  Use this option only if you are absolutely
  13078.             certain that your GOTO command is branching entirely
  13079.             within the current active IFF statement, and not into
  13080.             another IFF statement or a different IFF nesting level.
  13081.             Using /I under any other conditions will cause an error
  13082.             later in your batch file.
  13083.  
  13084.  
  13085. ___________________________________________________________________
  13086. NDOS Reference Manual                                          224
  13087.  
  13088.  
  13089. ___________________________________________________________________
  13090.  
  13091. HISTORY                                                       (New)
  13092.  
  13093. Purpose:    Display, add to, clear, or read the history list.
  13094.  
  13095. Format:     HISTORY [/A command /F /P /R filename]
  13096.  
  13097.             /A(dd)                           /P(ause)
  13098.             /F(ree)                     /R(ead)
  13099.  
  13100.             See also: LOG
  13101.  
  13102. Usage:      NDOS keeps a list of the commands you have entered on
  13103.             the command line.  See page 49 for information on
  13104.             command recall, which allows you to use the history
  13105.             list to repeat or edit commands you have typed.
  13106.  
  13107.             The HISTORY command lets you view and manipulate the
  13108.             command history list directly.  If no parameters are
  13109.             entered, HISTORY will display the current command
  13110.             history list:
  13111.  
  13112.                  c:\> history
  13113.  
  13114.             With the options explained below, you can clear the
  13115.             list, add new commands to the list without executing
  13116.             them, save the list in a file, or read a new list from
  13117.             a file.
  13118.  
  13119.             The number of commands saved in the history list
  13120.             depends on the length of each command line.  The
  13121.             history list size can be specified at startup from 256
  13122.             to 8192 characters (see page 115).  The default size is
  13123.             1024 characters.
  13124.  
  13125.         ##  You can use the HISTORY command as an aid in writing
  13126.             batch files.  Any time you have executed a series of
  13127.             commands that you'd like to save as the basis for a
  13128.             batch file, simply redirect the output of HISTORY to a
  13129.             file:
  13130.  
  13131.                  c:\> history > newbatch
  13132.  
  13133.             Then edit the output file to contain only the commands
  13134.             you want in the batch file, and save it under the
  13135.             appropriate name.  If you know you're going to use
  13136.             HISTORY this way, you may want to use the /F switch to
  13137.             clear the history first, so that your output file isn't
  13138.             cluttered with too many extraneous commands.
  13139.  
  13140.  
  13141.  
  13142. ___________________________________________________________________
  13143. NDOS Reference Manual                                          225
  13144.  
  13145.  
  13146. ___________________________________________________________________
  13147.  
  13148.         ##  You can disable the history list or specify a minimum
  13149.             command line length to save with the HistMin directive
  13150.             in the NDOS.INI file.
  13151.  
  13152. Options:##  /A(dd):  Add a command to the history list.  This
  13153.             performs the same function as the Ctrl-K key at the
  13154.             command line (see page 49).
  13155.  
  13156.             /F(ree):  Erase all entries in the command history
  13157.             list.
  13158.  
  13159.             /P(rompt):  Wait for a key after displaying each page
  13160.             of the list.
  13161.  
  13162.         ##  /R(ead):  Read the command history from the specified
  13163.             file and append it to the history list currently held
  13164.             in memory.  You can save the history list by
  13165.             redirecting the output of HISTORY to a file.  This
  13166.             example saves the command history to a file called
  13167.             HISTFLE and reads it back again immediately.  If you
  13168.             leave out the second line, NDOS will append the
  13169.             contents of the file to the current history list
  13170.             instead of replacing the current history list with the
  13171.             file copy:
  13172.  
  13173.                  c:\> history > histfile
  13174.                  c:\> history /f
  13175.                  c:\> history /r histfile
  13176.  
  13177.             If you need to save your history at the end of each
  13178.             day's work, you might use commands like this in your
  13179.             AUTOEXEC.BAT file:
  13180.  
  13181.                  if exist c:\histfile history /r c:\histfile
  13182.                  alias shut*down history > c:\histfile
  13183.  
  13184.             This restores the previous history list if it exists,
  13185.             then defines an alias which will save the history
  13186.             before shutting off the system.
  13187.  
  13188.  
  13189.  
  13190.  
  13191.  
  13192.  
  13193.  
  13194.  
  13195.  
  13196.  
  13197.  
  13198.  
  13199. ___________________________________________________________________
  13200. NDOS Reference Manual                                          226
  13201.  
  13202.  
  13203. ___________________________________________________________________
  13204.  
  13205. IF                                                       (Enhanced)
  13206.  
  13207. Purpose:    Execute a command if a condition or set of conditions
  13208.             is true.
  13209.  
  13210. Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  13211.                  condition ...] command
  13212.  
  13213.             condition:  A test to determine if the command should
  13214.             be executed.
  13215.             command:  The command to execute if the condition is
  13216.             true.
  13217.  
  13218.             See also: IFF.
  13219.  
  13220. Usage:      IF is normally used only in aliases and batch files.
  13221.             It is always followed by one or more conditions and
  13222.             then a command.  NDOS first evaluates the conditions.
  13223.             If they are true, NDOS executes the command.
  13224.             Otherwise, the command is ignored.  If you add a NOT
  13225.             before a condition, the command is executed only when
  13226.             the condition is false.
  13227.  
  13228.             You can link conditions with .AND., .OR., or .XOR., and
  13229.             you can nest IF statements.  The conditions can test
  13230.             strings, numbers, the existence of a file or
  13231.             subdirectory, the errorlevel returned from the
  13232.             preceding external command, and the existence of alias
  13233.             names and internal commands.
  13234.  
  13235.             The command can be an alias, a NDOS internal command,
  13236.             an external command, or a batch file.  The entire IF
  13237.             statement, including all conditions and the command,
  13238.             must fit on one line.
  13239.  
  13240.         ##  You can use command grouping (see page 84) to execute
  13241.             multiple commands if the condition is true.  For
  13242.             example, the following command tests if any .TXT files
  13243.             exist.  If they do, they are copied to drive A: and
  13244.             their extensions are changed to .TXO:
  13245.  
  13246.                  if exist *.txt (copy *.txt a: ^ ren *.txt *.txo)
  13247.  
  13248.             (The IFF command provides a more structured method of
  13249.             executing multiple commands if a condition or set of
  13250.             conditions is true.)
  13251.  
  13252.         ##  You may need to increase the NDOS internal stack size
  13253.             using the StackSize directive in NDOS.INI if you use
  13254.             extremely complex combinations of commands like EXCEPT,
  13255.  
  13256. ___________________________________________________________________
  13257. NDOS Reference Manual                                          227
  13258.  
  13259.  
  13260. ___________________________________________________________________
  13261.  
  13262.             FOR, GLOBAL, IF, and SELECT on the same command line,
  13263.             or use complex combinations of these commands in nested
  13264.             batch files or nested GOSUBs.  See the StackSize
  13265.             directive on page 128 for more information.
  13266.  
  13267. Conditions: The following conditional tests are available in both
  13268.             the IF and IFF commands.  They fit into three
  13269.             categories: string tests, numeric tests, and system
  13270.             tests.  The tests can use environment variables, NDOS
  13271.             internal-variables and variable functions (see pages 73
  13272.             and 77), filenames, and literal text and values as
  13273.             their arguments.
  13274.  
  13275.             Spaces are required on either side of the test
  13276.             condition in all cases, except == which will work with
  13277.             or without spaces around it.
  13278.  
  13279.             If you use one of the string or numeric tests like ==
  13280.             or GE, NDOS decides whether to compare the values as
  13281.             numbers or as strings by examining the first character
  13282.             of each value.  If both values begin with a digit, NDOS
  13283.             performs a numeric comparison.  If either value does
  13284.             not begin with a digit, a string comparison is done.
  13285.             To force a string comparison, use double quotation
  13286.             marks around the values you are testing.
  13287.  
  13288.             The difference between numeric and string comparisons
  13289.             is best explained by looking at the way values with and
  13290.             without blanks are tested.  For example, consider
  13291.             comparing the values 2 and 19.  Numerically, 2 is
  13292.             smaller, but as a string it is "larger" because its
  13293.             first digit is larger than the first digit of 19.  So
  13294.             the first of these conditions will be true, and the
  13295.             second will be false:
  13296.  
  13297.                  if 2 lt 19 ...
  13298.                  if "2" lt "19" ...
  13299.  
  13300.             String Tests:
  13301.  
  13302.               For the string tests, NDOS ignores case differences.
  13303.               When you compare strings, you should always enclose
  13304.               the arguments in double quotation marks in order to
  13305.               avoid syntax errors which may occur if one of the
  13306.               argument values is empty.
  13307.  
  13308.               string1 == string2
  13309.               string1 EQ string2
  13310.  
  13311.  
  13312.  
  13313. ___________________________________________________________________
  13314. NDOS Reference Manual                                          228
  13315.  
  13316.  
  13317. ___________________________________________________________________
  13318.  
  13319.                  If string1 is equal to string2, then the
  13320.                  condition is true.
  13321.  
  13322.               string1 != string2
  13323.               string1 NE string2
  13324.  
  13325.                  If string1 is not equal to string2, then the
  13326.                  condition is true.
  13327.  
  13328.               string1 LT string2
  13329.  
  13330.                  If string1 is less than string2, then the
  13331.                  condition is true.
  13332.  
  13333.               string1 LE string2
  13334.  
  13335.                  If string1 is less than or equal to string2, then
  13336.                  the condition is true.
  13337.  
  13338.               string1 GT string2
  13339.  
  13340.                  If string1 is greater than string2, then the
  13341.                  condition is true.
  13342.  
  13343.               string1 GE string2
  13344.  
  13345.                  If string1 is greater than or equal to string2,
  13346.                  then the condition is true.
  13347.  
  13348.               This first batch file fragment runs a program called
  13349.               MONOPROG if a monochrome monitor is attached to the
  13350.               system:
  13351.  
  13352.                       if "%_monitor" == "mono" monoprog
  13353.  
  13354.               The second batch file fragment tests for a string
  13355.               value:
  13356.  
  13357.                       input "Enter your selection : " %%cmd
  13358.                       if "%cmd" == "WP" goto wordproc
  13359.                       if "%cmd" NE "GRAPHICS" goto badentry
  13360.  
  13361.               This example calls GO.BTM if the first two
  13362.               characters of the file MYFILE contain the string
  13363.               "GO" (enter this example on one line):
  13364.  
  13365.                       if "%@substr[%@line[myfile,0],0,2]"=="GO"
  13366.                       call go.btm
  13367.  
  13368.  
  13369.  
  13370. ___________________________________________________________________
  13371. NDOS Reference Manual                                          229
  13372.  
  13373.  
  13374. ___________________________________________________________________
  13375.  
  13376.             Numeric Tests:
  13377.  
  13378.               The numeric tests available are exactly the same as
  13379.               the string tests (==, EQ, !=, NE, LT, LE, GT, and
  13380.               GE), but compare values as numbers instead of
  13381.               strings.  Both values must begin with a digit or
  13382.               NDOS will perform a string test instead.
  13383.  
  13384.               The first example below tests whether there is more
  13385.               than 500K of free base memory; the second tests for
  13386.               more than 2 MB of free EMS memory:
  13387.  
  13388.                     c:\> if %@dosmem[k] gt 500 echo Over 500K free
  13389.                     c:\> if %@ems[m] gt 2 echo Over 2 MB EMS free
  13390.  
  13391.               This example shows how to implement a simple loop
  13392.               inside a batch file.  The lines between the labels
  13393.               :loop and :loopdone will be executed 100 times:
  13394.  
  13395.                       set limit=100
  13396.                       set counter=1
  13397.                       :loop
  13398.                       if %counter gt %limit goto loopdone
  13399.                         rem DO SOME WORK HERE
  13400.                         set counter=%@eval[%counter + 1]
  13401.                         goto loop
  13402.                       :loopdone
  13403.  
  13404.             System Tests:
  13405.  
  13406.               The final conditions test the system status.  You
  13407.               can also use NDOS pseudo-variables and variable
  13408.               functions to test other parts of the system status.
  13409.  
  13410.               ERRORLEVEL [condition] n
  13411.  
  13412.                  This test retrieves the exit code of the
  13413.                  preceding external program.  By convention,
  13414.                  programs return an exit code of 0 when they are
  13415.                  successful and a number between 1 and 255 to
  13416.                  indicate an error.  The condition can be any of
  13417.                  the numeric operators listed above (EQ, !=, GT,
  13418.                  etc.).  If no relational operator is specified,
  13419.                  the default is GE.  The comparison between the
  13420.                  exit code and n is done numerically.
  13421.  
  13422.                  Not all programs return an explicit exit code.
  13423.                  For programs which do not, the behavior of
  13424.                  ERRORLEVEL is undefined and may be erratic.
  13425.  
  13426.  
  13427. ___________________________________________________________________
  13428. NDOS Reference Manual                                          230
  13429.  
  13430.  
  13431. ___________________________________________________________________
  13432.  
  13433.               EXIST filename
  13434.  
  13435.                  If the file exists, the condition is true.  You
  13436.                  can use wildcards in the filename, in which case
  13437.                  the condition is true if any file matching the
  13438.                  wildcards exists.
  13439.  
  13440.               ISALIAS aliasname
  13441.  
  13442.                  If the specified name is an alias, the condition
  13443.                  is true.
  13444.  
  13445.               [ISDIR | DIREXIST] path
  13446.  
  13447.                  If the subdirectory exists, the condition is
  13448.                  true.  For compatibility with DR-DOS, DIREXIST
  13449.                  may be used as a synonym for ISDIR.
  13450.  
  13451.               ISINTERNAL command
  13452.  
  13453.                  If the specified command is an active, internal
  13454.                  NDOS command, the condition is true.  Commands
  13455.                  can be activated and deactivated with the SETDOS
  13456.                  /I command.
  13457.  
  13458.               The first batch file fragment below tests for the
  13459.               existence of A:\JAN.DOC before copying it to drive
  13460.               C:.
  13461.  
  13462.                       if exist a:\jan.doc copy a:\jan.doc c:\
  13463.  
  13464.               This example tests the exit code of the previous
  13465.               program and stops batch file processing if an error
  13466.               occurred:
  13467.  
  13468.                       if errorlevel==0 goto success
  13469.                       echo "External Error -- Batch File Ends!"
  13470.                       cancel
  13471.  
  13472.             Combining Tests:
  13473.  
  13474.               You can negate the result of any test with NOT, and
  13475.               combine tests of any sort with .AND., .OR., and
  13476.               .XOR.  Test conditions are always scanned from left
  13477.               to right -- there is no implied order of precedence,
  13478.               as there is in some programming languages.
  13479.  
  13480.               When two tests are combined with .AND., the result
  13481.               is true if both of the individual tests are true.
  13482.               When two tests are combined with .OR., the result is
  13483.  
  13484. ___________________________________________________________________
  13485. NDOS Reference Manual                                          231
  13486.  
  13487.  
  13488. ___________________________________________________________________
  13489.  
  13490.               true if either (or both) of the individual tests are
  13491.               true.  When two tests are combined with .XOR., the
  13492.               result is true only if one of the tests is true and
  13493.               the other is false.
  13494.  
  13495.               This example runs a program called HIGHRES if either
  13496.               an EGA or VGA video adapter is in use:
  13497.  
  13498.                     if "%_video"=="EGA" .or. "%_video"==vga highres
  13499.  
  13500.  
  13501.  
  13502.  
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.  
  13509.  
  13510.  
  13511.  
  13512.  
  13513.  
  13514.  
  13515.  
  13516.  
  13517.  
  13518.  
  13519.  
  13520.  
  13521.  
  13522.  
  13523.  
  13524.  
  13525.  
  13526.  
  13527.  
  13528.  
  13529.  
  13530.  
  13531.  
  13532.  
  13533.  
  13534.  
  13535.  
  13536.  
  13537.  
  13538.  
  13539.  
  13540.  
  13541. ___________________________________________________________________
  13542. NDOS Reference Manual                                          232
  13543.  
  13544.  
  13545. ___________________________________________________________________
  13546.  
  13547. IFF                                                           (New)
  13548.  
  13549. Purpose:    Allow IF/THEN/ELSE conditional execution of
  13550.             commands.
  13551.  
  13552. Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  13553.                condition ...] THEN ^ commands
  13554.             [ELSEIFF condition  THEN ^ commands ] ...
  13555.             [ELSE ^ commands ]
  13556.             ^ ENDIFF
  13557.  
  13558.             condition:  A test to determine if the command(s)
  13559.             should be executed.
  13560.             commands:  One or more commands to execute if the
  13561.             condition(s) is true.  If you use multiple commands,
  13562.             they must be separated by carets or be placed on
  13563.             separate lines of a batch file.
  13564.  
  13565.             See also: IF
  13566.  
  13567. Usage:      IFF is similar to the IF command, except that it can
  13568.             perform one set of commands when a condition or set of
  13569.             conditions is true and different commands when the
  13570.             conditions are false.
  13571.  
  13572.             IFF can execute multiple commands when the conditions
  13573.             are true or false; IF normally executes only one
  13574.             command.  IFF imposes no limit on the number of
  13575.             commands and is generally a "cleaner" and more
  13576.             structured command than IF.
  13577.  
  13578.             IFF is always followed by one or more conditions, which
  13579.             NDOS evaluates.  If they are true, NDOS executes the
  13580.             commands that follow the word THEN.  Additional
  13581.             conditions can be tested with ELSEIFF.  If none of
  13582.             these conditions are true, NDOS executes the commands
  13583.             that follow the word ELSE.  In both cases, after the
  13584.             selected commands are executed, processing continues
  13585.             after the word ENDIFF.
  13586.  
  13587.             If you add a NOT before the condition, the THEN
  13588.             commands are executed only when the condition is false
  13589.             and the ELSE commands are executed only when the
  13590.             condition is true.
  13591.  
  13592.             You can link conditions with .AND., .OR., or .XOR., and
  13593.             you can nest IFF statements up to 15 deep.  The
  13594.             conditions can test strings or numbers, the existence
  13595.             of a file or subdirectory, the errorlevel returned from
  13596.  
  13597.  
  13598. ___________________________________________________________________
  13599. NDOS Reference Manual                                          233
  13600.  
  13601.  
  13602. ___________________________________________________________________
  13603.  
  13604.             the preceding external command, and the existence of
  13605.             alias names and internal commands.
  13606.  
  13607.             See the IF command for a list of the possible
  13608.             conditions.
  13609.  
  13610.             The commands can include any NDOS internal command or
  13611.             alias, external command, or batch file.
  13612.  
  13613.             The following batch file fragment tests the monitor
  13614.             type (monochrome or color), and sets the appropriate
  13615.             colors and prompt (enter the "prompt" lines on one line
  13616.             of the batch file):
  13617.  
  13618.                  iff "%_monitor" == "color" then
  13619.                    color bright white on blue ^ cls
  13620.                    prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  13621.                       $p$e[u$e[44;37m$n$g
  13622.                  else
  13623.                    prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  13624.                       $p$e[u$e[0m$n$g
  13625.                  endiff
  13626.  
  13627.             The alias in this second example checks to see if the
  13628.             argument is a subdirectory.  If so, the alias deletes
  13629.             the subdirectory's files and removes it (enter this on
  13630.             one line):
  13631.  
  13632.                  c:\> alias prune `iff isdir %1 then ^
  13633.                       del /p /sxz %1 ^ rd %1 ^ else ^
  13634.                       echo Not a directory!^endiff`
  13635.  
  13636.         ##  If you do a GOTO inside an IFF, NDOS normally assumes
  13637.             you are jumping outside of all active IFF statements.
  13638.             If you attempt to GOTO another part of the same IFF,
  13639.             the middle of another IFF, or a different IFF nesting
  13640.             level, you will eventually receive an "unknown command"
  13641.             error on a subsequent ELSE, ELSEIFF, or ENDIFF
  13642.             statement.  You can override this restriction with GOTO
  13643.             /I, but do so only if you are absolutely certain that
  13644.             your GOTO command is branching entirely within the
  13645.             current active IFF statement.  Using /I under any other
  13646.             conditions will cause an error later in your batch
  13647.             file.
  13648.  
  13649.  
  13650.  
  13651.  
  13652.  
  13653.  
  13654.  
  13655. ___________________________________________________________________
  13656. NDOS Reference Manual                                          234
  13657.  
  13658.  
  13659. ___________________________________________________________________
  13660.  
  13661. INKEY                                                         (New)
  13662.  
  13663. Purpose:    Get a single keystroke from the user and store it in an
  13664.             environment variable.
  13665.  
  13666. Format:     INKEY [/K"keys" /Wn] [prompt] %%varname
  13667.  
  13668.             prompt:  Optional text that is displayed as a prompt.
  13669.             varname:  The variable that will hold the user's
  13670.             keystroke.
  13671.  
  13672.             /K (valid keystrokes)            W(ait)
  13673.  
  13674.             See also: INPUT and KEYSTACK.
  13675.  
  13676. Usage:      INKEY optionally displays a prompt for user input.
  13677.             Then it waits for a specified time or indefinitely for
  13678.             a keystroke, and places the keystroke into an
  13679.             environment variable.  It is normally used in batch
  13680.             files and aliases to get a menu choice or other single-
  13681.             key input from the user.  Along with the INPUT command,
  13682.             INKEY allows great flexibility in reading user input
  13683.             from within a batch file or alias.
  13684.  
  13685.             If prompt text is included in an INKEY command, it is
  13686.             displayed while INKEY waits for input.
  13687.  
  13688.             The following batch file fragment prompts for a
  13689.             character and stores it in the variable NUM:
  13690.  
  13691.                  inkey Enter a number from 1 to 9:  %%num
  13692.  
  13693.             INKEY reads standard input for the keystroke, so it
  13694.             will accept keystrokes from a redirected file or from
  13695.             the KEYSTACK.  You can supply a list of valid
  13696.             keystrokes with the /K option.
  13697.  
  13698.             Standard keystrokes with ASCII values between 1 and 255
  13699.             are stored directly in the environment variable.
  13700.             Extended keystrokes (for example, function keys and
  13701.             cursor keys) are stored as a string in decimal format,
  13702.             with a leading @ (for example, the F1 key is @59).  The
  13703.             Enter key is stored as an extended keystroke, with the
  13704.             code @28.  See Appendix B (page 315) for a list of the
  13705.             ASCII and extended key codes.
  13706.  
  13707.             If you press Ctrl-C or Ctrl-BREAK while INKEY is
  13708.             waiting for a key, execution of an alias will be
  13709.             terminated, and execution of a batch file will be
  13710.  
  13711.  
  13712. ___________________________________________________________________
  13713. NDOS Reference Manual                                          235
  13714.  
  13715.  
  13716. ___________________________________________________________________
  13717.  
  13718.             suspended while you are asked whether to cancel the
  13719.             batch job.
  13720.  
  13721. Options:    /K["keys"]:  Specify the permissible keystrokes.  The
  13722.             list of valid keystrokes should be enclosed in double
  13723.             quotation marks.  For alphabetic keys the validity test
  13724.             is not case-sensitive.  You can specify extended keys
  13725.             by enclosing their names in square brackets (within the
  13726.             quotation marks), for example:
  13727.  
  13728.                  inkey /k"ab[Alt-F10]" Enter A, B, or Alt-F10
  13729.                  %%var
  13730.  
  13731.             If an invalid keystroke is entered NDOS will echo the
  13732.             keystroke if possible, beep, move the cursor back one
  13733.             character, and wait for another keystroke.
  13734.  
  13735.             Key names within square brackets are entered in the
  13736.             form:
  13737.  
  13738.                  Prefix-Keyname
  13739.  
  13740.             The key prefix is optional, and can be any one of the
  13741.             following:
  13742.  
  13743.               Alt        followed by A - Z, 0 - 9, F1 - F12, or
  13744.                          Bksp
  13745.               Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  13746.                          Left, Right, Home, End, PageUp,
  13747.                          PageDown, Ins, or Del
  13748.               Shift      followed by F1 - F12 or Tab.
  13749.  
  13750.             The possible key names are:
  13751.  
  13752.               A - Z         Enter         PageDown
  13753.               0 - 9         Up            Home
  13754.               F1 - F12      Down          End
  13755.               Esc           Left          Ins
  13756.               Bksp          Right         Del
  13757.               Tab           PageUp
  13758.  
  13759.             All key names must be spelled as shown.  The prefix
  13760.             must be separated from the key name with a dash.
  13761.  
  13762.             /W(ait):  Timeout period,  in seconds, to wait for a
  13763.             response.  If no keystroke is entered by the end of the
  13764.             timeout period, INKEY returns with the variable
  13765.             unchanged.  You can specify /W0 to return immediately
  13766.             if there are no keys waiting in the keyboard buffer.
  13767.  
  13768.  
  13769. ___________________________________________________________________
  13770. NDOS Reference Manual                                          236
  13771.  
  13772.  
  13773. ___________________________________________________________________
  13774.  
  13775.             For example, the following batch file fragment waits up
  13776.             to ten seconds for a character, then tests to see if a
  13777.             "Y" was entered:
  13778.  
  13779.                  set net=N
  13780.                  inkey /K"YN" /w10 Load the network (Y/N)?  %%net
  13781.                  iff "%net" == "Y" then
  13782.                    rem Commands to load the network go here
  13783.                  endiff
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.  
  13799.  
  13800.  
  13801.  
  13802.  
  13803.  
  13804.  
  13805.  
  13806.  
  13807.  
  13808.  
  13809.  
  13810.  
  13811.  
  13812.  
  13813.  
  13814.  
  13815.  
  13816.  
  13817.  
  13818.  
  13819.  
  13820.  
  13821.  
  13822.  
  13823.  
  13824.  
  13825.  
  13826. ___________________________________________________________________
  13827. NDOS Reference Manual                                          237
  13828.  
  13829.  
  13830. ___________________________________________________________________
  13831.  
  13832. INPUT                                                         (New)
  13833.  
  13834. Purpose:    Get a string from the keyboard and save it in an
  13835.             environment variable.
  13836.  
  13837. Format:     INPUT [/Wn] [prompt] %%varname
  13838.  
  13839.             prompt:  Optional text that is displayed as a prompt.
  13840.             varname:  The variable that will hold the user's input.
  13841.  
  13842.             /W(ait)
  13843.  
  13844.             See also: INKEY and KEYSTACK.
  13845.  
  13846. Usage:      INPUT optionally displays a prompt for user input.
  13847.             Then it waits for a specified time or indefinitely for
  13848.             the user's entry.  It places any characters typed by
  13849.             the user into an environment variable.  INPUT is
  13850.             normally used in batch files and aliases to get multi-
  13851.             key input from the user.  Along with the INKEY command,
  13852.             INPUT allows great flexibility in reading user input
  13853.             from within a batch file or alias.
  13854.  
  13855.             If prompt text is included in an INPUT command, it is
  13856.             displayed while INPUT waits for input.  Standard NDOS
  13857.             command line editing keys may be used to edit the input
  13858.             string as it is entered.
  13859.  
  13860.             All characters entered up to, but not including, the
  13861.             carriage return are stored in the variable.
  13862.  
  13863.             The following batch file fragment prompts for a string
  13864.             and stores it in the variable FNAME:
  13865.  
  13866.                  input Enter the filename:  %%fname
  13867.  
  13868.             INPUT reads standard input, so it will accept text from
  13869.             a re-directed file or from the KEYSTACK.
  13870.  
  13871. Option:     /W(ait):  Timeout period,  in seconds, to wait for a
  13872.             response.  If no keystroke is entered by the end of the
  13873.             timeout period, INPUT returns with the variable
  13874.             unchanged.  If you enter a key before the timeout
  13875.             period, INPUT will wait indefinitely for the remainder
  13876.             of the line.  You can specify /W0 to return immediately
  13877.             if there are no keys waiting in the keyboard buffer.
  13878.  
  13879.  
  13880.  
  13881.  
  13882.  
  13883. ___________________________________________________________________
  13884. NDOS Reference Manual                                          238
  13885.  
  13886.  
  13887. ___________________________________________________________________
  13888.  
  13889. KEYSTACK                                                      (New)
  13890.  
  13891. Purpose:    Feed keystrokes to a program or command automatically.
  13892.  
  13893. Format:     KEYSTACK [/Wn] ["abc"] [keyname] [!] ...
  13894.  
  13895.             "abc":  Literal characters to be placed in the
  13896.             Keystack.
  13897.             keyname:  Name or code for a key to be placed in the
  13898.             Keystack.
  13899.             !:  Signal to clear the Keystack and the keyboard
  13900.             buffer.
  13901.  
  13902.             /W(ait)
  13903.  
  13904. Usage:      KEYSTACK takes a series of keystrokes and feeds them to
  13905.             a program or command as if they were typed at the
  13906.             keyboard.  When the program has used all of the
  13907.             keystrokes in the keystack buffer, it will begin to
  13908.             read the keyboard for input, as it normally would.
  13909.  
  13910.             KEYSTACK will only work if the memory-resident program
  13911.             KSTACK.COM has been loaded.  KSTACK is usually loaded
  13912.             from the AUTOEXEC.BAT file (see page 105).  (It can
  13913.             also be loaded with an INSTALL= directive in CONFIG.SYS
  13914.             if your version of DOS supports INSTALL=; see your DOS
  13915.             manual for details).  If KSTACK is not loaded the
  13916.             KEYSTACK command will display an error message.  If you
  13917.             are using a multitasking system such as DESQview or
  13918.             Windows, see page 142 for information on loading KSTACK
  13919.             within a window.
  13920.  
  13921.             Characters entered within double quotation marks
  13922.             ("abc") will be stored "as is" in the keyboard buffer.
  13923.             The only items allowed outside double quotation marks
  13924.             are key names, key codes, and the /W option.
  13925.  
  13926.             Key names are entered in the form:
  13927.  
  13928.                  [Prefix-]Keyname
  13929.  
  13930.             The key prefix can be left out, in which case any of
  13931.             the key names can be used except A - Z or 0 - 9.  If
  13932.             the key prefix is used it can be any one of the
  13933.             following:
  13934.  
  13935.               Alt        followed by A - Z, 0 - 9, F1 - F12, or
  13936.                          Bksp
  13937.  
  13938.  
  13939.  
  13940. ___________________________________________________________________
  13941. NDOS Reference Manual                                          239
  13942.  
  13943.  
  13944. ___________________________________________________________________
  13945.  
  13946.               Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  13947.                          Left, Right, Home, End, PageUp,
  13948.                          PageDown, Ins, or Del
  13949.               Shift      followed by F1 - F12 or Tab.
  13950.  
  13951.             The possible key names are:
  13952.  
  13953.               A - Z         Enter         PageDown
  13954.               0 - 9         Up            Home
  13955.               F1 - F12      Down          End
  13956.               Esc           Left          Ins
  13957.               Bksp          Right         Del
  13958.               Tab           PageUp
  13959.  
  13960.             All key names must be spelled as shown.  The prefix and
  13961.             key name must be separated by a dash.  For example,
  13962.  
  13963.                  Alt-F10        This is okay
  13964.                  Alt F10        The space will cause an error
  13965.  
  13966.             If you prefer, you can use a numeric value instead of a
  13967.             key name.  Use the ASCII code for an ASCII, extended
  13968.             ASCII, or control character.  Use the scan code
  13969.             preceded by an at-sign [@] for extended key codes like
  13970.             F1 or the cursor keys.  In general, you will find it
  13971.             easier to use the names described above rather than key
  13972.             numbers.  See Appendix B (page 315) for an explanation
  13973.             and list of keyboard codes.
  13974.  
  13975.             An exclamation mark [!] will clear all pending
  13976.             keystrokes, both in the KEYSTACK buffer and in the
  13977.             keyboard buffer.
  13978.  
  13979.             For example, to start ProComm Plus and skip the opening
  13980.             screen you could use the command:
  13981.  
  13982.                  c:\comm> keystack 32 ^ pcplus
  13983.  
  13984.             This places a space (ASCII code 32) in the buffer, then
  13985.             runs ProComm Plus.  When ProComm looks for a keystroke
  13986.             to end the display of the opening screen the keystroke
  13987.             is already in the buffer, so the opening screen is
  13988.             removed immediately.
  13989.  
  13990.             The KEYSTACK command must be executed before running
  13991.             the program which is going to receive the stacked
  13992.             keystrokes.  This places the keystrokes into the buffer
  13993.             first, so the program can find them when it runs.
  13994.  
  13995.  
  13996.  
  13997. ___________________________________________________________________
  13998. NDOS Reference Manual                                          240
  13999.  
  14000.  
  14001. ___________________________________________________________________
  14002.  
  14003.             You can store a maximum of 255 characters in the
  14004.             KEYSTACK buffer.  Each time the KEYSTACK command is
  14005.             executed, it will clear any remaining keystrokes stored
  14006.             by a previous KEYSTACK command.
  14007.  
  14008.             You may need to experiment with your programs and
  14009.             insert delays (see the /W option) to find a keystroke
  14010.             sequence that works for any particular program.
  14011.  
  14012.             Programs that bypass DOS and the BIOS for keyboard
  14013.             input cannot read keystrokes entered with KEYSTACK.  If
  14014.             you use KEYSTACK then run such a program, the
  14015.             keystrokes will not appear in the program, but may
  14016.             appear at the prompt when you exit the program and
  14017.             return to NDOS.
  14018.  
  14019.         ##  KEYSTACK treats the number zero as a special case; it
  14020.             is used with programs that flush the keyboard buffer.
  14021.             When KEYSTACK processes a key value of zero, it tells
  14022.             the program the buffer is clear, so subsequent
  14023.             keystrokes will be accepted normally.  Some programs
  14024.             will require several zeros before they will accept
  14025.             input; you may need to experiment to determine the
  14026.             correct number.
  14027.  
  14028.             For example, the following batch file starts Lotus 1-2-
  14029.             3 and loads the file specified on the command line when
  14030.             the batch file is invoked (the KEYSTACK command should
  14031.             be entered on one line):
  14032.  
  14033.                  pushd c:\123
  14034.                  keystack 0 Enter 0 Enter 0 Enter 0 Enter 0 Enter
  14035.                    "/FR" 0 "%1" Enter
  14036.                  123
  14037.                  popd
  14038.  
  14039.             The sequence of "0 Enter" pairs tells Lotus 1-2-3 that
  14040.             the keyboard buffer is empty, then passes Lotus 1-2-3 a
  14041.             carriage return, repeating this sequence five times.
  14042.             This gets Lotus 1-2-3 to a point where an empty
  14043.             spreadsheet is displayed.  The rest of the KEYSTACK
  14044.             line issues a File Retrieve command (/FR), simulates an
  14045.             empty keyboard buffer once more, enters the filename
  14046.             passed on the batch command line (%1), and finally
  14047.             enters a carriage return to end the filename.
  14048.  
  14049.  
  14050.  
  14051.  
  14052.  
  14053.  
  14054. ___________________________________________________________________
  14055. NDOS Reference Manual                                          241
  14056.  
  14057.  
  14058. ___________________________________________________________________
  14059.  
  14060.         ##  Here's the same command defined as an alias (enter this
  14061.             on one line):
  14062.  
  14063.                  alias 321 pushd c:\123 ^ keystack 0 Enter 0
  14064.                  Enter 0 Enter 0 Enter 0 Enter "/FR" 0 "%1" 13 ^
  14065.                  123 ^ popd
  14066.  
  14067.         ##  Some programs require both the keyboard "scan code" and
  14068.             the ASCII value to be stacked.  To stack both codes,
  14069.             calculate the value ((256 * scan code) + ASCII code)
  14070.             and enter that numeric value as an argument for
  14071.             KEYSTACK.  For example, for the Enter key, the scan
  14072.             code is 28 and the ASCII code is 13, so to stack both
  14073.             values use ((256 * 28) + 13) or KEYSTACK 7181.  Try
  14074.             this approach if a "normal" KEYSTACK command does not
  14075.             work (for example, if you use KEYSTACK 13 for the Enter
  14076.             key and the program doesn't see the correct character).
  14077.             To stack combined key codes you must use the numeric
  14078.             value, not the key name (see Appendix B on page 315 for
  14079.             keyboard codes).
  14080.  
  14081. Options:##  /W(ait):  Delay the next keystroke in the KEYSTACK
  14082.             buffer by a specified number of clock "ticks".  A clock
  14083.             tick is approximately 1/18 second.  The number of clock
  14084.             ticks to delay should be placed immediately after the
  14085.             W, and must be between 1 and 65535 (65535 ticks is
  14086.             about one hour).  You can use the /W option as many
  14087.             times as desired and at any point in the string of
  14088.             keystrokes except within double quotation marks.  Some
  14089.             programs may need the delays provided by /W in order
  14090.             to receive keystrokes properly from KEYSTACK.  The
  14091.             only way to determine what delay is needed is to
  14092.             experiment.  Sometimes a combination of a delay and an
  14093.             "empty buffer" signal (a zero) are required.  For
  14094.             example, to start the program CADX and send it an F7,
  14095.             a delay of one second, an indication that the keyboard
  14096.             buffer is empty, and a carriage return:
  14097.  
  14098.                  c:\> keystack F7 /W18 0 Enter ^ cadx
  14099.  
  14100.  
  14101.  
  14102.  
  14103.  
  14104.  
  14105.  
  14106.  
  14107.  
  14108.  
  14109.  
  14110.  
  14111. ___________________________________________________________________
  14112. NDOS Reference Manual                                          242
  14113.  
  14114.  
  14115. ___________________________________________________________________
  14116.  
  14117. LH/LOADHIGH                                            (Compatible)
  14118.  
  14119. Purpose:    Load a memory resident program into an Upper Memory
  14120.             Block (UMB).
  14121.  
  14122. Format:     LOADHIGH | LH pathname [parameters]
  14123.                  or
  14124.  
  14125.             LOADHIGH [/L:region1[,minsize1] [;region2[,minsize2]
  14126.             [...] [/S]] pathname [parameters]
  14127.  
  14128.             /L:region1[,minsize1] [;region2[,minsize2]]...
  14129.  
  14130.             Specifies the regions of memory to load the program.
  14131.             Region1 specifies the number of the first memory
  14132.             region; minsize1 specifies the (optional) minimum size.
  14133.             Region2 and minsize2 specify the (optional) second
  14134.             region. You can specify as many regions as you want.
  14135.  
  14136.             /S:  Shrinks a UMB to its minimum size while the
  14137.             program is loading. MemMaker primarily uses /S.
  14138.  
  14139.             pathname:  The program to load into memory.
  14140.  
  14141.             parameters:  Any command line parameters for the loaded
  14142.             program.
  14143.  
  14144. Usage:      LH and LOADHIGH are synonyms.  You can use either one.
  14145.  
  14146.             LOADHIGH requires MS-DOS 5.0 or above.
  14147.  
  14148.             If you load memory-resident programs into UMBs, you
  14149.             will have more room in base memory for application
  14150.             programs.  If your system has no UMBs, or if the
  14151.             program is larger than the largest UMB, then LOADHIGH
  14152.             will load the program into conventional base memory.
  14153.  
  14154.             For example, to load the program C:\UTIL\CACHE.EXE into
  14155.             high memory:
  14156.  
  14157.                  c:\> loadhigh c:\util\cache.exe
  14158.  
  14159.             In addition to MS-DOS 5.0 or above, LOADHIGH requires
  14160.             the DOS=UMB command in your CONFIG.SYS file.  It can
  14161.             only be used to load programs into UMBs managed by MS-
  14162.             DOS 5.0 and above.
  14163.  
  14164.  
  14165.  
  14166.  
  14167.  
  14168. ___________________________________________________________________
  14169. NDOS Reference Manual                                          243
  14170.  
  14171.  
  14172. ___________________________________________________________________
  14173.  
  14174.             If you use a memory manager like 386MAX or QEMM to
  14175.             manage your UMBs, rather than the MS-DOS DOS=UMB
  14176.             directive, then LOADHIGH will not work, and you must
  14177.             use the equivalent command supplied with your memory
  14178.             manager in order to load programs high.
  14179.  
  14180.  
  14181.  
  14182.  
  14183.  
  14184.  
  14185.  
  14186.  
  14187.  
  14188.  
  14189.  
  14190.  
  14191.  
  14192.  
  14193.  
  14194.  
  14195.  
  14196.  
  14197.  
  14198.  
  14199.  
  14200.  
  14201.  
  14202.  
  14203.  
  14204.  
  14205.  
  14206.  
  14207.  
  14208.  
  14209.  
  14210.  
  14211.  
  14212.  
  14213.  
  14214.  
  14215.  
  14216.  
  14217.  
  14218.  
  14219.  
  14220.  
  14221.  
  14222.  
  14223.  
  14224.  
  14225. ___________________________________________________________________
  14226. NDOS Reference Manual                                          244
  14227.  
  14228.  
  14229. ___________________________________________________________________
  14230.  
  14231. LIST                                                          (New)
  14232.  
  14233. Purpose:    Display a file, with forward and backward paging and
  14234.             scrolling.
  14235.  
  14236. Format:     LIST [/H /S /W] file...
  14237.  
  14238.             file:  A file or list of files to display.
  14239.  
  14240.             /H(igh bit off)             /W(rap)
  14241.             /S(tandard input)
  14242.  
  14243.             See also: TYPE.
  14244.  
  14245. Usage:      LIST provides a much faster and more flexible way to
  14246.             view a file than TYPE, without the overhead of loading
  14247.             and using a text editor.
  14248.  
  14249.             LIST is normally used for displaying ASCII text files.
  14250.             Most other files contain non-alphabetic characters and
  14251.             may be unreadable.
  14252.  
  14253.             For example, to display a file called MEMO.DOC:
  14254.  
  14255.                  c:\> list memo.doc
  14256.  
  14257.             LIST uses the cursor pad to scroll through the file.
  14258.             The following keys have special meanings:
  14259.  
  14260.                  Home              Display the first page of the
  14261.                                    file.
  14262.                  End               Display the last page of the
  14263.                                    file.
  14264.                  Esc               Exit the current file.
  14265.                  Ctrl-C            Quit LIST.
  14266.                  UpArrow           Scroll up one line.
  14267.                  DownArrow         Scroll down one line.
  14268.                  LeftArrow         Scroll left eight columns.
  14269.                  RightArrow        Scroll right eight columns.
  14270.                  Ctrl-LeftArrow    Scroll left 40 columns.
  14271.                  Ctrl-RightArrow   Scroll right 40 columns.
  14272.                  F1                Call the NDOS online help
  14273.                  F                 Prompt and search for a string
  14274.                                    (case is ignored).
  14275.                  H                 Toggle the "strip high bit" (/H)
  14276.                                    option.
  14277.                  N                 Find next matching string (case
  14278.                                    is ignored).
  14279.                  P                 Print the entire file on LPT1.
  14280.  
  14281.  
  14282. ___________________________________________________________________
  14283. NDOS Reference Manual                                          245
  14284.  
  14285.  
  14286. ___________________________________________________________________
  14287.  
  14288.                  W                 Toggle the "line wrap" (/W)
  14289.                                    option.
  14290.  
  14291.             LIST saves the search string used by F and N, so you
  14292.             can LIST multiple files and search for the same string
  14293.             simply by pressing N in each file, or repeat your
  14294.             search the next time you use LIST.
  14295.  
  14296.         ##  Most of the LIST keystrokes can be reassigned with
  14297.             NDOS.INI file directives (see pages 121 and 125).
  14298.  
  14299.         ##  You can set the default colors used by LIST (and
  14300.             SELECT) using the ListColors directive in NDOS.INI.  If
  14301.             ListColors is not used the LIST display will use the
  14302.             current screen colors.
  14303.  
  14304. Options:##  /H(igh bit off):  Strip the high bit from each
  14305.             character before displaying. This is useful when
  14306.             displaying files created by some word processors that
  14307.             turn on the high bit for formatting purposes.  If you
  14308.             are displaying a word processor text file and see
  14309.             unusual characters mixed in with the text, try this
  14310.             option.
  14311.  
  14312.             /S(tandard input):  Read from the standard input rather
  14313.             than a file.  This allows you to redirect command
  14314.             output and view it with LIST.  For example, to use LIST
  14315.             to display the output of DIR:
  14316.  
  14317.                  c:\> dir | list /s
  14318.  
  14319.             To redefine the DIR command to always display its
  14320.             output via LIST, use this alias:
  14321.  
  14322.                  c:\> alias `dir *dir %& | list /s`
  14323.  
  14324.             /W(rap):  Wrap the text at the right margin.  This
  14325.             option is useful when displaying files that don't have
  14326.             a carriage return at the end of each line.  The
  14327.             horizontal scrolling keys are intended for use when the
  14328.             display is not wrapped.  If you wrap the display with
  14329.             /W (or with the W key from within LIST), then use the
  14330.             scrolling keys, the wrapping will change as each line
  14331.             is scrolled.  This may produce an unusual display,
  14332.             depending on the structure of the file you are viewing.
  14333.  
  14334.  
  14335.  
  14336.  
  14337.  
  14338.  
  14339. ___________________________________________________________________
  14340. NDOS Reference Manual                                          246
  14341.  
  14342.  
  14343. ___________________________________________________________________
  14344.  
  14345. LOADBTM                                                       (New)
  14346.  
  14347. Purpose:    Switch a batch file to or from BTM mode.
  14348.  
  14349. Format:     LOADBTM [ON | OFF]
  14350.  
  14351. Usage:      NDOS recognizes two kinds of batch files: .BAT and
  14352.             .BTM.  Batch files executing in BTM mode run two to
  14353.             five times faster than in BAT mode.  However, BTM mode
  14354.             should not be used to load memory-resident programs,
  14355.             nor should BTM mode be used for self-modifying batch
  14356.             files.  Batch files automatically start in the mode
  14357.             indicated by their file extension, .BAT or .BTM.
  14358.  
  14359.             The LOADBTM command turns BTM mode on and off.  It can
  14360.             be used to switch modes in either a .BAT or .BTM file.
  14361.             It can also be used to display the current batch mode
  14362.             from inside a batch file when it is used with no
  14363.             argument.
  14364.  
  14365.             LOADBTM can only be used within a .BAT or .BTM file.
  14366.             It is most often used to switch a .BAT file into BTM
  14367.             mode after memory-resident programs are loaded, to
  14368.             convert a .BAT file to BTM mode without changing its
  14369.             extension, or to switch a .BTM file into BAT mode in
  14370.             order to load memory-resident programs.
  14371.  
  14372.             Using LOADBTM to repeatedly switch modes within a .BAT
  14373.             or .BTM file is not efficient.  In most cases, the
  14374.             speed gained by running some parts of the file in BTM
  14375.             mode will be more than offset by the speed lost through
  14376.             repeated loading of the file each time BTM mode is
  14377.             invoked.
  14378.  
  14379.             The following .BAT file fragment loads some memory
  14380.             resident programs (TSRs), and then switches to BTM
  14381.             mode:
  14382.  
  14383.                  rem   Because this file has a .BAT extension,
  14384.                  rem   the initial default state is LOADBTM OFF
  14385.                  rem   Loading TSRs...
  14386.                  ansi.com
  14387.                  mouse.com
  14388.                  rem   Switch to high-speed (BTM) mode now that
  14389.                  rem   TSRs are loaded
  14390.                  loadbtm on
  14391.                  path c:\;c:\util;c:\dos
  14392.                  alias /r c:\aliases
  14393.  
  14394.  
  14395.  
  14396. ___________________________________________________________________
  14397. NDOS Reference Manual                                          247
  14398.  
  14399.  
  14400. ___________________________________________________________________
  14401.  
  14402.             For more information on .BTM and .BAT files, see page
  14403.             91.
  14404.  
  14405.  
  14406.  
  14407.  
  14408.  
  14409.  
  14410.  
  14411.  
  14412.  
  14413.  
  14414.  
  14415.  
  14416.  
  14417.  
  14418.  
  14419.  
  14420.  
  14421.  
  14422.  
  14423.  
  14424.  
  14425.  
  14426.  
  14427.  
  14428.  
  14429.  
  14430.  
  14431.  
  14432.  
  14433.  
  14434.  
  14435.  
  14436.  
  14437.  
  14438.  
  14439.  
  14440.  
  14441.  
  14442.  
  14443.  
  14444.  
  14445.  
  14446.  
  14447.  
  14448.  
  14449.  
  14450.  
  14451.  
  14452.  
  14453. ___________________________________________________________________
  14454. NDOS Reference Manual                                          248
  14455.  
  14456.  
  14457. ___________________________________________________________________
  14458.  
  14459. LOG                                                           (New)
  14460.  
  14461. Purpose:    Save a log of commands to a disk file.
  14462.  
  14463. Format:     LOG [/W file] [ON | OFF | text]
  14464.  
  14465.             file:  The name of the file to hold the log.
  14466.             text:  An optional message that will be added to the
  14467.             log.
  14468.  
  14469.             /W(rite to).
  14470.  
  14471.             See also: HISTORY.
  14472.  
  14473. Usage:      LOG keeps a record of all internal and external
  14474.             commands you use.  Each entry includes the current
  14475.             system date and time, along with the actual command
  14476.             after any alias or variable expansion.  You can use the
  14477.             log file as a record of your daily activities.
  14478.  
  14479.             By default, LOG writes commands to the file NDOSLOG in
  14480.             the root directory of the boot drive.
  14481.  
  14482.             Entering LOG with no parameters displays the log status
  14483.             (ON or OFF):
  14484.  
  14485.                  c:\> log
  14486.                  LOG is OFF
  14487.  
  14488.             To enable or disable logging, add the word "ON" or
  14489.             "OFF" after the LOG command:
  14490.  
  14491.                  c:\> log on
  14492.  
  14493.             Entering LOG with text writes a message to the log
  14494.             file, even if LOG is set OFF.  This allows you to enter
  14495.             headers in the log file:
  14496.  
  14497.                  c:\> log "Started work on the database system"
  14498.  
  14499.             The LOG file format looks like this:
  14500.  
  14501.                  [mm-dd-yy  hh:mm:ss]  command
  14502.  
  14503.             The LOG output can be used as the basis for writing
  14504.             batch files, but you will probably find HISTORY more
  14505.             effective for this purpose.
  14506.  
  14507. Options:    /W(rite):  This switch specifies a different filename
  14508.             for the LOG output.  It also automatically performs a
  14509.  
  14510. ___________________________________________________________________
  14511. NDOS Reference Manual                                          249
  14512.  
  14513.  
  14514. ___________________________________________________________________
  14515.  
  14516.             LOG ON command.  For example, to turn logging on and
  14517.             write the log to C:\LOG\LOGFILE:
  14518.  
  14519.                  c:\> log /w c:\log\logfile
  14520.  
  14521.  
  14522.  
  14523.  
  14524.  
  14525.  
  14526.  
  14527.  
  14528.  
  14529.  
  14530.  
  14531.  
  14532.  
  14533.  
  14534.  
  14535.  
  14536.  
  14537.  
  14538.  
  14539.  
  14540.  
  14541.  
  14542.  
  14543.  
  14544.  
  14545.  
  14546.  
  14547.  
  14548.  
  14549.  
  14550.  
  14551.  
  14552.  
  14553.  
  14554.  
  14555.  
  14556.  
  14557.  
  14558.  
  14559.  
  14560.  
  14561.  
  14562.  
  14563.  
  14564.  
  14565.  
  14566.  
  14567. ___________________________________________________________________
  14568. NDOS Reference Manual                                          250
  14569.  
  14570.  
  14571. ___________________________________________________________________
  14572.  
  14573. MD/MKDIR                                               (Compatible)
  14574.  
  14575. Purpose:    Create a subdirectory.
  14576.  
  14577. Format:     MD pathname...
  14578.                  or
  14579.             MKDIR pathname...
  14580.  
  14581.             pathname:  The name of one or more directories to
  14582.             create.
  14583.  
  14584.             See also: RD.
  14585.  
  14586. Usage:      MD and MKDIR are synonyms.  You can use either one.
  14587.  
  14588.             MD creates a subdirectory anywhere in the directory
  14589.             tree.  To create a subdirectory from the root, start
  14590.             the pathname with a backslash [\].  For example, this
  14591.             command creates a subdirectory called MYDIR in the root
  14592.             directory:
  14593.  
  14594.                  c:\> md \mydir
  14595.  
  14596.             If no path is given, the new subdirectory is created in
  14597.             the current directory.  This example creates a
  14598.             subdirectory called DIRTWO in the current directory:
  14599.  
  14600.                  c:\mydir> md dirtwo
  14601.  
  14602.             To create a directory from the parent of the current
  14603.             directory (that is, to create a sibling of the current
  14604.             directory), start the pathname with two periods and a
  14605.             backslash [..\].
  14606.  
  14607.             MD creates one directory at a time.  If you need to
  14608.             create the directory C:\ONE\TWO\THREE and none of the
  14609.             named directories exist, you must create each directory
  14610.             separately.  However, because MD accepts multiple
  14611.             arguments, you can still create all three directories
  14612.             in sequence with one command:
  14613.  
  14614.                  c:\> md \one \one\two \one\two\three
  14615.  
  14616.         ##  DOS will not accept directory names longer than 64
  14617.             characters.  You must be sure that the complete
  14618.             directory name from the root to your deepest
  14619.             subdirectory fits within the 64 character restriction.
  14620.  
  14621.  
  14622.  
  14623.  
  14624. ___________________________________________________________________
  14625. NDOS Reference Manual                                          251
  14626.  
  14627.  
  14628. ___________________________________________________________________
  14629.  
  14630. MEMORY                                                        (New)
  14631.  
  14632. Purpose:    Display the amount and status of system RAM.
  14633.  
  14634. Format:     MEMORY
  14635.  
  14636. Usage:      MEMORY displays information about the RAM in your
  14637.             system.  It lists the amount of total RAM in your
  14638.             system and the amount available for applications after
  14639.             DOS, NDOS, and memory-resident programs have been
  14640.             loaded;  the amount of EMS expanded memory, XMS
  14641.             extended memory, and non-XMS extended memory;  the HMA
  14642.             status; and the amount of memory NDOS is using for
  14643.             environment variable space, alias space, and history
  14644.             space:
  14645.  
  14646.                  c:\> memory
  14647.                      655,360 bytes total RAM
  14648.                      534,464 bytes free
  14649.  
  14650.                    1,687,552 bytes total EMS memory
  14651.                    1,097,728 bytes free
  14652.  
  14653.                      914,432 bytes total XMS memory (HMA in use)
  14654.  
  14655.                          512 bytes total environment
  14656.                          195 bytes free
  14657.  
  14658.                        1,024 bytes total alias
  14659.                          452 bytes free
  14660.  
  14661.                        1,024 bytes total history
  14662.  
  14663.             You can use the information from the MEMORY display to
  14664.             fine tune your system, to aid in setting the proper
  14665.             alias and environment sizes in NDOS.INI, and to be sure
  14666.             that you have sufficient memory for your largest
  14667.             applications.
  14668.  
  14669.             If you compare the free RAM displayed by MEMORY with
  14670.             the free RAM displayed by CHKDSK and some memory map
  14671.             programs, MEMORY will usually show a slightly higher
  14672.             value.  The difference is the size of the environment
  14673.             passed to these external programs;  most memory mapping
  14674.             programs do not count the passed environment as free
  14675.             space, but MEMORY does.
  14676.  
  14677.  
  14678.  
  14679.  
  14680.  
  14681. ___________________________________________________________________
  14682. NDOS Reference Manual                                          252
  14683.  
  14684.  
  14685. ___________________________________________________________________
  14686.  
  14687. MOVE                                                          (New)
  14688.  
  14689. Purpose:    Move files to a new directory and drive.
  14690.  
  14691. Format:     MOVE  [/C /D /H /N /P /Q /R /S /U] source...
  14692.             destination
  14693.  
  14694.             source:  A file or list of files to move.
  14695.             destination:  The new location for the files.
  14696.  
  14697.             /C(hanged)                  /Q(uiet)
  14698.             /D(irectory)                /R(eplace)
  14699.             /H(idden and system)        /S(ubdirectory tree)
  14700.             /N(othing)                  /U(pdate)
  14701.             /P(rompt)
  14702.  
  14703.             See also: COPY and RENAME.
  14704.  
  14705. Usage:      The MOVE command moves one or more files from one
  14706.             directory to another, whether the directories are on
  14707.             the same drive or not.  It has the same effect as
  14708.             copying the files to a new location and then deleting
  14709.             the originals.  Like COPY and RENAME, MOVE works with
  14710.             single files, multiple files, and sets of files
  14711.             specified with an include list.  Like those commands,
  14712.             MOVE never changes the attributes of the files that it
  14713.             operates on.
  14714.  
  14715.             The simplest MOVE command moves a single source file to
  14716.             a new location and, optionally, gives it a new name.
  14717.             These two examples both move one file from drive C: to
  14718.             the root directory on drive A:
  14719.  
  14720.                  c:\> move myfile.dat a:\
  14721.                  c:\> move myfile.dat a:\savefile.dat
  14722.  
  14723.             In both cases, MYFILE.DAT is removed from drive C:
  14724.             after it has been copied to drive A:.  If a file called
  14725.             MYFILE.DAT in the first example, or SAVEFILE.DAT in the
  14726.             second example, already existed on drive A:, it would
  14727.             be overwritten.  (This demonstrates the difference
  14728.             between MOVE and RENAME.  MOVE will move files between
  14729.             drives and will overwrite the destination file if it
  14730.             exists; RENAME will not.)
  14731.  
  14732.             If you MOVE multiple files, the destination must be a
  14733.             directory name.  MOVE will move each file into the
  14734.             destination directory with its original name (if the
  14735.             target is not a directory, MOVE will display an error
  14736.             message and exit):
  14737.  
  14738. ___________________________________________________________________
  14739. NDOS Reference Manual                                          253
  14740.  
  14741.  
  14742. ___________________________________________________________________
  14743.  
  14744.                  c:\> move *.wks *.txt c:\finance\myfiles
  14745.  
  14746.             You cannot move a file to a character device like the
  14747.             printer, or to itself.
  14748.  
  14749.         !   Be careful when you use MOVE with the SELECT command.
  14750.             If you SELECT multiple files and if the target is not a
  14751.             directory (because of a misspelling, for example) each
  14752.             file will be moved in turn to the target file,
  14753.             overwriting the previous file, and then the original
  14754.             will be erased before the next file is moved.  At the
  14755.             end of the command, all of the original files will have
  14756.             been erased and only the last file will exist as the
  14757.             target file.  You can avoid this problem by using
  14758.             square brackets with SELECT instead of parentheses (be
  14759.             sure that you don't allow the command line to get too
  14760.             long -- watch the character count in the upper left
  14761.             corner while you're selecting files).  MOVE will then
  14762.             receive one list of files to move instead of a series
  14763.             of individual filenames, and it will detect the error
  14764.             and halt.  You can also add a backslash [\] to the end
  14765.             of the destination name to ensure that it is the name
  14766.             of a subdirectory (see below).
  14767.  
  14768.             When you move files to another directory, if you add a
  14769.             backslash [\] to the end of the destination name MOVE
  14770.             will display an error message if the name does not
  14771.             refer to an existing directory.  You can use this
  14772.             feature to keep MOVE from treating a mistyped
  14773.             destination directory name as a filename, and
  14774.             attempting to move all source files to that name.  The
  14775.             /D option performs the same function but will also
  14776.             prompt to see if you want to create the destination
  14777.             directory if it doesn't exist.  The /S option always
  14778.             tries to create the destination directory if necessary,
  14779.             so this feature will not be effective when /S is used.
  14780.  
  14781.         ##  MOVE first attempts to rename the file(s), which is the
  14782.             fastest way to move files between subdirectories on the
  14783.             same drive.  If that fails (the destination is on a
  14784.             different drive or already exists), MOVE will copy the
  14785.             file(s) and then delete the originals.
  14786.  
  14787. Options:    /C(hanged files):  Move files only if the destination
  14788.             file exists and is older than the source (see also /U).
  14789.             This option is useful for updating the files in one
  14790.             directory from those in another without moving any
  14791.             newly created files.
  14792.  
  14793.  
  14794.  
  14795. ___________________________________________________________________
  14796. NDOS Reference Manual                                          254
  14797.  
  14798.  
  14799. ___________________________________________________________________
  14800.  
  14801.             /D(irectory):  Requires that the destination be a
  14802.             directory.  If the destination does not exist, MOVE
  14803.             will prompt to see if you want to create it.  If the
  14804.             destination exists as a file, MOVE will fail with an
  14805.             "Access denied" error.  Use this option to avoid having
  14806.             MOVE accidentally interpret your destination name as a
  14807.             filename when it's really a mistyped directory name.
  14808.  
  14809.         ##  /H(idden):  Move all files, including hidden and system
  14810.             files.
  14811.  
  14812.         ##  /N(othing):  Do everything except actually move the
  14813.             file(s)   This option is most useful for testing what a
  14814.             complex MOVE command will do.
  14815.  
  14816.             /P(rompt):  Ask the user to confirm each move by
  14817.             pressing Y or N.  An N response will skip that
  14818.             particular file.
  14819.  
  14820.             /Q(uiet):  Don't display filenames as they are moved.
  14821.  
  14822.             /R(eplace):  Prompt for a Y or N response before
  14823.             overwriting an existing destination file.
  14824.  
  14825.         ##  /S(ubdirectories):  Move an entire subdirectory tree to
  14826.             another location.  MOVE will attempt to create the
  14827.             destination directories if they don't exist, and will
  14828.             remove empty subdirectories after the move.  When /D is
  14829.             used with /S, you will be prompted if the first
  14830.             destination directory does not exist, but
  14831.             subdirectories below that will be created automatically
  14832.             by MOVE.
  14833.  
  14834.             /U(pdate):  Move each source file only if it is newer
  14835.             than a matching destination file or if a matching
  14836.             destination file does not exist (also see /C).  This
  14837.             option is useful for moving new files from one
  14838.             directory to another.
  14839.  
  14840.  
  14841.  
  14842.  
  14843.  
  14844.  
  14845.  
  14846.  
  14847.  
  14848.  
  14849.  
  14850.  
  14851.  
  14852. ___________________________________________________________________
  14853. NDOS Reference Manual                                          255
  14854.  
  14855.  
  14856. ___________________________________________________________________
  14857.  
  14858. NDOSHELP                                    (New, External command)
  14859.  
  14860. Purpose:    Display help for NDOS and DOS commands.
  14861.  
  14862. Format:     NDOSHELP [topic]
  14863.  
  14864.             topic:  An ndoshelp topic, NDOS internal command, or
  14865.             DOS external command.
  14866.  
  14867.             /M(onochrome)               /X (disable mouse)
  14868.             /Sn (set mouse speed)
  14869.  
  14870. Usage:      NDOSHELP displays a brief description and the proper
  14871.             syntax of both NDOS and DOS commands.  If you simply
  14872.             type
  14873.  
  14874.                  c:\> ndoshelp
  14875.  
  14876.             you will see a list of all help topics.  You can select
  14877.             a topic by using the cursor keys and then pressing
  14878.             Enter.
  14879.  
  14880.             If you want to avoid the opening list, use a topic or
  14881.             command name.  For example, if you want help with the
  14882.             NDOS COPY command, type
  14883.  
  14884.                  c:\> ndoshelp copy
  14885.  
  14886.             You can also start NDOSHELP by pressing F1 at the NDOS
  14887.             prompt (see page 55).
  14888.  
  14889.  
  14890.  
  14891.  
  14892.  
  14893.  
  14894.  
  14895.  
  14896.  
  14897.  
  14898.  
  14899.  
  14900.  
  14901.  
  14902.  
  14903.  
  14904.  
  14905.  
  14906.  
  14907.  
  14908. ___________________________________________________________________
  14909. NDOS Reference Manual                                          256
  14910.  
  14911.  
  14912. ___________________________________________________________________
  14913.  
  14914. PATH                                                     (Enhanced)
  14915.  
  14916. Purpose:    Display or alter the list of directories that NDOS will
  14917.             search for executable and batch files that are not in
  14918.             the current directory.
  14919.  
  14920. Format:     PATH [directory[;directory...]]
  14921.  
  14922.             directory:  The full name of a directory to include in
  14923.             the path setting.
  14924.  
  14925.             See also: SET and ESET.
  14926.  
  14927. Usage:      When NDOS is asked to execute an external command (a
  14928.             .COM, .EXE, .BTM, or .BAT file or executable
  14929.             extension), it first looks for the file in the current
  14930.             directory.  If it fails to find an executable file
  14931.             there, it then searches each of the directories
  14932.             specified in the path setting, in the order that they
  14933.             are included.
  14934.  
  14935.             For example, the following PATH command directs NDOS to
  14936.             search subdirectories for an executable file in the
  14937.             following order: the current directory, the root
  14938.             directory on C:, the DOS subdirectory on C:, and the
  14939.             UTIL subdirectory on C:
  14940.  
  14941.                  c:\> path c:\;c:\dos;c:\util
  14942.  
  14943.             The list of directories to search can be set or viewed
  14944.             with the PATH command.  The list is stored as an
  14945.             environment string, and can also be set or viewed with
  14946.             the SET command and edited with the ESET command.
  14947.  
  14948.             Directory names in the path must be separated by
  14949.             semicolons [;].  NDOS shifts each directory name to
  14950.             upper case.  This maintains compatibility with programs
  14951.             which can only recognize upper case directory names in
  14952.             the path variable.
  14953.  
  14954.             If you modify your path with the SET or ESET command,
  14955.             you may include directory names in lower case.  These
  14956.             may cause trouble with some programs, which assume that
  14957.             all path entries have been shifted to upper case.
  14958.  
  14959.             If you enter PATH with no parameters, NDOS displays the
  14960.             current search path:
  14961.  
  14962.                  c:\> path
  14963.                  PATH=C:\;C:\DOS;C:\UTIL
  14964.  
  14965. ___________________________________________________________________
  14966. NDOS Reference Manual                                          257
  14967.  
  14968.  
  14969. ___________________________________________________________________
  14970.  
  14971.             If you enter PATH and a semicolon, NDOS clears the
  14972.             search path and will search only the current directory
  14973.             (this is the default at system startup).
  14974.  
  14975.             Some applications also use the PATH variable to search
  14976.             for their data files.
  14977.  
  14978.         ##  If you include an explicit file extension on the
  14979.             external command name (for example, WP.EXE), NDOS will
  14980.             only look for files with that name and extension in the
  14981.             current directory and every directory in the path
  14982.             setting.  It will not look for other executable files
  14983.             with the same base name.
  14984.  
  14985.         ##  If you have a directory of a single period [.] in the
  14986.             path, NDOS will not search the current directory first,
  14987.             but will wait and search the current directory when it
  14988.             reaches the "." in the path.  This allows you to delay
  14989.             (but not prevent) NDOS from searching the current
  14990.             directory for executable files and files with
  14991.             executable extensions.  In rare cases, this feature may
  14992.             not be compatible with applications which use the path
  14993.             to search for their files; if you experience a problem,
  14994.             you will have to remove the "." as a path entry while
  14995.             using any such application.
  14996.  
  14997.         ##  NDOS can create a PATH as long as 250 characters (the
  14998.             command line is limited to 255 characters, and "PATH "
  14999.             takes five).  Some applications are written to expect a
  15000.             PATH no longer than the traditional limit of 123
  15001.             characters.  If you have extended your path beyond the
  15002.             traditional limit and experience unusual problems with
  15003.             application programs, see page 148 for tips on
  15004.             resolving the difficulty.
  15005.  
  15006.         ##  If you specify an invalid directory in the path, NDOS
  15007.             will skip that directory and continue searching with
  15008.             the next directory in the path.
  15009.  
  15010.  
  15011.  
  15012.  
  15013.  
  15014.  
  15015.  
  15016.  
  15017.  
  15018.  
  15019.  
  15020.  
  15021.  
  15022. ___________________________________________________________________
  15023. NDOS Reference Manual                                          258
  15024.  
  15025.  
  15026. ___________________________________________________________________
  15027.  
  15028. PAUSE                                                    (Enhanced)
  15029.  
  15030. Purpose:    Suspend batch file or alias execution.
  15031.  
  15032. Format:     PAUSE [text]
  15033.  
  15034.             text:  The message to be displayed as a user prompt.
  15035.  
  15036. Usage:      A PAUSE command will suspend execution of a batch file
  15037.             or alias, giving you the opportunity to change disks,
  15038.             turn on the printer, etc.
  15039.  
  15040.             PAUSE waits for any key to be pressed and then
  15041.             continues execution.  You can specify the text that
  15042.             PAUSE displays while it waits for a keystroke, or let
  15043.             NDOS use the default message:
  15044.  
  15045.                  Press any key when ready...
  15046.  
  15047.             For example, the following batch file fragment prompts
  15048.             the user before erasing files (the PAUSE command should
  15049.             be entered on one line):
  15050.  
  15051.                  pause Press Ctrl-C to abort, any other key to
  15052.                    erase all .LST files
  15053.                  erase *.lst
  15054.  
  15055.             If you press Ctrl-C or Ctrl-BREAK while PAUSE is
  15056.             waiting for a key, execution of an alias will be
  15057.             terminated, and execution of a batch file will be
  15058.             suspended while you are asked whether you want to
  15059.             cancel the batch job.
  15060.  
  15061.  
  15062.  
  15063.  
  15064.  
  15065.  
  15066.  
  15067.  
  15068.  
  15069.  
  15070.  
  15071.  
  15072.  
  15073.  
  15074.  
  15075.  
  15076.  
  15077.  
  15078.  
  15079. ___________________________________________________________________
  15080. NDOS Reference Manual                                          259
  15081.  
  15082.  
  15083. ___________________________________________________________________
  15084.  
  15085. POPD                                                          (New)
  15086.  
  15087. Purpose:    Return to the disk drive and directory at the top of
  15088.             the directory stack.
  15089.  
  15090. Format:     POPD [*]
  15091.  
  15092.             See also: DIRS and PUSHD.
  15093.  
  15094. Usage:      Each time you use the PUSHD command, NDOS saves the
  15095.             current disk drive and directory on its internal
  15096.             directory stack.  POPD restores the last drive and
  15097.             directory that was saved with PUSHD and removes that
  15098.             entry from the stack.  You can use these commands
  15099.             together to change directories, perform some work, and
  15100.             return to the starting drive and directory.
  15101.  
  15102.             This example saves and changes the current disk drive
  15103.             and directory with PUSHD, and then restores it.  The
  15104.             command line prompt is set to show the current
  15105.             directory:
  15106.  
  15107.                  c:\> pushd d:\database\test
  15108.                  d:\database\test> pushd c:\wordp\memos
  15109.                  c:\wordp\memos> pushd a:\123
  15110.                  a:\123> popd
  15111.                  c:\wordp\memos> popd
  15112.                  d:\database\test> popd
  15113.                  c:\>
  15114.  
  15115.             You can use the DIRS command to see the complete list
  15116.             of saved drives and directories (the directory stack).
  15117.  
  15118.             The POPD command followed by an asterisk [*] clears the
  15119.             directory stack without changing the current drive and
  15120.             directory.
  15121.  
  15122.         ##  If the directory on the top of the stack is not on the
  15123.             current drive, POPD will switch to the drive and
  15124.             directory on the top of the stack without changing the
  15125.             default directory on the current drive.
  15126.  
  15127.  
  15128.  
  15129.  
  15130.  
  15131.  
  15132.  
  15133.  
  15134.  
  15135.  
  15136. ___________________________________________________________________
  15137. NDOS Reference Manual                                          260
  15138.  
  15139.  
  15140. ___________________________________________________________________
  15141.  
  15142. PROMPT                                                        (New)
  15143.  
  15144. Purpose:    Change the NDOS command line prompt.
  15145.  
  15146. Format:     PROMPT [text]
  15147.  
  15148.             text:  Text to be used as the NDOS command line prompt.
  15149.  
  15150. Usage:      You can change and customize the command line prompt at
  15151.             any time.  The prompt can include normal text and
  15152.             system information such as the current drive and
  15153.             directory, the time and date, and the amount of memory
  15154.             available.  You can create an informal "Hello, Bob!"
  15155.             prompt or an official-looking prompt full of impressive
  15156.             information.
  15157.  
  15158.             The PROMPT command sets the command line prompt.  The
  15159.             special characters that can be included in a PROMPT
  15160.             command are listed below.  For example, to set the
  15161.             prompt to the current date and time, with a ">" at the
  15162.             end:
  15163.  
  15164.                  c:\> prompt $d $t $g
  15165.                  Wed  Dec 2, 1992 10:29:19 >
  15166.  
  15167.             To set the prompt to the current date and time,
  15168.             followed by the current drive and directory in upper
  15169.             case on the next line, with a ">" at the end:
  15170.  
  15171.                  c:\> prompt $d $t$_$P$g
  15172.                  Wed  Dec 2, 1992 10:29:19
  15173.                  C:\>
  15174.  
  15175.             You can include the PROMPT command in your AUTOEXEC.BAT
  15176.             file to set the prompt whenever your system is
  15177.             rebooted.
  15178.  
  15179.             The default prompt is $n$g (drive name plus ">")  on
  15180.             drives A: and B:, and $p$g (current drive and directory
  15181.             plus ">") on all other drives.
  15182.  
  15183.             If you enter PROMPT with no arguments, NDOS resets the
  15184.             prompt to the default.  The PROMPT command sets the
  15185.             environment variable PROMPT, so to view the current
  15186.             prompt setting use the command:
  15187.  
  15188.                  c:\> set prompt
  15189.  
  15190.  
  15191.  
  15192.  
  15193. ___________________________________________________________________
  15194. NDOS Reference Manual                                          261
  15195.  
  15196.  
  15197. ___________________________________________________________________
  15198.  
  15199.             If the prompt is not set at all NDOS will not use the
  15200.             PROMPT environment variable, in which case the SET
  15201.             command above will give a "Not in environment" error.
  15202.  
  15203.         ##  Along with literal text, special characters, and ANSI
  15204.             sequences, you can include the text of any environment
  15205.             variable, NDOS internal variable, or variable function
  15206.             (see pages 73 and 77) in a prompt.  For example, if you
  15207.             want to include the amount of free base memory in the
  15208.             command prompt, plus the current drive and directory,
  15209.             you could use this command:
  15210.  
  15211.                  c:\> prompt (%%@dosmem[K]K) $p$g
  15212.                  (601K) c:\data>
  15213.  
  15214.             Notice that the @DOSMEM function is shown with two
  15215.             leading percent signs [%].  If you used only one
  15216.             percent sign, the @DOSMEM function would be expanded
  15217.             once when the PROMPT command was executed, instead of
  15218.             every time NDOS displayed the prompt.  The result would
  15219.             be that the amount of memory would never change from
  15220.             the value it had when you entered the PROMPT command.
  15221.             You could also use back quotes to delay expanding the
  15222.             variable function until the prompt is displayed:
  15223.  
  15224.                  c:\> prompt (%@dosmem[K]K) $p$g
  15225.  
  15226.         ##  If you have an ANSI-compatible driver installed, you
  15227.             can include ANSI escape sequences in the PROMPT text.
  15228.             This example uses ANSI sequences to set a prompt that
  15229.             displays the shell level, date, time and path in color
  15230.             on the top line of the screen (enter the command as one
  15231.             line):
  15232.  
  15233.                  c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  15234.                       Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  15235.  
  15236.         ##  Traditionally, it was possible to use the PROMPT
  15237.             command in a batch file to transmit ANSI.SYS control
  15238.             sequences to the screen (for example, to redefine
  15239.             function keys).  This technique will not work with
  15240.             NDOS, which doesn't display a prompt within batch
  15241.             files; hence the characters in the PROMPT string are
  15242.             never sent to ANSI.SYS.  To send ANSI sequences in
  15243.             NDOS, use the ECHO command, substituting a Ctrl-X
  15244.             followed by an e for $e in the PROMPT string.
  15245.  
  15246.         ##  You may find it helpful to define a different prompt in
  15247.             secondary shells, by using $z to display the shell
  15248.             level, or by placing a PROMPT command in your NSTART
  15249.  
  15250. ___________________________________________________________________
  15251. NDOS Reference Manual                                          262
  15252.  
  15253.  
  15254. ___________________________________________________________________
  15255.  
  15256.             file and using IF or IFF statements to set the
  15257.             appropriate prompt for different shells.
  15258.  
  15259.             Prompt Characters:
  15260.  
  15261.             The prompt text can contain special commands in the
  15262.             form $?, where ? is one of the characters listed below.
  15263.  
  15264.                  b    The vertical bar character [|]
  15265.                  c    The open parenthesis [(]
  15266.                  d    Current date, in the format:  Fri  Jan 1,
  15267.                          1993
  15268.                  D    Current date, in the format:  Fri  1-01-93
  15269.                  e    The ASCII ESC character (decimal 27)
  15270.                  f    The close parenthesis [)]
  15271.                  g    The > character
  15272.                  h    BACKSPACE over the previous character
  15273.                  l    The < character
  15274.                  n    Current disk letter
  15275.                  p    Current disk and directory (lower case)
  15276.                  P    Current disk and directory (upper case)
  15277.                  q    The = character
  15278.                  r    The numeric exit code of the last external
  15279.                          command
  15280.                  s    The space character
  15281.                  t    Current time, in the format hh:mm:ss
  15282.                  v    DOS version number, in the format 3.10
  15283.                  xd:  Current directory on drive d:, in lower case
  15284.                  Xd:  Current directory on drive d:, in upper case
  15285.                  z    Current NDOS shell nesting level; the
  15286.                          primary command processor is shell 0.
  15287.                  $    The $ character
  15288.                  _    CR/LF (go to beginning of a new line)
  15289.  
  15290.         ##  The format for the date ($d) depends on the country
  15291.             code defined in the CONFIG.SYS file or by the CHCP
  15292.             command.  The default format is U.S. (mm-dd-yy).  The
  15293.             European format is dd-mm-yy; the Japanese is yy-mm-dd.
  15294.             The separator used for the time ($t) will also be
  15295.             changed based on the country definition.
  15296.  
  15297.  
  15298.  
  15299.  
  15300.  
  15301.  
  15302.  
  15303.  
  15304.  
  15305.  
  15306.  
  15307. ___________________________________________________________________
  15308. NDOS Reference Manual                                          263
  15309.  
  15310.  
  15311. ___________________________________________________________________
  15312.  
  15313. PUSHD                                                         (New)
  15314.  
  15315. Purpose:    Save the current disk drive and directory, optionally
  15316.             moving to a new drive and directory.
  15317.  
  15318. Format:     PUSHD [pathname]
  15319.  
  15320.             pathname:  The name of the new default drive and
  15321.             directory.
  15322.  
  15323.             See also: DIRS, POPD and CDPATH on page 107.
  15324.  
  15325. Usage:      PUSHD saves the current drive and directory on a "last
  15326.             in, first out" directory stack.  The POPD command
  15327.             returns to the last drive and directory that was saved
  15328.             by PUSHD.  You can use these commands together to
  15329.             change directories, perform some work, and return to
  15330.             the starting drive and directory.
  15331.  
  15332.             The DIRS command displays the contents of the directory
  15333.             stack.
  15334.  
  15335.             To save the current drive and directory, without
  15336.             changing directories:
  15337.  
  15338.                  c:\> pushd
  15339.                  c:\>
  15340.  
  15341.             If a pathname is specified as part of the PUSHD
  15342.             command, the current drive and directory are saved and
  15343.             the specified pathname becomes the new current drive
  15344.             and directory.  If the pathname includes a drive
  15345.             letter, PUSHD changes to the specified directory on the
  15346.             new drive without changing the default current
  15347.             directory on the original drive.
  15348.  
  15349.             This example saves the current directory and changes to
  15350.             C:\WORDP\MEMOS, then returns to the original directory
  15351.             with POPD:
  15352.  
  15353.                  c:\> pushd \wordp\memos
  15354.                  c:\wordp\memos> popd
  15355.                  c:\>
  15356.  
  15357.         ##  The directory stack can hold up to 255 characters or
  15358.             about 10 to 20 entries depending on the length of the
  15359.             directory names.  If you exceed the directory stack
  15360.             size, the oldest directory is removed before adding the
  15361.             current directory.
  15362.  
  15363.  
  15364. ___________________________________________________________________
  15365. NDOS Reference Manual                                          264
  15366.  
  15367.  
  15368. ___________________________________________________________________
  15369.  
  15370.         ##  If PUSHD can't change to the specified directory, it
  15371.             will look for the CDPATH environment variable.  PUSHD
  15372.             will append the specified directory name to each
  15373.             directory in CDPATH and attempt to change to that drive
  15374.             and directory, until the first match or the end of the
  15375.             CDPATH argument.  This allows you to use CDPATH as a
  15376.             quick way to find commonly used subdirectories which
  15377.             have unique names.  For example, if you are currently
  15378.             in the directory C:\WP\LETTERS\JANUARY and you'd like
  15379.             to change to D:\SOFTWARE\UTIL, you could enter the
  15380.             command:
  15381.  
  15382.                  c:\wp\letters\january> pushd d:\software\util
  15383.  
  15384.             However if the D:\SOFTWARE directory is listed in your
  15385.             CDPATH variable, and is the first directory in the list
  15386.             with a UTIL subdirectory, you can simply enter the
  15387.             command:
  15388.  
  15389.                  c:\wp\letters\january> pushd util
  15390.  
  15391.             and NDOS will change to D:\SOFTWARE\UTIL.
  15392.  
  15393.  
  15394.  
  15395.  
  15396.  
  15397.  
  15398.  
  15399.  
  15400.  
  15401.  
  15402.  
  15403.  
  15404.  
  15405.  
  15406.  
  15407.  
  15408.  
  15409.  
  15410.  
  15411.  
  15412.  
  15413.  
  15414.  
  15415.  
  15416.  
  15417.  
  15418.  
  15419.  
  15420.  
  15421. ___________________________________________________________________
  15422. NDOS Reference Manual                                          265
  15423.  
  15424.  
  15425. ___________________________________________________________________
  15426.  
  15427. QUIT                                                          (New)
  15428.  
  15429. Purpose:    Terminate the current batch file.
  15430.  
  15431. Format:     QUIT [value]
  15432.  
  15433.             value:  The exit code from 0 to 255 to return to NDOS
  15434.             or to the previous batch file.
  15435.  
  15436.             See also: CANCEL.
  15437.  
  15438. Usage:      QUIT provides a simple way to exit a batch file before
  15439.             reaching the end of the file.  If you QUIT a batch file
  15440.             called from another batch file, you will be returned to
  15441.             the previous file at the line following the original
  15442.             call.
  15443.  
  15444.             This example batch file fragment checks to see if the
  15445.             user entered "quit" and exits if true.
  15446.  
  15447.                  input  Enter your choice :  %%option
  15448.                  if  "%option" == "quit"  quit
  15449.  
  15450.             To end all batch file processing, use the CANCEL
  15451.             command.
  15452.  
  15453.         ##  If you specify a value, QUIT will set the ERRORLEVEL or
  15454.             exit code (see the IF command, and the %? variable on
  15455.             page 74) to that value.
  15456.  
  15457.         ##  You can also use QUIT to terminate an alias.  If you
  15458.             QUIT an alias while inside a batch file, QUIT will end
  15459.             both the alias and the batch file and return you to the
  15460.             NDOS command prompt or to the calling batch file.
  15461.  
  15462.  
  15463.  
  15464.  
  15465.  
  15466.  
  15467.  
  15468.  
  15469.  
  15470.  
  15471.  
  15472.  
  15473.  
  15474.  
  15475.  
  15476.  
  15477.  
  15478. ___________________________________________________________________
  15479. NDOS Reference Manual                                          266
  15480.  
  15481.  
  15482. ___________________________________________________________________
  15483.  
  15484. RD/RMDIR                                                 (Enhanced)
  15485.  
  15486. Purpose:    Remove one or more subdirectories.
  15487.  
  15488. Format:     RD pathname...
  15489.                  or
  15490.             RMDIR pathname...
  15491.  
  15492.             pathname:  The name of a subdirectory to remove.
  15493.  
  15494.             See also: MD.
  15495.  
  15496. Usage:      RD and RMDIR are synonyms.  You can use either one.
  15497.  
  15498.             RD removes directories from the directory tree.  For
  15499.             example, to remove the subdirectory MEMOS from the
  15500.             subdirectory WP, you can use this command:
  15501.  
  15502.                  c:\> rd \wp\memos
  15503.  
  15504.             Before using RD, you must delete all files and
  15505.             subdirectories (and their files) in the pathname you
  15506.             want to remove.  Remember to remove hidden and read-
  15507.             only files as well as normal files.
  15508.  
  15509.         ##  To use a single command to remove entire subdirectory
  15510.             trees including all files, see the /S and /X options of
  15511.             the DEL command.
  15512.  
  15513.         ##  You cannot remove the root directory, the current
  15514.             directory (.), or any directory above the current
  15515.             directory in the directory tree.
  15516.  
  15517.         ##  You can use wildcards in the pathname.
  15518.  
  15519.  
  15520.  
  15521.  
  15522.  
  15523.  
  15524.  
  15525.  
  15526.  
  15527.  
  15528.  
  15529.  
  15530.  
  15531.  
  15532.  
  15533.  
  15534.  
  15535. ___________________________________________________________________
  15536. NDOS Reference Manual                                          267
  15537.  
  15538.  
  15539. ___________________________________________________________________
  15540.  
  15541. REBOOT                                                        (New)
  15542.  
  15543. Purpose:    Do a warm or cold system reboot.
  15544.  
  15545. Format:     REBOOT [/C /V]
  15546.  
  15547.             /C(old reboot)              /V(erify)
  15548.  
  15549. ##  Usage:  REBOOT will completely restart your computer.  It is
  15550.             comparable to pressing Ctrl-Alt-Delete (a warm reboot)
  15551.             or to turning the power off and back on or pressing the
  15552.             reset button (a cold reboot).  A reboot is necessary to
  15553.             activate any changes to your CONFIG.SYS file, and may
  15554.             also be used if you wish to restart the system with an
  15555.             altered NSTART or AUTOEXEC.BAT file.
  15556.  
  15557.             The following example prompts you to verify the reboot,
  15558.             then does a cold boot:
  15559.  
  15560.                  c:\> reboot /c/v
  15561.  
  15562.             REBOOT defaults to performing a warm boot, with no
  15563.             prompting.
  15564.  
  15565.             REBOOT flushes the disk buffers, resets the drives, and
  15566.             waits one second before rebooting, to allow disk
  15567.             caching programs to finish writing any cached data.
  15568.  
  15569.         !   Some system BIOSes, memory managers, multitaskers, or
  15570.             memory-resident programs (TSRs) may intercept attempts
  15571.             to reboot your system, and defeat them entirely,
  15572.             convert a cold boot request to a warm boot or vice
  15573.             versa, or in very rare cases, hang the system --
  15574.             requiring a reboot!  As a result you may need to
  15575.             experiment with which reboot options work best for your
  15576.             system hardware and software configuration, and under
  15577.             rare circumstances REBOOT may not be useable on your
  15578.             system.
  15579.  
  15580. Options:    /C(old):  Do a "cold" reboot.  This is similar to
  15581.             turning the power off and back on, and may be necessary
  15582.             to properly initialize the system.  REBOOT /C may not
  15583.             physically reset all hardware devices as thoroughly as
  15584.             actually turning off the power; its effect depends on
  15585.             the internal design of each hardware device and on your
  15586.             system configuration.
  15587.  
  15588.             /V(erify):  Prompt for confirmation (Y or N) before
  15589.             rebooting.
  15590.  
  15591.  
  15592. ___________________________________________________________________
  15593. NDOS Reference Manual                                          268
  15594.  
  15595.  
  15596. ___________________________________________________________________
  15597.  
  15598. REM                                                    (Compatible)
  15599.  
  15600. Purpose:    Put a comment in a batch file.
  15601.  
  15602. Format:     REM [comment]
  15603.  
  15604.             comment:  The text to include in the batch file.
  15605.  
  15606. Usage:      The REM command lets you place a remark or comment in a
  15607.             batch file.  Batch file comments are useful for
  15608.             documenting the purpose of a batch file and the
  15609.             procedures you have used.  For example
  15610.  
  15611.                  rem This batch file provides a
  15612.                  rem menu-based system for accessing
  15613.                  rem word processing utilities.
  15614.                  rem
  15615.                  rem Clear the screen and get selection
  15616.                  cls
  15617.  
  15618.             REM must be followed by a space or tab character and
  15619.             then your comment.  Comments can be up to 255
  15620.             characters long.  NDOS will normally ignore everything
  15621.             on the line after the REM command, including quotation
  15622.             marks, redirection symbols, and other commands (see
  15623.             below for the exception to this rule).
  15624.  
  15625.             If ECHO is ON, NDOS will display the comment.
  15626.             Otherwise, NDOS will ignore it.  If ECHO is ON and you
  15627.             don't want to display the line, preface the REM command
  15628.             with the @ character.
  15629.  
  15630.         ##  You can use REM to create a zero-byte file if you use a
  15631.             redirection symbol immediately after the REM command.
  15632.             For example, to create the zero-byte file C:\FOO:
  15633.  
  15634.                  c:\> rem>foo
  15635.  
  15636.  
  15637.  
  15638.  
  15639.  
  15640.  
  15641.  
  15642.  
  15643.  
  15644.  
  15645.  
  15646.  
  15647.  
  15648.  
  15649. ___________________________________________________________________
  15650. NDOS Reference Manual                                          269
  15651.  
  15652.  
  15653. ___________________________________________________________________
  15654.  
  15655. REN/RENAME                                               (Enhanced)
  15656.  
  15657. Purpose:    Rename files or subdirectories.
  15658.  
  15659. Format:     REN [/N /P /Q /S] old_name... new_name
  15660.                  or
  15661.             RENAME [/N /P /Q /S] old_name... new_name
  15662.  
  15663.             old_name:  Original name of the file(s) or
  15664.             subdirectory.
  15665.             new_name:  New name to use or new path on the same
  15666.             drive.
  15667.  
  15668.             /N(othing)                  /Q(uiet)
  15669.             /P(rompt)                   /S(ubdirectory)
  15670.  
  15671.             See Also: COPY and MOVE.
  15672.  
  15673. Usage:      REN and RENAME are synonyms.  You may use either one.
  15674.  
  15675.             REN lets you change the name of a file or a
  15676.             subdirectory.  You can also use REN to move one or more
  15677.             files to a new subdirectory on the same drive.  (If you
  15678.             want to move files to a different drive, use MOVE.)
  15679.  
  15680.             In its simplest form, you simply give REN the old_name
  15681.             of an existing file or subdirectory and then a
  15682.             new_name.  The new_name must not already exist -- you
  15683.             can't give two files the same name (unless they are in
  15684.             different directories).  The first example renames the
  15685.             file MEMO.TXT to MEM.TXT.  The second example changes
  15686.             the name of the \WORD directory to \WP:
  15687.  
  15688.                  c:\> rename memo.txt mem.txt
  15689.                  c:\> rename \word \wp
  15690.  
  15691.             You can also use REN to rename a group of files that
  15692.             you specify with wildcards, as multiple files, or in an
  15693.             include list.  When you do, the new_name must use one
  15694.             or more wildcards to show what part of each filename to
  15695.             change.  Both of the next two examples change the
  15696.             extensions of multiple files to .SAV:
  15697.  
  15698.                  c:\> ren config.sys autoexec.bat nstart.btm *.sav
  15699.                  c:\> ren *.txt *.sav
  15700.  
  15701.             REN can move one or more files to a different
  15702.             subdirectory on the same drive.  When it is used for
  15703.             this purpose, REN requires one or more filenames for
  15704.             the old_name and a directory name for the new_name:
  15705.  
  15706. ___________________________________________________________________
  15707. NDOS Reference Manual                                          270
  15708.  
  15709.  
  15710. ___________________________________________________________________
  15711.  
  15712.                  c:\> ren memo.txt c:\wp\memos\
  15713.                  c:\> ren oct.dat nov.dat c:\data\save\
  15714.  
  15715.             The final backslash in the last two examples is
  15716.             optional.  If you use it, you force REN to recognize
  15717.             the last argument as the name of a directory, not a
  15718.             file.  If you accidentally mistype the directory name,
  15719.             REN will report an error instead of renaming your files
  15720.             in a way that you didn't intend.
  15721.  
  15722.             Finally, REN can move files to a new directory and
  15723.             change their name at the same time if you specify both
  15724.             a path and filename for new_name.  In this example,
  15725.             the files are renamed with an extension of .SAV as they
  15726.             are moved to a new directory:
  15727.  
  15728.                  c:\> ren *.dat c:\data\save\*.sav
  15729.  
  15730.             When new_name refers to a file or files (rather than a
  15731.             directory), the file(s) must not already exist.  Also,
  15732.             you cannot rename a subdirectory to a new location on
  15733.             the directory tree.
  15734.  
  15735.         ##  REN does not change a file's attributes.  The new_name
  15736.             file(s) will have the same attributes as old_name.
  15737.  
  15738. Options:    /N(othing):  Do everything except actually rename the
  15739.             file(s).  This option is useful for testing what a REN
  15740.             command will actually do.
  15741.  
  15742.             /P(rompt):  Ask the user to confirm each move by
  15743.             pressing Y or N.  An N response will skip that
  15744.             particular file.
  15745.  
  15746.             /Q(uiet):  Don't display filenames as they are renamed.
  15747.             This option is most often used in batch files.
  15748.  
  15749.             /S(ubdirectory):  Normally, you can rename a
  15750.             subdirectory only if you do not use any wildcards in
  15751.             the new_name.  This prevents subdirectories from being
  15752.             renamed inadvertently when a group of files is being
  15753.             renamed with wildcards.  /S will let you rename a
  15754.             subdirectory even when you use wildcards.
  15755.  
  15756.  
  15757.  
  15758.  
  15759.  
  15760.  
  15761.  
  15762.  
  15763. ___________________________________________________________________
  15764. NDOS Reference Manual                                          271
  15765.  
  15766.  
  15767. ___________________________________________________________________
  15768.  
  15769. RETURN                                                        (New)
  15770.  
  15771. Purpose:    Return from a GOSUB (subroutine) in a batch file.
  15772.  
  15773. Format:     RETURN
  15774.  
  15775.             See also: GOSUB.
  15776.  
  15777. ## Usage:   NDOS allows subroutines in batch files.  A subroutine
  15778.             begins with a label (a colon followed by a word) and
  15779.             ends with a RETURN command.  The subroutine is invoked
  15780.             with a GOSUB command from another part of the batch
  15781.             file.  The RETURN command ends a subroutine; execution
  15782.             of the batch file will continue on the line following
  15783.             the original GOSUB.
  15784.  
  15785.             The following batch file fragment calls a subroutine
  15786.             which displays the current directory:
  15787.  
  15788.                  echo Calling a subroutine
  15789.                  gosub subr1
  15790.                  echo Returned from the subroutine
  15791.                  quit
  15792.  
  15793.                  :subr1
  15794.                  dir /a/w
  15795.                  return
  15796.  
  15797.  
  15798.  
  15799.  
  15800.  
  15801.  
  15802.  
  15803.  
  15804.  
  15805.  
  15806.  
  15807.  
  15808.  
  15809.  
  15810.  
  15811.  
  15812.  
  15813.  
  15814.  
  15815.  
  15816.  
  15817.  
  15818.  
  15819.  
  15820. ___________________________________________________________________
  15821. NDOS Reference Manual                                          272
  15822.  
  15823.  
  15824. ___________________________________________________________________
  15825.  
  15826. SCREEN                                                        (New)
  15827.  
  15828. Purpose:    Position the cursor on the screen and optionally
  15829.             display a message.
  15830.  
  15831. Format:     SCREEN row column [message]
  15832.  
  15833.             row:  The new row location for the cursor.
  15834.             column:  The new column location for the cursor.
  15835.             message:  Optional text to display at the new cursor
  15836.             location.
  15837.  
  15838.             See also: ECHO, SCRPUT, TEXT, and VSCRPUT.
  15839.  
  15840. Usage:      SCREEN allows you to create attractive screen displays
  15841.             in batch files.  You use it to specify where a message
  15842.             will appear on the screen.  You can use SCREEN to
  15843.             create menu displays, logos, etc.  The following batch
  15844.             file fragment displays a menu:
  15845.  
  15846.                  @echo off ^ cls
  15847.                  screen 3 10  Select a number from 1 to 4:
  15848.                  screen 6 20  1 - Word Processing
  15849.                  screen 7 20  2 - Spreadsheet
  15850.                  screen 8 20  3 - Telecommunications
  15851.                  screen 9 20  4 - Quit
  15852.  
  15853.             SCREEN does not change the screen colors.  If you have
  15854.             ANSI.SYS installed and have set colors with CLS or
  15855.             COLOR, those colors will be used for the display.  To
  15856.             display text in specific colors, use SCRPUT or VSCRPUT.
  15857.  
  15858.             The row and column values are zero-based, so on a
  15859.             standard 25 line by 80 column display, valid rows are 0
  15860.             - 24 and valid columns are 0 - 79.
  15861.  
  15862.             SCREEN checks for a valid row and column, and displays
  15863.             a "Usage" error message if either value is out of
  15864.             range.
  15865.  
  15866.  
  15867.  
  15868.  
  15869.  
  15870.  
  15871.  
  15872.  
  15873.  
  15874.  
  15875.  
  15876.  
  15877. ___________________________________________________________________
  15878. NDOS Reference Manual                                          273
  15879.  
  15880.  
  15881. ___________________________________________________________________
  15882.  
  15883. SCRPUT                                                        (New)
  15884.  
  15885. Purpose:    Position the cursor on the screen and display a message
  15886.             in color.
  15887.  
  15888. Format:     SCRPUT row col [BRIght] [BLInk] fg ON bg text
  15889.  
  15890.             row:  Starting row
  15891.             col:  Starting column
  15892.             fg:  Foreground character color
  15893.             bg:  Background character color
  15894.             text:  The text to display
  15895.  
  15896.             The available colors are:
  15897.  
  15898.               Black         Blue          Green         Red
  15899.               Magenta       Cyan          Yellow        White
  15900.  
  15901.             See also: CLS, ECHO, SCREEN, TEXT, and VSCRPUT.
  15902.  
  15903. Usage:      SCRPUT allows you to create attractive screen displays
  15904.             in batch files.  You use it to specify where a message
  15905.             will appear on the screen and what colors will be used
  15906.             to display the message text.  You can use SCRPUT to
  15907.             create menu displays, logos, etc.
  15908.  
  15909.             SCRPUT works like SCREEN, but allows you to specify the
  15910.             display colors.  It writes directly to the screen and
  15911.             does not require an ANSI driver.
  15912.  
  15913.             Only the first three characters of the color name and
  15914.             the attributes BRIGHT and BLINK are required.  The row
  15915.             and column are zero-based, so on a standard 25 line by
  15916.             80 column display, valid rows are 0 - 24 and valid
  15917.             columns are 0 - 79.
  15918.  
  15919.             The following batch file fragment displays a menu in
  15920.             color (each  SCRPUT command should be entered on one
  15921.             line):
  15922.  
  15923.                  @echo off ^ cls white on blue
  15924.                  scrput 3 10 bri whi on blue Select a number from
  15925.                    1 to 4:
  15926.                  scrput 6 20 bri red on blue 1 - Word Processing
  15927.                  scrput 7 20 bri yel on blue 2 - Spreadsheet
  15928.                  scrput 8 20 bri gre on blue 3 -
  15929.                  Telecommunications
  15930.                  scrput 9 20 bri mag on blue 4 - Quit
  15931.  
  15932.  
  15933.  
  15934. ___________________________________________________________________
  15935. NDOS Reference Manual                                          274
  15936.  
  15937.  
  15938. ___________________________________________________________________
  15939.  
  15940. SELECT                                                        (New)
  15941.  
  15942. Purpose:    Interactively select files for a command.
  15943.  
  15944. Format:     SELECT [/A[:][-]rhsda /C /D /E /O[:][-]adeginrsu]
  15945.                  [command] ... (files...)...
  15946.  
  15947.             command:  The command to execute with the selected
  15948.             files.
  15949.             files:  The files from which to select.  Filenames may
  15950.             be enclosed in either parentheses or square brackets.
  15951.             The difference is explained below.
  15952.  
  15953.             /A(ttribute select)              /E  (use upper case)
  15954.             /C(ompression -- display)        /O(rder)
  15955.             /D(isable colorization)
  15956.  
  15957. Usage:      SELECT allows you to select files for internal and
  15958.             external commands by using a full-screen "point and
  15959.             shoot" display.  You can have SELECT execute a command
  15960.             once for each file you select, or have it create a list
  15961.             of files for a command to work with.  The command can
  15962.             be a NDOS internal command or alias, an external
  15963.             command, or a batch file.
  15964.  
  15965.             If you use parentheses around the files, SELECT
  15966.             executes the command once for each file you have
  15967.             selected.  During each execution, one of the selected
  15968.             files is passed to the command as an argument.  If you
  15969.             use square brackets around files, the SELECTed files
  15970.             are combined into a single list, separated by spaces.
  15971.             The command is then executed once with the entire list
  15972.             presented as its command-line arguments.
  15973.  
  15974.             SELECT uses the UpArrow, DownArrow, PageUp, and
  15975.             PageDown keys to scroll through the file list.  Use
  15976.             the + key or the spacebar to select a file (or
  15977.             unselect a marked file), and the - key to unselect a
  15978.             file.  The * key will reverse all of the current
  15979.             marks (excluding subdirectories), and the / key will
  15980.             unmark everything.  After marking the files, press
  15981.             Enter to execute the command.
  15982.  
  15983.             You can select a single file by moving the scroll bar
  15984.             to the filename and pressing Enter without marking any
  15985.             other files.
  15986.  
  15987.             To skip the files listed in the current display and go
  15988.             on to the next file specification inside the
  15989.             parentheses or brackets (if any), press the Escape key.
  15990.  
  15991. ___________________________________________________________________
  15992. NDOS Reference Manual                                          275
  15993.  
  15994.  
  15995. ___________________________________________________________________
  15996.  
  15997.             To cancel the current SELECT command entirely, press
  15998.             Ctrl-C or Ctrl-Break.
  15999.  
  16000.             In the simplest form of SELECT, you merely specify the
  16001.             command and then the list of files from which you will
  16002.             make your selection(s).  For example:
  16003.  
  16004.                  c:\> select copy (*.com *.exe) a:\
  16005.  
  16006.             will let you select from among the .COM and .EXE files
  16007.             on the current drive.  It will then invoke the COPY
  16008.             command to copy each file you select to drive A:.  You
  16009.             will be able to select first from a list of all .COM
  16010.             files in the current directory, and then from a list of
  16011.             all .EXE files.
  16012.  
  16013.             If you want to select from a list of all the .COM and
  16014.             .EXE files mixed together, create an include list
  16015.             inside the parentheses by inserting a semicolon (see
  16016.             page 67 for information on include lists):
  16017.  
  16018.                  c:\> select copy (*.com;*.exe) a:\
  16019.  
  16020.             Finally, if you want the SELECT command to send a
  16021.             single list of files to COPY, instead of invoking COPY
  16022.             once for each file you select, put the filenames in
  16023.             square brackets instead of parentheses:
  16024.  
  16025.                  c:\> select copy [*.com;*.exe] a:\
  16026.  
  16027.             If you use brackets, you have to be sure that the
  16028.             resulting command (the word COPY, the list of files,
  16029.             and the destination drive in this example) is no more
  16030.             than 127 characters long for external commands and no
  16031.             more than 255 characters long for internal NDOS
  16032.             commands.  The current line length is displayed by
  16033.             SELECT while you are marking files to help you to
  16034.             conform to these limits.
  16035.  
  16036.             The parentheses or brackets enclosing the filename(s)
  16037.             can appear anywhere within the command; SELECT assumes
  16038.             that the first set of parentheses or brackets it finds
  16039.             is the one containing the list of files from which you
  16040.             wish to make your selection.
  16041.  
  16042.         ##  If you don't specify a command, the selected
  16043.             filename(s) will become the command.  For example, this
  16044.             command defines an alias called UTILS that selects from
  16045.             the executable files in the directory C:\UTIL, and then
  16046.  
  16047.  
  16048. ___________________________________________________________________
  16049. NDOS Reference Manual                                          276
  16050.  
  16051.  
  16052. ___________________________________________________________________
  16053.  
  16054.             executes them in the order marked (enter the alias on
  16055.             one line):
  16056.  
  16057.                  c:\> alias utils select
  16058.                        (c:\util\*.com;*.exe;*.btm;*.bat)
  16059.  
  16060.         ##  If you want to use filename completion (see page 52) to
  16061.             enter the filenames inside the parentheses, type a
  16062.             space after the opening parenthesis.  Otherwise the
  16063.             command line editor will treat the open parenthesis as
  16064.             the first character of the filename.
  16065.  
  16066.         ##  You can set the default colors used by SELECT (and
  16067.             LIST) using the ListColors directive in NDOS.INI (see
  16068.             page 121).  If ListColors is not used, the default
  16069.             colors will be set by the StdColors directive (page
  16070.             121) or by the last CLS or COLOR command.
  16071.  
  16072.         ##  If you have an ANSI driver loaded, you can display the
  16073.             filenames in color by setting the COLORDIR environment
  16074.             variable (the same colors will be used by the DIR
  16075.             command).  The format for COLORDIR is:
  16076.  
  16077.                  ext ... :[BRIght][BLInk] fg [ON bg]; ...
  16078.  
  16079.             where ext is the file extension, or one of the
  16080.             following file attributes:
  16081.  
  16082.                  DIRS      directory
  16083.                  RDONLY    read-only file
  16084.                  HIDDEN    hidden file
  16085.                  SYSTEM    system file
  16086.                  ARCHIVE   file modified since last backup.
  16087.  
  16088.             For example, to display the .COM and .EXE files in red,
  16089.             the .C and .ASM files in bright cyan, and the read-only
  16090.             files in blinking green (enter this on one line):
  16091.  
  16092.                  c:\> set colordir=com exe:red; c asm:bright cyan;
  16093.                       rdonly:blink green
  16094.  
  16095.             If you don't specify a background color, SELECT will
  16096.             use the current screen background color from the
  16097.             ListColors or StdColors directive or the last CLS or
  16098.             COLOR command (as described above).  COLORDIR will not
  16099.             work properly unless you have an ANSI driver loaded.
  16100.  
  16101.             You can disable directory colorization within SELECT
  16102.             with the /D option.
  16103.  
  16104.  
  16105. ___________________________________________________________________
  16106. NDOS Reference Manual                                          277
  16107.  
  16108.  
  16109. ___________________________________________________________________
  16110.  
  16111.             When displaying descriptions, SELECT adds a right arrow
  16112.             [] at the end of the line if the description is too
  16113.             long to fit on the screen.  This symbol will alert you
  16114.             to the existence of additional description text.
  16115.  
  16116.         ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  16117.             .BAX, and .BAC files) can be used in directory color
  16118.             specifications.  See page 64 for more information on
  16119.             extended wildcards.
  16120.  
  16121.         ##  When sorting filenames and extensions for the SELECT
  16122.             display, NDOS normally assumes that sequences of digits
  16123.             should be sorted numerically (for example, the file
  16124.             DRAW2 would come before DRAW03 because 2 is numerically
  16125.             smaller than 03), rather than strictly alphabetically
  16126.             (where DRAW2 would come second because "2" comes after
  16127.             "0").  You can defeat this behavior and force a strict
  16128.             alphabetic sort with the /O:a option.
  16129.  
  16130.         ##  You may need to increase the NDOS internal stack size
  16131.             using the StackSize directive in NDOS.INI if you use
  16132.             extremely complex combinations of commands like EXCEPT,
  16133.             FOR, GLOBAL, IF, and SELECT on the same command line,
  16134.             or use complex combinations of these commands in nested
  16135.             batch files or nested GOSUBs.  See the StackSize
  16136.             directive on page 128 for more information.
  16137.  
  16138. Options:##  /A(ttribute select):  Display only those files that
  16139.             have the specified attribute set.  Preceding the
  16140.             attribute character with a minus [-] will display those
  16141.             files that don't have that attribute set.  Attributes
  16142.             can also be combined.  The attributes are:
  16143.  
  16144.                  R    Read-only         D    Subdirectory
  16145.                  H    Hidden            A    Archive
  16146.                  S    System
  16147.  
  16148.             If no attributes are listed at all (e.g. SELECT /A
  16149.             ...), SELECT will display all files and subdirectories
  16150.             including hidden and system files.  If attributes are
  16151.             combined, all the specified attributes must match for a
  16152.             file to be included in the listing.  For example,
  16153.             /A:RHS will display only those files with all three
  16154.             attributes set.  See page 168 for more information on
  16155.             file attributes.
  16156.  
  16157.             /C(ompression):  Display compression specifications for
  16158.             filenames, if applicable.  Use /CH to display file
  16159.             compression ratio; /CH uses host allocation unit size.
  16160.  
  16161.  
  16162. ___________________________________________________________________
  16163. NDOS Reference Manual                                          278
  16164.  
  16165.  
  16166. ___________________________________________________________________
  16167.  
  16168.         ##  /D(isable colorization):  Temporarily turn off
  16169.             directory colorization within SELECT.
  16170.  
  16171.             /E  (case):  Display filenames in the traditional upper
  16172.             case format; also see SETDOS /U and the UpperCase
  16173.             directive in NDOS.INI.
  16174.  
  16175.             /O(rder):  Set the sort order for the files.  The order
  16176.             can be any combination of the following options:
  16177.  
  16178.                  -    Reverse the sort order for the next option
  16179.                  a    Sort names and extensions in standard ASCII
  16180.                       order, rather than sorting numerically when
  16181.                       digits are included in the name or extension
  16182.                  d    Sort by date and time (oldest first)
  16183.                  e    Sort by extension
  16184.                  g    Group subdirectories together
  16185.                  i    Sort by the file description
  16186.                  n    Sort by filename (this is the default)
  16187.                  r    Reverse the sort order for all options
  16188.                  s    Sort by size
  16189.                  u    Unsorted
  16190.  
  16191.  
  16192.  
  16193.  
  16194.  
  16195.  
  16196.  
  16197.  
  16198.  
  16199.  
  16200.  
  16201.  
  16202.  
  16203.  
  16204.  
  16205.  
  16206.  
  16207.  
  16208.  
  16209.  
  16210.  
  16211.  
  16212.  
  16213.  
  16214.  
  16215.  
  16216.  
  16217.  
  16218.  
  16219. ___________________________________________________________________
  16220. NDOS Reference Manual                                          279
  16221.  
  16222.  
  16223. ___________________________________________________________________
  16224.  
  16225. SET                                                      (Enhanced)
  16226.  
  16227. Purpose:    Display, create, modify, or delete environment
  16228.             variables.
  16229.  
  16230. Format:     SET [/M /P /R filename...] [name[=][value]]
  16231.  
  16232.             filename:  The name of a file containing variable
  16233.             definitions.
  16234.             name:  The name of the environment variable to define
  16235.             or modify.
  16236.             value:  The new value for the variable.
  16237.  
  16238.             /M(aster)                   /R(ead from file)
  16239.             /P(ause)
  16240.  
  16241.             See also: UNSET and ESET.
  16242.  
  16243. Usage:      Every program and command inherits an environment,
  16244.             which is a list of variable names, each of which is
  16245.             followed by an equal sign and some text.  Many programs
  16246.             use entries in the environment to modify their own
  16247.             actions.  NDOS itself uses several environment
  16248.             variables (see page 106).  See page 70 for more
  16249.             information on the environment.
  16250.  
  16251.             If you simply type the SET command with no options or
  16252.             arguments, it will display all the names and values
  16253.             currently stored in the environment.  Typically, you
  16254.             will see an entry called COMSPEC, an entry called PATH,
  16255.             an entry called CMDLINE, and whatever other environment
  16256.             variables you and your programs have established:
  16257.  
  16258.                  c:\> set
  16259.                  COMSPEC=C:\NDOS.COM
  16260.                  PATH=C:\;C:\DOS;C:\UTIL
  16261.                  CMDLINE=E:\UTIL\MAPMEM.EXE
  16262.  
  16263.             To add a variable to the environment, type SET plus the
  16264.             variable name, an equal sign, and the text:
  16265.  
  16266.                  c:\> set mine=c:\finance\myfiles
  16267.  
  16268.             NDOS will convert the variable name to upper case but
  16269.             leave the text after the equal sign just as you entered
  16270.             it.  If the variable already exists, its value will be
  16271.             replaced with the new text that you entered.
  16272.  
  16273.             Normally you should not put a space on either side of
  16274.             the equal sign.  A space before the equal sign will
  16275.  
  16276. ___________________________________________________________________
  16277. NDOS Reference Manual                                          280
  16278.  
  16279.  
  16280. ___________________________________________________________________
  16281.  
  16282.             become part of the name; a space after the equal sign
  16283.             will become part of the value.
  16284.  
  16285.             To display the contents of a single variable, type SET
  16286.             plus the variable name:
  16287.  
  16288.                  c:\> set mine
  16289.  
  16290.             You can edit environment variables with the ESET
  16291.             command.  To remove variables from the environment, use
  16292.             UNSET, or type SET plus a variable name and an equal
  16293.             sign:
  16294.  
  16295.                  c:\> set mine=
  16296.  
  16297.             NDOS limits the variable name to a maximum of 80
  16298.             characters, and the name plus the value to a maximum of
  16299.             255 characters.
  16300.  
  16301.         ##  Unless you use /M, SET only affects the environment of
  16302.             the current command processor and the programs it
  16303.             executes.  If you EXIT to a parent command processor,
  16304.             the original environment will be unchanged.
  16305.  
  16306.             The size of the environment is specified by the
  16307.             Environment and EnvFree directives in NDOS.INI (see
  16308.             page 115) or by the /E: startup switch (see page 102).
  16309.  
  16310. Options:##  /M(aster):  Display or modify the master environment
  16311.             rather than the local environment.  This option only
  16312.             makes sense in a secondary command processor.
  16313.  
  16314.             /P(ause):  Pause after displaying each page of
  16315.             environment entries.  Press Ctrl-C to quit, or any
  16316.             other key to display the next page.
  16317.  
  16318.         ##  /R(ead):  Read environment variables from a file.  This
  16319.             is much faster than loading variables from a batch file
  16320.             with multiple SET commands.  The file is in the same
  16321.             format as the SET display, so SET /R can accept as
  16322.             input a file generated by redirecting SET output.  For
  16323.             example, the following commands will save the
  16324.             environment variables to a file, and then reload them
  16325.             from that file:
  16326.  
  16327.                       set > varlist
  16328.                       set /r varlist
  16329.  
  16330.             You can load variables from multiple files by listing
  16331.             the filenames individually after the /R.  You can add
  16332.  
  16333. ___________________________________________________________________
  16334. NDOS Reference Manual                                          281
  16335.  
  16336.  
  16337. ___________________________________________________________________
  16338.  
  16339.             comments to a variable file by starting the comment
  16340.             line with a colon [:].  Lines in a SET /R file can be
  16341.             up to 511 characters long.
  16342.  
  16343.  
  16344.  
  16345.  
  16346.  
  16347.  
  16348.  
  16349.  
  16350.  
  16351.  
  16352.  
  16353.  
  16354.  
  16355.  
  16356.  
  16357.  
  16358.  
  16359.  
  16360.  
  16361.  
  16362.  
  16363.  
  16364.  
  16365.  
  16366.  
  16367.  
  16368.  
  16369.  
  16370.  
  16371.  
  16372.  
  16373.  
  16374.  
  16375.  
  16376.  
  16377.  
  16378.  
  16379.  
  16380.  
  16381.  
  16382.  
  16383.  
  16384.  
  16385.  
  16386.  
  16387.  
  16388.  
  16389.  
  16390. ___________________________________________________________________
  16391. NDOS Reference Manual                                          282
  16392.  
  16393.  
  16394. ___________________________________________________________________
  16395.  
  16396. SETDOS                                                        (New)
  16397.  
  16398. Purpose:    Display or set the NDOS configuration.
  16399.  
  16400. Format:     SETDOS [/A? /C? /E? /I+|- command /L? /M? /N? /P? /R?
  16401.                  /S?:? /U? /V?]
  16402.  
  16403.             /A(NSI)                     /N(o clobber)
  16404.             /C(ompound)                 /P(arameter character)
  16405.             /E(scape character)         /R(ows)
  16406.             /I(nternal commands)        /S(hape of cursor)
  16407.             /L(ine)                     /U(pper case)
  16408.             /M(ode for editing)         /V(erbose)
  16409.  
  16410. Usage:      SETDOS allows you to customize certain aspects of NDOS
  16411.             to suit your personal tastes or the configuration of
  16412.             your system.  Each of these options is described below.
  16413.  
  16414.             You can display the value of all SETDOS options by
  16415.             entering the SETDOS command with no parameters.
  16416.  
  16417.             Most of the SETDOS options can be initialized when NDOS
  16418.             starts through directives in the NDOS.INI file (see
  16419.             page 117).  The name of the corresponding directive is
  16420.             listed in square brackets [ ] with each option;  if
  16421.             none is listed, that option cannot be set from the
  16422.             NDOS.INI file.  You can also define the SETDOS options
  16423.             in your AUTOEXEC.BAT or NSTART file, in aliases, or at
  16424.             the command line.
  16425.  
  16426.             Secondary shells automatically inherit most
  16427.             configuration settings currently in effect in the
  16428.             previous shell.  If values have been changed by SETDOS
  16429.             since NDOS started, the new values will be passed to
  16430.             the secondary shell.  For details on inheritance of
  16431.             SETDOS values by secondary shells and their
  16432.             relationship to NDOS.INI, see page 111.
  16433.  
  16434.             SETDOS /I settings are not inherited by secondary
  16435.             shells.  If you want to use SETDOS /I- to disable
  16436.             commands in all shells, place the SETDOS command(s) in
  16437.             your NSTART file (see page 107), which is executed when
  16438.             any shell starts.
  16439.  
  16440.             Many of the options below are marked with ##.  If you
  16441.             are a new user, skip these and read the /M, /S, and /U
  16442.             options, which are more common.
  16443.  
  16444.  
  16445.  
  16446.  
  16447. ___________________________________________________________________
  16448. NDOS Reference Manual                                          283
  16449.  
  16450.  
  16451. ___________________________________________________________________
  16452.  
  16453. Options:##  /A(NSI)  [ANSI]:  The ANSI option determines whether
  16454.             NDOS will attempt to use ANSI escape sequences for the
  16455.             CLS and COLOR commands.  NDOS normally determines this
  16456.             itself, but if you are using a non-standard ANSI driver
  16457.             or your loading sequence is unusual, you may need to
  16458.             explicitly inform NDOS.  /A0 allows NDOS to determine
  16459.             whether an ANSI driver is installed (the default).
  16460.             /A1 forces NDOS to assume an ANSI driver is installed.
  16461.             /A2 forces NDOS to assume an ANSI driver is not
  16462.             installed.
  16463.  
  16464.         ##  /C(ompound character)  [CommandSep]:  The COMPOUND
  16465.             option sets the character used for separating multiple
  16466.             commands on the same line.  The default is the caret
  16467.             [^].  You cannot use any of the redirection characters
  16468.             (| > <), or any of the whitespace characters (blank,
  16469.             tab, comma, or equal sign) as the command separator.
  16470.             This example changes the COMPOUND character to a tilde
  16471.             [~]:
  16472.  
  16473.                  c:\> setdos /c~
  16474.  
  16475.         ##  /E(scape character)  [EscapeChar]:  The ESCAPE option
  16476.             sets the character used to suppress the normal meaning
  16477.             of the following character.  Any character following
  16478.             the escape character will be passed unmodified to the
  16479.             command line.  For example, you could include a
  16480.             redirection character such as > as part of a command-
  16481.             line argument if the character was preceded by the
  16482.             escape character.  The default escape character is
  16483.             Ctrl-X (ASCII 24; appears on screen as an up arrow
  16484.             []).  You cannot use any of the redirection characters
  16485.             (| > <) or the whitespace characters (blank, tab,
  16486.             comma, or equal sign) as the escape character.  Certain
  16487.             characters (b, e, f, n, r, and t)  have special
  16488.             meanings when immediately preceded by the escape
  16489.             character.  See page 86 for additional details.
  16490.  
  16491.         ##  /I(nternal):  The INTERNAL option allows you to disable
  16492.             or enable internal NDOS commands.  To disable a
  16493.             command, precede the command name with a minus [-].  To
  16494.             re-enable a command, precede it with a plus [+].  For
  16495.             example, to disable the internal LIST command to force
  16496.             NDOS to use an external command:
  16497.  
  16498.                  c:\> setdos /i-list
  16499.  
  16500.         ##  /L(ine)  [LineInput]:  The LINE option controls how
  16501.             NDOS gets its input from the command line.  /L0 tells
  16502.             NDOS to use character input (the default).  /L1 tells
  16503.  
  16504. ___________________________________________________________________
  16505. NDOS Reference Manual                                          284
  16506.  
  16507.  
  16508. ___________________________________________________________________
  16509.  
  16510.             NDOS to use line input (via DOS  service INT 21h
  16511.             function 0Ah, like COMMAND.COM).  /L1 will disable
  16512.             command line editing, history recall, and filename
  16513.             completion; it should only be used if it is needed for
  16514.             compatibility with a specific program.  If you have a
  16515.             program that requires line input, you can use the
  16516.             following line in an alias or batch file to change the
  16517.             line input option just for that single program:
  16518.  
  16519.                  setdos /L1 ^ program %& ^ setdos /L0
  16520.  
  16521.             See the file APPNOTES.DOC for information on programs
  16522.             which require this option.
  16523.  
  16524.             /M(ode)  [EditMode]:  The MODE option controls the
  16525.             initial line editing mode.  /M0 forces NDOS to start
  16526.             editing in overstrike mode (the default).  /M1 forces
  16527.             NDOS to start editing in insert mode.
  16528.  
  16529.         ##  /N(o clobber)  [NoClobber]:  The NOCLOBBER option
  16530.             controls output redirection (see page 59).  /N0 means
  16531.             existing files will be overwritten by simple
  16532.             redirection (with >) and that appending (with >>) does
  16533.             not require the file to exist already.  This is the
  16534.             default.  /N1 means existing files may not be
  16535.             overwritten by simple output redirection, and that when
  16536.             appending the output file must exist.  A /N1 setting
  16537.             can be overridden with the [!] character.  If you use
  16538.             /N1, you may have problems with a few unusual programs
  16539.             that shell to DOS to run a command with redirection,
  16540.             and expect to be able to overwrite an existing file.
  16541.  
  16542.         ##  /P(arameter character)  [ParameterChar]:  This option
  16543.             sets the character used after a percent sign to specify
  16544.             all or all remaining command line arguments in a batch
  16545.             file or alias (e.g. %& or %n&; see pages 92 and 165).
  16546.             The default is the ampersand [&].
  16547.  
  16548.         ##  /R(ows)  [ScreenRows]:  The ROWS option sets the number
  16549.             of screen rows used by the video display.  Normally
  16550.             NDOS detects the screen size, but if you have a non-
  16551.             standard display you may need to set it explicitly.
  16552.             This option does not affect screen scrolling (that is
  16553.             controlled by your video BIOS or ANSI.SYS); it is used
  16554.             only for LIST, SELECT, the paged output options (i.e.,
  16555.             TYPE /P), and error checking in the screen output
  16556.             commands.
  16557.  
  16558.             /S(hape)  [CursorOver, CursorIns]:  The SHAPE option
  16559.             sets the NDOS cursor shape.  The format is /So:i where
  16560.  
  16561. ___________________________________________________________________
  16562. NDOS Reference Manual                                          285
  16563.  
  16564.  
  16565. ___________________________________________________________________
  16566.  
  16567.             o is the cursor size for overstrike mode, i the cursor
  16568.             size for insert mode.  The size is entered as a
  16569.             percentage of the total character height.  The default
  16570.             values are 10:100 (an underscore cursor for overstrike
  16571.             mode, and a block cursor for insert mode).  Because of
  16572.             the way video BIOSes remap the cursor shape, you may
  16573.             not get a smooth progression in the cursor size from 0%
  16574.             - 100%.  To disable the cursor, enter /S0:0.
  16575.  
  16576.             /U(pper)  [UpperCase]:  The UPPER option controls the
  16577.             default case (upper or lower) for filenames displayed
  16578.             by NDOS internal commands like COPY and DIR.  /U0
  16579.             displays filenames in lower case (the default).  /U1
  16580.             displays filenames in the traditional upper case.
  16581.  
  16582.         ##  /V(erbose)  [BatchEcho]:  The VERBOSE option controls
  16583.             the default for command echoing in batch files.  /V0
  16584.             disables echoing of batch file commands unless ECHO is
  16585.             explicitly set ON.  /V1 enables echoing of batch file
  16586.             commands unless ECHO is explicitly set OFF.  /V2 forces
  16587.             echoing of all batch file commands, even if ECHO is set
  16588.             OFF or the line begins with an "@".  /V2 is intended
  16589.             for debugging, and can be set with SETDOS but cannot be
  16590.             set with the BatchEcho directive in NDOS.INI.  /V1 is
  16591.             the default.
  16592.  
  16593.  
  16594.  
  16595.  
  16596.  
  16597.  
  16598.  
  16599.  
  16600.  
  16601.  
  16602.  
  16603.  
  16604.  
  16605.  
  16606.  
  16607.  
  16608.  
  16609.  
  16610.  
  16611.  
  16612.  
  16613.  
  16614.  
  16615.  
  16616.  
  16617.  
  16618. ___________________________________________________________________
  16619. NDOS Reference Manual                                          286
  16620.  
  16621.  
  16622. ___________________________________________________________________
  16623.  
  16624. SETLOCAL                                                      (New)
  16625.  
  16626. Purpose:    Save a copy of the current disk drive, directory,
  16627.             environment, and alias list.
  16628.  
  16629. Format:     SETLOCAL
  16630.  
  16631.             See also: ENDLOCAL.
  16632.  
  16633. Usage:      SETLOCAL is used in batch files to save the default
  16634.             disk drive and directory, the environment, and the
  16635.             alias list to a reserved block of memory.  You can then
  16636.             change their values and later restore the original
  16637.             values with the ENDLOCAL command.
  16638.  
  16639.             For example, this batch file fragment saves everything,
  16640.             changes the disk and directory, modifies some
  16641.             variables, runs a program, and then restores the
  16642.             original values:
  16643.  
  16644.                  setlocal
  16645.                  cdd d:\test
  16646.                  set path=c:\;c:\dos;c:\util
  16647.                  set lib=d:\lib
  16648.                  rem run some program here
  16649.                  endlocal
  16650.  
  16651.             SETLOCAL and ENDLOCAL are not nestable within a batch
  16652.             file.  However, you can have multiple SETLOCAL /
  16653.             ENDLOCAL pairs within a batch file, and nested batch
  16654.             files can each have their own SETLOCAL/ENDLOCAL.  You
  16655.             cannot use SETLOCAL in an alias or at the command line.
  16656.  
  16657.         ##  NDOS automatically performs an ENDLOCAL at the end of a
  16658.             batch file if you forget to do so.  If you invoke one
  16659.             batch file from another without using CALL, the first
  16660.             batch file is terminated, and an automatic ENDLOCAL is
  16661.             performed.  The second batch file inherits the drive,
  16662.             directory, aliases, and environment variables as they
  16663.             were prior to any unterminated SETLOCAL.
  16664.  
  16665.         ##  Do not load memory-resident programs (TSRs) from a
  16666.             batch file while SETLOCAL is in effect.  If you do,
  16667.             when ENDLOCAL is executed and the memory used by
  16668.             SETLOCAL is released, a "hole" will be left in memory
  16669.             below the TSR.  This is not usually harmful, but wastes
  16670.             memory.
  16671.  
  16672.  
  16673.  
  16674.  
  16675. ___________________________________________________________________
  16676. NDOS Reference Manual                                          287
  16677.  
  16678.  
  16679. ___________________________________________________________________
  16680.  
  16681. SHIFT                                                    (Enhanced)
  16682.  
  16683. Purpose:    Allows the use of more than 127 replaceable parameters
  16684.             in a batch file.
  16685.  
  16686. Format:     SHIFT [n]
  16687.  
  16688. Usage:      SHIFT is provided for compatibility with older batch
  16689.             files, where it was used to access more than ten
  16690.             replaceable parameters.  NDOS supports 128 replaceable
  16691.             parameters (%0 to %127), so you may not need to use
  16692.             SHIFT for batch files running exclusively under NDOS.
  16693.  
  16694.             SHIFT moves each of the batch file replaceable
  16695.             parameters n positions to the left.  The default value
  16696.             for n is one.  SHIFT 1 moves the parameter in %1 to
  16697.             position %0, the parameter in %2 becomes %1, etc.  You
  16698.             can reverse a SHIFT by giving a negative value for n
  16699.             (i.e., after SHIFT -1, the former %0 is restored, %0
  16700.             becomes %1, %1 becomes %2, etc.).
  16701.  
  16702.             SHIFT also affects the NDOS parameters %n& (command
  16703.             line tail) and %# (number of command arguments).
  16704.  
  16705.             For example, create a batch file called TEST.BAT:
  16706.  
  16707.                  echo %1 %2 %3 %4
  16708.                  shift
  16709.                  echo %1 %2 %3 %4
  16710.                  shift 2
  16711.                  echo %1 %2 %3 %4
  16712.                  shift -1
  16713.                  echo %1 %2 %3 %4
  16714.  
  16715.             Executing TEST.BAT produces the following results:
  16716.  
  16717.                  c:\> test zero one two three four five six
  16718.  
  16719.                  zero one two three
  16720.                  one two three four
  16721.                  three four five six
  16722.                  two three four five
  16723.  
  16724.  
  16725.  
  16726.  
  16727.  
  16728.  
  16729.  
  16730.  
  16731.  
  16732. ___________________________________________________________________
  16733. NDOS Reference Manual                                          288
  16734.  
  16735.  
  16736. ___________________________________________________________________
  16737.  
  16738. SWAPPING                                                      (New)
  16739.  
  16740. Purpose:    Enable or disable NDOS swapping, or display the
  16741.             swapping state.
  16742.  
  16743. Format:     SWAPPING [ON | OFF]
  16744.  
  16745. ## Usage:   SWAPPING temporarily disables or enables the swapping
  16746.             of the transient portion of NDOS to expanded memory,
  16747.             to XMS extended memory, or to disk (see page 115).
  16748.  
  16749.             Setting SWAPPING OFF is particularly useful for
  16750.             speeding up batch files (including AUTOEXEC.BAT) when
  16751.             NDOS is using disk swapping.  When you are running
  16752.             several small programs from a batch file, disk swapping
  16753.             can sometimes cause a noticeable delay.  However, if
  16754.             you disable swapping, there will be about 90K less
  16755.             memory available for large application programs.
  16756.  
  16757.             The following batch file fragment disables swapping,
  16758.             runs several programs, and then re-enables swapping:
  16759.  
  16760.                  swapping off
  16761.                  c:\util\mouse
  16762.                  c:\video\ansi.com
  16763.                  cls bright white on blue
  16764.                  c:\bin\cache.com
  16765.                  swapping on
  16766.  
  16767.             If you enter SWAPPING with no arguments, NDOS displays
  16768.             the current swapping type (XMS, EMS, Disk, or None) and
  16769.             state:
  16770.  
  16771.                  c:\> swapping
  16772.                  SWAPPING (XMS) is ON
  16773.  
  16774.             Setting SWAPPING OFF does not close the disk swap file
  16775.             or release any reserved EMS or XMS memory.
  16776.  
  16777.             You may have trouble if you load memory-resident
  16778.             programs (TSRs) with SWAPPING OFF and unload them with
  16779.             SWAPPING ON, or vice versa.  Many TSRs expect the
  16780.             system to be in the same state when they unload that it
  16781.             was in when they loaded, and variation from this norm
  16782.             may cause the TSR to unload improperly or hang your
  16783.             system, requiring a reboot.
  16784.  
  16785.  
  16786.  
  16787.  
  16788.  
  16789. ___________________________________________________________________
  16790. NDOS Reference Manual                                          289
  16791.  
  16792.  
  16793. ___________________________________________________________________
  16794.  
  16795. TEE                                                           (New)
  16796.  
  16797. Purpose:    Copy standard input to both standard output and a file.
  16798.  
  16799. Format:     TEE [/A] file...
  16800.  
  16801.             file:  One or more files that will receive the "tee-d"
  16802.             output.
  16803.  
  16804.             /A(ppend)
  16805.  
  16806.             See also: Y; redirection options (page 59).
  16807.  
  16808. ## Usage:   Many programs get their input from "standard input" and
  16809.             send their output to "standard output," which are
  16810.             normally the keyboard and video display (known
  16811.             collectively as the console or CON).  You can redirect
  16812.             both the input and output of such programs, for
  16813.             example, using a file either to provide the input or
  16814.             collect the output.
  16815.  
  16816.             TEE gets its input from standard input and sends out
  16817.             two copies: one goes to standard output, the other to
  16818.             the file or files that you specify.  It is most often
  16819.             used with a redirection pipe [|] to capture
  16820.             intermediate output before the data is altered by
  16821.             another program or command.
  16822.  
  16823.             For example, to search the file DOC for any lines
  16824.             containing the string "NDOS", make a copy of the
  16825.             matching lines in N.DAT, sort the lines, and write them
  16826.             to the output file ND.DAT:
  16827.  
  16828.                  c:\> find "NDOS" doc | tee n.dat | sort > nd.dat
  16829.  
  16830.             If you are typing at the keyboard to produce the input
  16831.             for TEE, you must enter a Ctrl-Z to terminate the
  16832.             input.
  16833.  
  16834. Option:     /A(ppend):  Add the output to the file(s) rather than
  16835.             overwriting them.
  16836.  
  16837.  
  16838.  
  16839.  
  16840.  
  16841.  
  16842.  
  16843.  
  16844.  
  16845.  
  16846. ___________________________________________________________________
  16847. NDOS Reference Manual                                          290
  16848.  
  16849.  
  16850. ___________________________________________________________________
  16851.  
  16852. TEXT                                                          (New)
  16853.  
  16854. Purpose:    Display a block of text in a batch file.
  16855.  
  16856. Format:     TEXT
  16857.                  .
  16858.                  .
  16859.                  .
  16860.             ENDTEXT
  16861.  
  16862.             See also: ECHO, SCREEN, SCRPUT, and VSCRPUT.
  16863.  
  16864. Usage:      The TEXT command is useful for displaying menus or
  16865.             multi-line messages from a batch file.  TEXT will
  16866.             display all subsequent lines in the batch file until
  16867.             terminated by ENDTEXT.  Both TEXT and ENDTEXT must be
  16868.             entered as the only command on the line.
  16869.  
  16870.             If you have an ANSI driver loaded, you can change
  16871.             screen colors by inserting ANSI escape sequences
  16872.             anywhere in the text block.  You can also use a CLS or
  16873.             COLOR command to set the screen color before executing
  16874.             the TEXT command.
  16875.  
  16876.             The following batch file fragment displays a simple
  16877.             menu:
  16878.  
  16879.                  @echo off ^ cls ^ screen 2 0
  16880.                  text
  16881.                  Enter one of the following:
  16882.                  1 - Spreadsheet
  16883.                  2 - Word Processing
  16884.                  3 - DOS Utilities
  16885.                  Enter your selection :
  16886.                  endtext
  16887.  
  16888.  
  16889.  
  16890.  
  16891.  
  16892.  
  16893.  
  16894.  
  16895.  
  16896.  
  16897.  
  16898.  
  16899.  
  16900.  
  16901.  
  16902.  
  16903. ___________________________________________________________________
  16904. NDOS Reference Manual                                          291
  16905.  
  16906.  
  16907. ___________________________________________________________________
  16908.  
  16909. TIME                                                   (Compatible)
  16910.  
  16911. Purpose:    Display or set the current system time.
  16912.  
  16913. Format:     TIME [hh[:mm[:ss]]] [AM | PM]
  16914.  
  16915.             hh: hour,  0 - 23
  16916.             mm: minute,  0 - 59
  16917.             ss: second,  0 - 59
  16918.  
  16919.             See also: CHCP and DATE.
  16920.  
  16921. Usage:      If you don't enter any parameters, TIME will display
  16922.             the current system time and prompt you for a new time.
  16923.             Press ENTER if you don't wish to change the time;
  16924.             otherwise, enter the new time:
  16925.  
  16926.                  c:\> time
  16927.                  Wed  Dec 2, 1992  9:30:10
  16928.                  New time (hh:mm:ss):
  16929.  
  16930.             TIME defaults to 24-hour format, but you can optionally
  16931.             enter the time in 12-hour format by appending an "am"
  16932.             or "pm" to the time you enter.
  16933.  
  16934.             For example, to enter the time as 9:30 am:
  16935.  
  16936.                  c:\> time 9:30 am
  16937.  
  16938.             DOS adds the system time and date to the directory
  16939.             entry of every file you create and modify.  If you keep
  16940.             both the time and date accurate, you will have a record
  16941.             of when you last updated each file.
  16942.  
  16943.             The separator used by TIME depends on the country code
  16944.             defined in the CONFIG.SYS file or by the CHCP command.
  16945.  
  16946.  
  16947.  
  16948.  
  16949.  
  16950.  
  16951.  
  16952.  
  16953.  
  16954.  
  16955.  
  16956.  
  16957.  
  16958.  
  16959.  
  16960. ___________________________________________________________________
  16961. NDOS Reference Manual                                          292
  16962.  
  16963.  
  16964. ___________________________________________________________________
  16965.  
  16966. TIMER                                                         (New)
  16967.  
  16968. Purpose:    TIMER is a system stopwatch.
  16969.  
  16970. Format:     TIMER [ON] [/1 /2 /3 /S]
  16971.  
  16972.             ON:  Force the stopwatch to restart
  16973.  
  16974.             /1 (stopwatch #1)                /3 (stopwatch #3)
  16975.             /2 (stopwatch #2)                /S(plit)
  16976.  
  16977. Usage:      The TIMER command turns a system stopwatch on and off.
  16978.             When you first run TIMER, the stopwatch starts:
  16979.  
  16980.                  c:\> timer
  16981.                  Timer 1 on:  12:21:46
  16982.  
  16983.             When you run TIMER again, the stopwatch stops and the
  16984.             elapsed time is displayed:
  16985.  
  16986.                  c:\> timer
  16987.                  Timer 1 off:  12:21:58    Elapsed time:
  16988.                  0:00:12.06
  16989.  
  16990.             There are three stopwatches available (1, 2, and 3) so
  16991.             you can time multiple overlapping events.  By default,
  16992.             TIMER uses stopwatch #1.
  16993.  
  16994.             TIMER is particularly useful for timing events in batch
  16995.             files.  For example, to time both an entire batch file,
  16996.             and an intermediate section of the same file, you could
  16997.             use commands like this:
  16998.  
  16999.                  rem Turn on timer 1
  17000.                  timer
  17001.                  rem Do some work here
  17002.                  rem Turn timer 2 on to time the next section
  17003.                  timer /2
  17004.                  rem Do some more work
  17005.                  echo Intermediate section completed
  17006.                  rem Display time taken in intermediate section
  17007.                  timer /2
  17008.                  rem Do some more work
  17009.                  rem Now display the total time
  17010.                  timer
  17011.  
  17012.             The smallest interval TIMER can measure is .06 second;
  17013.             the largest interval is 23 hours, 59 minutes, 59.99
  17014.             seconds.
  17015.  
  17016.  
  17017. ___________________________________________________________________
  17018. NDOS Reference Manual                                          293
  17019.  
  17020.  
  17021. ___________________________________________________________________
  17022.  
  17023. Options:    /1:  Use timer #1 (the default).
  17024.  
  17025.             /2:  Use timer #2.
  17026.  
  17027.             /3:  Use timer #3.
  17028.  
  17029.             /S(plit):  Display a split time without stopping the
  17030.             timer.  To display the current elapsed time but leave
  17031.             the timer running:
  17032.  
  17033.                  c:\> timer /s
  17034.                  Timer 1 elapsed: 0:06:40.63
  17035.  
  17036.             ON:   Start the timer regardless of its previous state
  17037.             (on or off).  Otherwise the TIMER command toggles the
  17038.             timer state (unless /S is used).
  17039.  
  17040.  
  17041.  
  17042.  
  17043.  
  17044.  
  17045.  
  17046.  
  17047.  
  17048.  
  17049.  
  17050.  
  17051.  
  17052.  
  17053.  
  17054.  
  17055.  
  17056.  
  17057.  
  17058.  
  17059.  
  17060.  
  17061.  
  17062.  
  17063.  
  17064.  
  17065.  
  17066.  
  17067.  
  17068.  
  17069.  
  17070.  
  17071.  
  17072.  
  17073.  
  17074. ___________________________________________________________________
  17075. NDOS Reference Manual                                          294
  17076.  
  17077.  
  17078. ___________________________________________________________________
  17079.  
  17080. TRUENAME                                                      (New)
  17081.  
  17082. Purpose:    Find the full, true path and filename for a file.
  17083.  
  17084. Format:     TRUENAME file
  17085.  
  17086.             file:  The file whose name TRUENAME will report.
  17087.  
  17088.             See also: @truename variable function on page 82.
  17089.  
  17090. Usage:      Default directories, as well as the JOIN and SUBST
  17091.             external commands, can obscure the true name of a file.
  17092.             TRUENAME "sees through" these obstacles and reports the
  17093.             fully qualified name of a file.
  17094.  
  17095.             The following example uses TRUENAME to get the true
  17096.             pathname for a file:
  17097.  
  17098.                  c:\> subst d: c:\util\test
  17099.                  c:\> truename d:\test.exe
  17100.                  c:\util\test\test.exe
  17101.  
  17102.             TRUENAME requires MS-DOS or PC-DOS 3.0 or above.
  17103.  
  17104.  
  17105.  
  17106.  
  17107.  
  17108.  
  17109.  
  17110.  
  17111.  
  17112.  
  17113.  
  17114.  
  17115.  
  17116.  
  17117.  
  17118.  
  17119.  
  17120.  
  17121.  
  17122.  
  17123.  
  17124.  
  17125.  
  17126.  
  17127.  
  17128.  
  17129.  
  17130.  
  17131. ___________________________________________________________________
  17132. NDOS Reference Manual                                          295
  17133.  
  17134.  
  17135. ___________________________________________________________________
  17136.  
  17137. TYPE                                                     (Enhanced)
  17138.  
  17139. Purpose:    Display the contents of the specified file(s).
  17140.  
  17141. Format:     TYPE [/L /P] file...
  17142.  
  17143.             file:  The file or list of files that you want to
  17144.             display.
  17145.  
  17146.             /L(ine numbers)             /P(ause)
  17147.  
  17148.             See also: LIST.
  17149.  
  17150. Usage:      The TYPE command displays a file.  It is normally only
  17151.             useful for displaying ASCII text files.  Executable
  17152.             files (.COM and .EXE) and many data files may be
  17153.             unreadable when displayed with TYPE because they
  17154.             include non-alphanumeric characters.
  17155.  
  17156.             To display the files MEMO1 and MEMO2:
  17157.  
  17158.                  c:\> type /p memo1 memo2
  17159.  
  17160.             You can press Ctrl-S to pause the display from the TYPE
  17161.             command and then any key to continue.
  17162.  
  17163.             You will probably find LIST to be more useful for
  17164.             displaying files.  However, the TYPE /L command used
  17165.             with redirection (see page 59) is useful if you want to
  17166.             add line numbers to a file.
  17167.  
  17168. Options:    /L(ine numbers):  Print a line number preceding each
  17169.             line of text.
  17170.  
  17171.             /P(ause):  Wait for a keystroke after displaying each
  17172.             page.  Press Ctrl-C to quit, or any other key to
  17173.             continue.
  17174.  
  17175.  
  17176.  
  17177.  
  17178.  
  17179.  
  17180.  
  17181.  
  17182.  
  17183.  
  17184.  
  17185.  
  17186.  
  17187.  
  17188. ___________________________________________________________________
  17189. NDOS Reference Manual                                          296
  17190.  
  17191.  
  17192. ___________________________________________________________________
  17193.  
  17194. UNALIAS                                                       (New)
  17195.  
  17196. Purpose:    Remove aliases from the alias list.
  17197.  
  17198. Format:     UNALIAS [/Q] alias...
  17199.                  or
  17200.             UNALIAS *
  17201.  
  17202.             alias:  One or more aliases to remove from memory.
  17203.  
  17204.             See also: ALIAS and ESET.
  17205.  
  17206. Usage:      NDOS maintains a list of the aliases that you have
  17207.             defined.  The UNALIAS command will remove aliases from
  17208.             that list.  You can remove one or more aliases by name,
  17209.             or you can delete the entire alias list by using the
  17210.             command UNALIAS *
  17211.  
  17212.             For example, to remove the alias DDIR:
  17213.  
  17214.                  c:\> unalias ddir
  17215.  
  17216.             To remove all the aliases:
  17217.  
  17218.                  c:\> unalias *
  17219.  
  17220. Options:    /Q(uiet):  Prevents UNALIAS from displaying an error
  17221.             message if one or more of the aliases does not exist.
  17222.             This option is most useful in batch files, for removing
  17223.             a group of aliases when some of the aliases may not
  17224.             have been defined.
  17225.  
  17226.  
  17227.  
  17228.  
  17229.  
  17230.  
  17231.  
  17232.  
  17233.  
  17234.  
  17235.  
  17236.  
  17237.  
  17238.  
  17239.  
  17240.  
  17241.  
  17242.  
  17243.  
  17244.  
  17245. ___________________________________________________________________
  17246. NDOS Reference Manual                                          297
  17247.  
  17248.  
  17249. ___________________________________________________________________
  17250.  
  17251. UNSET                                                         (New)
  17252.  
  17253. Purpose:    Remove variables from the environment.
  17254.  
  17255. Format:     UNSET  [/M /Q] name...
  17256.                  or
  17257.             UNSET *
  17258.  
  17259.             name:  One or more variables to remove from the
  17260.             environment.
  17261.  
  17262.             /M(aster environment)            /Q(uiet)
  17263.  
  17264.             See also: SET and ESET.
  17265.  
  17266. Usage:      See the SET command and page 70 for a discussion of
  17267.             environment variables.
  17268.  
  17269.             UNSET removes one or more variables from the
  17270.             environment.  For example, to remove the variable
  17271.             CMDLINE:
  17272.  
  17273.                  c:\> unset cmdline
  17274.  
  17275.             If you use the command UNSET *, all of the environment
  17276.             variables will be deleted:
  17277.  
  17278.                  c:\> unset *
  17279.  
  17280.             UNSET is often used in conjunction with the SETLOCAL
  17281.             and ENDLOCAL commands in order to clear the environment
  17282.             of variables that may cause problems for some
  17283.             applications.
  17284.  
  17285.         !   Use caution when removing environment variables, and
  17286.             especially when using UNSET *.  Many programs will not
  17287.             work properly without certain environment variables;
  17288.             NDOS itself depends on PATH and COMSPEC.
  17289.  
  17290. Options:##  /M(aster):  Remove the variable from the master
  17291.             environment rather than the local environment.  This
  17292.             option only makes sense if used in a secondary command
  17293.             processor.
  17294.  
  17295.             /Q(uiet):  Prevents UNSET from displaying an error
  17296.             message if one or more of the variables does not exist.
  17297.             This option is most useful in batch files, for removing
  17298.             a group of variables when some of the variables may not
  17299.             have been defined.
  17300.  
  17301.  
  17302. ___________________________________________________________________
  17303. NDOS Reference Manual                                          298
  17304.  
  17305.  
  17306. ___________________________________________________________________
  17307.  
  17308. VER                                                      (Enhanced)
  17309.  
  17310. Purpose:    Display the current NDOS and DOS versions.
  17311.  
  17312. Format:     VER [/R]
  17313.  
  17314.             /R(evision level)
  17315.  
  17316. Usage:      Both the NDOS and DOS version numbers consist of a one-
  17317.             digit major version number, a period, and a one- or
  17318.             two-digit minor version number.  The VER command
  17319.             displays both version numbers:
  17320.  
  17321.                  c:\> ver
  17322.  
  17323.                  NDOS 7.0   DOS 5.0
  17324.  
  17325.             VER will automatically detect DR-DOS and display the
  17326.             corresponding operating system name and version number.
  17327.  
  17328. Option:     /R(evision level):  Display the NDOS and DOS, or DR-DOS
  17329.             revision level; and whether DOS is loaded into the high
  17330.             memory area (HMA), is resident in ROM, or is in normal
  17331.             base memory.  The output from /R related to DOS is only
  17332.             meaningful in MS-DOS or PC-DOS version 5.0 or above.
  17333.  
  17334.  
  17335.  
  17336.  
  17337.  
  17338.  
  17339.  
  17340.  
  17341.  
  17342.  
  17343.  
  17344.  
  17345.  
  17346.  
  17347.  
  17348.  
  17349.  
  17350.  
  17351.  
  17352.  
  17353.  
  17354.  
  17355.  
  17356.  
  17357.  
  17358.  
  17359. ___________________________________________________________________
  17360. NDOS Reference Manual                                          299
  17361.  
  17362.  
  17363. ___________________________________________________________________
  17364.  
  17365. VERIFY                                                 (Compatible)
  17366.  
  17367. Purpose:    Enable or disable disk write verification or display
  17368.             the verification state.
  17369.  
  17370. Format:     VERIFY [ON | OFF]
  17371.  
  17372. Usage:      DOS maintains an internal verify flag.  When the flag
  17373.             is on, DOS attempts to verify each disk write by making
  17374.             sure that the data written to the disk can be read back
  17375.             successfully into the computer.  It does NOT compare
  17376.             the data written with the data actually placed on disk.
  17377.  
  17378.             If used without any parameters, VERIFY will display the
  17379.             state of the DOS verify flag:
  17380.  
  17381.                  c:\> verify
  17382.                  VERIFY is OFF
  17383.  
  17384.             VERIFY is off when the system boots up.  Once it is
  17385.             turned on with the VERIFY ON command, it stays on until
  17386.             you use the VERIFY OFF command or until you reboot.
  17387.  
  17388.             Verification will slow your disk write operations
  17389.             slightly.
  17390.  
  17391.  
  17392.  
  17393.  
  17394.  
  17395.  
  17396.  
  17397.  
  17398.  
  17399.  
  17400.  
  17401.  
  17402.  
  17403.  
  17404.  
  17405.  
  17406.  
  17407.  
  17408.  
  17409.  
  17410.  
  17411.  
  17412.  
  17413.  
  17414.  
  17415.  
  17416. ___________________________________________________________________
  17417. NDOS Reference Manual                                          300
  17418.  
  17419.  
  17420. ___________________________________________________________________
  17421.  
  17422. VOL                                                      (Enhanced)
  17423.  
  17424. Purpose:    Display a disk volume label(s).
  17425.  
  17426. Format:     VOL [d:] ...
  17427.  
  17428.             d:  The drive or drives to search for labels.
  17429.  
  17430. Usage:      Each disk may have a volume label, created when the
  17431.             disk is formatted or with the DOS external LABEL
  17432.             command.  Also, every floppy disk formatted with DOS
  17433.             version 4.0 or above has a volume serial number.
  17434.  
  17435.             The VOL command will display the volume label and, if
  17436.             you are using DOS 4.0 or later, the volume serial
  17437.             number of a disk volume.  If the disk doesn't have a
  17438.             volume label, VOL will report that it is "unlabeled."
  17439.             If you don't specify a drive, VOL displays information
  17440.             about the current drive:
  17441.  
  17442.                  c:\> vol
  17443.                  Volume in drive C: is MYHARDDISK
  17444.  
  17445.             If you are using DOS 4.0 or later, the disk serial
  17446.             number will appear after the drive label or name.
  17447.  
  17448.             To display the disk labels for drives A: and B:
  17449.  
  17450.                  c:\> vol a: b:
  17451.                  Volume in drive A: is unlabeled
  17452.                  Volume in drive B: is BACKUP_2
  17453.  
  17454.  
  17455.  
  17456.  
  17457.  
  17458.  
  17459.  
  17460.  
  17461.  
  17462.  
  17463.  
  17464.  
  17465.  
  17466.  
  17467.  
  17468.  
  17469.  
  17470.  
  17471.  
  17472.  
  17473. ___________________________________________________________________
  17474. NDOS Reference Manual                                          301
  17475.  
  17476.  
  17477. ___________________________________________________________________
  17478.  
  17479. VSCRPUT                                                       (New)
  17480.  
  17481. Purpose:    Display text vertically in the specified color.
  17482.  
  17483. Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON bg text
  17484.  
  17485.             row:  Starting row number.
  17486.             col:  Starting column number
  17487.             fg:  Foreground text color
  17488.             bg:  Background text color
  17489.             text:  The text to display
  17490.  
  17491.             The available colors are:
  17492.  
  17493.               Black         Blue          Green         Red
  17494.               Magenta       Cyan          Yellow        White
  17495.  
  17496.             See also: SCRPUT.
  17497.  
  17498. Usage:      VSCRPUT writes text vertically on the screen rather
  17499.             than horizontally.  Like the SCRPUT command, it uses
  17500.             the colors you specify to write the text.  VSCRPUT can
  17501.             be used for simple graphs and charts generated by batch
  17502.             files.
  17503.  
  17504.             The row and column are zero-based, so on a standard 25
  17505.             row by 80 column display, valid rows are 0 - 24 and
  17506.             valid columns are 0 - 79.
  17507.  
  17508.             Only the first three characters of the color name and
  17509.             the attributes BRIGHT and BLINK are required.
  17510.  
  17511.             The following batch file fragment displays an X and Y
  17512.             axis and labels them:
  17513.  
  17514.                  cls bright white on blue
  17515.                  drawhline 20 10 40 1 bright white on blue
  17516.                  drawvline 2 10 19 1 bright white on blue
  17517.                  scrput 21 20 bright red on blue X axis
  17518.                  vscrput 8 9 bright red on blue Y axis
  17519.  
  17520.             VSCRPUT checks for a valid row and column, and displays
  17521.             a "Usage" error message if either value is out of
  17522.             range.
  17523.  
  17524.  
  17525.  
  17526.  
  17527.  
  17528.  
  17529.  
  17530. ___________________________________________________________________
  17531. NDOS Reference Manual                                          302
  17532.  
  17533.  
  17534. ___________________________________________________________________
  17535.  
  17536. Y                                                             (New)
  17537.  
  17538. Purpose:    Copy standard input to standard output, and then copy
  17539.             the specified file(s) to standard output.
  17540.  
  17541. Format:     Y file ...
  17542.  
  17543.             file:  The file or list of files to send to standard
  17544.             output.
  17545.  
  17546.             See also: TEE.
  17547.  
  17548. ##  Usage:  The Y command copies input from standard input (usually
  17549.             the keyboard) to standard output (usually the screen).
  17550.             Once the input ends, the named files are appended to
  17551.             standard output.
  17552.  
  17553.             For example, to get text from standard input, append
  17554.             the files MEMO1 and MEMO2 to it, and send the output to
  17555.             MEMOS:
  17556.  
  17557.                  c:\> y memo1 memo2 > memos
  17558.  
  17559.             The Y command is most useful if you want to add
  17560.             redirected data to the beginning of a file instead of
  17561.             appending it to the end.
  17562.  
  17563.             If you are typing at the keyboard to produce input text
  17564.             for Y, you must enter a Ctrl-Z to terminate the input.
  17565.  
  17566.  
  17567.  
  17568.  
  17569.  
  17570.  
  17571.  
  17572.  
  17573.  
  17574.  
  17575.  
  17576.  
  17577.  
  17578.  
  17579.  
  17580.  
  17581.  
  17582.  
  17583.  
  17584.  
  17585.  
  17586.  
  17587. ___________________________________________________________________
  17588. NDOS Reference Manual                                          303
  17589.  
  17590.                                  APPENDIX A, NDOS ERROR MESSAGES
  17591. ___________________________________________________________________
  17592.  
  17593.  
  17594. APPENDIX A, NDOS ERROR MESSAGES
  17595.  
  17596.  
  17597. This appendix lists error messages generated by NDOS, and includes
  17598. a recommended course of action for most errors.  If you are unable
  17599. to resolve the problem, look through Chapter 7, "Using NDOS With
  17600. Your Hardware and Software," beginning on page 130, or contact
  17601. Symantec for technical support.
  17602.  
  17603. Error messages relating to files are generally reports of errors
  17604. returned by DOS.  You may find some of these messages (for example,
  17605. "Access denied") vague enough that they are not always helpful.
  17606. NDOS includes the filename in file error messages, but is often
  17607. unable to determine a more accurate explanation of these DOS
  17608. errors.  The message shown is the best information available based
  17609. on the error codes returned by DOS.
  17610.  
  17611. The following list includes all error messages, in alphabetical
  17612. order:
  17613.  
  17614.     NDOS internal stack overflow:  You attempted to nest batch
  17615.     files or commands like EXCEPT, FOR, IF, IFF, GLOBAL, or SELECT
  17616.     too deep, and NDOS ran out of stack space.  Restructure your
  17617.     command, alias, or batch file, or use the StackSize directive
  17618.     in NDOS.INI to increase the NDOS internal stack size.
  17619.  
  17620.     NDOS initialization error --:  An error occurred during the
  17621.     NDOS startup process.  Look up the rest of the message in this
  17622.     list for a more specific explanation.
  17623.  
  17624.     NDOS server error --:  An error occurred in communication
  17625.     between the resident and transient portions of NDOS.  Look up
  17626.     the rest of the message in this list for a more specific
  17627.     explanation.
  17628.  
  17629.     NDOS swapping failed, loading in non-swapping mode:  None of
  17630.     the swapping options worked, so NDOS loaded in non-swapping
  17631.     mode, which requires about 92K more memory than swapping mode.
  17632.     Check your Swapping specification in NDOS.INI, and/or free
  17633.     some XMS or EMS memory or disk space.
  17634.  
  17635.     NDOS unrecoverable error XX:  An error occurred in the
  17636.     resident portion of NDOS.  These errors will terminate
  17637.     secondary shells and require a reboot if they occur during a
  17638.     primary shell or if NDOS cannot continue.
  17639.  
  17640.          BI    Bad server function code.  Contact Symantec.
  17641.          DI    Same as Disk swap file corrupted.
  17642.          DR    Same as Swap file read error.
  17643.  
  17644. ___________________________________________________________________
  17645. NDOS Reference Manual                                          304
  17646.  
  17647.                                  APPENDIX A, NDOS ERROR MESSAGES
  17648. ___________________________________________________________________
  17649.  
  17650.          DS    Same as Swap file seek error.
  17651.          EI    Same as EMS mapping error.
  17652.          NS    No number for new shell.  You have started too many
  17653.                NDOS secondary shells without properly exiting some
  17654.                of them, perhaps by closing DESQview windows rather
  17655.                than EXITing.  Clean up any work in process and
  17656.                reboot the system.
  17657.          PT    Illegal process termination.  Contact Symantec.
  17658.          TS    Terminated inactive shell.  Contact Symantec.
  17659.          XI    Same as XMS move failed.
  17660.  
  17661.     Access denied:  You tried to write to or erase a read-only
  17662.     protected file, to rename a file or directory to an existing
  17663.     name, to create a directory that already exists, or to remove
  17664.     a read-only directory or a directory with files or
  17665.     subdirectories still in it.
  17666.  
  17667.     Alias loop:  An alias refers back to itself either directly or
  17668.     indirectly (i.e., a = b = a), or aliases are nested more than
  17669.     16 deep.  Correct your alias list.
  17670.  
  17671.     Ambiguous directive name:  The name of a NDOS.INI directive
  17672.     was not fully spelled out and was therefore ambiguous.  Spell
  17673.     out the directive more fully to make its name unambiguous.
  17674.  
  17675.     Attempt to exit from root shell:  Another program has
  17676.     destroyed a portion of NDOS memory.  Reboot the system; if the
  17677.     error persists, contact Symantec.
  17678.  
  17679.     Bad disk unit:  Generally caused by a disk drive hardware
  17680.     failure.
  17681.  
  17682.     Bad environment:  The DOS environment has a bad structure,
  17683.     probably because a program destroyed master environment space
  17684.     of NDOS.  Reboot the system.
  17685.  
  17686.     Batch file missing:  NDOS can't find the batch (.BAT) file it
  17687.     was running.  It was either deleted, renamed, moved, or the
  17688.     disk was changed.  Correct the problem and rerun the file.
  17689.  
  17690.     Can't copy file to itself:  NDOS will not permit you to COPY
  17691.     or MOVE a file to itself.  NDOS performs full path and
  17692.     filename expansion before copying to ensure that files aren't
  17693.     inadvertently destroyed.
  17694.  
  17695.     Can't create:  NDOS can't create the specified file.  The disk
  17696.     may be full or write protected, or the file already exists and
  17697.     is read-only, or the root directory is full.
  17698.  
  17699.  
  17700.  
  17701. ___________________________________________________________________
  17702. NDOS Reference Manual                                          305
  17703.  
  17704.                                  APPENDIX A, NDOS ERROR MESSAGES
  17705. ___________________________________________________________________
  17706.  
  17707.     Can't delete:  NDOS can't delete the specified file or
  17708.     directory.  The disk is probably write protected.
  17709.  
  17710.     Can't get directory:  NDOS can't read the directory.  The disk
  17711.     drive is probably not ready.
  17712.  
  17713.     Can't make directory entry:  NDOS can't create the filename in
  17714.     the directory.  This is usually caused by a full root
  17715.     directory.  Create a subdirectory and move some of the files
  17716.     to it.
  17717.  
  17718.     Can't open:  NDOS can't open the specified file.  Either the
  17719.     file doesn't exist or the disk directory or File Allocation
  17720.     Table is damaged.
  17721.  
  17722.     Can't remove current directory:  You attempted to remove the
  17723.     current directory, which DOS does not allow.  Change to the
  17724.     parent directory and try again.
  17725.  
  17726.     Can't set up disk swap file:  The disk swap file you specified
  17727.     cannot be opened.  The path or drive is invalid, the disk is
  17728.     full, DOS is out of file handles, or there is a hardware
  17729.     problem.  Check NDOS.INI to be sure your Swapping directive is
  17730.     correct.
  17731.  
  17732.     Command line too long:  A single command exceeded 255
  17733.     characters, or the entire command line exceeded 511
  17734.     characters, during alias and variable expansion.  To address
  17735.     this reduce the complexity of the command, or use a batch
  17736.     file.  This error also occurs if you pass an extremely long
  17737.     command line to NDOS on your SHELL= line in CONFIG.SYS and
  17738.     NDOS does not have room for your command line and the
  17739.     necessary directory information for the COMSPEC environment
  17740.     variable.  In this case, place the commands in a batch file
  17741.     and invoke the batch file from your SHELL= line.
  17742.  
  17743.     Command tail too long:  A program attempted to pass a command
  17744.     in an improper format or a command longer than 126 characters
  17745.     to NDOS.  This is probably a bug in the program from which
  17746.     NDOS was loaded.  Contact the author of the program or
  17747.     Symantec for technical assistance.
  17748.  
  17749.     Contents lost before copy:  COPY was appending files, and
  17750.     found one of the source files is the same as the target.  That
  17751.     source file is skipped, and appending continues with the next
  17752.     file.
  17753.  
  17754.     Data error:  DOS can't read or write properly to the device.
  17755.     On a floppy drive, this error is usually caused by a defective
  17756.     floppy disk, dirty disk drive heads, or a misalignment between
  17757.  
  17758. ___________________________________________________________________
  17759. NDOS Reference Manual                                          306
  17760.  
  17761.                                  APPENDIX A, NDOS ERROR MESSAGES
  17762. ___________________________________________________________________
  17763.  
  17764.     the heads on your drive and the drive on which the disk was
  17765.     created.  On a hard drive, this error may indicate a drive
  17766.     that is too hot or too cold, or a hardware problem.  Retry the
  17767.     operation; if it fails again, correct the hardware or floppy
  17768.     disk problem.
  17769.  
  17770.     Directory stack empty:  POPD or DIRS can't find any entries in
  17771.     the directory stack.
  17772.  
  17773.     Disk is write protected:  The disk cannot be written to.
  17774.     Check the disk and remove the write-protect tab or close the
  17775.     write-protect window if necessary.
  17776.  
  17777.     Disk swap file corrupted:  The NDOS disk swapping file
  17778.     (NDOSSWAP.nnn) has been moved, deleted, or damaged by another
  17779.     program.  Reboot the system.
  17780.  
  17781.     Drive not ready--close door:  The floppy disk drive door is
  17782.     open.  Close the door and try again.
  17783.  
  17784.     EMS deallocation failed:  NDOS can't deallocate EMS memory
  17785.     when exiting from a secondary shell.  The EMS map has been
  17786.     corrupted or the memory area used by NDOS or the EMS driver
  17787.     has been destroyed by a program.  Clean up any work in process
  17788.     and reboot the system.
  17789.  
  17790.     EMS map save or restore failed:  NDOS cannot save or restore
  17791.     the EMS page map.  The EMS map has been corrupted, memory has
  17792.     been destroyed by a program, or you have an incompatible EMS
  17793.     driver.  If this error recurs, try another swapping method,
  17794.     update your EMS driver, or contact Symantec.
  17795.  
  17796.     EMS mapping failed:  NDOS can't map EMS pages when swapping to
  17797.     or from EMS.  The EMS map has been corrupted or the memory
  17798.     area used by the loader or the EMS driver has been destroyed
  17799.     by a program.  Reboot the system.
  17800.  
  17801.     Environment already saved:  You have already saved the
  17802.     environment with a previous SETLOCAL command.  You cannot nest
  17803.     SETLOCAL/ENDLOCAL pairs.
  17804.  
  17805.     Error in command line directive:  You used the //iniline
  17806.     option to place a NDOS.INI directive on the SHELL= line in
  17807.     CONFIG.SYS or on the startup command line for a secondary
  17808.     shell, but the directive is in error.  A more specific error
  17809.     message follows.
  17810.  
  17811.     Error on line [nnnn] of [filename]:  There is an error in your
  17812.     NDOS.INI file.  The following message explains the error in
  17813.  
  17814.  
  17815. ___________________________________________________________________
  17816. NDOS Reference Manual                                          307
  17817.  
  17818.                                  APPENDIX A, NDOS ERROR MESSAGES
  17819. ___________________________________________________________________
  17820.  
  17821.     more detail.  Correct the line in error, and restart NDOS for
  17822.     your change to take effect.
  17823.  
  17824.     Error reading:  DOS experienced an I/O error when reading from
  17825.     a device.  This is usually caused by a bad disk, a device not
  17826.     ready, or a hardware error.
  17827.  
  17828.     Error writing:  DOS experienced an I/O error when writing to a
  17829.     device.  This is usually caused by a full disk, a bad disk, a
  17830.     device not ready, or a hardware error.
  17831.  
  17832.     Exceeded batch nesting limit:  You have attempted to nest
  17833.     batch files more than ten levels deep.
  17834.  
  17835.     Fatal error -- please reboot:  NDOS cannot continue due to the
  17836.     previous error.  Reboot the system.
  17837.  
  17838.     File Allocation Table bad:  DOS can't access the FAT on the
  17839.     specified disk.  This can be caused by a bad disk, a hardware
  17840.     error, or an unusual software interaction.
  17841.  
  17842.     File exists:  The requested output file already exists, and
  17843.     NDOS won't overwrite it.
  17844.  
  17845.     File not found:  NDOS couldn't find the specified file.  Check
  17846.     the spelling or path name.
  17847.  
  17848.     General failure:  This is usually a hardware problem,
  17849.     particularly a disk drive failure or a device not properly
  17850.     connected to a serial or parallel port.  Try to correct the
  17851.     problem or reboot and try again.
  17852.  
  17853.     I/O error in [filename] ... some directives may not have been
  17854.     processed:  AN I/O error occurred while reading your NDOS.INI
  17855.     file.  There may be a physical problem with data on the disk,
  17856.     or a sharing error on a multitasking system.  Check your
  17857.     NDOS.INI file and try again.
  17858.  
  17859.     Illegal Swapping option or path:  The swap type or disk swap
  17860.     path in the NDOS.INI Swapping directive is invalid.  NDOS
  17861.     ignores the bad swap type or path and attempts to scan the
  17862.     rest of the Swapping specification for a valid option.
  17863.     Multiple errors in the Swapping directive will cause this
  17864.     message to repeat.  Correct NDOS.INI and reboot the system for
  17865.     the corrected swap type to take effect.
  17866.  
  17867.     INI file processing error at line n, remainder of file
  17868.     skipped:  An input error (such as a data error) has prevented
  17869.     NDOS from fully processing your NDOS.INI file.  Check that the
  17870.  
  17871.  
  17872. ___________________________________________________________________
  17873. NDOS Reference Manual                                          308
  17874.  
  17875.                                  APPENDIX A, NDOS ERROR MESSAGES
  17876. ___________________________________________________________________
  17877.  
  17878.     file is readable by another program, or TYPE it to ensure that
  17879.     NDOS reads the file properly.
  17880.  
  17881.     Insufficient load space:  There is not enough room in the NDOS
  17882.     internal memory areas to include all of the options you
  17883.     requested in NDOS.INI.  Contact Symantec for assistance.
  17884.  
  17885.     Insufficient disk space:  COPY or MOVE ran out of room on the
  17886.     destination drive.  Remove some files and retry the operation.
  17887.  
  17888.     Internal DOS error:  DOS encountered an internal bug and
  17889.     failed. Reboot the system.
  17890.  
  17891.     Invalid choice value:  You gave an invalid value for a
  17892.     "choice" directive (one that accepts a choice from a list,
  17893.     like "Yes" or "No") in NDOS.INI.
  17894.  
  17895.     Invalid color:  You gave an invalid value for a color
  17896.     directive in NDOS.INI.
  17897.  
  17898.     Invalid date:  An invalid date was entered.  Check the syntax
  17899.     and reenter.
  17900.  
  17901.     Invalid drive:  A bad or non-existent disk drive was
  17902.     specified.
  17903.  
  17904.     Invalid DOS version:  You need a newer version of DOS to
  17905.     execute the specified command.
  17906.  
  17907.     Invalid INI file path or name, file not processed:  The path
  17908.     or name for the initialization file on the SHELL= line in
  17909.     CONFIG.SYS or on the startup command line for a secondary
  17910.     shell.  Correct the @d:\path\inifile option to name the
  17911.     correct file.
  17912.  
  17913.     Invalid directive name:  NDOS can't recognize the name of a
  17914.     directive in your NDOS.INI file.
  17915.  
  17916.     Invalid key name:  You tried to make an invalid key
  17917.     substitution in NDOS.INI, or you used an invalid key name in a
  17918.     keystroke alias or KEYSTACK.  Correct the error and retry the
  17919.     operation.
  17920.  
  17921.     Invalid numeric value:  You gave an invalid value for a
  17922.     numeric directive in NDOS.INI.
  17923.  
  17924.     Invalid parameter:  NDOS didn't recognize a parameter.  Check
  17925.     the syntax and spelling.
  17926.  
  17927.  
  17928.  
  17929. ___________________________________________________________________
  17930. NDOS Reference Manual                                          309
  17931.  
  17932.                                  APPENDIX A, NDOS ERROR MESSAGES
  17933. ___________________________________________________________________
  17934.  
  17935.     Invalid path:  The specified path does not exist.  Check the
  17936.     disk specification and/or spelling.
  17937.  
  17938.     Invalid path specification:  You used an invalid path in a
  17939.     path or filename directive in NDOS.INI.
  17940.  
  17941.     Invalid section name:  You used an invalid section name in
  17942.     NDOS.INI.  The only valid section names are [Primary] and
  17943.     [Secondary].
  17944.  
  17945.     Invalid startup switch, ignored:  You passed NDOS an invalid
  17946.     option on the SHELL= line in CONFIG.SYS or on the startup
  17947.     command line for a secondary shell.  Correct the switch.
  17948.  
  17949.     Invalid Swapping option or path:  The swap type or disk swap
  17950.     path in the NDOS.INI Swapping directive is invalid.  NDOS
  17951.     ignores the bad swap type or path and attempts to scan the
  17952.     rest of the Swapping specification for a valid option.
  17953.     Multiple errors in the Swapping directive will cause this
  17954.     message to repeat.  Correct NDOS.INI and reboot the system for
  17955.     the corrected swap type to take effect.
  17956.  
  17957.     Invalid time:  An invalid time was entered.  Check the syntax
  17958.     and reenter.
  17959.  
  17960.     Keystroke substitution table full:  NDOS ran out of room to
  17961.     store keystroke substitutions entered in NDOS.INI.  Reduce the
  17962.     number of key substitutions or contact Symantec for
  17963.     assistance.
  17964.  
  17965.     KSTACK.COM not loaded:  You attempted to execute a KEYSTACK
  17966.     command without loading KSTACK.COM.  See the KEYSTACK command
  17967.     for more information.
  17968.  
  17969.     Label not found:  A GOTO or GOSUB referred to a non-existent
  17970.     label. Check your batch file.
  17971.  
  17972.     Memory allocation error:  NDOS can't allocate memory while
  17973.     loading, or while reserving memory for internal use.  DOS
  17974.     memory allocation has been corrupted.  Reboot the system.
  17975.  
  17976.     Memory deallocation error:  Similar to memory allocation
  17977.     error; memory has been corrupted.  Reboot the system.
  17978.  
  17979.     Memory destroyed:  The DOS memory control blocks have been
  17980.     corrupted.  Reboot the system.
  17981.  
  17982.     Missing ENDTEXT:  A TEXT command is missing a matching
  17983.     ENDTEXT.  Check the batch file.
  17984.  
  17985.  
  17986. ___________________________________________________________________
  17987. NDOS Reference Manual                                          310
  17988.  
  17989.                                  APPENDIX A, NDOS ERROR MESSAGES
  17990. ___________________________________________________________________
  17991.  
  17992.     Missing GOSUB:  NDOS cannot perform the RETURN command in a
  17993.     batch file.  You tried to do a RETURN without a GOSUB, or your
  17994.     batch file has been corrupted.
  17995.  
  17996.     Missing SETLOCAL:  NDOS encountered an ENDLOCAL without a
  17997.     matching SETLOCAL.
  17998.  
  17999.     No aliases defined:  You tried to display aliases but no
  18000.     aliases have been defined.
  18001.  
  18002.     No closing quote: NDOS couldn't find a second matching
  18003.     quotation mark (` or ") on the command line.
  18004.  
  18005.     No expression:  The expression passed to the %@EVAL variable
  18006.     function is empty.  Correct the expression and retry the
  18007.     operation.
  18008.  
  18009.     No file handle available:  This is an internal NDOS disk
  18010.     swapping error.  Change to another swapping method if
  18011.     possible, and contact Symantec.
  18012.  
  18013.     No room for INI file name:  NDOS does not have enough space to
  18014.     pass the name of your NDOS.INI file to secondary shells; see
  18015.     String area overflow for more details.  Any [Secondary]
  18016.     section in NDOS.INI will be ignored in secondary shells.
  18017.  
  18018.     No UMBs; loading low:  The LOADHIGH (or LH) command can't find
  18019.     any UMBs for your program.  The program is loaded into base
  18020.     memory.  LH and LOADHIGH only work with MS-DOS 5.0 and above,
  18021.     when the DOS=UMB directive is included in CONFIG.SYS and
  18022.     sufficient upper memory space is available for the program.
  18023.  
  18024.     No upper memory available, master environment will be placed
  18025.     in low memory:  You asked NDOS to load the master environment
  18026.     into an UMB via the UMBEnvironment directive in NDOS.INI, but
  18027.     no UMB was available.  Check that your XMS driver is properly
  18028.     installed and/or free up some UMB space in use by another
  18029.     program.
  18030.  
  18031.     No upper memory available, resident portion will remain in low
  18032.     memory:  You requested relocation of the NDOS resident portion
  18033.     to an UMB via the UMBLoad directive in NDOS.INI, but no UMB
  18034.     was available.  Check that your XMS driver is properly
  18035.     installed and/or free up some UMB space in use by another
  18036.     program.
  18037.  
  18038.     Non-DOS disk:  DOS can't read the disk.  Either the disk is
  18039.     bad, or it has been formatted by a different operating system.
  18040.     Reformat it as a DOS disk.
  18041.  
  18042.  
  18043. ___________________________________________________________________
  18044. NDOS Reference Manual                                          311
  18045.  
  18046.                                  APPENDIX A, NDOS ERROR MESSAGES
  18047. ___________________________________________________________________
  18048.  
  18049.     Not an alias:  The specified alias is not in the NDOS alias
  18050.     list.
  18051.  
  18052.     Not in environment:  The specified variable is not in the
  18053.     environment.
  18054.  
  18055.     Not in swapping mode:  You attempted to turn swapping on or
  18056.     off with the SWAPPING command, but NDOS is loaded in memory-
  18057.     resident mode and swapping is not active.
  18058.  
  18059.     Not ready:  The specified device can't be accessed.
  18060.  
  18061.     Not same device:  This error usually appears in RENAME.  You
  18062.     cannot rename a file to a different disk drive.
  18063.  
  18064.     Out of environment/alias space:  NDOS has run out of space
  18065.     for environment variables or aliases.  Edit the SHELL line in
  18066.     CONFIG.SYS or the Environment directive in NDOS.INI to
  18067.     increase the environment size, or the Alias directive in
  18068.     NDOS.INI to increase the alias list size.
  18069.  
  18070.     Out of memory:  DOS or NDOS had insufficient free memory to
  18071.     execute the last command, or the DOS memory control blocks
  18072.     have been destroyed.  If this error occurs in a secondary
  18073.     shell, return to the primary shell before running the command.
  18074.     Otherwise, try to free some memory by removing memory-resident
  18075.     programs.  If the error persists, use the MEMORY command to
  18076.     determine the actual memory available.  If the base memory
  18077.     (DOS RAM) figures reported by MEMORY are unreasonable, the
  18078.     memory control blocks have probably been destroyed and you
  18079.     must reboot the system.  If you receive this error from DIR
  18080.     when the MEMORY command shows sufficient memory for the
  18081.     directory you are displaying, memory has probably been
  18082.     "fragmented", and contains a free area larger than 8K but not
  18083.     large enough for the entire directory.  Use a memory mapping
  18084.     program like PMAP, MAPMEM, or MANIFEST to determine where the
  18085.     fragmentation is, and experiment with your TSRs and
  18086.     applications to determine and remove its cause.
  18087.  
  18088.     Out of paper:  DOS detected an out-of-paper condition on one
  18089.     of the parallel printers (LPT1, LPT2, or LPT3).  Check your
  18090.     printer and add paper if necessary.
  18091.  
  18092.     Overflow:  An arithmetic overflow occurred in the %@EVAL
  18093.     variable function.  Check the values being passed to %@EVAL.
  18094.     %@EVAL can handle 16 digits to the left of the decimal point
  18095.     and eight to the right.
  18096.  
  18097.     Read error:  DOS disk read error; usually caused by a bad disk
  18098.     or a non-DOS disk.
  18099.  
  18100. ___________________________________________________________________
  18101. NDOS Reference Manual                                          312
  18102.  
  18103.                                  APPENDIX A, NDOS ERROR MESSAGES
  18104. ___________________________________________________________________
  18105.  
  18106.     Sector not found:  BIOS disk error; usually caused by a bad
  18107.     disk or a non-DOS disk.
  18108.  
  18109.     Seek error:  DOS can't seek to the proper location on the
  18110.     disk.  This is generally caused by a bad disk or drive.
  18111.  
  18112.     String area overflow:  NDOS ran out of room to store the text
  18113.     from string directives in NDOS.INI.  Reduce the complexity of
  18114.     NDOS.INI or contact Symantec for assistance.
  18115.  
  18116.     Swap file [seek | read | write] failed:  NDOS  encountered an
  18117.     I/O error while accessing the disk swap file (NDOSSWAP.nnn).
  18118.     The disk was changed, the file has been destroyed by a
  18119.     program, or the NDOS memory area has been overwritten by a
  18120.     program.  Reboot the system.
  18121.  
  18122.     Syntax error:  A command or variable function was entered in
  18123.     an improper format.  Check the syntax in this manual and
  18124.     correct the error.
  18125.  
  18126.     Too many DR-DOS SETs in CONFIG.SYS:  The SET commands in your
  18127.     DR-DOS CONFIG.SYS file exceeded the size of the NDOS buffer
  18128.     area.  Reduce the number or length of the commands or contact
  18129.     Symantec for assistance.
  18130.  
  18131.     Too many open files:  DOS has run out of file handles.  Try
  18132.     setting FILES=20 or more in your CONFIG.SYS file.
  18133.  
  18134.     Transient memory allocation error:  NDOS couldn't reserve
  18135.     memory for its transient portion (probably in a SWAPPING OFF
  18136.     command).  The memory control blocks have been destroyed, or a
  18137.     program has fragmented memory.  Reboot the system.
  18138.  
  18139.     Transient memory deallocation error:  NDOS couldn't release
  18140.     memory for its transient portion (probably in a SWAPPING ON
  18141.     command).  The memory control blocks have been destroyed, or a
  18142.     program has fragmented memory.  Reboot the system.
  18143.  
  18144.     Unbalanced parentheses:  The number of left and right
  18145.     parentheses did not match in an expression passed to the
  18146.     %@EVAL variable function.  Correct the expression and retry
  18147.     the operation.
  18148.  
  18149.     Unknown command:  A command was entered that NDOS didn't
  18150.     recognize and couldn't find in the current search path.  Check
  18151.     the spelling or PATH specification.
  18152.  
  18153.     Variable loop:  A nested environment variable refers to
  18154.     itself, or variables are nested more than 16 deep.  Correct
  18155.     the error and retry the command.
  18156.  
  18157. ___________________________________________________________________
  18158. NDOS Reference Manual                                          313
  18159.  
  18160.                                  APPENDIX A, NDOS ERROR MESSAGES
  18161. ___________________________________________________________________
  18162.  
  18163.     Write error:  A DOS disk error, usually caused by a bad disk
  18164.     or a non-DOS disk.
  18165.  
  18166.     XMS deallocation failed:  NDOS could not deallocate XMS memory
  18167.     when exiting a secondary shell.  XMS memory has been
  18168.     destroyed; reboot your system.
  18169.  
  18170.     XMS move failed:  NDOS could not move data between base memory
  18171.     and XMS memory while swapping itself.  XMS memory has been
  18172.     destroyed; reboot your system.
  18173.  
  18174.  
  18175.  
  18176.  
  18177.  
  18178.  
  18179.  
  18180.  
  18181.  
  18182.  
  18183.  
  18184.  
  18185.  
  18186.  
  18187.  
  18188.  
  18189.  
  18190.  
  18191.  
  18192.  
  18193.  
  18194.  
  18195.  
  18196.  
  18197.  
  18198.  
  18199.  
  18200.  
  18201.  
  18202.  
  18203.  
  18204.  
  18205.  
  18206.  
  18207.  
  18208.  
  18209.  
  18210.  
  18211.  
  18212.  
  18213.  
  18214. ___________________________________________________________________
  18215. NDOS Reference Manual                                          314
  18216.  
  18217.                                                               ASCII
  18218. ___________________________________________________________________
  18219.  
  18220.  
  18221. APPENDIX B, ASCII AND KEY CODES
  18222.  
  18223.  
  18224.  
  18225. ASCII
  18226.  
  18227.     To represent the text you type, computers must translate each
  18228.     letter to and from a number.  The code used by all PC-
  18229.     compatible computers for this translation is called ASCII
  18230.     (American Standard Code for Information Interchange).  ASCII
  18231.     codes are also used for the characters displayed on the
  18232.     screen.  Function keys, cursor keys, and Alt keys do not
  18233.     generate ASCII codes.  For details on these keys and a
  18234.     reference table, see Keys and Key Codes later in this
  18235.     Appendix.
  18236.  
  18237.     ASCII Control Characters have numeric values between 0 and 31,
  18238.     and include non-printing characters like carriage return and
  18239.     line feed.  The ASCII standard does not define a visual
  18240.     representation for control characters, but the IBM PC
  18241.     character set does define one for most control characters as
  18242.     shown in the Char column of the table.  You can enter these
  18243.     characters using the Ctrl key combination shown in the Ctrl
  18244.     column of this table, with a caret [^] representing the Ctrl
  18245.     key.  For example, character 4 is shown as ^D;  to enter it,
  18246.     press Ctrl and D on your keyboard.  You can also enter control
  18247.     characters with the Alt key and the numeric keypad, like
  18248.     extended ASCII codes (see below).  The Name column of this
  18249.     table shows a two or three character "name" given to each
  18250.     control character as part of the ASCII standard.
  18251.  
  18252.     ASCII Printing Characters have numeric values between 32 and
  18253.     127, and include the entire English-language character set as
  18254.     well as punctuation and other special marks.  You enter these
  18255.     characters by pressing the corresponding keyboard key.
  18256.     Character 127 has no corresponding keyboard key, but can be
  18257.     entered on many systems by typing Ctrl-Backspace.
  18258.  
  18259.     Extended ASCII Characters have values between 128 and 255 and
  18260.     include international language characters, line-drawing
  18261.     characters, and other graphics symbols.  You can enter
  18262.     extended ASCII codes on the keyboard by holding down the Alt
  18263.     key, entering the decimal numeric value of the key on the
  18264.     numeric keypad, and then releasing the Alt key.
  18265.  
  18266.  
  18267.  
  18268.  
  18269.  
  18270.  
  18271.  
  18272. ___________________________________________________________________
  18273. NDOS Reference Manual                                          315
  18274.  
  18275.                                                  Keys and Key Codes
  18276. ___________________________________________________________________
  18277.  
  18278.  
  18279. Keys and Key Codes
  18280.  
  18281.     When you press a single key or a key combination, software
  18282.     built into your computer (the BIOS or Basic Input/Output
  18283.     System) translates your keystroke into two numbers:  a scan
  18284.     code, representing the actual key that was pressed, and an
  18285.     ASCII code, representing the ASCII value for that key.  The
  18286.     BIOS returns these numbers the next time a program requests
  18287.     keyboard input.  This section explains how key codes work;
  18288.     for information on using them with NDOS features see NDOS.INI
  18289.     (page 121), keystroke aliases (page 162), INKEY (page 235),
  18290.     and KEYSTACK (page 239).
  18291.  
  18292.     As PCs have evolved, the structure of keyboard codes has
  18293.     evolved somewhat haphazardly with them, resulting in a
  18294.     bewildering array of possible key codes.  We'll give you a
  18295.     basic explanation of how key codes work.  For a more in-depth
  18296.     discussion, refer to a BIOS or PC hardware reference manual.
  18297.  
  18298.     The nuances of how your keyboard behaves depends on the
  18299.     keyboard manufacturer and the computer manufacturer who
  18300.     provides the built-in BIOS.  As a result, we can't guarantee
  18301.     the accuracy of the information below for every system, but
  18302.     the discussion and reference table should be accurate for most
  18303.     systems.  Our discussion is based on the 101-key "enhanced"
  18304.     keyboard commonly used on AT-compatible and PS/2 computers,
  18305.     but virtually all of it is applicable to the 84-key keyboards
  18306.     on older systems.  The primary difference is that older
  18307.     keyboards lack a separate cursor pad and only have ten
  18308.     function keys.
  18309.  
  18310.     All keys have a scan code.  Not all keys have an ASCII code.
  18311.     For example, function keys and cursor keys are not part of the
  18312.     ASCII character set (see above), and have no ASCII value, but
  18313.     they do have a scan code.  Some keys have more than one ASCII
  18314.     code.  The A key, for example, has ASCII code 97 (lower case
  18315.     "a") if you press it by itself.  If you press it along with
  18316.     the Shift key, the ASCII code changes to 65 (upper case "A").
  18317.     If you press Ctrl and A the ASCII code changes to one.  In all
  18318.     these cases, the scan code (30) is unchanged because you are
  18319.     pressing the same physical key.
  18320.  
  18321.     Things are different if you press Alt-A.  Alt keystrokes have
  18322.     no ASCII code, so the BIOS returns an ASCII code of 0, along
  18323.     with the A key's scan code of 30.  This allows a program to
  18324.     detect all the possible variations of A, based on the
  18325.     combination of ASCII code and scan code.
  18326.  
  18327.  
  18328.  
  18329.  
  18330. ___________________________________________________________________
  18331. NDOS Reference Manual                                          316
  18332.  
  18333.                                                  Keys and Key Codes
  18334. ___________________________________________________________________
  18335.  
  18336.  
  18337.     Some keys generate more than one scan code depending on
  18338.     whether Shift, Ctrl, or Alt is pressed.  This allows a program
  18339.     to differentiate between two different keystrokes on the same
  18340.     key, neither of which has a corresponding ASCII value.  For
  18341.     example, F1 has no ASCII value so it returns an ASCII code of
  18342.     0, and the F1 scan code of 59.  Shift-F1 also returns an ASCII
  18343.     code 0;  if it also returned a scan code of 59, a program
  18344.     couldn't distinguish it from F1.  The BIOS translates scan
  18345.     codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so that
  18346.     each variation returns a different scan code along with an
  18347.     ASCII code of 0.
  18348.  
  18349.     On the 101-key keyboard that we're discussing, there's one
  18350.     more variation: non-ASCII keys on the cursor keypad (such as
  18351.     UpArrow) return the same scan code as the corresponding key
  18352.     on the numeric keypad, for compatibility reasons.  If they
  18353.     also returned an ASCII code of 0, a program couldn't tell
  18354.     which key was pressed.  Therefore, these keys return an ASCII
  18355.     code of 224 rather than 0.  This means that older programs,
  18356.     which only look for an ASCII 0 to indicate a non-ASCII
  18357.     keystroke like UpArrow, may not detect these cursor pad keys
  18358.     properly.
  18359.  
  18360.     The number of different codes returned by any given key varies
  18361.     from one (the spacebar) to four, depending on the key, the
  18362.     design of your keyboard, and the BIOS in your system.  Some
  18363.     keys, like Alt, Ctrl, and Shift by themselves or in
  18364.     combination with each other, plus Print Screen, SysReq, Scroll
  18365.     Lock, Pause, Break, Num Lock, and Caps Lock keys, do not have
  18366.     any code representations at all.  The same is true of
  18367.     keystrokes with more than one modifying key, like Ctrl-Shift-
  18368.     A.  The BIOS may perform special actions automatically when
  18369.     you press these keys (for example, it switches into Caps Lock
  18370.     mode when you press Caps Lock), but it does not report the
  18371.     keystrokes to whatever program is running.  Programs which
  18372.     detect such keystrokes access the keyboard hardware directly,
  18373.     a subject which is beyond the scope of this manual.
  18374.  
  18375.     The following table lists all of the keys on the 101-key
  18376.     "enhanced" keyboard.  The keys are arranged roughly in scan
  18377.     code order, which is generally left to right, moving from the
  18378.     top of the keyboard to the bottom.
  18379.  
  18380.     Column one shows the key's keycap symbol or name.  Column two
  18381.     shows the scan code if the key is unshifted. Columns three and
  18382.     four contain the codes for the shifted key.  Columns five and
  18383.     six show the code for Ctrl plus the key.  Column seven
  18384.     contains the scan code for Alt plus the key (Alt keystrokes
  18385.     have no ASCII code and always generate an ASCII code of 0,
  18386.     which is not shown).  The last column shows the ASCII code.
  18387.  
  18388.  
  18389. ___________________________________________________________________
  18390. NDOS Reference Manual                                          317
  18391.  
  18392.                                                  Keys and Key Codes
  18393. ___________________________________________________________________
  18394.  
  18395.  
  18396.     Key names prefaced by np are on the numeric keypad.  Those
  18397.     prefaced by cp are on the cursor keypad between the main
  18398.     typing keys and the number keypad.  The numeric keypad values
  18399.     are valid if Num Lock is turned off.  If you need to specify a
  18400.     number key from the numeric keypad, use the scan code shown
  18401.     for the keypad and the ASCII code shown for the corresponding
  18402.     typewriter key.  For example, the keypad "7" has a scan code
  18403.     of 71 (the np Home scan code) and an ASCII code of 54 (the
  18404.     ASCII code for "7").
  18405.  
  18406.     The chart is blank for key combinations that are not reported
  18407.     at all by the BIOS, like Ctrl-1 and Alt-PageUp.
  18408.  
  18409.  
  18410.  
  18411.  
  18412.  
  18413.  
  18414.  
  18415.  
  18416.  
  18417.  
  18418.  
  18419.  
  18420.  
  18421.  
  18422.  
  18423.  
  18424.  
  18425.  
  18426.  
  18427.  
  18428.  
  18429.  
  18430.  
  18431.  
  18432.  
  18433.  
  18434.  
  18435.  
  18436.  
  18437.  
  18438.  
  18439.  
  18440.  
  18441. ___________________________________________________________________
  18442. NDOS Reference Manual                                          318
  18443.  
  18444.                                                  Keys and Key Codes
  18445. ___________________________________________________________________
  18446.  
  18447.  
  18448.           Scan Codes and Key Codes for Top Two Keyboard Rows
  18449.  
  18450.  
  18451.  
  18452.                         Shift  Shift  Ctrl  Ctrl   Alt
  18453.     Key Cap    Scan     Scan   ASCII  Scan  ASCII  Scan  ASCII
  18454.     Symbol     Code     Code   Code   Code  Code   Code  Code
  18455.  
  18456.     Esc        1        1      27     1      27    1     27
  18457.     1  !       2        2      33                  120   49
  18458.     2  @       3        3      64     3      0     121   50
  18459.     3  #       4        4      35                  122   51
  18460.     4  $       5        5      36                  123   52
  18461.     5  %       6        6      37                  124   53
  18462.     6  ^       7        7      94     7      30    125   54
  18463.     7  &       8        8      38                  126   55
  18464.     8  *       9        9      42                  127   56
  18465.     9  (       10       10     40                  128   57
  18466.     0  )       11       11     41                  129   48
  18467.     -  _       12       2      95     12     31    130   45
  18468.     =  +       13       13     43                  131   61
  18469.     Backspace  14       14     8      14     127   14    8
  18470.     Tab        15       15     0      148    0     165   9
  18471.     Q          16       16     81     16     17    16    113
  18472.     W          17       17     87     17     23    17    119
  18473.     E          18       18     69     18     5     18    101
  18474.     R          19       19     82     19     18    19    114
  18475.     T          20       20     84     20     20    20    116
  18476.     Y          21       21     89     21     25    21    121
  18477.     U          22       22     85     22     21    22    117
  18478.     I          23       23     73     23     9     23    105
  18479.     O          24       24     79     24     15    24    111
  18480.     P          25       25     80     25     16    25    112
  18481.     [  {       26       26     123    26     27    26    91
  18482.     ]  }       27       27     125    27     29    27    93
  18483.     Enter      28       28     13     28     10    28    13
  18484.  
  18485.  
  18486.  
  18487.  
  18488.  
  18489.  
  18490.  
  18491.  
  18492.  
  18493.  
  18494.  
  18495.  
  18496. ___________________________________________________________________
  18497. NDOS Reference Manual                                          319
  18498.  
  18499.                                                  Keys and Key Codes
  18500. ___________________________________________________________________
  18501.  
  18502.  
  18503.          Scan Codes and Key Codes for Bottom Two Keyboard Rows
  18504.  
  18505.  
  18506.  
  18507.                         Shift  Shift  Ctrl  Ctrl   Alt
  18508.     Key Cap    Scan     Scan   ASCII  Scan  ASCII  Scan  ASCII
  18509.     Symbol     Code     Code   Code   Code  Code   Code  Code
  18510.  
  18511.     A          30       30     65     30    1      30     97
  18512.     S          31       31     83     31    19     31     115
  18513.     D          32       32     68     32    4      32     100
  18514.     F          33       33     70     33    6      33     102
  18515.     G          34       34     71     34    7      34     103
  18516.     H          35       35     72     35    8      35     104
  18517.     J          36       36     74     35    10     36     106
  18518.     K          37       37     75     36    11     37     107
  18519.     L          38       38     76     37    12     38     108
  18520.     ;  :       39       39     58                  39     59
  18521.     '  "       40       40     34                  40     39
  18522.       ~        41       41     126                 41     96
  18523.     \  |       43       43     124    43    28     43     92
  18524.     Z          44       44     90     44    26     44     122
  18525.     X          45       45     88     45    24     45     120
  18526.     C          46       46     67     46    3      46     99
  18527.     V          47       47     86     47    22     47     118
  18528.     B          48       48     66     48    2      48     98
  18529.     N          49       49     78     49    14     49     110
  18530.     M          50       50     77     50    13     50     109
  18531.     ,  <       51       51     60                  51     44
  18532.     .  >       52       52     62                  52     46
  18533.     /  ?       53       53     63                  53     47
  18534.     Space      57       57     32     57    32     57     32
  18535.  
  18536.  
  18537.  
  18538.  
  18539.  
  18540.  
  18541.  
  18542.  
  18543.  
  18544.  
  18545.  
  18546.  
  18547.  
  18548.  
  18549.  
  18550.  
  18551. ___________________________________________________________________
  18552. NDOS Reference Manual                                          320
  18553.  
  18554.                                                  Keys and Key Codes
  18555. ___________________________________________________________________
  18556.  
  18557.         Scan Codes and Key Codes for Key Pads and Function Keys
  18558.  
  18559.  
  18560.  
  18561.                        Shift  Shift  Ctrl   Ctrl   Alt
  18562.     Key Cap    Scan    Scan   ASCII  Scan   ASCII  Scan  ASCII
  18563.     Symbol     Code    Code   Code   Code   Code   Code  Code
  18564.  
  18565.  
  18566.     F1         59      84     0      94     0      104   0
  18567.     F2         60      85     0      95     0      105   0
  18568.     F3         61      86     0      96     0      106   0
  18569.     F4         62      87     0      97     0      107   0
  18570.     F5         63      88     0      98     0      108   0
  18571.     F6         64      89     0      99     0      109   0
  18572.     F7         65      90     0      100    0      110   0
  18573.     F8         66      91     0      101    0      111   0
  18574.     F9         67      92     0      102    0      112   0
  18575.     F10        68      93     0      103    0      113   0
  18576.     F11        133     135    0      137    0      139   0
  18577.     F12        134     136    0      138    0      140   0
  18578.     np *       55      55     42     150    0      55    42
  18579.     np Home    71      71     55     119    0            0
  18580.     cp Home    71      71     224    119    224    151   224
  18581.     np Up      72      72     56     141    0            0
  18582.     cp Up      72      72     224    141    224    152   224
  18583.     np PgUp    73      73     57     132    0            0
  18584.     cp PgUp    73      73     224    132    224    153   224
  18585.     np Minus   74      74     45     142    0      74    45
  18586.     np Left    75      75     52     115    0            0
  18587.     cp Left    75      75     224    115    224    155   224
  18588.     np 5       76      76     53     143    0            0
  18589.     np Right   77      77     54     116    0            0
  18590.     cp Right   77      77     224    116    224    157   224
  18591.     np Plus    78      78     43     144    0      78    43
  18592.     np End     79      79     49     117    0            0
  18593.     cp End     79      79     224    117    224    159   224
  18594.     np Down    80      80     50     145    0            0
  18595.     cp Down    80      80     224    145    224    160   224
  18596.     np PgDn    81      81     51     118    0            0
  18597.     cp PgDn    81      81     224    118    224    161   224
  18598.     np Ins     82      82     48     146    0            0
  18599.     cp Ins     82      82     224    146    224    162   224
  18600.     np Del     83      83     46     147    0            0
  18601.     cp Del     83      83     224    147    224    163   224
  18602.     np /       224     224    47     149    0      164   47
  18603.     np Enter   224     224    13     224    10     166   13
  18604.  
  18605.  
  18606.  
  18607. ___________________________________________________________________
  18608. NDOS Reference Manual                                          321
  18609.  
  18610.                                                      Detecting NDOS
  18611. ___________________________________________________________________
  18612.  
  18613.  
  18614. APPENDIX C, TECHNICAL INFORMATION
  18615.  
  18616.  
  18617. This appendix provides technical information for programmers who
  18618. wish to build interfaces to NDOS.  It covers detecting NDOS,
  18619. placing keystrokes in the Keystack, writing installable commands,
  18620. using the DESCRIPT.ION file, and using the interrupt 2E "back door"
  18621. entry into NDOS to execute commands.
  18622.  
  18623.  
  18624. Detecting NDOS
  18625.  
  18626.  
  18627.     Detecting NDOS From a Batch File
  18628.  
  18629.     From a batch file, you can determine if NDOS is loaded by
  18630.     testing for the variable function @EVAL, with a test like
  18631.     this:
  18632.  
  18633.          if "%@eval[2+2]" == "4" echo NDOS is loaded!
  18634.  
  18635.     This test can never succeed in COMMAND.COM and is therefore a
  18636.     reliable way to detect NDOS.  Other variable functions could
  18637.     be used for the same purpose.
  18638.  
  18639.  
  18640.     Detecting NDOS From a Program
  18641.  
  18642.     Any program can test for the presence of NDOS by making a
  18643.     simple INT 2Fh call.  Be sure to check the INT 2Fh vector
  18644.     first as it may be zero under some versions of DOS 2 if no
  18645.     program has hooked the interrupt.  To detect NDOS, call INT
  18646.     2Fh with:
  18647.  
  18648.           AX = E44Dh
  18649.           BX = 0
  18650.  
  18651.     If NDOS is not loaded, AX should be returned unchanged.  If
  18652.     NDOS is loaded, it will return the following (no other
  18653.     registers are modified):
  18654.  
  18655.           AX = 44EEh
  18656.           BX = Version number (BL = major version, BH = minor
  18657.                version)
  18658.           CX = NDOS PSP segment address
  18659.           DL = NDOS shell number
  18660.  
  18661.     The shell number is incremented each time a new copy of NDOS
  18662.     is loaded, either in a different multitasker window (for
  18663.  
  18664. ___________________________________________________________________
  18665. NDOS Reference Manual                                          322
  18666.  
  18667.                                Placing Keystrokes Into the Keystack
  18668. ___________________________________________________________________
  18669.  
  18670.     example, under DESQview), or via nested shells.  The primary
  18671.     shell is shell number zero.
  18672.  
  18673.     This function tells you if NDOS is loaded in memory, but not
  18674.     whether it is the parent process of your program.  You can
  18675.     determine if NDOS is the parent process by comparing the PSP
  18676.     value returned in CX to the PSP chain pointer at offset 16h in
  18677.     your program's PSP.
  18678.  
  18679.  
  18680.     Detecting the NDOS Prompt
  18681.  
  18682.     NDOS generates INT 2Fh calls before and after the prompt is
  18683.     displayed to allow TSRs to detect that NDOS is at the prompt.
  18684.     The calls are:
  18685.  
  18686.           AX = E44Eh
  18687.           BX = 0:  NDOS is about to display the prompt
  18688.                1:  NDOS is about to accept keyboard input at the
  18689.          prompt
  18690.                2:  keyboard input is complete and NDOS is about to
  18691.                begin processing the line
  18692.  
  18693.     The BX = 0 call occurs immediately before displaying the
  18694.     prompt; the BX = 1 call occurs after displaying the prompt and
  18695.     immediately before accepting keyboard input; and the BX = 2
  18696.     call occurs immediately after NDOS receives the CR (Enter)
  18697.     keystroke, but before the line is processed.  Any routine
  18698.     intercepting these calls should preserve the SI, DI, BP, SP,
  18699.     DS, ES, and SS registers.
  18700.  
  18701.  
  18702. Placing Keystrokes Into the Keystack
  18703.  
  18704.     You can put keystrokes into the NDOS Keystack with an INT 2Fh
  18705.     call.  First, you must make a call to check whether KSTACK.COM
  18706.     is loaded:
  18707.  
  18708.          AX =  E44Fh
  18709.          BX =  0
  18710.  
  18711.     If KSTACK.COM is not loaded, this call will return AX
  18712.     unchanged.  If it is loaded, AX will be returned as 44EEh;
  18713.     other registers will be unchanged.  Once you have determined
  18714.     that KSTACK.COM is loaded, you can send keystrokes with this
  18715.     call:
  18716.  
  18717.           AX = E44Fh
  18718.           BX = 1
  18719.           CX = number of keystrokes being passed
  18720.  
  18721. ___________________________________________________________________
  18722. NDOS Reference Manual                                          323
  18723.  
  18724.                                        Writing Installable Commands
  18725. ___________________________________________________________________
  18726.  
  18727.           DS:DX = address of the keystroke array
  18728.  
  18729.     On return, if the call succeeded then AX will be 0; if it
  18730.     failed, AX will be non-zero.  BX, CX, and DX are destroyed;
  18731.     other registers are preserved.  If the call succeeds,
  18732.     subsequent calls to INT 16h functions 0, 1, 10h, or 11h will
  18733.     receive the stacked keystrokes.
  18734.  
  18735.     The keystroke array passed to KSTACK must be an array of words
  18736.     containing the values to return from INT 16h.  The high byte
  18737.     of each word is a scan code and the low byte is an ASCII code.
  18738.     Many programs accept keystrokes properly with only the ASCII
  18739.     code, but some require the scan code as well.  See page 319
  18740.     for a list of ASCII and scan codes for most keyboards.  To
  18741.     insert a delay in the keystroke sequence, include a word set
  18742.     to FFFFh followed by a word containing the desired delay in
  18743.     clock ticks.
  18744.  
  18745.  
  18746. Writing Installable Commands
  18747.  
  18748.     An "installable command" is created with a memory-resident
  18749.     program (TSR) which can receive signals from NDOS and process
  18750.     commands.  NDOS makes every command available to such TSRs
  18751.     before it is executed; if any TSR chooses to execute the
  18752.     command, NDOS will do no further processing.  Otherwise, NDOS
  18753.     processes the command normally.
  18754.  
  18755.     The NDOS "Installable command" interface is compatible with an
  18756.     undocumented interface present in COMMAND.COM for MS-DOS and
  18757.     PC-DOS 3.3 and above.  This interface is documented more
  18758.     thoroughly on pages 373 - 379 of the excellent reference text
  18759.     Undocumented DOS by Schulman et. al., published by Addison
  18760.     Wesley (ISBN 0-201-57064-5).
  18761.  
  18762.     NDOS looks for an installable command after alias expansion
  18763.     and after checking to see if the command is a drive change,
  18764.     but before checking for an internal or external command.
  18765.  
  18766.     NDOS first makes an INT 2Fh call to determine whether any TSR
  18767.     loaded will respond to the command, with:
  18768.  
  18769.           AX =      AE00h
  18770.           BX =      offset of command line buffer:
  18771.                  first byte = maximum length of command line (128)
  18772.                  second byte = actual length of command line, not
  18773.                     including trailing CR
  18774.                  remainder = command line, with a trailing CR
  18775.           CH =      FFh
  18776.  
  18777.  
  18778. ___________________________________________________________________
  18779. NDOS Reference Manual                                          324
  18780.  
  18781.                                                  Using DESCRIPT.ION
  18782. ___________________________________________________________________
  18783.  
  18784.           CL =      length of command line, not including the
  18785.                command name
  18786.           DX =      FFFFh
  18787.           SI =      offset of command name buffer:
  18788.                  first byte = length of command name
  18789.                  remainder = command name, shifted to upper case
  18790.          and
  18791.                     padded with blanks to 11 characters
  18792.  
  18793.     If the TSR does not recognize the command as its own, it must
  18794.     pass the INT 2Fh along with registers unchanged.  If it does
  18795.     recognize the command, it must return 0FFh in AL.  The command
  18796.     should not be executed at this point.  NDOS will then make
  18797.     another call (buffer formats are the same as above):
  18798.  
  18799.           AX = AE01h
  18800.           BX = offset of command line buffer
  18801.           CH = 0
  18802.           CL = length of command name
  18803.           DX = FFFFh
  18804.           SI = offset of command name buffer
  18805.  
  18806.     If the TSR executed the command line, it must set the command
  18807.     name length (DS:[SI]) to zero.  If the command name length is
  18808.     not zero, NDOS will attempt to execute the command as an
  18809.     internal or external command.  This allows the TSR to return a
  18810.     modified command line to NDOS by modifying the command line
  18811.     buffer at DS:BX, and leaving the command name length byte at
  18812.     DS:[SI] set to a non-zero value.  If the command is executed,
  18813.     the TSR should return the result of the command (zero for
  18814.     normal return or non-zero for an error) in AL.
  18815.  
  18816.  
  18817. Using DESCRIPT.ION
  18818.  
  18819.     NDOS uses the file DESCRIPT.ION to store file descriptions.
  18820.     This file is created as a hidden file in each subdirectory
  18821.     which has descriptions, and deleted when all descriptions are
  18822.     removed or when all files with descriptions are deleted.
  18823.  
  18824.     Your programs can access DESCRIPT.ION to create, retrieve, or
  18825.     modify file descriptions, and to store other information.
  18826.     DESCRIPT.ION has one line per file, and is unsorted.  Each
  18827.     line is in the following format:
  18828.  
  18829.          filename.ext Description[*<ID>Other program info]...<CR>
  18830.  
  18831.     There is normally one space between the description and
  18832.     filename but additional spaces may be used in future versions
  18833.     of NDOS.  The characters after the description allow extension
  18834.  
  18835. ___________________________________________________________________
  18836. NDOS Reference Manual                                          325
  18837.  
  18838.                                                        Interrupt 2E
  18839. ___________________________________________________________________
  18840.  
  18841.     of the description format for use by other programs.  They are
  18842.     as follows:
  18843.  
  18844.          * is an ASCII Ctrl-D (04), and marks the end of the
  18845.          description text and the beginning of information for a
  18846.          program other than NDOS.  This symbol can appear multiple
  18847.          times on each line; each occurrence marks the beginning
  18848.          of information for another program.
  18849.  
  18850.          <ID> is an identification byte for the program which is
  18851.          using this area of the particular line.  If you are
  18852.          writing a program which will store information in
  18853.          DESCRIPT.ION, test it using an ID byte of your own
  18854.          choosing.  When you are ready to release the program,
  18855.          contact Symantec and we will provide you with an ID byte
  18856.          value that is not in use by others to the best of our
  18857.          knowledge.
  18858.  
  18859.          Other program info is any text the program wishes to
  18860.          store in its area of the line.  The text should relate
  18861.          specifically to the file named on the line.  It may not
  18862.          contain the Ctrl-D character, carriage returns, line
  18863.          feeds, or nulls (ASCII zeros).
  18864.  
  18865.     NDOS will copy, delete, or move all the information on a line
  18866.     in DESCRIPT.ION, including  information owned by other
  18867.     programs, when performing the same action on the corresponding
  18868.     file.  NDOS will also change the name if a file is renamed.
  18869.     To support DESCRIPT.ION properly, your program must do the
  18870.     same if it copies, deletes, moves, or renames files.  Take
  18871.     care not to remove information which does not belong to your
  18872.     program, or delete lines which contain information for other
  18873.     programs.  Your program should be able to handle a line
  18874.     terminated by a CR or LF alone, a CR/LF pair, an EOF (ASCII
  18875.     26), or the physical end of the file.  The lines it creates
  18876.     should be terminated with CR/LF.  The line length limit is
  18877.     4096 bytes; exceeding this limit will cause unpredictable
  18878.     results.
  18879.  
  18880.  
  18881. Interrupt 2E
  18882.  
  18883.     NDOS provides full, documented support for the undocumented
  18884.     COMMAND.COM "back door" entry, INT 2E (hex).  INT 2E allows
  18885.     applications to call the primary copy of the command processor
  18886.     to execute commands, without loading a secondary shell.
  18887.  
  18888.     INT 2E support is enabled with the FullINT2E = Yes directive
  18889.     in NDOS.INI.  If this directive is left out or is set to No,
  18890.     NDOS does "hook" INT 2E, but any calls to it are ignored.
  18891.  
  18892. ___________________________________________________________________
  18893. NDOS Reference Manual                                          326
  18894.  
  18895.                                                        Interrupt 2E
  18896. ___________________________________________________________________
  18897.  
  18898.     Setting FullINT2E = Yes adds about 100 bytes to the resident
  18899.     size of NDOS, and applies only to the primary shell (it is
  18900.     ignored in secondary shells).
  18901.  
  18902.     To use INT 2E, set DS:SI to the address of a buffer containing
  18903.     the command, then issue an INT 2E.  The buffer format is:
  18904.  
  18905.          First byte      Length of command, not including this
  18906.                          byte or the last byte
  18907.          Text bytes      The command text
  18908.          Last byte       CR (ASCII 13)
  18909.  
  18910.     You must have enough memory available for NDOS to reload its
  18911.     transient portion, and about 80 bytes of available stack space
  18912.     for the INT 2E handler to use.  INT 2E can not be called from
  18913.     a TSR while NDOS is running (for example, a TSR popped up at
  18914.     the NDOS prompt or from within LIST or SELECT), but can be
  18915.     called from within any application or from within a TSR while
  18916.     an application (including the NDOS HELP system) is running.
  18917.  
  18918.     INT 2E can invoke any NDOS command including an alias, an
  18919.     internal command, an external command, or a batch file.  All
  18920.     changes to NDOS data (such as aliases, environment variables,
  18921.     and SETDOS settings) which are made by a command executed via
  18922.     INT 2E calls will affect the primary shell, and the
  18923.     environment passed to a program called via INT 2E will be a
  18924.     copy of the primary shell's environment.
  18925.  
  18926.     INT 2E uses the same internal stack (temporary storage area)
  18927.     as the primary shell.  If a complex command is used in the
  18928.     primary shell to start a program which eventually issues an
  18929.     INT 2E, the additional stack space required by commands
  18930.     executed through INT 2E may (in rare circumstances) cause a
  18931.     stack overflow.  If this occurs, use the StackSize directive
  18932.     in NDOS.INI (see page 128) to increase NDOS internal stack
  18933.     space.
  18934.  
  18935.     INT 2E also uses the same batch file "stack" as the primary
  18936.     shell.  This means that if INT 2E is used to execute a batch
  18937.     file, this batch file is considered "nested" within any batch
  18938.     file(s) used in the primary shell to start the program which
  18939.     issued the INT 2E.  This may cause batch nesting errors from
  18940.     within the INT 2E call which would not occur if the same
  18941.     command were executed at the prompt.  For example, suppose an
  18942.     application is loaded from batch files nested six levels deep,
  18943.     and that application uses INT 2E to execute a command which
  18944.     invokes batch files which nest to five levels deep.  Under
  18945.     these conditions a nesting error will occur, because the total
  18946.     nesting level is eleven, exceeding the NDOS limit of ten
  18947.     levels of nested batch files.
  18948.  
  18949. ___________________________________________________________________
  18950. NDOS Reference Manual                                          327
  18951.  
  18952.                                                        Interrupt 2E
  18953. ___________________________________________________________________
  18954.  
  18955.     On return from INT 2E all registers will be destroyed except
  18956.     SS and SP.  AX will be set as follows:
  18957.  
  18958.           FFFFh     An error occurred before processing the
  18959.                     command: not enough memory was available, INT
  18960.                     2E was called from a TSR, or another error made
  18961.                     it impossible to handle the interrupt.
  18962.  
  18963.           0         The command was processed without error.
  18964.  
  18965.           > 0       There was an error in processing the command.
  18966.                     AX is the error number, equivalent to the %_?
  18967.                     value from an internal command or the
  18968.                     ERRORLEVEL or %? value from an external
  18969.                     command.  If a batch file is run the value will
  18970.                     be the error level returned by the batch file
  18971.                     (via QUIT n or CANCEL n) or the last command
  18972.                     within it.  If an alias is run the value will
  18973.                     be the error level returned by the last command
  18974.                     in the alias.
  18975.  
  18976.  
  18977.  
  18978.  
  18979.  
  18980.  
  18981.  
  18982.  
  18983.  
  18984.  
  18985.  
  18986.  
  18987.  
  18988.  
  18989.  
  18990.  
  18991.  
  18992.  
  18993.  
  18994.  
  18995.  
  18996.  
  18997.  
  18998.  
  18999.  
  19000.  
  19001.  
  19002.  
  19003.  
  19004.  
  19005.  
  19006. ___________________________________________________________________
  19007. NDOS Reference Manual                                          328
  19008.  
  19009.                                                            GLOSSARY
  19010. ___________________________________________________________________
  19011.  
  19012.  
  19013. GLOSSARY
  19014.  
  19015.  
  19016. Some items in this glossary refer to NDOS features or to terms
  19017. which are discussed in more detail elsewhere in this manual.  Be
  19018. sure to check the index to see if more information is available on
  19019. a particular feature or term.
  19020.  
  19021.     NDOS.INI:  The NDOS initialization file containing directives
  19022.     which set NDOS startup configuration parameters.
  19023.  
  19024.     NEXIT:  A batch file which is executed whenever a secondary
  19025.     NDOS shell ends.
  19026.  
  19027.     NSTART:  A batch file which is executed whenever NDOS is
  19028.     started, either as a primary shell or a secondary shell.
  19029.  
  19030.     Alias:  A shorthand name for a command or series of commands.
  19031.  
  19032.     Alias Argument:  A numeric variable included in an alias
  19033.     definition, allowing a different value to be used in the alias
  19034.     each time it is executed.
  19035.  
  19036.     AND:  A logical combination of two true or false conditions
  19037.     such that if both conditions are true the result is true; if
  19038.     either condition is false the result is false.
  19039.  
  19040.     ANSI.SYS:  A device driver supplied with DOS which provides
  19041.     enhanced screen display and keyboard macros, or one of the
  19042.     many similar programs.
  19043.  
  19044.     Append:  Concatenation of one file or string onto the end of
  19045.     another (not related to the DOS external command named
  19046.     APPEND!)
  19047.  
  19048.     Application:  A program run from the command prompt or a batch
  19049.     file.  The term is used broadly to mean any program other than
  19050.     the command processor; and more narrowly to mean a program
  19051.     with a specific purpose such as a spreadsheet or word
  19052.     processing program, as opposed to a utility.
  19053.  
  19054.     Archive:  A file attribute indicating that the file has been
  19055.     modified since the last backup (presuming that the last backup
  19056.     cleared the archive attribute, as most backup programs do).
  19057.     Also sometimes used to refer to a single file (such as a .ZIP
  19058.     file) which contains a number of other files in compressed
  19059.     form.
  19060.  
  19061.  
  19062.  
  19063. ___________________________________________________________________
  19064. NDOS Reference Manual                                          329
  19065.  
  19066.                                                            GLOSSARY
  19067. ___________________________________________________________________
  19068.  
  19069.     Argument:  A piece of additional information placed after a
  19070.     command or function name.  For example in the command DIR XYZ,
  19071.     XYZ is an argument.  Also used to refer to an alias argument
  19072.     or batch file argument.
  19073.  
  19074.     ASCII:  The American Standard Code for Information
  19075.     Interchange, which defines numeric values for 128 different
  19076.     characters comprising the English alphabet, numbers,
  19077.     punctuation, and some control characters.
  19078.  
  19079.     ASCII File:  A file containing ASCII text, as opposed to a
  19080.     binary file which may contain codes, numbers, or other
  19081.     information that cannot be sensibly interpreted as text.
  19082.  
  19083.     Attribute:  A characteristic of a file which can be set or
  19084.     cleared.  The standard attributes are Read-Only, Hidden,
  19085.     System, and Archive.  The special attributes Volume Label and
  19086.     Directory are also used for files of those types.
  19087.  
  19088.     AUTOEXEC.BAT:  A batch file which is AUTOmatically EXECuted
  19089.     when the computer is started.
  19090.  
  19091.     Automatic Directory Change:  A NDOS feature which allows
  19092.     changing directories by typing the directory name and a
  19093.     backslash [\] at the prompt.
  19094.  
  19095.     Base Memory:  The portion of your computer's memory available
  19096.     for use by DOS, the command processor, and application
  19097.     programs.  On most PCs this area consists of the first 640K
  19098.     bytes of the computer's memory (one K is 1024 bytes).
  19099.  
  19100.     BAT File:  Same as a Batch File.
  19101.  
  19102.     Batch File:  A text file containing a sequence of DOS or NDOS
  19103.     commands.  Batch files are used to save command sequences so
  19104.     that they can be re-executed at any time, transferred to
  19105.     another system, etc.
  19106.  
  19107.     Batch File Argument:  A numeric variable used within a batch
  19108.     file, allowing a different value to be used at that spot in
  19109.     the file each time it is executed.
  19110.  
  19111.     Binary File:  A file containing information which does not
  19112.     represent or cannot sensibly be interpreted as text.  See also
  19113.     ASCII File.
  19114.  
  19115.     Block Device:  A physical device for input or output which can
  19116.     transmit or receive large blocks of data while the computer is
  19117.     engaged in other activities.  Examples include disk, tape, and
  19118.     CD-ROM drives.
  19119.  
  19120. ___________________________________________________________________
  19121. NDOS Reference Manual                                          330
  19122.  
  19123.                                                            GLOSSARY
  19124. ___________________________________________________________________
  19125.  
  19126.     Boot:  The process of starting the computer and loading DOS
  19127.     and the command processor into memory.
  19128.  
  19129.     Boot Directory:  The current directory at the time the system
  19130.     is booted, almost always the root directory of the boot drive.
  19131.  
  19132.     Boot Drive:  The disk drive that the system is booted from,
  19133.     usually A: (the floppy disk) or C: (the hard disk).
  19134.  
  19135.     Break: A signal sent to a program (including NDOS) to tell it
  19136.     to halt what it is doing.  The Ctrl-C key  or Ctrl-Break key
  19137.     is used to send this signal.  Some external commands abort
  19138.     when they receive a break signal; others return to a previous
  19139.     screen or menu, or abort the current operation.
  19140.  
  19141.     BTM File:  A special type of batch file which is loaded into
  19142.     memory, dramatically speeding up execution.
  19143.  
  19144.     Buffer:  An area of memory set aside for storage.  Usually
  19145.     refers to disk buffers, used to save information as it is
  19146.     transferred between your program and the disk; or to the
  19147.     keyboard buffer, which holds keystrokes until a program can
  19148.     use them.
  19149.  
  19150.     Character Device:  A physical device for input or output which
  19151.     must communicate with your computer one character at a time.
  19152.     Examples include the console, communications ports, and
  19153.     printers.
  19154.  
  19155.     Code Page:  A set of definitions which tells DOS how to get
  19156.     and display date, time, and other information in the format
  19157.     appropriate to a particular country.
  19158.  
  19159.     Command Completion:  A NDOS feature which allows you to recall
  19160.     a previous command by typing the first few letters of the
  19161.     command, then an UpArrow or DownArrow.
  19162.  
  19163.     Command Echoing:  A feature which displays commands as they
  19164.     are executed.  Echoing can be turned on and off.
  19165.  
  19166.     Command History:  A NDOS feature which retains commands you
  19167.     have previously executed, so that they can be modified and re-
  19168.     executed later.
  19169.  
  19170.     Command Interpreter:  A program, such as NDOS or COMMAND.COM,
  19171.     which interprets commands and executes other programs.
  19172.  
  19173.     Command Recall:  See Command History.
  19174.  
  19175.  
  19176.  
  19177. ___________________________________________________________________
  19178. NDOS Reference Manual                                          331
  19179.  
  19180.                                                            GLOSSARY
  19181. ___________________________________________________________________
  19182.  
  19183.     Command Tail:  The portion of a command consisting of all the
  19184.     arguments, i.e. everything but the command name itself.
  19185.  
  19186.     Compound Command:  See Multiple Commands.
  19187.  
  19188.     COMSPEC:  An environment variable which defines where to get
  19189.     the command processor for a secondary shell.
  19190.  
  19191.     Conditional Commands:  A NDOS feature allowing commands to be
  19192.     executed or skipped depending on the results of a previous
  19193.     command.   See also Exit Code.
  19194.  
  19195.     CONFIG.SYS:  A file which tells DOS what device drivers to
  19196.     install, what command processor to use, and other information
  19197.     about what to do when your system boots.  See your DOS manual
  19198.     for more information.
  19199.  
  19200.     Console:  The PC keyboard and display.
  19201.  
  19202.     Control Character:  A character which is part of the ASCII
  19203.     code, but does not have a normal text representation, and
  19204.     which can be generated by pressing the Ctrl key along with
  19205.     another key.  For example the control character called "LF" or
  19206.     "Line Feed" is generated by pressing Ctrl-J.
  19207.  
  19208.     Country Code:  See Code Page.
  19209.  
  19210.     CR:  The ASCII character "carriage return", generated by
  19211.     pressing the "Enter" key on the keyboard, and stored in most
  19212.     ASCII files at the end of each line.
  19213.  
  19214.     Critical Error:  An error, usually related to input, output,
  19215.     or network access, which prevents a program from continuing.
  19216.     When a critical error occurs, a prompt such as "R(etry),
  19217.     I(gnore), F(ail), or A(bort)" appears on the screen and you
  19218.     must decide what action to take.
  19219.  
  19220.     Current Directory:  The directory in which all file operations
  19221.     will take place unless otherwise specified.
  19222.  
  19223.     Description:  A string of characters assigned to describe a
  19224.     file with the NDOS DESCRIBE command.
  19225.  
  19226.     Destination:  In the NDOS file commands (COPY, MOVE, and
  19227.     RENAME), the name or directory files should have after any
  19228.     copying or modification has taken place; generally referred to
  19229.     by the last specification on the command line.  See also
  19230.     Source.
  19231.  
  19232.  
  19233.  
  19234. ___________________________________________________________________
  19235. NDOS Reference Manual                                          332
  19236.  
  19237.                                                            GLOSSARY
  19238. ___________________________________________________________________
  19239.  
  19240.     Device:  A physical device for input or output such as the
  19241.     console, a communications port, or a printer.  Sometimes the
  19242.     term "device" alone is used to refer to character devices such
  19243.     as those listed above, and excludes block devices.
  19244.  
  19245.     Device Driver:  A program which allows DOS to communicate with
  19246.     a device, and which is loaded into memory when the system is
  19247.     booted, via a statement in CONFIG.SYS.  Some device drivers
  19248.     are used to manage memory or for other similar internal
  19249.     functions, rather than to communicate with an external device.
  19250.  
  19251.     Directory:  A portion of any disk, identified by a name and a
  19252.     relationship to other directories in a "tree" structure, with
  19253.     the tree starting at the root directory.  A directory
  19254.     separates files on the disk into logical groups, but does not
  19255.     represent a physical division of the data on the disk.
  19256.  
  19257.     Disk Swapping:  A type of swapping in which the transient
  19258.     portion of NDOS is stored on disk while an application is
  19259.     running.
  19260.  
  19261.     DOS Memory:  See Base Memory.
  19262.  
  19263.     Echo:  See Command Echoing.
  19264.  
  19265.     EMS Memory:  Memory which conforms to the Lotus - Intel -
  19266.     Microsoft Expanded Memory Specification (LIM EMS).  This
  19267.     hardware/software standard allows programs to access large
  19268.     amounts of memory outside of base memory or extended memory.
  19269.  
  19270.     EMS Swapping:  A type of swapping in which the transient
  19271.     portion of NDOS is stored in EMS memory while an application
  19272.     is running.
  19273.  
  19274.     Environment:  An area of memory which contains multiple
  19275.     entries in the form "NAME=value".  Each entry is called an
  19276.     environment variable.  See also Master Environment and Passed
  19277.     Environment.
  19278.  
  19279.     Environment Variable:  The name of a single entry in the
  19280.     environment.
  19281.  
  19282.     Errorlevel:  A numeric value between 0 and 255 returned from
  19283.     an external command to indicate its result (e.g., success,
  19284.     failure, response to a question), and accessible via the IF
  19285.     ERRORLEVEL command and the %? environment variable.  See also
  19286.     Exit Code.
  19287.  
  19288.     Escape Character:  This term has two meanings.  In some
  19289.     contexts it means the NDOS escape character, normally Ctrl-X,
  19290.  
  19291. ___________________________________________________________________
  19292. NDOS Reference Manual                                          333
  19293.  
  19294.                                                            GLOSSARY
  19295. ___________________________________________________________________
  19296.  
  19297.     which is used to suppress the normal meaning of or give
  19298.     special meaning to the following character.  In other cases it
  19299.     refers to the specific ASCII character ESC.  The meaning must
  19300.     be determined from the context.
  19301.  
  19302.     Executable Extensions:  A NDOS feature which allows you to
  19303.     specify the application to be executed when a file with a
  19304.     particular extension is named at the command prompt.
  19305.  
  19306.     Executable File:  A file with the extension .COM or .EXE,
  19307.     which can be loaded into memory and run as a program.
  19308.  
  19309.     Exit Code:  The error level returned by an external command,
  19310.     or a similar exit code returned by a NDOS internal command.
  19311.     NDOS internal commands return an exit code of zero if
  19312.     successful, or non-zero if unsuccessful.  See also Errorlevel.
  19313.  
  19314.     Expansion:  The process NDOS goes through when it scans a
  19315.     command line and substitutes the appropriate actual values for
  19316.     aliases, alias arguments, batch file arguments, and
  19317.     environment variables.  See also Parsing.
  19318.  
  19319.     Extended ASCII Character:  A character which is not part of
  19320.     the standard set of 128 ASCII characters, but is used on the
  19321.     PC as part of an extended set of 256 characters.  These
  19322.     characters include international language symbols, and box and
  19323.     line drawing characters.
  19324.  
  19325.     Extended Memory:  Any memory on a 286-based (PC-AT compatible)
  19326.     or 386-based computer system which is above the 1 MB (one
  19327.     megabyte, or 1024*1024 bytes) of memory that DOS can address
  19328.     directly.  Any PC-AT compatible or 386 system with more than
  19329.     640K of memory has extended memory.  See also XMS.
  19330.  
  19331.     External Command:  A program which resides in an executable
  19332.     file, as opposed to an internal command which is part of the
  19333.     command processor.
  19334.  
  19335.     File Attribute:  See Attribute.
  19336.  
  19337.     File Description:  See Description.
  19338.  
  19339.     Filename Completion:  A NDOS feature which allows you to type
  19340.     part of a filename on the command line, and have NDOS fill in
  19341.     the rest for you.
  19342.  
  19343.     Free Memory:  Usually, the amount of base memory which is
  19344.     currently unoccupied and available for use by applications.
  19345.  
  19346.  
  19347.  
  19348. ___________________________________________________________________
  19349. NDOS Reference Manual                                          334
  19350.  
  19351.                                                            GLOSSARY
  19352. ___________________________________________________________________
  19353.  
  19354.     Hidden:  A file attribute indicating that the file should not
  19355.     be displayed with a normal DIR command, and should not be
  19356.     available for access by programs unless they specifically
  19357.     request use of hidden files.
  19358.  
  19359.     History:  See Command History.
  19360.  
  19361.     History Window:  A pop-up window used by NDOS to display the
  19362.     command history, allowing you to choose a previous command to
  19363.     modify and/or execute.
  19364.  
  19365.     Include List:  A concise method of specifying several files or
  19366.     groups of files in the same directory, for use with all NDOS
  19367.     commands which take filenames as arguments.
  19368.  
  19369.     Insert Mode:  When editing text, a mode in which newly typed
  19370.     characters are inserted into the line at the cursor position,
  19371.     rather than overwriting existing characters on the line.  See
  19372.     also Overstrike Mode.
  19373.  
  19374.     Internal Command:  A command which is part of the command
  19375.     processor, as opposed to an external command.
  19376.  
  19377.     Keyboard Buffer:  A buffer which holds keystrokes you have
  19378.     typed that have not yet been used by the currently executing
  19379.     program.
  19380.  
  19381.     Keystroke Alias:  An alias assigned to a key, so that it can
  19382.     be invoked or recalled with a single keystroke.
  19383.  
  19384.     Label:  A marker in a batch file.  Labels allow GOTO and GOSUB
  19385.     commands to "jump" to the command on the line following the
  19386.     label.  See also Volume Label.
  19387.  
  19388.     LF:  The ASCII character "line feed", not usually generated
  19389.     from the keyboard, but stored in most ASCII files at the end
  19390.     of each line after the CR character.
  19391.  
  19392.     Master Environment:  The master copy of the environment
  19393.     maintained by the command processor.
  19394.  
  19395.     Memory Resident Mode:  A method of installing NDOS in which
  19396.     swapping is disabled, and all of NDOS remains permanently
  19397.     resident in memory.
  19398.  
  19399.     Modulo:  The remainder after an integer division.  For example
  19400.     11 modulo 3 is 2, because when 11 is divided by 3 the
  19401.     remainder is 2.
  19402.  
  19403.  
  19404.  
  19405. ___________________________________________________________________
  19406. NDOS Reference Manual                                          335
  19407.  
  19408.                                                            GLOSSARY
  19409. ___________________________________________________________________
  19410.  
  19411.     Multiple Commands:  A NDOS feature which allows multiple
  19412.     commands to be placed on a line, separated by a caret (^) or
  19413.     other user-defined character.
  19414.  
  19415.     Multitasking:  A capability of some software (and the related
  19416.     hardware) which allows two or more programs to run apparently
  19417.     simultaneously on the same computer.  Multitasking software
  19418.     for PC compatible systems includes programs like Windows
  19419.     DESQview.
  19420.  
  19421.     Non-Swapping Mode:  See Memory Resident Mode.
  19422.  
  19423.     Option:  See Switch.
  19424.  
  19425.     OR:  A logical combination of two true or false conditions
  19426.     such that if both conditions are false the result is false; if
  19427.     either condition is true the result is true.
  19428.  
  19429.     Overstrike Mode:  When editing text, a mode in which newly
  19430.     typed characters overwrite existing characters on the line,
  19431.     rather than being inserted into the line at the cursor
  19432.     position.  See also Insert Mode.
  19433.  
  19434.     Parameter:  See Argument.
  19435.  
  19436.     Parsing:  The process NDOS performs when it analyzes the
  19437.     command line, performs alias and environment variable
  19438.     expansion, and finds the appropriate internal command or
  19439.     external command to execute.
  19440.  
  19441.     Passed Environment:  A copy of the master environment created
  19442.     before running an application, so that any changes made by the
  19443.     application will not affect the master environment.  The size
  19444.     of the passed environment is determined by the amount of space
  19445.     actually used in the master environment when the application
  19446.     is started.
  19447.  
  19448.     Path:  A specification of the directories a file resides in,
  19449.     including all parent directories.  For example, the path for
  19450.     C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Path is also
  19451.     used to refer to the environment variable PATH, which contains
  19452.     a series of path specifications used when searching for
  19453.     external commands and batch files.
  19454.  
  19455.     Pipe:  A method for collecting the standard output of one
  19456.     program and passing it on as the standard input of the next
  19457.     program to be executed, signified by a vertical bar "|" on the
  19458.     command line. See also Redirection.
  19459.  
  19460.  
  19461.  
  19462. ___________________________________________________________________
  19463. NDOS Reference Manual                                          336
  19464.  
  19465.                                                            GLOSSARY
  19466. ___________________________________________________________________
  19467.  
  19468.     Primary Shell:  The copy of the command processor which is
  19469.     loaded when the system boots.
  19470.  
  19471.     RAM Disk:  A pseudo "disk drive", created by software, which
  19472.     appears like a normal physical disk drive to programs.  RAM
  19473.     disks can be stored in extended memory, XMS memory, EMS
  19474.     memory, or base memory, and provide a convenient way for
  19475.     programs to use this memory for temporary files.
  19476.  
  19477.     Read-Only:  A file attribute indicating that the file can be
  19478.     read, but not written by DOS and NDOS.
  19479.  
  19480.     Reboot:  The process of restarting the computer, usually by
  19481.     pressing the Ctrl, Alt, and Del keys simultaneously.
  19482.  
  19483.     Redirection:  A method for collecting the standard output of a
  19484.     program in a file, and/or of providing the standard input for
  19485.     a program from a file, signified respectively by a greater
  19486.     than symbol ">" or less than symbol "<" on the command line.
  19487.     See also Pipe.
  19488.  
  19489.     Replaceable Parameter:  See Alias Argument and Batch File
  19490.     Argument.
  19491.  
  19492.     Resident Portion:  The small portion of NDOS stored
  19493.     permanently in memory when swapping mode is in use, as opposed
  19494.     to the larger transient portion.  The resident portion is
  19495.     stored as close as possible to the beginning of base memory.
  19496.  
  19497.     Root Directory:  The first directory, from which all other
  19498.     directories are "descended."  The root directory is referenced
  19499.     with a single backslash (\).  When a disk is first formatted,
  19500.     it is the only directory.
  19501.  
  19502.     Secondary Shell:  Any copy of any command processor which is
  19503.     loaded after the system boots.
  19504.  
  19505.     Shell:  A command processor.  Also used to refer to a program
  19506.     which gives access to DOS functions and commands through a
  19507.     menu- or mouse-driven system.
  19508.  
  19509.     Source:  In the NDOS file commands (COPY, MOVE, and RENAME),
  19510.     the original files before any copying or modification has
  19511.     taken place, i.e. those specified earlier on the command line.
  19512.     See also Target.
  19513.  
  19514.     Stack:  An area of memory used by any program to store
  19515.     temporary data while the program is running; more generally,
  19516.     any such storage area where the last item stored is normally
  19517.     the first one removed.
  19518.  
  19519. ___________________________________________________________________
  19520. NDOS Reference Manual                                          337
  19521.  
  19522.                                                            GLOSSARY
  19523. ___________________________________________________________________
  19524.  
  19525.     Standard Error, Standard Input, and Standard Output:  The
  19526.     file(s) or character device(s) where a program respectively
  19527.     displays error messages, obtains its normal input, and
  19528.     displays its normal output.  Standard error and standard
  19529.     output always go to the console, and standard input always
  19530.     comes from the console, unless redirection is used.
  19531.  
  19532.     Subdirectory:  Any directory other than the root directory.
  19533.     See also Root Directory.
  19534.  
  19535.     Swap File:  A disk file created by NDOS to store its transient
  19536.     portion when disk swapping is in use.
  19537.  
  19538.     Swapping:  A NDOS feature which removes the larger transient
  19539.     portion of NDOS from base memory while an application is
  19540.     running, leaving the maximum possible amount of memory for the
  19541.     application, and allows NDOS to restore information such as
  19542.     the command history after the application is finished.  See
  19543.     also XMS Swapping, EMS Swapping, and Disk Swapping.
  19544.  
  19545.     Switch:  An argument to an internal command or application
  19546.     which specifies a particular behavior or setting.  For
  19547.     example, the command "DIR /P" might be referred to as "having
  19548.     the /P switch set".  Also, a configuration value for NDOS
  19549.     specified on the SHELL= line in CONFIG.SYS.
  19550.  
  19551.     System:  A file attribute indicating that the file belongs to
  19552.     DOS and should not be accessed by normal programs.
  19553.  
  19554.     Target:  See Destination.
  19555.  
  19556.     Transient Portion:  The larger portion of NDOS stored in
  19557.     memory temporarily when swapping mode is in use, as opposed to
  19558.     the smaller resident portion.  The transient portion is stored
  19559.     as close as possible to the end of base memory, and releases
  19560.     the space it is using whenever an application is executed.
  19561.  
  19562.     TSR:  A Terminate and Stay Resident program, i.e. a program
  19563.     which "terminates" but remains resident in base memory, to
  19564.     provide capabilities such as network support, a pop-up notepad
  19565.     or telephone dialer, a disk cache, or mouse support.
  19566.  
  19567.     UMB:  An XMS Upper Memory Block, whose address is above the
  19568.     end of normal base memory, but is within the 1 MB of
  19569.     memory that DOS can address directly.
  19570.  
  19571.     Variable:  See Alias Argument, Batch File Argument, and
  19572.     Environment Variable.
  19573.  
  19574.  
  19575.  
  19576. ___________________________________________________________________
  19577. NDOS Reference Manual                                          338
  19578.  
  19579.                                                            GLOSSARY
  19580. ___________________________________________________________________
  19581.  
  19582.     Volume Label:  A special, hidden file placed on any disk whose
  19583.     name constitutes a "label" for the entire disk.
  19584.  
  19585.     White Space Character:  Generally, a character used to
  19586.     separate arguments on the command line.  The white space
  19587.     characters recognized by NDOS are the space, tab, and comma.
  19588.  
  19589.     Wildcard:  A character ("*" or "?") used in a filename to
  19590.     specify the possibility that any single character ("?") or
  19591.     sequence of characters ("*") can occur at that point in the
  19592.     actual name.
  19593.  
  19594.     XMS Memory:  A software method for accessing extended memory.
  19595.     XMS memory is not additional memory, but is a software
  19596.     specification only.
  19597.  
  19598.     XMS Swapping:  A type of swapping where the transient portion
  19599.     of NDOS is stored in XMS memory while an application is
  19600.     running.
  19601.  
  19602.     XOR (exclusive OR):  A logical combination of two true or
  19603.     false conditions such that if both conditions are false or
  19604.     both conditions are true the result is false; if either
  19605.     condition is true and the other is false the result is true.
  19606.  
  19607.  
  19608.  
  19609.  
  19610.  
  19611.  
  19612.  
  19613.  
  19614.  
  19615.  
  19616.  
  19617.  
  19618.  
  19619.  
  19620.  
  19621.  
  19622.  
  19623.  
  19624.  
  19625.  
  19626.  
  19627.  
  19628.  
  19629.  
  19630.  
  19631.  
  19632.  
  19633. ___________________________________________________________________
  19634. NDOS Reference Manual                                          339
  19635.  
  19636.                                                               Index
  19637. ___________________________________________________________________
  19638.  
  19639. Index                               /
  19640.  
  19641.                                     /, in command switches, 156
  19642. Conventions:  Most terms in
  19643. capital letters (e.g. ECHO,         ?
  19644. SELECT) are NDOS command names
  19645. unless otherwise noted.             ? as filename "wildcard", 64
  19646.                                     ? command, 158
  19647. !                                   ? internal variable, 74
  19648.                                     _? internal variable, 74
  19649. ! warning mark, 2, 157
  19650.                                     @
  19651. %
  19652.                                     @ sign, see also Variable
  19653. % sign                               functions
  19654.    in filenames, 40                    for key codes
  19655.    use with environment                   in a keystroke alias, 163
  19656.     variables, 71, 72                     in KEYSTACK text, 240
  19657.    use with replaceable                   in NDOS.INI, 114
  19658.     parameters, 86, 92, 165            in filenames, 40
  19659.    use with variable functions,        in INKEY results, 235
  19660.     77                                 to define a keystroke alias,
  19661. %# and %n&                              162
  19662.    changing parameter                  to override batch file echo,
  19663.     character, 92, 288                  91, 207, 269
  19664.    in aliases, 165                     to override command history
  19665.    in batch files, 92, 288              save, 50
  19666. %0 to %127                             to read a file in FOR, 215
  19667.    in aliases, 165
  19668.    in batch files, 92, 288          |
  19669.  
  19670. &                                   || (or) in conditional
  19671.                                      commands, 84
  19672. && (and) in conditional
  19673.  commands, 83                       A
  19674.  
  19675. *                                   Abort, Retry, Fail message, see
  19676.                                      Critical errors
  19677. * (asterisk)                        AddFile directive, 124
  19678.    as filename "wildcard", 64       ALIAS command, 153, 159
  19679.    in alias name, 162               Alias directive, 114
  19680.    in alias value, 160              _ALIAS internal variable, 74
  19681.    to temporarily disable an        Aliases, 88, 159
  19682.     alias, 55, 97, 160                 and QUIT, 266
  19683.                                        asterisk in name, 162
  19684. .                                      asterisk in value, 160
  19685.                                        back quotes in, 88, 159,
  19686. ., see Current directory                160, 164
  19687. .., see Parent directory               commands for, 154
  19688.  
  19689.  
  19690. ___________________________________________________________________
  19691. NDOS Reference Manual                                          340
  19692.  
  19693.                                                               Index
  19694. ___________________________________________________________________
  19695.  
  19696.    defining default command            use by NDOS, 118, 133
  19697.     options with, 160, 165          _ANSI internal variable, 74
  19698.    editing, 211                     ANSI.COM, 135
  19699.    examples, 88, 95, 98             ANSI.SYS, 135
  19700.    IFF in, 165                      APPEND command, 140
  19701.    in batch files, 95               Appending files, 184
  19702.    inheritance in secondary         Archive attribute, see File
  19703.     shells, 127, 166                 attributes
  19704.    internal variables in, 166       Argument quoting, 86
  19705.    keystroke, 90, 162               Arguments, see replaceable
  19706.       and key assignments, 122       parameters
  19707.       automatic execution of,       Arithmetic, 79
  19708.        86, 90, 164                  ASCII, 43, 315
  19709.    memory space for, 74, 114,       @ASCII variable function, 78
  19710.     252                             Asterisk, see *
  19711.    multiple commands in, 159        At sign, see @ sign
  19712.    nesting, 160                     ATTRIB, 168
  19713.    order of execution, 37           @ATTRIB variable function, 78
  19714.    reading from a file, 166         Attributes, see File attributes
  19715.    removing, 297                    AUTOEXEC.BAT, 36, 100, 105
  19716.    replaceable parameters in,          and NSTART, 107
  19717.     165, 166                           and startup command, 103
  19718.    saving in a file, 164               location of, 115
  19719.    saving temporarily, 210, 287        running, 102
  19720.    suspending execution of, 259        setting COMSPEC in, 101
  19721.    temporarily disabling, 55,          speeding up, 289
  19722.     97, 160                            starting KSTACK.COM, 61,
  19723.    variable functions in, 82,           105, 239
  19724.     166                             AutoExecPath directive, 115
  19725. Alt-255, 49                         Automatic batch files, 36
  19726. And (&&) in conditional             Automatic directory changes,
  19727.  commands, 83                        54, 107
  19728. .AND., in IF and IFF, 227,
  19729.  231, 233                           B
  19730. ANSI directive, 118, 135, 180,
  19731.  181, 284                           Back & Forth, 104, 112
  19732. ANSI driver, 45                     Backspace character, 86
  19733.    and CLS, 180, 284                Backspace directive, 123
  19734.    and COLOR, 182, 284              Base memory, see Memory
  19735.    and COLORDIR, 197                Base name, see Filenames
  19736.    and colors, 121                  .BAT files, 91, 247
  19737.    and cursor problems, 134         Batch files, 91
  19738.    and DESQview, 144                   aliases in, 95, 96
  19739.    and PROMPT, 262                     based on command history,
  19740.    and scrolling, 134, 285              225
  19741.    and TEXT, 291                       branching in, 224
  19742.    detecting, 74, 135                  calling, 173
  19743.    escape sequences, 86, 262,          capturing output of, 98
  19744.     291                                chaining, 173
  19745.    in CONFIG.SYS, 135                  commands for, 93, 154
  19746.  
  19747. ___________________________________________________________________
  19748. NDOS Reference Manual                                          341
  19749.  
  19750.                                                               Index
  19751. ___________________________________________________________________
  19752.  
  19753.    comments in, 269                 CDD, 177
  19754.    debugging, 97                    CDPATH environment variable,
  19755.    displaying messages in, 207,      72, 107
  19756.     209, 273, 274, 291, 302            and automatic directory
  19757.    echoing of commands, 91,             changes, 54
  19758.     118, 207, 286                      and CD, 176
  19759.    environment variables in,           and CDD, 177
  19760.     92                                 and PUSHD, 265
  19761.    internal variables in, 76,       Changing directories, 54, 175,
  19762.     92                               177, 260, 264
  19763.    interrupting, 95                 @CHAR variable function, 78
  19764.    keyboard input in, 235, 238      CHCP, 179, 189, 198, 292
  19765.    labels in, 222, 224              CHDIR, 175
  19766.    modes, 91, 247                   ClearKeyMap directive, 126
  19767.    nesting, 74, 173                 CLS, 94, 180
  19768.    order of execution, 37              and DESQview, 144
  19769.    replaceable parameters, 92,      CMDLINE environment variable,
  19770.     288                              73
  19771.    saving environment in, 210,      Code page, 75, 179
  19772.     287                             _CODEPAGE internal variable,
  19773.    screen display, 203, 205,         75
  19774.     206                             Cold reboot, 268
  19775.    subroutines, 222, 272            COLOR, 94, 182
  19776.    suspending execution of, 259        and DESQview, 144
  19777.    temporary variables in, 93       ColorDir directive, 121
  19778.    terminating, 174, 266            COLORDIR environment variable,
  19779.    timing events in, 293             73, 107, 197, 277
  19780.    tips, 95                            and DESQview, 144
  19781.    variable functions in, 82,          and redirection, 197
  19782.     92                              Colors, see Screen; Monochrome
  19783. _BATCH internal variable, 74        monitor
  19784. BatchEcho directive, 91, 118,       _COLUMN internal variable, 75
  19785.  286                                _COLUMNS internal variable,
  19786. BEEP, 93, 118, 170                   75
  19787. BeepFreq directive, 118             Command grouping, 84, see also
  19788. BeepLength directive, 118            EXCEPT, FOR, GLOBAL, and IF
  19789. BeginLine directive, 123            Command history, see History
  19790. _BG internal variable, 74            list
  19791. Boxes, drawing, 203                 Command interpreter, 34
  19792. BREAK, 172                          Command line, 47
  19793. .BTM files, 91, 247                    arguments, see replaceable
  19794.                                         parameters
  19795. C                                      automatic directory changes,
  19796.                                         54
  19797. CALL, 93, 173                          echoing of, 207, 208
  19798. CANCEL, 93, 173, 174, 266              editing, 48, 122, 124
  19799. Carriage return character, 86          editing mode, 48, 119, 285
  19800. Case (upper/lower), 120, 286           expanded, 208
  19801. CD, 175                                filename completion, 52
  19802. CD-ROM drives, 136                     help, 55
  19803.  
  19804. ___________________________________________________________________
  19805. NDOS Reference Manual                                          342
  19806.  
  19807.                                                               Index
  19808. ___________________________________________________________________
  19809.  
  19810.    history, 49, see also               and DOS FORMAT /S, 140
  19811.     History list                       and multitaskers, 140
  19812.    history window, 51                  checking, 101
  19813.    input method, 120, 284              on laptop and notebook
  19814.    multiple commands, 54                computers, 138
  19815.    processing of, 37                   removing, 298
  19816.    prompt, 261                         setting automatically, 101
  19817. Command processing, 37              Conditional commands, 83
  19818. Command Reference Guide, 153        CONFIG.SYS, 34, 100
  19819. Command tail, 36, 37, 38               and ANSI driver, 135
  19820. Command, NDOS startup, 102, 105        and DOS bug, 103
  19821.    and multitaskers, 140               NDOS commands in, 101
  19822. COMMAND.COM                         Configuration, NDOS, 72, 100,
  19823.    in Microsoft Windows, 143         108
  19824.    in multitasker DOS windows,      CONsole device, 188, 290, see
  19825.     140                              also Standard input, Standard
  19826.    message server, 127               output, and Standard error
  19827. CommandEscape directive, 124        Coprocessor, see Numeric
  19828. Commands                             coprocessor
  19829.    conditional execution of,        COPY, 183
  19830.     233                             Country code, 189, 198, 263,
  19831.    external, 37, 153, 155, 257       292
  19832.    format of, 155                   CPU, 42, 130
  19833.    help for, 55, 256                _CPU internal variable, 75
  19834.    internal, 37, 153                CritFail directive, 126, 139
  19835.       disabling, 158, 284           Critical errors, 138
  19836.    length of, 48, 54, 58               automatic Fail response,
  19837.    list of, 154, 158                    102, 104, 126
  19838.    new, 155                         Ctrl-Break
  19839.    order of execution, 37, 70          checking, 172
  19840.    programming interface, 324          during DELAY, 192
  19841.    types of, 154                       during INKEY, 235
  19842. CommandSep directive, 118, 284         during PAUSE, 259
  19843. Comments                               during SELECT, 276
  19844.    in alias files, 166                 in batch files, 95
  19845.    in AUTOEXEC.BAT, 150             Ctrl-C, see Ctrl-Break
  19846.    in batch files, 269              Ctrl-X, see Escape character
  19847.    in CONFIG.SYS, 10, 150           Ctrl-Z, 186
  19848.    in environment variable          CTTY, 60, 188
  19849.     files, 282                      Current drive and directory, 40
  19850.    in NDOS.INI, 110                    changing, see Changing
  19851. Compatibility, 5, 7                     directories
  19852.    with hardware, 130                  retrieving, 75
  19853.    with other software, 139,           saving temporarily, 210,
  19854.     147                                 260, 264, 287
  19855. Compound character, 284             Cursor
  19856. COMSPEC environment variable,          positioning, 273, 274, 302
  19857.  73, 106                               shape, 118, 134, 285
  19858.    and disk swapping, 117           CursorIns directive, 118, 134,
  19859.                                      285
  19860.  
  19861. ___________________________________________________________________
  19862. NDOS Reference Manual                                          343
  19863.  
  19864.                                                               Index
  19865. ___________________________________________________________________
  19866.  
  19867. CursorOver directive, 118, 134,        size, 264
  19868.  285                                DIREXIST test, in IF and IFF,
  19869. _CWD internal variable, 75           231
  19870. _CWDS internal variable, 75         DIRS, 202, 260, 264
  19871. _CWP internal variable, 75          Disk drives, 135
  19872. _CWPS internal variable, 75          drive letter, 38
  19873.                                        space on, 79, 219
  19874. D                                      swapping to, 116, 289
  19875.                                        testing status of, 81
  19876. Daily execution of batch file,         volume label, 80, 301
  19877.  83                                    write verification on, 300
  19878. DATE, 189                           _DISK internal variable, 75
  19879. _DATE internal variable, 75         @DISKFREE variable function,
  19880. @DATE variable function, 79          79
  19881. Day of week, 75                        on networks, 146
  19882. Default directory, see Current      Diskless workstations, 146
  19883.  drive and directory                DiskReset directive, 126, 136
  19884. Default drive, see Current          @DISKTOTAL variable function,
  19885.  drive and directory                 79
  19886. DEL, 136, 190                          on networks, 146
  19887. Del directive, 123                  @DISKUSED variable function,
  19888. DELAY, 192                           79
  19889. Deleting files, 190                    on networks, 146
  19890. DelHistory directive, 124           Display colors, see Screen;
  19891. DelToBeginning directive, 123        Video
  19892. DelToEnd directive, 123             DOS, 140
  19893. DelWordLeft directive, 123             APPEND command, 140
  19894. DelWordRight directive, 123            bug in CONFIG.SYS
  19895. DESCRIBE, 122, 193                      processing, 103
  19896. @DESCRIPT variable function,           command interpreter, 35
  19897.  79                                    commands, help for, 55, 155,
  19898. DESCRIPT.ION, 193, see File             256
  19899.  descriptions                          external commands, 153
  19900. DescriptionMax directive, 118,         FORMAT /S command, 140
  19901.  193                                   hidden files, 34
  19902. Descriptions, see File                 memory, see Memory
  19903.  descriptions                          shell (defined), 1
  19904. DESQview, 144                          structure, 34
  19905.    and secondary shells, 104,          version 2.x, 101
  19906.     112                             _DOS internal variable, 75
  19907.    detecting, 75, 77                @DOSMEM variable function, 79
  19908. Detecting NDOS, 322                 _DOSVER internal variable, 75
  19909. DIR, 136, 195                       _DOW internal variable, 75
  19910.    and include lists, 68            Down directive, 123
  19911.    directory size limits, 198       DRAWBOX, 94, 133, 203
  19912. Directories, see Subdirectories     DRAWHLINE, 94, 133, 205
  19913. Directory stack, 264                DRAWVLINE, 94, 133, 206
  19914.    clearing, 260                    Drive, see Disk drives
  19915.    displaying, 202                  Drive letter, 38
  19916.                                     DRSets directive, 127
  19917.  
  19918. ___________________________________________________________________
  19919. NDOS Reference Manual                                          344
  19920.  
  19921.                                                               Index
  19922. ___________________________________________________________________
  19923.  
  19924. _DV internal variable, 75              reading from a file, 281
  19925. DVCleanup directive, 127, 145          referencing, 71
  19926.                                        removing, 298
  19927. E                                      spaces in, 280
  19928.                                     ERASE, 136, 190
  19929. ECHO, 207                           EraseLine directive, 123
  19930.    ANSI sequences in, 86            Error level, see Exit code
  19931.    at command line, 208             Error messages, 304
  19932.    in batch files, 91, 94,          ERRORLEVEL test, in IF and IFF,
  19933.     97, 269                          230
  19934.       default state, 118, 286       Escape character, 86, 119, 284
  19935.       inheritance, 173              EscapeChar directive, 119, 284
  19936. ECHOS, 94, 209                      ESET, 122, 211
  19937. Editing aliases and environment        and environment variables,
  19938.  variables, 211                         70, 281
  19939. EditMode directive, 119, 285           and PATH, 149, 257
  19940. EGA, 133, 134, 179, 232             @EVAL variable function, 79
  19941. ELSE, in IFF, 233                   EXCEPT, 84, 128, 212
  19942. ELSEIFF, in IFF, 233                   and DEL /Z, 191
  19943. EMS, see Memory                     @EXEC variable function, 79
  19944. @EMS variable function, 79          ExecLine directive, 123
  19945. EndHistory directive, 124           Executable extensions, 37, 68
  19946. ENDIFF, in IFF, 233                    wildcards in, 70
  19947. EndLine directive, 123              EXIST test, in IF and IFF, 231
  19948. ENDLOCAL, 93, 97, 210, 287,         EXIT, 107, 214
  19949.  298                                Exit code, 74, 214, 266
  19950. ENDTEXT, 94, 291                       and CALL, 173
  19951. _ENV internal variable, 75             and GLOBAL, 220
  19952. EnvFree directive, 115, 281            and IF tests, 230
  19953. Environment, 41, 70, 280            Expanded memory, see Memory
  19954.    loading in high memory, 117      @EXT variable function, 79
  19955.    master, 211, 281, 298            Extended key codes, see Key
  19956.    memory space for                  codes
  19957.       displaying, 252               Extended memory, see Memory
  19958.       setting, 102, 104, 115        @EXTENDED variable function,
  19959.       testing, 75                    80
  19960.    saving temporarily, 210, 287     Extension, see Filenames
  19961.    size, and compatibility          External commands, see Commands
  19962.     problems, 149
  19963. Environment directive, 115, 281     F
  19964. Environment variables, 41, 70,
  19965.  280                                _FG internal variable, 75
  19966.    and INKEY, 235                   File attributes, 40, 168
  19967.    and INPUT, 238                      and COPY, 186, 187
  19968.    characters in name, 71              and DEL, 191
  19969.    creating, 280                       and DIR, 195, 199, 201
  19970.    displaying, 280                     and EXCEPT, 212
  19971.    editing, 211                        and GLOBAL, 220
  19972.    expansion, 87                       and MOVE, 253, 255
  19973.    nesting, 71                         and REN, 271
  19974.  
  19975. ___________________________________________________________________
  19976. NDOS Reference Manual                                          345
  19977.  
  19978.                                                               Index
  19979. ___________________________________________________________________
  19980.  
  19981.    and SELECT, 278                  @FULL variable function, 80
  19982.    setting, 168                     FullINT2E directive, 127
  19983.    subdirectory, 169
  19984.    testing, 78                      G
  19985.    viewing, 168
  19986.    volume label, 169                General Concepts, 34
  19987. File descriptions, 193              GLOBAL, 84, 128, 220
  19988.    and disk performance, 136        Glossary, 329
  19989.    length of, 118, 193, 198,        GOSUB, 94, 99, 222, 272
  19990.     278                                and FOR, 217
  19991.    programming for, 325             GOTO, 94, 224
  19992.    retrieving, 79                      and IFF, 99, 234
  19993.    sorting by, 200, 279             Guided Tour, of NDOS features,
  19994. Filenames, 38                        12
  19995.    parts of, 38
  19996.       separating, 79, 81            H
  19997.    shorthand for, 63
  19998.    unique, 82                       Hard drives, 135
  19999. @FILEDATE variable function,        Hardware compatibility, see
  20000.  80                                  Compatibility
  20001. Filename completion, 52             HELP
  20002. Files, 38                              and external commands, 155
  20003.    adding line numbers to, 296         and mouse, 56
  20004.    copying, 183                        on monochrome screen, 138,
  20005.    date, 41, 80, 189, 195              options, 138, 256
  20006.    deleting, 190                    Help directive, 124
  20007.    displaying, 245, 296             Hidden attribute, see File
  20008.    moving, 253, 270                  attributes
  20009.    reading, in FOR, 215             HistMin directive, 119
  20010.    searching for, 81                HISTORY, 108, 225
  20011.    selecting, 275                   History directive, 115
  20012.    size of, 80, 195                 History list, 49, 225
  20013.    time stamp, 41, 80, 292             controlling, 119, 226
  20014.    true path of, 82, 295               inheritance in secondary
  20015. @FILESIZE variable function,           shells, 127
  20016.  80                                    memory space for, 115, 252
  20017. @FILETIME variable function,           reading from a file, 226
  20018.  80                                 History window, 51, 119
  20019. FineSwap directive, 127             HistWinBegin directive, 125
  20020. Floppy disks, 135                   HistWinColor directive, 119
  20021. FOR, 84, 94, 128, 215               HistWinDel directive, 125
  20022.    and GOSUB, 223                   HistWinEdit directive, 125
  20023. Form feed character, 86             HistWinEnd directive, 125
  20024. FORMAT /S command, 140              HistWinExec directive, 125
  20025. FREE, 219                           HistWinHeight directive, 119
  20026.    on networks, 146
  20027. Free disk space, see disk space
  20028. Free memory, see Memory
  20029.  
  20030. ___________________________________________________________________
  20031. NDOS Reference Manual                                          346
  20032.  
  20033.                                                               Index
  20034. ___________________________________________________________________
  20035.  
  20036. HistWinLeft directive, 119                for command line editing,
  20037. HistWinOpen directive, 125                 124
  20038. HistWinTop directive, 119                 for history window, 125
  20039. HistWinWidth directive, 120               for LIST, 125
  20040. HMA, see Memory                        names, 113, 162, 239
  20041.                                     Keyboard, 44
  20042. I                                   KEYSTACK, 61, 94, 98, 239
  20043.                                        programming interface, 323
  20044. IF, 84, 94, 128, 227                Keystroke aliases, see Aliases
  20045.    conditions, 228                  KSTACK.COM, 61, 105, 239
  20046. IFF, 94, 233
  20047.    and GOSUB, 222                   L
  20048.    and GOTO, 99, 234
  20049.    conditions, 228                  @LABEL variable function, 80
  20050. Include lists, 67                   Labels, in batch files, 222,
  20051. @INDEX variable function, 80         224
  20052. Inherit directive, 127              Laptop computers, 136
  20053. INKEY, 94, 98, 235                  Left directive, 123
  20054. INPUT, 94, 122, 238                 @LEN variable function, 80
  20055. Ins directive, 123                  LH, 131, 132, 243
  20056. Installable commands, 324           LIM EMS, see Memory
  20057. Installation, 9                     Line feed character, 86
  20058.    reversing, 10                    @LINE variable function, 80
  20059. INT 2E, 326                         LineInput directive, 120, 284
  20060. INT 2F, 322                         Lines, drawing, on screen, 205,
  20061. @INT variable function, 80           206
  20062. Internal commands, see Commands     LIST, 245
  20063. Internal variables, 73, see            default colors, 121
  20064.  also names of individual              keys used with, 123, 125
  20065.  variables                             output method, 133
  20066.    in aliases, 166                     screen size, 120, 133, 285
  20067.    in batch files, 77, 92           ListColors directive, 121
  20068. ISALIAS test, in IF and IFF,        ListFind directive, 125
  20069.  231                                ListHighBit directive, 126
  20070. ISDIR test, in IF and IFF, 231      ListNext directive, 126
  20071. ISINTERNAL test, in IF and IFF,     ListPrint directive, 126
  20072.  231                                ListWrap directive, 126
  20073.                                     Literal keystrokes, 48
  20074. J                                   LOADBTM, 91, 94, 247
  20075.                                     LOADHIGH, 131, 132, 243
  20076. JOIN command, 295                   LOG, 98, 107, 249
  20077.                                     LogName directive, 115
  20078. K                                   Lower case, 80, 120, 200, 286
  20079.                                     @LOWER variable function, 80
  20080. Key                                 @LPT variable function, 80
  20081.    codes, 43, 315, 316
  20082.    mapping, 121                     M
  20083.       clearing default key map,
  20084.        126                          Master environment, see
  20085.       for all input, 122             Environment
  20086.  
  20087. ___________________________________________________________________
  20088. NDOS Reference Manual                                          347
  20089.  
  20090.                                                               Index
  20091. ___________________________________________________________________
  20092.  
  20093. MD, 251                                in aliases, 159
  20094. MEMORY, 132, 149, 252                  separator character, 54, 86,
  20095.    and QEMM, 132                        118, 284
  20096. Memory, 42, 131                     Multiple filenames, 66
  20097.    base, 42                         Multitasking software, 140
  20098.       amount of, 79                    and disk swapping, 142
  20099.       DOS in, 299                      DESQview, 144
  20100.       NDOS use of, 131                 Microsoft Windows, 143
  20101.    expanded (EMS), 42
  20102.       amount of, 79, 252            N
  20103.       hardware, 132
  20104.       NDOS use of, 132              @NAME variable function, 81
  20105.       swapping to, 115, 132,        NDOS
  20106.        289                             and DESQview, see DESQview
  20107.    extended, 42                        and DOS versions, 103, 140
  20108.       amount of, 79, 252               and DR-DOS, 43, 101, 103,
  20109.       NDOS use of, 131                  140
  20110.    extended (XMS), 42                  and MS-DOS 5.0, 57, 103
  20111.       amount of, 79, 252               and MS-DOS 5.0 memory
  20112.       NDOS use of, 132                  management, 43, 131, 132,
  20113.       swapping to, 115, 289             243
  20114.    free, 252                           and other software, 139
  20115.    high memory area (HMA), 43,         and Windows, see Microsoft
  20116.     132                                 Windows
  20117.       DOS in, 299                      configuration, 72, 100, 108
  20118.       status of, 252                   detecting, 322
  20119.    problems with, 132                  Features, 5
  20120.    upper, 42                           memory usage, 115, 117, 128
  20121.    upper memory blocks (UMBs),         programming interface, 322
  20122.     43                                 resident portion, 115
  20123.       and LOADHIGH, 243                   loading in high memory,
  20124.       NDOS use of, 117, 131                117
  20125. Memory resident programs, see          startup options, see Startup
  20126.  TSRs                                   options
  20127. Messages, displaying, 207, 209         transient portion, 115, 128
  20128. MessageServer directive, 127        NDOS.COM, 103, 106
  20129. Microsoft Windows, 141, 142         NDOS.INI, 100, 108
  20130.    and secondary shells, 104,          advanced directives, 126
  20131.     112                                and installation, 108
  20132.    detecting, 76, 143                  and SETDOS, 111, 117, 283
  20133. MKDIR, 251                             color directives, 121
  20134. _MONITOR internal variable,            comments in, 110
  20135.  76                                    configuration directives,
  20136. Monochrome monitor                      117
  20137.    and HELP, 138, 256                  directive types, 112
  20138. Mouse, in HELP, 56                     directives, 109, see also
  20139. MOVE, 253                               names of individual
  20140.    and SELECT, 254                      directives
  20141. Multiple commands, 54                  errors in, 110, 115
  20142.  
  20143.  
  20144. ___________________________________________________________________
  20145. NDOS Reference Manual                                          348
  20146.  
  20147.                                                               Index
  20148. ___________________________________________________________________
  20149.  
  20150.    initialization directives,       _NVER internal variable, 74
  20151.     114
  20152.    key mapping directives, 121      O
  20153.    location of, 101, 104, 111,
  20154.     112                             Operating system, detecting
  20155.       and multitaskers, 112          type of, 75
  20156.    primary section, 110             Options
  20157.       in alternate files, 112          in commands, 156
  20158.    secondary section, 110              startup, see Startup Options
  20159.       and DESQview, 145             Or (||) in conditional
  20160.       and multitaskers, 141          commands, 84
  20161. NDOS.PIF, 143                       .OR., in IF and IFF, 227, 231,
  20162. NDOSHELP, 55, 256                    233
  20163.    options, 138, 256
  20164. _NDP internal variable, 76          P
  20165. NetwareNames directive, 128
  20166. Networks, 146                       ParameterChar directive, 120,
  20167.    and pipes, 147                    285
  20168.    disk access problems on, 136     Parent directory, 40, 175, 177
  20169.    disk space calculations on,       251
  20170.     146                             Parsing, 38
  20171.    disk swapping on, 128, 147       PATH command, 148, 257
  20172.    drive names on, 39               PATH environment variable, 41,
  20173.    file and directory names on,      73, 106
  20174.     146                                "." in, 258
  20175. NEXIT, 36, 100, 107                    and @SEARCH variable
  20176.    location of, 108, 114                function, 81
  20177. NextFile directive, 124                avoiding search of, 28
  20178. NextHistory directive, 124             changing, 211, 257
  20179. NextINIFile directive, 128             format of, 257
  20180. NoClobber directive, 120, 285          invalid directory in, 258
  20181. NormalEditKey directive, 124           length of, 148, 258
  20182. NormalHWinKey directive, 125           searching path, 37
  20183. NormalKey directive, 123               viewing, 257
  20184.    and keystroke aliases, 163       @PATH variable function, 81
  20185. NormalListKey directive, 126        Path, of a file, 38, 39
  20186. NOT, in IF and IFF, 227, 231,          and aliases, 89
  20187.  233                                   extracting from full file-
  20188. Notebook computers, 136                 name, 81
  20189. Novell Netware, 128, 146               finding full path name, 86
  20190. NSTART, 36, 77, 100, 107               finding true path, 82, 295
  20191.    and multitaskers, 142               if omitted, 40
  20192.    and startup command, 103            in executable extensions, 69
  20193.    and TSRs, 107                       in include lists, 67
  20194.    location of, 108, 114            PAUSE, 94, 98, 259
  20195. NStartPath directive, 114           PauseOnError directive, 110,
  20196. Numeric coprocessor, 76, 130         115
  20197. Numeric tests, in IF and IFF,       Percent sign, see % sign
  20198.  230                                Pipes, 60, 290
  20199.                                        and networks, 147
  20200.  
  20201. ___________________________________________________________________
  20202. NDOS Reference Manual                                          349
  20203.  
  20204.                                                               Index
  20205. ___________________________________________________________________
  20206.  
  20207. POPD, 202, 260, 264                 REM, 94, 150, 269
  20208. PrevFile directive, 125                in AUTOEXEC.BAT, 11, 150
  20209. PrevHistory directive, 125             in CONFIG.SYS, 10, 11, 150
  20210. [Primary], see NDOS.INI             @REMOTE variable function, 81
  20211. Primary shell, see Shell            @REMOVABLE variable function,
  20212. Printer                              81
  20213.    checking status of, 80           REN, 253, 270
  20214.    sending control codes to, 86     RENAME, 253, 270
  20215.    sending files to, 183            Replaceable parameters
  20216. Programming for NDOS, see              in aliases, 165
  20217.  Technical Information                 in batch files, 92, 288
  20218. PROMPT command, 107, 141, 261       ReserveTPA directive, 128
  20219.    ANSI sequences in, 92, 262       RETURN, 94, 222, 272
  20220.    changing for secondary           Right directive, 124
  20221.     shell, 77                       RMDIR, 267
  20222.    environment variables and        ROM, booting from, 136
  20223.     functions in, 71                Root directory, 39
  20224. PROMPT environment variable,        _ROW internal variable, 76
  20225.  73, 106                            _ROWS internal variable, 76
  20226. PUSHD, 202, 260, 264
  20227.                                     S
  20228. Q
  20229.                                     SaveHistory directive, 125
  20230. QUIT, 94, 173, 174, 266             Scan codes, see Key codes
  20231. Quoting, of arguments, 86           SCREEN, 94, 273
  20232.                                     Screen, see also Video
  20233. R                                      clearing, 180
  20234.                                        colors, see also Monochrome
  20235. RAM, see Memory                         monitor
  20236. RAM disk, 39, 132                         and ANSI driver, 45, 121,
  20237.    swapping to, 115                        284
  20238. RD, 267                                   and cursor, 134
  20239. Read-only attribute, see File             in DIR, 197
  20240.  attributes                               in HELP, 138, 256
  20241. @READY variable function, 81              in history window, 119
  20242. REBOOT, 268                               in LIST, 121, 246
  20243. Redirection, 59                           in PROMPT, 262
  20244.    alternative methods, 290,              in SELECT, 121, 277
  20245.     303                                   of boxes, 203
  20246.    and COLORDIR environment               of lines, 205, 206
  20247.     variable, 198                         of text, 274, 291, 302
  20248.    and command grouping, 84               setting defaults, 121,
  20249.    and NoClobber, 60, 285                  180, 182, 284
  20250.    capturing batch file output,           setting, in NSTART, 77,
  20251.     98                                     107
  20252.    nested, 60                             testing, 74, 75
  20253.    preventing file overwrites,         size, 45, 75, 76, 120, 133,
  20254.     120                                 285
  20255. Reduce directive, 128               ScreenRows directive, 120, 133,
  20256.                                      285
  20257.  
  20258. ___________________________________________________________________
  20259. NDOS Reference Manual                                          350
  20260.  
  20261.                                                               Index
  20262. ___________________________________________________________________
  20263.  
  20264. SCRPUT, 94, 133, 274                      startup options, 104
  20265. Search path, see PATH                  visual shell, 35
  20266.  environment variable               _SHELL internal variable, 76
  20267. @SEARCH variable function, 81       SHELL= line, in CONFIG.SYS, 35,
  20268. [Secondary], see NDOS.INI            101, 137
  20269. Secondary shell, see Shell          SHIFT, 92, 94, 288
  20270. SELECT, 275                         Software compatibility, see
  20271.    and command grouping, 84          Compatibility
  20272.    and include lists, 68            Sound, see BEEP
  20273.    and MOVE, 254                    StackSize directive, 128
  20274.    and stack size, 128              Standard error device, 58, 59
  20275.    default colors, 121              Standard input device, 58, 59,
  20276.    keys used with, 122               246, 290, 303
  20277.    output method, 133               Standard output device, 58, 59,
  20278.    screen size, 121, 134, 285        290, 303
  20279. Serial port, 188                    Startup options, 101
  20280. SET, 70, 280                           //iniline, 103, 104, 141
  20281. SETDOS, 283                            @d:\path\inifile, 101, 104,
  20282.    /A(NSI), 118, 140, 180, 182,         112, 141
  20283.     284                                commands in, 103, 105
  20284.    /C(ompound character), 119,         for secondary shells, 105
  20285.     284                             StdColors directive, 121
  20286.    /E(scape character), 86,         Stopwatch, see TIMER
  20287.     119, 284                        String tests, in IF and IFF,
  20288.    /I(nternal), 158, 231, 284        228
  20289.    /L(ine), 120, 284                Subdirectories, 39
  20290.    /M(ode), 119, 285                   attributes of, 168
  20291.    /N(o clobber), 120, 285             changing, see Changing
  20292.    /P(arameter character), 120,         directories
  20293.     285                                copying, 187
  20294.    /R(ows), 120, 133, 285              creating, 251
  20295.    /S(hape), 118, 134, 285             deleting files from, 191
  20296.    /U(pper), 76, 120, 199, 286         descriptions for, 193
  20297.    /V(erbose), 91, 118, 286            executing commands in, 220
  20298.    and NDOS.INI, 111, 283              hidden, 220
  20299. SETLOCAL, 93, 94, 97, 287,             moving, 253, 255
  20300.  298                                   name, maximum length of, 39
  20301. Shell                                  removing, 191, 255, 267
  20302.    DOS shell (defined), 1              renaming, 270
  20303.    level, 76, 262                      testing for, 231
  20304.    primary, 35                      Subdirectory attribute, see
  20305.       and multitaskers, 142,         File attributes
  20306.        143                          SUBST command, 295
  20307.       startup options, 101          @SUBSTR variable function, 81
  20308.    secondary, 35                    Swapping, 115
  20309.       and COMSPEC, 106                 and compatibility, 132
  20310.       and multitaskers, 142            and multitasking software,
  20311.       exiting from, 214                 142
  20312.       inheritance, 111, 127,           enabling and disabling, 289
  20313.        166, 283
  20314.  
  20315. ___________________________________________________________________
  20316. NDOS Reference Manual                                          351
  20317.  
  20318.                                                               Index
  20319. ___________________________________________________________________
  20320.  
  20321.    filenames used by, 116,             and multitasker startup
  20322.     142                                 files, 141
  20323.    on networks, 146                    and NSTART, 107
  20324.    reduced, 128                        and SETLOCAL, 287
  20325.    types of, 116                       and swapping state, 289
  20326. SWAPPING command, 289                  loading order, 151
  20327. Swapping directive, 115, 131,       TYPE, 296
  20328.  147, 151
  20329. SwapReopen directive, 128           U
  20330. Switches, in commands, 156
  20331. System                              UltraVision, 135
  20332.    attribute, see File              UMBEnvironment directive, 117,
  20333.     attributes                       131, 151
  20334.    date, 189                           and DESQview, 145
  20335.    rebooting, 268                   UMBLoad directive, 117, 131,
  20336.    tests, in IF and IFF, 230         151
  20337.    time, 292                           and DESQview, 145
  20338.                                     UMBs, see Memory
  20339. T                                   UNALIAS, 97, 297
  20340.                                     Uninstalling NDOS, 10
  20341. Tab character, 86                   @UNIQUE variable function, 82
  20342. Task switching software, see        UniqueSwapName directive, 116,
  20343.  Multitasking software               129, 142
  20344. Technical Information, 322          UNSET, 70, 93, 298
  20345.    DESCRIPT.ION, 325                Up directive, 124
  20346.    detecting NDOS, 322              Upper case, 120, 286
  20347.    installable commands, 324        @UPPER variable function, 82
  20348.    INT 2E, 326                      UpperCase directive, 120, 199,
  20349.    KEYSTACK, 323                     200, 286
  20350.  
  20351. TEE, 290                            V
  20352. TEMP environment variable, 73,
  20353.  107, 147                           Variable expansion, 87
  20354. TEMPNDOS environment variable,      Variable functions, 77, see
  20355.  73, 106, 147                        also names of individual
  20356. TEXT, 94, 291                        functions
  20357. THEN, in IFF, 233                      in aliases, 82, 166
  20358. TIME, 292                              in batch files, 83, 93
  20359. _TIME internal variable, 76         VER, 299
  20360. @TIME variable function, 82         VERIFY, 187, 300
  20361. TIMER, 95, 293                      Version numbers, 75, 76, 299
  20362. Tour, 12                            Vertical text display, 302
  20363. _TRANSIENT internal variable,       VGA, 133, 134, 179, 232
  20364.  76                                 Video hardware, 45, 133, see
  20365. TRUENAME, 295                         also Screen
  20366. @TRUENAME variable function,        _VIDEO internal variable, 76
  20367.  82, 295                            VOL, 301
  20368. TSRs, 139                           Volume label, see Disk drives
  20369.    and .BTM files, 247
  20370.  
  20371.  
  20372. ___________________________________________________________________
  20373. NDOS Reference Manual                                          352
  20374.  
  20375.                                                               Index
  20376. ___________________________________________________________________
  20377.  
  20378. Volume label attribute, see
  20379.  File attributes
  20380. VSCRPUT, 95, 133, 302
  20381.  
  20382. W
  20383.  
  20384. Warm reboot, 268
  20385. Warning mark, see !
  20386. Wildcards, 64
  20387.    and @SEARCH variable
  20388.     function, 81
  20389.    and filename completion, 53
  20390.    and renaming subdirectories,
  20391.     270
  20392.    extended, 65
  20393.       and DEL, 136, 191
  20394.    in executable extensions, 70
  20395.    in include lists, 67
  20396.    in multiple filenames, 66
  20397. _WIN internal variable, 76,
  20398.  143
  20399. Windows, see Microsoft Windows
  20400. @WORD variable function, 82
  20401. WordLeft directive, 124
  20402. WordRight directive, 124
  20403.  
  20404. X
  20405.  
  20406. XMS, see Memory
  20407. @XMS variable function, 82
  20408. .XOR., in IF and IFF, 227,
  20409.  231, 233
  20410.  
  20411. Y
  20412.  
  20413. Y, 303
  20414.  
  20415. Z
  20416.  
  20417. Zero length files, creating,
  20418.  269
  20419.  
  20420.  
  20421.  
  20422.  
  20423.  
  20424.  
  20425.  
  20426.  
  20427.  
  20428.  
  20429. ___________________________________________________________________
  20430. NDOS Reference Manual                                          353
  20431.