home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 October / PCO1097.ISO / FilesBBS / OS2 / 4OS2300.ARJ / 4OS2300.ZIP / 4OS2.INF (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1997-07-24  |  557.1 KB  |  18,023 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About 4OS2 Help ΓòÉΓòÉΓòÉ
  3.  
  4.                                       4OS2
  5.  
  6.                              Version 3.0 Help System
  7.  
  8.                 Text by Hardin Brothers, Tom Rawson, and Rex Conn
  9.  
  10. Help Text Copyright 1993 - 1997, JP Software Inc., All Rights Reserved. 
  11.  
  12. Software Copyright 1988 - 1997, Rex Conn and JP Software Inc., All Rights 
  13. Reserved. 
  14.  
  15. 4DOS, 4OS2, and 4NT are JP Software Inc.'s trademarks for its family of 
  16. character-mode command processors.  4DOS and Take Command are registered 
  17. trademarks of JP Software Inc. JP Software, jpsoft.com, and all JP Software 
  18. designs and logos are also trademarks of JP Software Inc. Other product and 
  19. company names are trademarks of their respective owners. 
  20.  
  21. [07/97 - 3.00A] 
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 2. The Command Line ΓòÉΓòÉΓòÉ
  25.  
  26. 4OS2 displays a [c:\] prompt when it is waiting for you to enter a command. 
  27. (The actual text depends on the current drive and directory as well as your 
  28. PROMPT settings.)  This is called the command line and the prompt is asking you 
  29. to enter a command, an alias or batch file name, or the instructions necessary 
  30. to begin an application program. 
  31.  
  32. This section explains the features that will help you while you are typing in 
  33. commands, and how keystrokes are interpreted when you enter them at the command 
  34. line.  The keystrokes discussed here are the ones normally used by 4OS2.  If 
  35. you prefer using different keystrokes to perform these functions, you can 
  36. assign new ones with key mapping directives in 4OS2.INI. 
  37.  
  38. The command line features documented in this section are: 
  39.  
  40.             Command-Line Editing 
  41.             Command History and Recall 
  42.             Command History Window 
  43.             Filename Completion 
  44.             Automatic Directory Changes 
  45.             Directory History Window 
  46.             Multiple Commands 
  47.             Expanding and Disabling Aliases 
  48.             Command-Line Length Limits 
  49.  
  50.  Additional command-line features are documented under File Selection and Other 
  51.  Features. 
  52.  
  53.  
  54. ΓòÉΓòÉΓòÉ 2.1. Command-Line Editing ΓòÉΓòÉΓòÉ
  55.  
  56. The command line works like a single-line word processor, allowing you to edit 
  57. any part of the command at any time before you press Enter to execute it, or 
  58. Esc to erase it.  The command line you enter can be up to 1023 characters long. 
  59.  
  60. You can use the following editing keys when you are typing a command (the words 
  61. Ctrl and Shift mean to press the Ctrl or Shift key together with the other key 
  62. named): 
  63.  
  64. Cursor Movement Keys: 
  65.  
  66.                        Move the cursor left one character. 
  67.                        Move the cursor right one character. 
  68.         Ctrl           Move the cursor left one word. 
  69.         Ctrl           Move the cursor right one word. 
  70.         Home            Move the cursor to the beginning of the line. 
  71.         End             Move the cursor to the end of the line. 
  72.  
  73.  Insert and Delete: 
  74.  
  75.         Ins             Toggle between insert and overtype mode. 
  76.         Del             Delete the character at the cursor. 
  77.         Backspace       Delete the character to the left of the cursor. 
  78.         Ctrl-L          Delete the word or partial word to the left of the 
  79.                         cursor. 
  80.         Ctrl-R          or Ctrl-Bksp  Delete the word or partial word to the 
  81.                         right of the cursor. 
  82.         Ctrl-Home       Delete from the beginning of the line to the cursor. 
  83.         Ctrl-End        Delete from the cursor to the end of the line. 
  84.         Esc             Delete the entire line. 
  85.  
  86.  Execution: 
  87.  
  88.         Ctrl-C          or Ctrl-Break  Cancel the command line. 
  89.         Enter           Execute the command line. 
  90.  
  91.  Most of the command-line editing capabilities are also available when a 4OS2 
  92.  command prompts you for a line of input.  For example, you can use the 
  93.  command-line editing keys when DESCRIBE prompts for a file description, when 
  94.  INPUT prompts for input from an alias or batch file, or when LIST prompts you 
  95.  for a search string. 
  96.  
  97.  If you want your input at the command line to be in a different color from 
  98.  4OS2's prompts or output, you can use the Display page of the OPTION dialogs, 
  99.  or the InputColors directive in 4OS2.INI. 
  100.  
  101.  4OS2 will prompt for additional command-line text when you include the escape 
  102.  character as the very last character of a typed command line.  The default 
  103.  escape character is the caret [^].  For example: 
  104.  
  105.           [c:\] echo The quick brown fox jumped over the lazy^
  106.           More? sleeping dog. > alphabet
  107.  
  108.  Sometimes you may want to enter one of the command line editing keystrokes on 
  109.  the command line, instead of performing the key's usual action.  For example, 
  110.  suppose you have a program that requires a Ctrl-R character on its command 
  111.  line.  Normally you couldn't type this keystroke at the prompt, because it 
  112.  would be interpreted as a "Delete word right" command. 
  113.  
  114.  To get around this problem, use the special keystroke Alt-255. You enter 
  115.  Alt-255 by holding down the Alt key while you type 255 on the numeric keypad, 
  116.  then releasing the Alt key (you must use the number keys on the numeric pad; 
  117.  the row of keys at the top of your keyboard won't work).  This forces 4OS2 to 
  118.  interpret the next keystroke literally and places it on the command line, 
  119.  ignoring any special meaning it would normally have as a command-line editing 
  120.  or history keystroke.  You can use Alt-255 to suppress the normal meaning of 
  121.  command-line editing keystrokes even if they have been reassigned with key 
  122.  mapping directives in the .INI file, and Alt-255 itself can be reassigned with 
  123.  the CommandEscape directive. 
  124.  
  125.  
  126. ΓòÉΓòÉΓòÉ 2.2. Command History and Recall ΓòÉΓòÉΓòÉ
  127.  
  128. Command History Keys: 
  129.  
  130.                        Recall the previous (or most recent) command, or the 
  131.                         most recent command that matches a partial command 
  132.                         line. 
  133.                        Recall the next (or oldest) command, or the oldest 
  134.                         command that matches a partial command line. 
  135.         F3              Fill in the rest of the command line from the previous 
  136.                         command, beginning at the current cursor position. 
  137.         Ctrl-D          Delete the currently displayed history list entry, 
  138.                         erase the command line, and display the previous 
  139.                         (matching) history list entry. 
  140.         Ctrl-E          Display the last entry in the history list. 
  141.         Ctrl-K          Save the current command line in the history list 
  142.                         without executing it, and then clear the command line. 
  143.         Ctrl-Enter      Copy the current command line to the end of the history 
  144.                         list even it has not been altered, then execute it. 
  145.         @               As the first character in a line:  Do not save the 
  146.                         current line in the history list when it is executed, 
  147.                         and do not store it in the CMDLINE environment 
  148.                         variable. 
  149.  
  150.  Use the  key repeatedly to scan back through the history list.  When the 
  151.  desired command appears, press Enter to execute it again.  After you have 
  152.  found a command, you can edit it before pressing Enter. 
  153.  
  154.  The history list is normally "circular".  If you move to the last command in 
  155.  the list and then press the down arrow one more time, you'll see the first 
  156.  command in the list.  Similarly, if you move to the first command in the list 
  157.  and then press the up arrow one more time, you'll see the last command in the 
  158.  list.  You can disable this feature and make command history recall stop at 
  159.  the beginning or end of the list by turning off the History Wrap selection on 
  160.  the Command Line 1 page of the OPTION dialogs, or setting Histwrap to No in 
  161.  the .INI file. 
  162.  
  163.  You can search the command history list to find a previous command quickly 
  164.  using command completion.  Just enter the first few characters of the command 
  165.  you want to find and press . You only need to enter enough characters to 
  166.  identify the command that you want to find.  If you press the  key a second 
  167.  time, you will see the previous command that matches.  The system will beep if 
  168.  there are no matching commands.  The search process stops as soon as you type 
  169.  one of the editing keys, whether or not the line is changed.  At that point, 
  170.  the line you're viewing becomes the new line to match if you press  again. 
  171.  
  172.  You can specify the size of the command history list with the OPTION command, 
  173.  or with the History directive in the .INI file.  When the list is full, the 
  174.  oldest commands are discarded to make room for new ones.  You can also use the 
  175.  HistMin directive in the .INI file to enable or disable history saves and to 
  176.  specify the shortest command line that will be saved. 
  177.  
  178.  You can prevent any command line from being saved in the history by beginning 
  179.  it with an at sign [@]. 
  180.  
  181.  When you execute a command from the history, that command remains in the 
  182.  history list in its original position.  The command is not copied to the end 
  183.  of the list (unless you modify it).  If you want each command to be copied or 
  184.  moved to the end of the list when it is re- executed, set HistCopy or HistMove 
  185.  to Yes in 4OS2.INI. If you select either of these options, the list entry 
  186.  identified as "current" (the entry from which commands are retrieved when you 
  187.  press ) is also adjusted to refer to the end of the history list after each 
  188.  recalled command is executed. 
  189.  
  190.  Local and Global Command History 
  191.  
  192.  The command history can be stored in either a "local" or "global" list. 
  193.  
  194.  With a local command history list, any changes made to the history will only 
  195.  affect the current copy of 4OS2.  They will not be visible in other shells, or 
  196.  other sessions. 
  197.  
  198.  With a global command history list, all copies of 4OS2 will share the same 
  199.  command history, and any changes made to the history in one copy will affect 
  200.  all other copies.  Global lists are the default for 4OS2. 
  201.  
  202.  You can control the type of command history on the Startup page of the OPTION 
  203.  dialogs, with the LocalHistory directive in the .INI file, or with the /L and 
  204.  /LH options of the START command. 
  205.  
  206.  There is no fixed rule for deciding whether to use a local or global command 
  207.  history list.  Depending on your work style, you may find it most convenient 
  208.  to use one type, or a mixture of types in different sessions or shells.  We 
  209.  recommend that you start with the default setting, then modify it if you find 
  210.  a situation where the default is not convenient. 
  211.  
  212.  If you select a global history list for 4OS2 you can share the history among 
  213.  all copies of 4OS2 running in any session.  When you close all 4OS2 sessions, 
  214.  the memory for the global history list is released, and a new, empty history 
  215.  list is created the next time you start 4OS2. 
  216.  
  217.  If you want the history list to be retained in memory even when no command 
  218.  processor session is running, execute the SHRALIAS command, which loads a 
  219.  program to perform this service for the global command history, directory 
  220.  history, and alias lists. 
  221.  
  222.  Whenever you start a secondary shell which uses a local history list, it 
  223.  inherits a copy of the command history from the previous shell.  However, any 
  224.  changes to the history made in the secondary shell will affect only that 
  225.  shell.  If you want changes made in a secondary shell to affect the previous 
  226.  shell, use a global history list in both shells. 
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 2.3. Command History Window ΓòÉΓòÉΓòÉ
  230.  
  231. Command History Window Keys: 
  232.  
  233.         PgUp            (from the command line) Open the command history 
  234.                         window. 
  235.          or PgDn 
  236.                        Scroll the display up one line. 
  237.                        Scroll the display down one line. 
  238.                        Scroll the display left 4 columns. 
  239.                        Scroll the display right 4 columns. 
  240.         PgUp            (inside the window) Scroll the display up one page. 
  241.         PgDn            (inside the window) Scroll the display down one page. 
  242.         Ctrl-PgUp       Go to the beginning of the history list. 
  243.          or Home 
  244.         Ctrl-PgDn       Go to the end of the history list. 
  245.          or End 
  246.         Ctrl-D          Delete the selected line from the history list. 
  247.         Enter           Execute the selected line. 
  248.         Ctrl-Enter      Move the selected line to the command line for editing. 
  249.  
  250.  You can view the command history in a scrollable command history window, and 
  251.  select the command to modify or re-execute from those displayed in the window. 
  252.  To activate the command history window press PgUp or PgDn at the command line. 
  253.  A window will appear in the upper right corner of the screen, with the command 
  254.  you most recently executed marked with a highlight.  (If you just finished 
  255.  re-executing a command from the history, then the next command in sequence 
  256.  will be highlighted.) 
  257.  
  258.  The display is not circular as it is at the prompt; it has a fixed beginning 
  259.  and end.  The Ctrl-D (delete from history) key works within the history window 
  260.  as it does at the command line. 
  261.  
  262.  Once you have selected a command in the history window, press Enter to execute 
  263.  it immediately, or Ctrl-Enter to move the line to the prompt for editing (you 
  264.  cannot edit the line directly in the history window). 
  265.  
  266.  You can bring up a "filtered" history window by typing some characters on the 
  267.  command line, then pressing PgUp or PgDn. Only those commands matching the 
  268.  typed characters will be displayed in the window. 
  269.  
  270.  See Popup Windows for information on customizing window position, size, and 
  271.  color. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 2.4. Filename Completion ΓòÉΓòÉΓòÉ
  275.  
  276. Filename Completion Keys: 
  277.  
  278.         F8                  Get the previous matching filename. 
  279.          or Shift-Tab 
  280.         F9                  Get the next matching filename. 
  281.          or Tab 
  282.         F10                 Keep the current matching filename and display the 
  283.                             next matching name immediately after the current 
  284.                             one. 
  285.  
  286.  Filename completion can help you by filling in a complete file name on the 
  287.  command line when you only remember or want to type part of the name. For 
  288.  example, if you know the name of a file begins AU but you can't remember the 
  289.  rest of the name, type: 
  290.  
  291.           [c:\] copy au
  292.  
  293.  and then press the Tab key or F9 key.  4OS2 will search the current directory 
  294.  for filenames that begin AU and insert the first one onto the command line in 
  295.  place of the AU that you typed. 
  296.  
  297.  If this is the file that you want, simply complete the command.  If 4OS2 
  298.  didn't find the file that you were looking for, press Tab or F9 again to 
  299.  substitute the next filename that begins with AU.  When there are no more 
  300.  filenames that match your pattern, the system will beep each time you press 
  301.  Tab or F9. 
  302.  
  303.  If you go past the filename that you want, press Shift-Tab or F8 to back up 
  304.  and return to the previous matching filename. After you back up to the first 
  305.  filename, the system will beep each time you press Shift-Tab or F8. 
  306.  
  307.  If you want to enter more than one matching filename on the same command line, 
  308.  press F10 when each desired name appears.  This will keep that name and place 
  309.  the next matching filename after it on the command line.  You can then use Tab 
  310.  (or F9), Shift-Tab (or F8), and F10 to move through the remaining matching 
  311.  files. 
  312.  
  313.  The pattern you use for matching may contain any valid filename characters, as 
  314.  well as wildcard characters and extended wildcards.  For example, you can copy 
  315.  the first matching .TXT file by typing 
  316.  
  317.           [c:\] copy *.txt
  318.  
  319.  and then pressing Tab. 
  320.  
  321.  If you don't specify part of a filename before pressing Tab, the command 
  322.  processor will match all files.  For example, if you enter the above command 
  323.  as "COPY", without the "*.TXT", and then press Tab, the first filename in the 
  324.  current directory is displayed.  Each time you press Tab or F9 after that, 
  325.  another name from the current directory is displayed, until all filenames have 
  326.  been displayed. 
  327.  
  328.  If you type a filename without an extension, 4OS2 will add *.* to the name (* 
  329.  on HPFS drives).  It will also place a "*" after a partial extension. If you 
  330.  are typing a group of file names in an include list, the part of the include 
  331.  list at the cursor will be used as the pattern to match. 
  332.  
  333.  When filename completion is used at the start of the command line, it will 
  334.  only match directories, executable files, and files with executable 
  335.  extensions, since these are the only file names that it makes sense to use at 
  336.  the start of a command.  If a directory is found, a "\" will be appended to it 
  337.  to enable an automatic directory change. 
  338.  
  339.  Appending Backslashes to Directory Names 
  340.  
  341.  If you set the AppendToDir .INI directive, or the "Add \ ..." option on the 
  342.  Command Line 1 page of the OPTION dialogs, 4OS2 will add a trailing backslash 
  343.  [\] to all directory names.  This feature can be especially handy if you use 
  344.  filename completion to specify files that are not in the current directory -- 
  345.  a succession of Tab (or F9) and F10 keystrokes can build a complete path to 
  346.  the file you want to work with. 
  347.  
  348.  The following example shows the use of this technique to edit the file 
  349.  C:\DATA\FINANCE\MAPS.DAT.  The lines which include <F9> show where F9 (or Tab) 
  350.  is pressed; the other lines show how the command line appears after the 
  351.  previous F9 or Tab (the example is displayed on several lines here, but all 
  352.  appears at a single command prompt when you actually perform the steps): 
  353.  
  354.           1    [c:\> edit \da <F9>
  355.           2    [c:\> edit \data\
  356.           3    [c:\> edit \data\f <F9>
  357.           4    [c:\> edit \data\frank.doc <F9>
  358.           5    [c:\> edit \data\finance\
  359.           6    [c:\> edit \data\finance\map <F9>
  360.           7    [c:\> edit \data\finance\maps.dat
  361.  
  362.  Note that F9 was pressed twice in succession on lines 3 and 4, because the 
  363.  file name displayed on line 3 was not what was needed we were looking for the 
  364.  FINANCE directory, which came up the second time F9 was pressed.  In this 
  365.  example, filename completion saves about half the keystrokes that would be 
  366.  required to type the name in full.  If you are using long file or directory 
  367.  names, the savings can be much greater. 
  368.  
  369.  Customizing Filename Completion 
  370.  
  371.  You can customize filename completion for any internal or external command or 
  372.  alias.  This allows the command processor to display filenames intelligently 
  373.  based on the command you are entering.  For example, you might want to see 
  374.  only .TXT files when you use filename completion in the EDIT command. 
  375.  
  376.  To customize filename completion you can use the Command Line 1 page of the 
  377.  OPTION dialogs, or set the FileCompletion directive manually in your .INI 
  378.  file.  You can also use the FILECOMPLETION environment variable.  If you use 
  379.  both, the environment variable will override the settings in your .INI file. 
  380.  You may find it useful to use the environment variable for experimenting, then 
  381.  create permanent settings with the OPTION command or the FileCompletion 
  382.  directive. 
  383.  
  384.  The format for both the environment variable and the .INI file is: 
  385.  
  386.           cmd1:ext1 ext2 ...; cmd2: ...
  387.  
  388.  where "cmd" is a command name and "ext" is a file extension (which may include 
  389.  wildcards) or one of the following file types: 
  390.  
  391.           DIRS       Directories
  392.           RDONLY     Read-only files
  393.           HIDDEN     Hidden files
  394.           SYSTEM     System files
  395.           ARCHIVE    Files modified since the last backup
  396.  
  397.  The command name is the internal command, alias command, or executable file 
  398.  name (without a path).  For example, to have file completion return only 
  399.  directories for the CD command and only .C and .ASM files for B (the Boxer 
  400.  editor), you would use this setting for filename completion in the OPTION 
  401.  dialogs: 
  402.  
  403.           FileCompletion=cd:dirs; b:c asm
  404.  
  405.  To set the same values using the environment variable, you would use this 
  406.  line: 
  407.  
  408.           [c:\] set filecompletion=cd:dirs; b:c asm
  409.  
  410.  With this setting in effect, if you type "CD " and then pressed Tab, the 
  411.  command processor will return only directories, not files.  If you type "B " 
  412.  and press Tab, you will see only names of .C and .ASM files. 
  413.  
  414.  4OS2 does not check your command line for aliases before matching the commands 
  415.  for customized file completion.  Instead, they ignore any path or file 
  416.  extension information in the first word of the command, and then search the 
  417.  FILECOMPLETION environment variable and the FileCompletion INI directive to 
  418.  find a match that will limit the files selected for filename completion. 
  419.  
  420.  Filename Completion Window 
  421.  
  422.  You can also view filenames in a filename completion window and select the 
  423.  file you want to work with.  To activate the window, press F7 or Ctrl-Tab at 
  424.  the command line.  You will see a window in the upper-right corner of the 
  425.  screen, with a sorted list of files that match any partial filename you have 
  426.  entered on the command line.  If you haven't yet entered a file name, the 
  427.  window will contain the name of all files in the current directory.  You can 
  428.  search for a name by typing the first few characters. (Ctrl-Tab will work only 
  429.  if your keyboard and keyboard driver support it.  If it does not work on your 
  430.  system, use F7 instead.) 
  431.  
  432.  See Popup Windows for information on customizing window position, size, and 
  433.  color. 
  434.  
  435.  Filename Completion Window Keys: 
  436.  
  437.         F7                  (from the command line)  Open the filename 
  438.                             completion window. 
  439.          or Ctrl-Tab 
  440.                            Scroll the display up one line. 
  441.                            Scroll the display down one line. 
  442.                            Scroll the display left 4 columns. 
  443.                            Scroll the display right 4 columns. 
  444.         PgUp                Scroll the display up one page. 
  445.         PgDn                Scroll the display down one page. 
  446.         Ctrl-PgUp           Go to the beginning of the filename list. 
  447.          or Home 
  448.         Ctrl-PgDn           Go to the end of the filename list. 
  449.          or End 
  450.         Enter               Insert the selected filename into the command line. 
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 2.5. Automatic Directory Changes ΓòÉΓòÉΓòÉ
  454.  
  455. The automatic directory change feature lets you change directories quickly from 
  456. the command prompt, without entering an explicit CD or CDD command.  To do so, 
  457. simply type the name of the directory you want to change to at the prompt, with 
  458. a backslash [\] at the end.  For example: 
  459.  
  460.         [c:\] 4os2\
  461.         [c:\4os2]
  462.  
  463. This can make directory changes very simple when it is combined with Extended 
  464. Directory Searches or CDPATH.  If you have enabled either of those features, 
  465. the command processor will use them in searching for any directory you change 
  466. to with an automatic directory change. 
  467.  
  468. For example, suppose Extended Directory Searches are enabled, and the directory 
  469. WIN exists on drive E:.  You can change to this directory with a single word on 
  470. the command line: 
  471.  
  472.         [c:\4os2] win\
  473.         [e:\win]
  474.  
  475. (Depending on the way Extended Directory Searches are configured, and the 
  476. number of subdirectories on your disk whose names contain the string WIN, when 
  477. you execute such a command you may see an immediate change as shown above, or a 
  478. popup window which contains a list of subdirectories named WIN to choose from.) 
  479.  
  480. The text before the backslash can include a drive letter, a full path, a 
  481. partial path, or a UNC name.  Commands like "....\" can be used to move up the 
  482. directory tree quickly (see Extended Parent Directory Names).  Automatic 
  483. directory changes save the current directory, so it can be recalled with a "CDD 
  484. -" or "CD -" command.  For example, any of the following are valid automatic 
  485. directory change entries: 
  486.  
  487.         [c:\] d:\data\finance\
  488.         [c:\] archives\
  489.         [c:\] ...\util\os2\
  490.         [c:\] \\server\vol1\george\
  491.  
  492. The first and last examples change to the named directory.  The second changes 
  493. to the ARCHIVES subdirectory of the current directory, and the third changes to 
  494. the UTIL\OS2 subdirectory of the directory which is two levels "up" from the 
  495. current directory in the tree. 
  496.  
  497.  
  498. ΓòÉΓòÉΓòÉ 2.6. Directory History Window ΓòÉΓòÉΓòÉ
  499.  
  500. Directory History Window Keys: 
  501.  
  502.         Ctrl-PgUp       (from the command line) Open the directory history 
  503.                         window. 
  504.          or Ctrl-PgDn 
  505.                        Scroll the display up one line. 
  506.                        Scroll the display down one line. 
  507.                        Scroll the display left 4 columns. 
  508.                        Scroll the display right 4 columns. 
  509.         PgUp            Scroll the display up one page. 
  510.         PgDn            Scroll the display down one page. 
  511.         Ctrl-PgUp       Go to the beginning of the directory list. 
  512.          or Home 
  513.         Ctrl-PgDn       Go to the end of the directory list. 
  514.          or End 
  515.         Ctrl-D          Delete the selected line from the directory list. 
  516.         Enter           Change to the selected drive and directory. 
  517.         Ctrl-Enter      Move the selected line to the command line for editing. 
  518.  
  519.  The current directory is recorded automatically in the directory history list 
  520.  just before each change to a new directory or drive. 
  521.  
  522.  You can view the directory history from a directory history window and change 
  523.  to any drive and directory on the list.  To activate the directory history 
  524.  window, press Ctrl-PgUp or Ctrl-PgDn at the command line.  You can then select 
  525.  a new directory with the Enter key. 
  526.  
  527.  If the directory history list becomes full, old entries are deleted to make 
  528.  room for new ones.  You can set the size of the list with the DirHistory 
  529.  directive in the .INI file.  In order to conserve space, each directory name 
  530.  is recorded just once in the directory history, even if you move into and out 
  531.  of that directory several times.  The directory history can be stored in 
  532.  either a "local" or "global" list. (See Local and Global Directory History.) 
  533.  
  534.  When you switch directories the original directory is saved in the directory 
  535.  history list, regardless of whether you change directories at the command 
  536.  line, from within a batch file, or from within an alias.  However, directory 
  537.  changes made by external directory navigation utilities or other external 
  538.  programs are not recorded by 4OS2. 
  539.  
  540.  See Popup Windows for information on customizing window position, size, and 
  541.  color. 
  542.  
  543.  
  544. ΓòÉΓòÉΓòÉ 2.6.1. Local and Global Directory History ΓòÉΓòÉΓòÉ
  545.  
  546. The directory history can be stored in either a "local" or "global" list. 
  547.  
  548. With a local directory history list, any changes made to the list will only 
  549. affect the current copy of the command processor.  They will not be visible in 
  550. other shells, or other sessions. 
  551.  
  552. With a global list, all copies of the command processor will share the same 
  553. directory history, and any changes made to the list in one copy will affect all 
  554. other copies. 
  555.  
  556. You can control the type of directory history list on the Startup page of the 
  557. OPTION dialogs, with the LocalDirHistory directive in 4OS2.INI, with the /L and 
  558. /LD startup options, and with the /L and /LD options of the START command. 
  559.  
  560. There is no fixed rule for deciding whether to use a local or global directory 
  561. history list.  Depending on your work style, you may find it most convenient to 
  562. use one type, or a mixture of types in different sessions or shells.  We 
  563. recommend that you start with the default setting, then modify it if you find a 
  564. situation where the default is not convenient. 
  565.  
  566. If you select a global directory list, you can share the list among all copies 
  567. of the command processor running in any session.  When you close all 4OS2 
  568. sessions, the memory for the global directory history list is released, and a 
  569. new, empty list is created the next time you start 4OS2. 
  570.  
  571. If you want the list to be retained in memory even when no command processor 
  572. session is running, you need to execute the SHRALIAS command, which loads a 
  573. program to perform this service for the global command history, directory 
  574. history, and alias lists. 
  575.  
  576. Whenever you start a secondary shell which uses a local directory history list, 
  577. it inherits a copy of the directory history from the previous shell. However, 
  578. any changes to the list made in the secondary shell will affect only that 
  579. shell.  If you want changes made in a secondary shell to affect the previous 
  580. shell, use a global directory history list in both shells. 
  581.  
  582.  
  583. ΓòÉΓòÉΓòÉ 2.7. Multiple Commands ΓòÉΓòÉΓòÉ
  584.  
  585. You can type several commands on the same command line, separated by an 
  586. ampersand [&].  For example, if you know you want to copy all of your .TXT 
  587. files to drive A: and then run CHKDSK to be sure that drive A's file structure 
  588. is in good shape, you could enter the following command: 
  589.  
  590.         [c:\] copy *.txt a: & chkdsk a:
  591.  
  592. You may put as many commands on the command line as you wish, as long as the 
  593. total length of the command line does not exceed 1023 characters. 
  594.  
  595. You can use multiple commands in alias definitions and batch files as well as 
  596. from the command line. 
  597.  
  598. If you don't like using the default command separator, you can pick another 
  599. character using the SETDOS /C command or the CommandSep directive in the .INI 
  600. file.  If you plan to share aliases or batch files between 4OS2 and 4DOS, 4NT, 
  601. or Take Command, see Special Character Compatibility for details about choosing 
  602. compatible command separators for two or more products. 
  603.  
  604.  
  605. ΓòÉΓòÉΓòÉ 2.8. Expanding and Disabling Aliases ΓòÉΓòÉΓòÉ
  606.  
  607. A few command line options are specifically related to aliases, and are 
  608. documented briefly here for completeness. 
  609.  
  610. You can expand an alias on the command line and view or edit the results by 
  611. pressing Ctrl-F before the command is executed.  Doing so is especially useful 
  612. when you are developing and debugging a complex alias or if you want to make 
  613. sure that an alias that you may have forgotten won't change the intent of your 
  614. command. 
  615.  
  616. At times, you may want to temporarily disable an alias that you have defined. 
  617. To do so, precede the command with an asterisk [*].  For example, if you have 
  618. an alias for DIR which changes the display format, you can use the following 
  619. command to bypass the alias and display the directory in the standard format: 
  620.  
  621.         [c:\] *dir
  622.  
  623.  
  624. ΓòÉΓòÉΓòÉ 2.9. Command Line Help ΓòÉΓòÉΓòÉ
  625.  
  626. You can start the online help system at the command line by entering HELP or 
  627. HELP plus a topic, or by pressing the F1 key at any time. 
  628.  
  629. If you have already typed part or all of a command on the line, the help system 
  630. will provide "context-sensitive" help by using the first word on the line as a 
  631. help topic.  If it's a valid topic, you will see help for that topic 
  632. automatically; if not, you will see a table of contents and you can then pick 
  633. the topic you want.  For example, if you press F1 after entering each of the 
  634. command lines shown below you will get the display indicated: 
  635.  
  636.         [c:\]                  Topic list / table of contents
  637.         [c:\] copy *.* a:      Help on COPY
  638.         [c:\] c:\util\map      Topic list / table of contents
  639.  
  640. For quick help you can type the name of any internal command at the prompt, 
  641. followed by a slash and a question mark [/?] like this: 
  642.  
  643.         copy /?
  644.  
  645. This will show you help for the command in a "quick-reference" style (the 
  646. output can be redirected).  The /? option may not work correctly if you have 
  647. redefined how the command operates with an alias.  In this case you may need to 
  648. add an asterisk to the beginning of the command to disable alias processing: 
  649.  
  650.         alias copy copy /r
  651.         *copy /?
  652.  
  653. /? will only access the help system when you use it with an internal command. 
  654. If you use it with an external command name, the external command will be 
  655. executed and will interpret the /? parameter according to its own rules.  Some 
  656. external commands, including some external utility programs, do display help 
  657. when run with a /? parameter, but this a characteristic of these commands and 
  658. does not depend on the command processor.  Many other external commands do not 
  659. have this feature. 
  660.  
  661.  
  662. ΓòÉΓòÉΓòÉ 2.10. Command-Line Length Limits ΓòÉΓòÉΓòÉ
  663.  
  664. When you first enter a command at the prompt or in an alias or batch file, it 
  665. can be up to 1,023 characters long. 
  666.  
  667. As 4OS2 scans the command line and substitutes the contents of aliases and 
  668. environment variables for their names, the line usually gets longer.  This 
  669. expanded line is stored in an internal buffer which allows each individual 
  670. command to grow to 1,023 characters during the expansion process.  In addition, 
  671. if you have multiple commands on a single line, during expansion the entire 
  672. line can grow to as much as 2,047 characters.  If your use of aliases or 
  673. environment variables causes the command line to exceed either of these limits 
  674. as it is expanded, you will see a "Command line too long" error and the 
  675. remainder of the line will not be executed. 
  676.  
  677.  
  678. ΓòÉΓòÉΓòÉ 3. File Selection ΓòÉΓòÉΓòÉ
  679.  
  680. Most internal commands (like COPY, DIR, etc.) work on a file or a group of 
  681. files.  Besides typing the exact name of the file you want to work with, you 
  682. can use several shorthand forms for naming or selecting files and the 
  683. applications associated with them. 
  684.  
  685. Most of the features explained in this section apply to 4OS2 commands only, and 
  686. can not be used to pass file names to external programs unless those programs 
  687. were specifically written to support these features. 
  688.  
  689. The file selection features are: 
  690.  
  691.             Extended Parent Directory Names 
  692.             Wildcards 
  693.             Date, Time, and Size Ranges 
  694.             File Exclusion Ranges 
  695.             Multiple Filenames 
  696.             Include Lists 
  697.             Executable Extensions 
  698.  
  699.  
  700. ΓòÉΓòÉΓòÉ 3.1. Extended Parent Directory Names ΓòÉΓòÉΓòÉ
  701.  
  702. 4OS2 allows you to extend the traditional syntax for naming the parent 
  703. directory, by adding additional [.] characters.  Each additional [.] represents 
  704. an additional directory level above the current directory.  For example, 
  705. .\FILE.DAT refers to a file in the current directory, ..\FILE.DAT refers to a 
  706. file one level up (in the parent directory), and ...\FILE.DAT refers to a file 
  707. two levels up (in the parent of the parent directory).  If you are in the 
  708. C:\DATA\FINANCE\JANUARY directory and want to copy the file LETTERS.DAT from 
  709. the directory C:\DATA to drive A: 
  710.  
  711.         [C:\DATA\FINANCE\JANUARY] copy ...\LETTERS.DAT A:
  712.  
  713.  
  714. ΓòÉΓòÉΓòÉ 3.2. Wildcards ΓòÉΓòÉΓòÉ
  715.  
  716. Wildcards let you specify a file or group of files by typing a partial 
  717. filename.  The appropriate directory is scanned to find all of the files that 
  718. match the partial name you have specified. 
  719.  
  720. Wildcards are usually used to specify which files should be processed by a 
  721. command.  If you need to specify which files should not be processed see File 
  722. Exclusion Ranges (for internal commands), or EXCEPT (for external commands). 
  723.  
  724. Most internal commands accept filenames with wildcards anywhere that a full 
  725. filename can be used.  There are two wildcard characters, the asterisk [*] and 
  726. the question mark [?], plus a special method of specifying a range of 
  727. permissible characters. 
  728.  
  729. An asterisk [*] in a filename means "any zero or more characters in this 
  730. position."  For example, this command will display a list of all files in the 
  731. current directory: 
  732.  
  733.         [c:\] dir *.*
  734.  
  735. If you want to see all of the files with a .TXT extension, you could type this: 
  736.  
  737.         [c:\] dir *.txt
  738.  
  739. If you know that the file you are looking for has a base name that begins with 
  740. ST and an extension that begins with .D, you can find it this way.  Filenames 
  741. such as STATE.DAT, STEVEN.DOC, and ST.D will all be displayed: 
  742.  
  743.         [c:\] dir st*.d*
  744.  
  745. With 4OS2, you can also use the asterisk to match filenames with specific 
  746. letters somewhere inside the name.  The following example will display any file 
  747. with a .TXT extension that has the letters AM together anywhere inside its base 
  748. name.  It will, for example, display AMPLE.TXT, STAMP.TXT, CLAM.TXT, and AM.TXT 
  749.  
  750.         [c:\] dir *am*.txt
  751.  
  752. A question mark [?] matches any single filename character.  You can put the 
  753. question mark anywhere in a filename and use as many question marks as you 
  754. need.  The following example will display files with names like LETTER.DOC and 
  755. LATTER.DAT, and LITTER.DU : 
  756.  
  757.         [c:\] dir l?tter.d??
  758.  
  759. The use of an asterisk wildcard before other characters, and of the character 
  760. ranges discussed below, are enhancements to the standard wildcard syntax, and 
  761. may not work properly with software other than 4OS2 and Take Command. 
  762.  
  763. "Extra" question marks in your wildcard specification are ignored if the file 
  764. name is shorter than the wildcard specification.  For example, if you have 
  765. files called LETTER.DOC, LETTER1.DOC, and LETTERA.DOC, this command will 
  766. display all three names: 
  767.  
  768.         [c:\] dir letter?.doc
  769.  
  770. The file LETTER.DOC is included in the display because the "extra" question 
  771. mark at the end of "LETTER? " is ignored when matching the shorter name LETTER. 
  772.  
  773. In some cases, the question mark wildcard may be too general.  You can also 
  774. specify what characters you want to accept (or exclude) in a particular 
  775. position in the filename by using square brackets. Inside the brackets, you can 
  776. put the individual acceptable characters or ranges of characters.  For example, 
  777. if you wanted to match LETTER0.DOC through LETTER9.DOC, you could use this 
  778. command: 
  779.  
  780.         [c:\] dir letter[0-9].doc
  781.  
  782. You could find all files that have a vowel as the second letter in their name 
  783. this way.  This example also demonstrates how to mix the wildcard characters: 
  784.  
  785.         [c:\] dir ?[aeiouy]*.*
  786.  
  787. You can exclude a group of characters or a range of characters by using an 
  788. exclamation mark [!] as the first character inside the brackets.  This example 
  789. displays all filenames that are at least 2 characters long except those which 
  790. have a vowel as the second letter in their names: 
  791.  
  792.         [c:\] dir ?[!aeiouy]*.*
  793.  
  794. The next example, which selects files such as AIP, BIP, and TIP but not NIP, 
  795. demonstrates how you can use multiple ranges inside the brackets.  It will 
  796. accept a file that begins with an A, B, C, D, T, U, or V: 
  797.  
  798.         [c:\] dir [a-dt-v]ip
  799.  
  800. You may use a question mark character inside the brackets, but its meaning is 
  801. slightly different than a normal (unbracketed) question mark wildcard.  A 
  802. normal question mark wildcard matches any character, but will be ignored when 
  803. matching a name shorter than the wildcard specification, as described above.  A 
  804. question mark inside brackets will match any character, but will not be 
  805. discarded when matching shorter filenames.  For example: 
  806.  
  807.         [c:\] dir letter[?].doc
  808.  
  809. will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC. 
  810.  
  811. A pair of brackets with no characters between them [], or an exclamation point 
  812. and question mark together [!?], will match only if there is no character in 
  813. that position.  For example, 
  814.  
  815.         [c:\] dir letter[].doc
  816.  
  817. will not display LETTER1.DOC or LETTERA.DOC, but will display LETTER.DOC.  This 
  818. is most useful for commands like 
  819.  
  820.         [c:\] dir /I"[]" *.btm
  821.  
  822. which will display a list of all .BTM files which don't have a description, 
  823. because the empty brackets match only an empty description string (DIR /I 
  824. selects files to display based on their descriptions). 
  825.  
  826. You can repeat any of the wildcard characters in any combination you desire 
  827. within a single file name.  For example, the following command lists all files 
  828. which have an A, B, or C as the third character, followed by zero or more 
  829. additional characters, followed by a D, E, or F, followed optionally by some 
  830. additional characters, and with an extension beginning with P or Q.  You 
  831. probably won't need to do anything this complex, but we've included it to show 
  832. you the flexibility of extended wildcards: 
  833.  
  834.         [c:\] dir ??[abc]*[def]*.[pq]*
  835.  
  836. You can also use the square bracket wildcard syntax to work around a conflict 
  837. between long filenames containing semicolons [;], and the use of a semicolon to 
  838. indicate an include list. For example, if you have a file on an HPFS drive 
  839. named C:\DATA\LETTER1;V2 and you enter this command: 
  840.  
  841.         [c:\] del \data\letter1;v2
  842.  
  843. you will not get the results you expect.  Instead of deleting the named file, 
  844. 4OS2 will attempt to delete LETTER1 and then V2, because the semicolon 
  845. indicates an include list.  However if you use square brackets around the 
  846. semicolon it will be interpreted as a filename character, and not as an include 
  847. list separator.  For example, this command would delete the file named above: 
  848.  
  849.         [c:\] del \data\letter1[;]v2
  850.  
  851.  
  852. ΓòÉΓòÉΓòÉ 3.3. Ranges ΓòÉΓòÉΓòÉ
  853.  
  854.             Date, Time, and Size Ranges 
  855.             File Exclusion Ranges 
  856.  
  857.  
  858. ΓòÉΓòÉΓòÉ 3.3.1. Date, Time, and Size Ranges ΓòÉΓòÉΓòÉ
  859.  
  860. Most internal commands which accept wildcards also allow date, time, and size 
  861. ranges to further define the files that you wish to work with.  4OS2 will 
  862. examine each file's size and timestamp (a record of when the file was created, 
  863. last modified, or last accessed) to determine if the file meets the range 
  864. criteria you have specified. 
  865.  
  866. (4OS2 also supports File Exclusion Ranges to exclude files from a command. 
  867. These are similar to date, time, and size ranges, but have a slightly different 
  868. purpose and therefore are documented separately.) 
  869.  
  870. A range begins with the switch character (/), followed by a left square bracket 
  871. ("[") and a character that specifies the range type:  "s" for a size range, "d" 
  872. for a date range, or "t" for a time range.  The "s", "d", or "t" is followed by 
  873. a start value, and an optional comma and end value.  The range ends with a 
  874. right square bracket ("]").  For example, to select files between 100 and 200 
  875. bytes long you could use the range /[s100,200]. 
  876.  
  877. All ranges are inclusive.  For example, a size range which selects files from 
  878. 10,000 to 20,000 bytes long will match files that are exactly 10,000 bytes and 
  879. 20,000 bytes long, as well as all sizes in between; a date range that selects 
  880. files last modified between 10-27-97 and 10-30-97 will include files modified 
  881. on each of those dates, and on the two days in between. 
  882.  
  883. If you reverse range start and end values the command processor will recognize 
  884. the reversal, and will use the second (lower) value as the start point of the 
  885. range and the first (higher) value as its end point.   For example, the range 
  886. above for files between 100 and 200 bytes long could also be entered as 
  887. /[s200,100]. 
  888.  
  889. See the individual range types for details on specifying ranges: 
  890.  
  891.             Date Ranges 
  892.             Time Ranges 
  893.             Size Ranges 
  894.  
  895.  Using Ranges 
  896.  
  897.  If you combine two types of ranges, a file must satisfy both ranges to be 
  898.  included.  For example, /[d2-8-97,2-9-97] /[s1024,2048] means files last 
  899.  modified between February 8 and February 9, 1997, which are also between 1,024 
  900.  and 2,048 bytes long. 
  901.  
  902.  When you use a date, time, or size range in a command, it should immediately 
  903.  follow the command name.  Unlike some command switches which apply to only 
  904.  part of the command line, the range usually applies to all file names 
  905.  specified for the command.  Any exceptions are noted in the descriptions of 
  906.  individual commands. 
  907.  
  908.  For example, to get a directory of all the *.C files dated October 1, 1997, 
  909.  you could use this command: 
  910.  
  911.           [c:\] dir /[d10-1-97,+0] *.c
  912.  
  913.  To delete all of the 0-byte files on your hard disk, you could use this 
  914.  command: 
  915.  
  916.           [c:\] del /[s0,0] *.* /s
  917.  
  918.  And to copy all of the non-zero byte files that you changed yesterday or today 
  919.  to your floppy disk, you can use this command: 
  920.  
  921.           [c:\] copy /[d-1] /[s1] *.* a:
  922.  
  923.  The HPFS file system maintains 3 sets of dates and times for each file: 
  924.  creation, last access, and last write.  By default, date and time ranges work 
  925.  with the last write time stamp. You can use the "last access" (a) or "created" 
  926.  (c) time stamp in a date or time range with the syntax: 
  927.  
  928.           /[da...]  or  /[dc...]  or  /[ta...]  or  /[tc...]
  929.  
  930.  For example, to select files that were last accessed yesterday or today: 
  931.  
  932.           /[da-1]
  933.  
  934.  Date, time, and size ranges can be used with the ATTRIB, COPY, DEL, DESCRIBE, 
  935.  DIR, EXCEPT, FFIND, FOR, LIST, MOVE, RD, REN, SELECT, and TYPE commands.  They 
  936.  cannot be used with filename completion or in filename arguments for variable 
  937.  functions. 
  938.  
  939.  
  940. ΓòÉΓòÉΓòÉ 3.3.1.1. Date Ranges ΓòÉΓòÉΓòÉ
  941.  
  942. Date ranges select files that were created or last modified at any time between 
  943. the two dates.  For example, /[d12-1-97,12-5-97] selects files that were last 
  944. modified between December 1, 1997, and December 5, 1997. 
  945.  
  946. The time for the starting date defaults to 00:00:00 and the time for the ending 
  947. date defaults to 23:59:59.  You can alter these defaults, if you wish, by 
  948. including a start and stop time inside the date range.  The time is separated 
  949. from the date with an at sign [@].  For example, the range 
  950. /[d7-1-97@8:00a,7-3-97@6:00p] selects files that were modified at any time 
  951. between 8:00 am on July 1, 1997 and 6:00 pm on July 3, 1997.  If you prefer, 
  952. you can specify the times in 24-hour format (e.g., @18:00 for the end time in 
  953. the previous example). 
  954.  
  955. If you omit the second argument in a date range, 4OS2 substitutes the current 
  956. date and time.  For example, /[d10-1-97] selects files dated between October 1, 
  957. 1997 and today. 
  958.  
  959. You can use an offset value for either the beginning or ending date, or both. 
  960. An offset begins with a plus sign [+] or a minus sign [-] followed by an 
  961. integer.  If you use an offset for the second value, it is calculated relative 
  962. to the first.  If you use an offset for the first (or only) value, the current 
  963. date is used as the basis for calculation.  For example: 
  964.  
  965.         Specification       Selects Files
  966.  
  967.         /[d10-27-97,+3]     modified between 10-27-97 and 10-30-97
  968.         /[d10-27-97,-3]     modified between 10-24-97 and 10-27-97
  969.         /[d-0]              modified today (from today minus zero days, to today)
  970.         /[d-1]              modified yesterday or today (from today minus one day,
  971.                             to today)
  972.         /[d-1,+0]           modified yesterday (from today minus one day, to zero
  973.                             days after that)
  974.  
  975. As a shorthand way of specifying files modified today, you can also use /[d]; 
  976. this has the same effect as the /[d-0] example shown above. 
  977.  
  978. To select files last modified n days ago or earlier, use /[dn,1/1/80].  For 
  979. example, to get a directory of all files last modified 3 days or more before 
  980. today (i.e., those files not modified within the last 3 days), you could use 
  981. this command: 
  982.  
  983.         [c:\] dir /[d-3,1/1/80]
  984.  
  985. This reversed date range (with the later date given first) will be handled 
  986. correctly by 4OS2.  It takes advantage of the facts that an offset in the start 
  987. date is relative to today, and that the base or "zero" point for PC file dates 
  988. is January 1, 1980. 
  989.  
  990. You cannot use offsets in the time portion of a date range (the part after an 
  991. at sign), but you can combine a time with a date offset.  For example, 
  992. /[d12-8-97@12:00,+2@12:00] selects files that were last modified between noon 
  993. on December 8 and noon on December 10, 1997.  Similarly, /[d-2@15:00,+1] 
  994. selects files last modified between 3:00 pm the day before yesterday and the 
  995. end of the day one day after that, i.e., yesterday.  The second time defaults 
  996. to the end of the day because no time is given. 
  997.  
  998. The HPFS file system maintains 3 sets of dates and times for each file: 
  999. creation, last access, and last write.  By default, date ranges work with the 
  1000. last write date/time stamp.  You can use the "last access" (a) or "created" (c) 
  1001. date/time stamp in a date range with the syntax: 
  1002.  
  1003.         /[da...]  or  /[dc...]
  1004.  
  1005. For example, to select files that were last accessed yesterday or today: 
  1006.  
  1007.         /[da-1]
  1008.  
  1009.  
  1010. ΓòÉΓòÉΓòÉ 3.3.1.2. Time Ranges ΓòÉΓòÉΓòÉ
  1011.  
  1012. A time range specifies a file modification time without reference to the date. 
  1013. For example, to select files modified between noon and 2:00 pm on any date, use 
  1014. /[t12:00p,2:00p].  The times in a time range can either be in 12-hour format, 
  1015. with a trailing "a" for AM or "p" for PM, or in 24-hour format. 
  1016.  
  1017. If you omit the second argument in a time range, you will select files that 
  1018. were modified between the first time and the current time, on any date.  You 
  1019. can also use offsets, beginning with a plus sign [+] or a minus sign [-] for 
  1020. either or both of the arguments in a time range.  The offset values are 
  1021. interpreted as minutes.  Some examples: 
  1022.  
  1023.         Specification       Selects Files
  1024.  
  1025.         /[t12:00p,+120]     modified between noon and 2:00 PM on any date
  1026.         /[t-120,+120]       modified between two hours ago and the
  1027.                             current time on any date
  1028.         /[t0:00,11:59]      modified in the morning on any date
  1029. The HPFS file system maintains 3 sets of date and time for each file: creation, 
  1030. last access, and last write.  By default, time ranges work with the last write 
  1031. time stamp.  You can use the "last access" (a) or "created" (c) time stamp in a 
  1032. time range with the syntax: 
  1033.  
  1034.         /[ta...]  or  /[tc...]
  1035.  
  1036.  
  1037. ΓòÉΓòÉΓòÉ 3.3.1.3. Size Ranges ΓòÉΓòÉΓòÉ
  1038.  
  1039. Size ranges simply select files whose size is between the limits given.  For 
  1040. example, /[s10000,20000] selects files between 10,000 and 20,000 bytes long. 
  1041.  
  1042. Either or both values in a size range can end with "k" to indicate thousands of 
  1043. bytes, "K" to indicate kilobytes (1,024 bytes), "m" to indicate millions of 
  1044. bytes, or "M" to indicate megabytes (1,048,576 bytes).  For example, the range 
  1045. above could be rewritten as /[s10k,20k]. 
  1046.  
  1047. All ranges are inclusive.  Both examples above will match files that are 
  1048. exactly 10,000 bytes and 20,000 bytes long, as well as all sizes in between. 
  1049.  
  1050. The second argument of a size range is optional.  If you use a single argument, 
  1051. like /[s10k], you will select files of that size or larger.  You can also 
  1052. precede the second argument with a plus sign [+]; when you do, it is added to 
  1053. the first value to determine the largest file size to include in the search. 
  1054. For example,  /[s10k,+1k] select files from 10,000 through 11,000 bytes in 
  1055. size. 
  1056.  
  1057. Some further examples of size ranges: 
  1058.  
  1059.         Specification       Selects Files
  1060.  
  1061.         /[s0,0]             of length zero (empty)
  1062.         /[s1M]              1 megabyte or more in length
  1063.         /[s10k,+200]        between 10,000 and 10,200 bytes
  1064.  
  1065.  
  1066. ΓòÉΓòÉΓòÉ 3.3.2. File Exclusion Ranges ΓòÉΓòÉΓòÉ
  1067.  
  1068. Most internal commands which accept wildcards also accept file exclusion ranges 
  1069. to further define the files that you wish to work with.  4OS2 examines each 
  1070. file name and excludes files that match the names you have specified in a file 
  1071. exclusion range. 
  1072.  
  1073. A file exclusion range begins with the switch character (usually a slash), 
  1074. followed by a left square bracket and an exclamation mark ("[!")  The range 
  1075. ends with a right square bracket ("]"). 
  1076.  
  1077. Inside the brackets, you can list one or more filenames to be excluded from the 
  1078. command.  The filenames can include wildcards and extended wildcards, but 
  1079. cannot include path names or drive letters. 
  1080.  
  1081. The following example will display all files in the current directory except 
  1082. backup files (files with the extension .BAK or .BKP): 
  1083.  
  1084.         [c:\] dir /[!*.bak *.bkp] *.*
  1085.  
  1086. You can combine file exclusion ranges with date, time, and size ranges  This 
  1087. example displays all files that are 10K bytes or larger in size and that were 
  1088. created in the last 7 days, except .C and .H files: 
  1089.  
  1090.         [c:\] dir /[s10k] /[d-7] /[!*.c *.h] *.*
  1091.  
  1092. File exclusion ranges will only work for 4OS2 internal commands.  The EXCEPT 
  1093. command can be used to exclude files from processing by many external commands. 
  1094.  
  1095.  
  1096. ΓòÉΓòÉΓòÉ 3.4. Multiple Filenames ΓòÉΓòÉΓòÉ
  1097.  
  1098. Most file processing commands can work with multiple files at one time.  To use 
  1099. multiple file names, you simply list the files one after another on the command 
  1100. line, separated by spaces.  You can use wildcards in any or all of the 
  1101. filenames.  For example, to copy all .TXT and .DOC files from the current 
  1102. directory to drive A, you could use this command: 
  1103.  
  1104.         [c:\] copy *.txt *.doc a:
  1105.  
  1106. If the files you want to work with are not in the default directory, you must 
  1107. include the full path with each filename: 
  1108.  
  1109.         [c:\] copy a:\details\file1.txt a:\details\file1.doc c:
  1110.  
  1111. Multiple filenames are handy when you want to work with a group of files which 
  1112. cannot be defined with a single filename and wildcards.  They let you be very 
  1113. specific about which files you want to work with in a command. 
  1114.  
  1115. When you use multiple filenames with a command that expects both a source and a 
  1116. destination, like COPY or MOVE, be sure that you always include a specific 
  1117. destination on the command line.  If you don't, the command will assume that 
  1118. the last filename is the destination and may overwrite important files. 
  1119.  
  1120. Like extended wildcards and include lists, multiple filenames will work with 
  1121. internal commands but not with external programs, unless those programs have 
  1122. been written to handle multiple file names on the command line. 
  1123.  
  1124. If you have a list of files to process that's too long to put on the command 
  1125. line or too time-consuming to type, see FOR or SELECT for another way of 
  1126. passing multiple file names to a command. 
  1127.  
  1128.  
  1129. ΓòÉΓòÉΓòÉ 3.5. Include Lists ΓòÉΓòÉΓòÉ
  1130.  
  1131. Any internal command that accepts multiple filenames will also accept one or 
  1132. more include lists.  An include list is simply a group of filenames, with or 
  1133. without wildcards, separated by semicolons [;].  All files in the include list 
  1134. must be in the same directory.  You may not add a space on either side of the 
  1135. semicolon. 
  1136.  
  1137. For example, you can shorten this command which uses multiple file names: 
  1138.  
  1139.         [c:\] copy a:\details\file1.txt a:\details\file1.doc c:
  1140.  
  1141. to this using an include list: 
  1142.  
  1143.         [c:\] copy a:\details\file1.txt;file1.doc c:
  1144.  
  1145. Include lists are similar to multiple filenames, but have three important 
  1146. differences.  First, you don't have to repeat the path to your files if you use 
  1147. an include list, because all of the included files must be in the same 
  1148. directory.  Second, if you use include lists, you aren't as likely to 
  1149. accidentally overwrite files if you forget a destination path for commands like 
  1150. COPY, because the last name in the list will be part of the include list, and 
  1151. won't be seen as the destination file name.  (Include lists can only be used as 
  1152. the source parameter - the location files are coming from - for COPY and other 
  1153. similar commands.  They cannot be used to specify a destination for files.) 
  1154.  
  1155. Third, multiple filenames and include lists are processed differently by the 
  1156. DIR and SELECT commands. If you use multiple filenames, all of the files 
  1157. matching the first filename are processed, then all of the files matching the 
  1158. second name, and so on.  When you use an include list, all files that match any 
  1159. entry in the include list are processed together, and will appear together in 
  1160. the directory display or SELECT list.  You can see this difference clearly if 
  1161. you experiment with both techniques and the DIR command.  For example: 
  1162.  
  1163.         [c:\] dir *.txt *.doc
  1164.  
  1165. will list all the .TXT files with a directory header, the file list, and a 
  1166. summary of the total number of files and bytes used.  Then it will do the same 
  1167. for the .DOC files.  However, 
  1168.  
  1169.         [c:\] dir *.txt;*.doc
  1170.  
  1171. will display all the files in one list. 
  1172.  
  1173.  Like extended wildcards and multiple filenames, the include list feature will 
  1174. work with internal commands, but not with external programs (unless they have 
  1175. been programmed especially to support them).  The maximum length of an include 
  1176. list is 260 characters. 
  1177.  
  1178.  
  1179. ΓòÉΓòÉΓòÉ 3.6. Executable Extensions ΓòÉΓòÉΓòÉ
  1180.  
  1181. The syntax for creating an executable extension is: 
  1182.  
  1183.         set .ext=command [options]
  1184.  
  1185. This tells 4OS2 to run the specified command whenever you name a file with the 
  1186. extension .ext at the prompt. 
  1187.  
  1188. .EXT is the executable file extension; command is the name of the internal 
  1189. command, external program, alias, or batch file to run; and [options] are any 
  1190. command-line startup options you want to specify for the program, batch file, 
  1191. or alias. 
  1192.  
  1193. Normally, when you type a filename (as opposed to an alias or internal command 
  1194. name) as the first word on the command line, 4OS2 looks for a file with that 
  1195. name to execute.  The file's extension may be .EXE or .COM to indicate that it 
  1196. contains a program, it may have a batch file extension like .BTM, or the file's 
  1197. contents may indicate that it is executable. 
  1198.  
  1199. You can add to the default list of extensions, and have 4OS2 take the action 
  1200. you want with files that are not executable programs or batch files.  The 
  1201. action taken is always based on the file's extension.  For example, you could 
  1202. start your text editor whenever you type the name of a .DOC file, or start your 
  1203. database manager whenever you type the name of a .DAT file. 
  1204.  
  1205. You can use environment variables to define the internal command, external 
  1206. program, batch file, or alias to run for each defined file extension.  To 
  1207. create an executable extension, use the SET command to create a new environment 
  1208. variable.  An environment variable is recognized as an executable extension if 
  1209. its name begins with a period. 
  1210.  
  1211. For example, if you want to run a word processor called EDITOR whenever you 
  1212. type the name of a file that has an extension of .EDT, you could use this 
  1213. command: 
  1214.  
  1215.         [c:\] set .edt=c:\edit\editor.exe
  1216.  
  1217. If the command specified in an executable extension is a batch file or external 
  1218. program, 4OS2 will search the PATH for it if necessary.  However, you can make 
  1219. sure that the correct program or batch file is used, and speed up the 
  1220. executable extension, by specifying the full name including drive, path, 
  1221. filename, and extension. 
  1222.  
  1223. Once an executable extension is defined, any time you name a file with that 
  1224. extension the corresponding program, batch file, or alias is started, with the 
  1225. name of your file passed to it as a parameter. 
  1226.  
  1227. The following example defines B.EXE (the Boxer text editor) as the processor 
  1228. for .MAK files: 
  1229.  
  1230.         [c:\] set .mak=c:\boxer\b.exe -s
  1231.  
  1232. With this definition, if you have a file named INIT.MAK in the current 
  1233. directory and enter the command: 
  1234.  
  1235.         [c:\source] init
  1236.  
  1237. 4OS2 will execute the command: 
  1238.  
  1239.         c:\boxer\b.exe -s c:\source\init.mak
  1240.  
  1241. Notice that the full pathname of INIT.MAK is automatically included.  If you 
  1242. enter parameters on the command line, they are appended to the end of the 
  1243. command.  For example, if you changed the above entry to: 
  1244.  
  1245.         [c:\source] init -w
  1246.  
  1247. the command processor would execute the command: 
  1248.  
  1249.         c:\boxer\b.exe -s c:\source\init.mak -w
  1250.  
  1251. In order for executable extensions to work, the command, program, batch file, 
  1252. or alias must be able to interpret the command line properly.  For example, if 
  1253. a program you want to run doesn't accept a file name on its command line as 
  1254. shown in these examples, then executable extensions won't work with that 
  1255. program. 
  1256.  
  1257. Executable extensions may include wildcards, so you could, for example, run 
  1258. your text editor for any file with an extension beginning with T by defining an 
  1259. executable extension called .T*.  Extended wildcards (e.g., DO[CT] for .DOC and 
  1260. .DOT files) may also be used. 
  1261.  
  1262. The search for executable files starts in the current directory, then proceeds 
  1263. to each subdirectory specified by the PATH environment variable (if a "." is 
  1264. used in the PATH the current directory is not searched first; see the PATH 
  1265. command for details). 
  1266.  
  1267. You may need to take this search order into account when using executable 
  1268. extensions.  Using the .MAK example above, if you had a file named FORMAT.MAK 
  1269. in the current directory and entered the command FORMAT A:, your command would 
  1270. run the Boxer editor specified by the executable extension, instead of finding 
  1271. the standard OS/2 FORMAT command as you perhaps intended.  You can get around 
  1272. this by remembering that the OS/2 FORMAT command is in the file FORMAT.COM.  If 
  1273. you entered the command FORMAT.COM A: then the .MAK executable extension would 
  1274. not be checked, and the search would continue until it found the FORMAT.COM 
  1275. file. 
  1276.  
  1277. To remove an executable extension, use the UNSET command to remove the 
  1278. corresponding variable. 
  1279.  
  1280.  
  1281. ΓòÉΓòÉΓòÉ 4. Directory Navigation ΓòÉΓòÉΓòÉ
  1282.  
  1283. The operating system and command processor remember both a current or default 
  1284. drive for your system as a whole, and a current or default directory for every 
  1285. drive in your system.  The current directory on the current drive is sometimes 
  1286. called the current working directory. 
  1287.  
  1288. With traditional command processors, you change the current drive by typing the 
  1289. new drive letter plus a colon at the prompt, and you change the current working 
  1290. directory with the CD command.  4OS2 supports those standard features, and 
  1291. offer a number of enhancements to make directory navigation much simpler and 
  1292. faster. 
  1293.  
  1294. The 4OS2 directory navigation features are in three groups:  features which 
  1295. help the command processor find the directory you want, methods for initiating 
  1296. a directory change with a minimal amount of typing, and methods for returning 
  1297. easily to directories you've recently used.  Each group is summarized below. 
  1298.  
  1299. Finding Directories 
  1300.  
  1301. Traditional command processors require you to explicitly type the name of the 
  1302. directory you want to change to.  4OS2 support this method, and also offer two 
  1303. significant enhancements: 
  1304.  
  1305.     *   Extended Directory Searches allow the command processor to search a 
  1306.         "database" of all the directories on your system to find the one you 
  1307.         want. 
  1308.  
  1309.     *   The CDPATH allows you to enter a specific list of directories to be 
  1310.         searched, rather than searching a database.  Use CDPATH instead of 
  1311.         Extended Directory Searches if you find the extended searches too 
  1312.         broad, or your hard drive has too many directories for an efficient 
  1313.         search. 
  1314.  
  1315.  Initiating a Directory Change 
  1316.  
  1317.  4OS2 supports the traditional methods of changing directories, and also offers 
  1318.  several more flexible approaches: 
  1319.  
  1320.     *   Automatic directory changes allow you to type a directory name at the 
  1321.         prompt and switch to it automatically, without typing an explicit CD or 
  1322.         similar command. 
  1323.  
  1324.     *   The CD command can change directories on a single drive, and can return 
  1325.         to the most recently used directory. 
  1326.  
  1327.     *   The CDD command changes drive and directory at the same time, and can 
  1328.         return to the most recently used drive and directory. 
  1329.  
  1330.     *   The PUSHD command changes changes the drive and directory like CDD, and 
  1331.         records the previous directory in a directory "stack."  You can view 
  1332.         the stack with DIRS and return to the directory on the top of the stack 
  1333.         with POPD. 
  1334.  
  1335.  CDD, PUSHD, and automatic directory changes can also change to a network drive 
  1336.  and directory mapped to a drive letter or specified with a UNC name (see File 
  1337.  Systems for more information about network directories). 
  1338.  
  1339.   Returning to a Previous Directory 
  1340.  
  1341.  Traditional command processors do not remember previously-used directories, 
  1342.  and can only "return" to a directory by changing back to it with a standard 
  1343.  drive change or CD command.  4OS2 supports three additional methods for 
  1344.  returning to a previous directory: 
  1345.  
  1346.     *   The CD - and CDD - commands can be used to return to the previous 
  1347.         working directory (the one you used immediately before the current 
  1348.         directory).  Use these commands if you are working in two directories 
  1349.         and alternating between them. 
  1350.  
  1351.     *   The directory history window allows you to select one of several 
  1352.         recently-used directories from a popup list and return to it 
  1353.         immediately.  The window displays the contents of the directory history 
  1354.         list. 
  1355.  
  1356.     *   The POPD command will return to the last directory saved by PUSHD. The 
  1357.         directory stack holds 511 characters, enough for 20 to 40 typical drive 
  1358.         and directory entries. 
  1359.  
  1360.  
  1361. ΓòÉΓòÉΓòÉ 4.1. Extended Directory Searches ΓòÉΓòÉΓòÉ
  1362.  
  1363. When you change directories with an automatic directory change, CD, CDD, or 
  1364. PUSHD command, 4OS2 must find the directory you want to change to.  To do so, 
  1365. the command processor first uses the traditional method to find a new 
  1366. directory:  it checks to see whether you have specified either the name of an 
  1367. existing subdirectory below the current directory, or the name of an existing 
  1368. directory with a full path or a drive letter.  If you have, the command 
  1369. processor changes to that directory, and does no further searching. 
  1370.  
  1371. This traditional search method requires that you navigate manually through the 
  1372. directory tree, and type the entire name of each directory you want to change 
  1373. to.  Extended Directory Searches speed up the navigation process dramatically 
  1374. by allowing the command processor to find the directory you want, even if you 
  1375. only enter a small part of its name. 
  1376.  
  1377. When the traditional search method fails, 4OS2 try to find the directory you 
  1378. requested via the CDPATH, then via an Extended Directory Search.  This section 
  1379. covers only Extended Directory Searches, which are more flexible and more 
  1380. commonly used than CDPATH. 
  1381.  
  1382. Extended Directory Searches use a database of directory names to facilitate 
  1383. changing to the correct directory.  The database is used only if Extended 
  1384. Directory Searches are enabled, and if the explicit directory search and CDPATH 
  1385. search fail to find the directory you requested. 
  1386.  
  1387. An extended directory search automatically finds the correct path to the 
  1388. requested directory and changes to it if that directory exists in your 
  1389. directory database.  If more than one directory in the database matches the 
  1390. name you have typed, a popup window appears and you can choose the directory 
  1391. you want. 
  1392.  
  1393. You can control the color, position and size of the popup directory search 
  1394. window from the Command line 2 page of the OPTION dialogs, or with directives 
  1395. in the .INI file, including CDDWinLeft, CDDWinTop, CDDWinWidth, and 
  1396. CDDWinHeight, and CDDWinColors.  You can also change the keys used in the popup 
  1397. window with key mapping directives in 4OS2.INI. 
  1398.  
  1399. To use extended directory searches, you must explicitly enable them and also 
  1400. create the directory database. 
  1401.  
  1402. The Extended Search Database 
  1403.  
  1404. To create or update the database of directory names, use the CDD /S command. 
  1405. When you create the database with CDD /S, you can specify which drives should 
  1406. be included.  If you enable Extended Directory Searches and do not create the 
  1407. database, it will be created automatically the first time it is required, and 
  1408. will include all local hard drives. 
  1409.  
  1410. The database is stored in the file JPSTREE.IDX, which is placed in the root 
  1411. directory of drive C: by default.  The same tree file is used by all JP 
  1412. Software command processors.  You can specify a different location for this 
  1413. file on the Command Line 2 page of the OPTION dialogs, or with the TreePath 
  1414. .INI directive.  If you are using 2 or more of our products on your computer 
  1415. and want to have different drives stored in the database for each, use the 
  1416. dialogs or the TreePath directive to place their database directories in 
  1417. different locations. 
  1418.  
  1419. If you use an internal 4OS2 command to create or delete a directory, the 
  1420. directory database is automatically updated to reflect the change to your 
  1421. directory structure.  The updates occur if the command processor can find the 
  1422. JPSTREE.IDX file in the root directory of drive C: or in the location specified 
  1423. by the TreePath .INI directive. 
  1424.  
  1425. The internal commands which can modify the directory structure and cause 
  1426. automatic updates of the file are MD, RD, COPY /S, DEL /X, MOVE /S, and REN. 
  1427. The MD /N command can be used to create a directory without updating the 
  1428. directory database.  This is useful when creating a temporary directory which 
  1429. you do not want to appear in the database. 
  1430.  
  1431. Enabling Extended Searches 
  1432.  
  1433. To enable extended directory searches and control their operation, you must set 
  1434. the FuzzyCD directive in the .INI file.  You can set FuzzyCD with the Search 
  1435. Level option on the Command Line 2 page of the OPTION dialogs, or by editing 
  1436. the .INI file manually. 
  1437.  
  1438.         If FuzzyCD = 0, extended searches are disabled, the JPSTREE database is 
  1439.         ignored, and CD, CDD, PUSHD, and automatic directory changes search for 
  1440.         directories using only explicit names and CDPATH.  This is the default. 
  1441.  
  1442.         If FuzzyCD = 1 and an extended search is required, then the command 
  1443.         processor will search the JPSTREE database for directory names which 
  1444.         exactly match the name you specified. 
  1445.  
  1446.         If FuzzyCD = 2 and an extended search is required, the command 
  1447.         processor will search the database for exact matches first, just as 
  1448.         when FuzzyCD = 1.  If the requested directory is not found, it will 
  1449.         search the database a second time looking for directory names that 
  1450.         begin with the name you specified. 
  1451.  
  1452.         If FuzzyCD = 3 and an extended search is required, the command 
  1453.         processor will search the database for exact matches first, just as 
  1454.         when FuzzyCD = 1.  If the requested directory is not found, it will 
  1455.         search the database a second time looking for directory names that 
  1456.         contain the name you specified anywhere within them. 
  1457.  
  1458.  For example, suppose that you have a directory called C:\DATA\MYDIR, CDPATH is 
  1459.  not set, and C:\DATA is not the current directory on drive C:.  The following 
  1460.  chart shows what CDD command you might use to change to this directory. 
  1461.  
  1462.         FuzzyCD 
  1463.         Setting     CDD Command 
  1464.  
  1465.          0          [c:\] cdd c:\data\mydir 
  1466.          1          [c:\] cdd mydir 
  1467.          2          [c:\] cdd myd 
  1468.          3          [c:\] cdd yd 
  1469.  
  1470.  An extended directory search is not used if you specify a full directory path 
  1471.  (one beginning with a backslash [\], or a drive letter and a backslash).  If 
  1472.  you use a name which begins with a drive letter (e.g. C:MYDIR ), the extended 
  1473.  search will examine only directories on that drive. 
  1474.  
  1475.  Forcing an Extended Search with Wildcards 
  1476.  
  1477.  Normally you type a specific directory name for the command processor to 
  1478.  locate, and the search proceeds as described in the preceding sections. 
  1479.  However, you can also force the command processor to perform an extended 
  1480.  directory search by using wildcard characters in the directory name.  If you 
  1481.  use a wildcard, an extended search will occur whether or not extended searches 
  1482.  have been enabled. 
  1483.  
  1484.  When 4OS2 is changing directories and it finds wildcards in the directory 
  1485.  name, it skips the explicit search and CDPATH steps and goes directly to the 
  1486.  extended search. 
  1487.  
  1488.  If a single match is found, the change is made immediately.  If more than one 
  1489.  match is found, a popup window is displayed with all matching directories. 
  1490.  
  1491.  Wildcards can only be used in the final directory name in the path (after the 
  1492.  last backslash in the path name).  For example you can find COMM\*A*.* (all 
  1493.  directories whose parent directory is COMM and which have an A somewhere in 
  1494.  their names), but you cannot find CO?M\*A*.* because it uses a wildcard before 
  1495.  the last backslash. 
  1496.  
  1497.  If you use wildcards in the directory name as described here, and the extended 
  1498.  directory search database does not exist, it will be built automatically the 
  1499.  first time a wildcard is used.  You can update the database at any time with 
  1500.  CDD /S. 
  1501.  
  1502.  Internally, extended directory searches use wildcards to scan the directory 
  1503.  database.  If FuzzyCD is set to 2, an extended search looks for the name you 
  1504.  typed followed by an asterisk (i.e. DIRNAME*).  If FuzzyCD is set to 3, it 
  1505.  looks for the name preceded and followed by an asterisk (i.e. *DIRNAME*). 
  1506.  
  1507.  These internal wildcards will be used in addition to any wildcards you use in 
  1508.  the name.  For example if you search for ABC?DEF (ABC followed by any 
  1509.  character followed by DEF) and FuzzyCD is set to 3, the command processor will 
  1510.  actually search the directory database for *ABC?DEF*. 
  1511.  
  1512.  
  1513. ΓòÉΓòÉΓòÉ 4.2. CDPATH ΓòÉΓòÉΓòÉ
  1514.  
  1515. When you change directories with an automatic directory change, CD, CDD, or 
  1516. PUSHD command, 4OS2 must find the directory you want to change to.  To do so, 
  1517. the command processor first uses the traditional method to find a new 
  1518. directory. 
  1519.  
  1520. When the traditional search method fails, 4OS2 tries to find the directory you 
  1521. requested via the CDPATH, then via an Extended Directory Search.  This section 
  1522. covers only the CDPATH. 
  1523.  
  1524. Enabling both CDPATH and Extended Directory Searches can yield confusing 
  1525. results, so we recommend that you do not use both features at the same time. If 
  1526. you prefer to explicitly list where the command processor should look for 
  1527. directories, use CDPATH.  If you prefer to have the command processor look at 
  1528. all of the directory names on your disk, use Extended Directory Searches. 
  1529.  
  1530. CDPATH is an environment variable, and is similar to the PATH variable used to 
  1531. search for executable files:  it contains an explicit list of directories to 
  1532. search when attempting to find a new directory.  The command processor appends 
  1533. the specified directory name to each directory in CDPATH and attempts to change 
  1534. to that drive and directory.  It stops when it finds a match or when it reaches 
  1535. the end of the CDPATH list. 
  1536.  
  1537. CDPATH is ignored if a complete directory name (one beginning with a backslash 
  1538. [ \]) is specified, or if a drive letter is included in the name.  It is only 
  1539. used when a name is given with no drive letter or leading backslash. 
  1540.  
  1541. CDPATH provides a quick way to find commonly used subdirectories in an explicit 
  1542. list of locations.  You can create CDPATH with the SET command.  The format of 
  1543. CDPATH is similar to that of PATH:  a list of directories separated by 
  1544. semicolons [;].  For example, if you want the directory change commands to 
  1545. search the C:\DATA directory, the D:\SOFTWARE directory, and the root directory 
  1546. of drive E:\ for the subdirectories that you name, you should create CDPATH 
  1547. with this command: 
  1548.  
  1549.         [c:\] set cdpath=c:\data;d:\software;e:\
  1550.  
  1551. Suppose you are currently in the directory C:\WP\LETTERS\JANUARY, and you'd 
  1552. like to change to D:\SOFTWARE\UTIL.  You could change directories explicitly 
  1553. with the command: 
  1554.  
  1555.         [c:\wp\letters\january] cdd d:\software\util
  1556.  
  1557. However, because the D:\SOFTWARE directory is listed in your CDPATH variable as 
  1558. shown in the previous example (we'll assume it is the first directory in the 
  1559. list with a UTIL subdirectory), you can simply enter the command 
  1560.  
  1561.         [c:\wp\letters\january] cdd util
  1562.  
  1563. or, using an automatic directory change: 
  1564.  
  1565.         [c:\wp\letters\january] util\
  1566.  
  1567. to change to D:\SOFTWARE\UTIL. 
  1568.  
  1569. As it handles this request, the command processor looks first in the current 
  1570. directory, and attempts to find the C:\WP\LETTERS\JANUARY\UTIL subdirectory. 
  1571. Then it looks at CDPATH, and appends the name you entered, UTIL, to each entry 
  1572. in the CDPATH variable -- in other words, it tries to change to C:\DATA\UTIL, 
  1573. then to D:\SOFTWARE\UTIL.  Because this change succeeds, the search stops and 
  1574. the directory change is complete. 
  1575.  
  1576.  
  1577. ΓòÉΓòÉΓòÉ 5. Other Features ΓòÉΓòÉΓòÉ
  1578.  
  1579.             Page and File Prompts 
  1580.             Redirection and Piping 
  1581.             Using the Keystack 
  1582.             Waiting for Applications to Finish 
  1583.             Critical Errors 
  1584.             Conditional Commands 
  1585.             Command Grouping 
  1586.             Escape Character 
  1587.  
  1588.  
  1589. ΓòÉΓòÉΓòÉ 5.1. Page and File Prompts ΓòÉΓòÉΓòÉ
  1590.  
  1591. Several 4OS2 commands can generate prompts, which wait for you to press a key 
  1592. to view a new page or to perform a file activity. 
  1593.  
  1594. When 4OS2 is displaying information in page mode, for example with a DIR /P or 
  1595. SET /P command, it displays the message 
  1596.  
  1597.         Press Esc to Quit or any other key to continue...
  1598.  
  1599. At this prompt, you can press Esc, Ctrl-C, or Ctrl- Break if you want to quit 
  1600. the command.  You can press almost any other key to continue with the command 
  1601. and see the next page of information. 
  1602.  
  1603. During file processing, if you have activated prompting with a command like DEL 
  1604. /P, you will see this prompt before processing every file: 
  1605.  
  1606.         Y/N/R ?
  1607.  
  1608. You can answer this prompt by pressing Y for "Yes, process this file;"  N for 
  1609. "No, do not process this file;" R for "process the Remainder of the files 
  1610. without further prompting."  You can also press Ctrl-C, Ctrl-Break, or Esc at 
  1611. this prompt to cancel the remainder of the command. 
  1612.  
  1613.  
  1614. ΓòÉΓòÉΓòÉ 5.2. Redirection and Piping ΓòÉΓòÉΓòÉ
  1615.  
  1616. This section covers redirection and piping.  You can use these features to 
  1617. change how 4OS2 and some application programs handle input and output. 
  1618.  
  1619. Internal commands and many external programs get their input from the 
  1620. computer's standard input device and send their output to the standard output 
  1621. device.  Some programs also send special messages to the standard error device. 
  1622. Normally, the keyboard is used for standard input and the video screen for both 
  1623. standard output and standard error. 
  1624.  
  1625. Redirection and piping allow you to change these assignments temporarily. 
  1626.  
  1627. Redirection changes the standard input, standard output, or standard error 
  1628. device for a program or command from the default device (the keyboard or 
  1629. screen), to another device or to a file. 
  1630.  
  1631. Piping changes the standard output and / or standard error device so that the 
  1632. output of one command becomes the standard input for another program or 
  1633. command. 
  1634.  
  1635.  
  1636. ΓòÉΓòÉΓòÉ 5.2.1. Redirection ΓòÉΓòÉΓòÉ
  1637.  
  1638. Redirection can be used to reassign the standard input, standard output, and 
  1639. standard error devices from their default settings (the keyboard and screen) to 
  1640. another device like the printer or serial port, to a file, or to the clipboard. 
  1641. You must use some discretion when you use redirection with a device; there is 
  1642. no way to get input from the printer, for example. 
  1643.  
  1644. Redirection always applies to a specific command, and lasts only for the 
  1645. duration of that command.  When the command is finished, the assignments for 
  1646. standard input, standard output, and standard error revert to whatever they 
  1647. were before the command. 
  1648.  
  1649. In the descriptions below, filename means either the name of a file or of an 
  1650. appropriate device (PRN, LPT1, LPT2, or LPT3 for printers; COM1 to COM4 for 
  1651. serial ports; CON for the keyboard and screen; CLIP: for the clipboard; NUL for 
  1652. the "null" device, etc.). 
  1653.  
  1654. Here are the standard redirection options supported by 4OS2 (see below for 
  1655. additional redirection options using numeric file handles): 
  1656.  
  1657.         < filename          To get input from a file or device instead of from 
  1658.                             the keyboard 
  1659.         > filename          Redirect standard output to a file or device 
  1660.         >& filename         Redirect standard output and standard error to a 
  1661.                             file or device 
  1662.         >&> filename        Redirect standard error only to a file or device 
  1663.  
  1664.  If you want to append output to the end of an existing file, rather than 
  1665.  creating a new file, replace the first ">" in the last three commands above 
  1666.  with ">>" (i.e., use >>, >>&, and >>&>). 
  1667.  
  1668.  To use redirection, place the redirection symbol and filename at the end of 
  1669.  the command line, after the command name and any parameters.  For example, to 
  1670.  redirect the output of the DIR command to a file called DIRLIST, you could use 
  1671.  a command line like this: 
  1672.  
  1673.           [c:\] dir /b *.dat > dirlist
  1674.  
  1675.  You can use both input and output redirection for the same command, if both 
  1676.  are appropriate:  For example, this command sends input to SORT from the file 
  1677.  DIRLIST, and sends output from SORT to the file DIRLIST.SRT: 
  1678.  
  1679.           [c:\] sort < dirlist > dirlist.srt
  1680.  
  1681.  You can redirect text to or from the OS/2 clipboard by using the pseudo-device 
  1682.  name CLIP: (the colon is required). 
  1683.  
  1684.  If you redirect the output of a single internal command like DIR, the 
  1685.  redirection ends automatically when that command is done.  If you start a 
  1686.  batch file with redirection, all of the batch file's output is redirected, and 
  1687.  redirection ends when the batch file is done.  Similarly, if you use 
  1688.  redirection at the end of a command group, all of the output from the command 
  1689.  group is redirected, and redirection ends when the command group is done. 
  1690.  
  1691.  When output is directed to a file with >, >&, or >&>, if the file already 
  1692.  exists, it will be overwritten.  You can protect existing files by using the 
  1693.  SETDOS /N1 command, the "Protect redirected output files" setting available on 
  1694.  the Options 1 page of the OPTION dialogs, or the NoClobber directive in the 
  1695.  .INI file. 
  1696.  
  1697.  When output is appended to a file with >>, >>&, or >>&>, the file will be 
  1698.  created if it doesn't already exist.  However, if NoClobber is set as 
  1699.  described in the above, append redirection will not create a new file; 
  1700.  instead, if the output file does not exist a "File not found" or similar error 
  1701.  will be displayed. 
  1702.  
  1703.  You can temporarily override the current setting of NoClobber by using an 
  1704.  exclamation mark [!] after the redirection symbol. For example, to redirect 
  1705.  the output of DIR to the file DIROUT, and allow overwriting of any existing 
  1706.  file despite the NoClobber setting: 
  1707.  
  1708.           [c:\] dir >! dirout
  1709.  
  1710.  Redirection is fully nestable.  For example, you can invoke a batch file and 
  1711.  redirect all of its output to a file or device.  Output redirection on a 
  1712.  command within the batch file will take effect for that command only; when the 
  1713.  command is completed, output will revert to the redirected output file or 
  1714.  device in use for the batch file as a whole. 
  1715.  
  1716.  You can use redirection if you need to create a zero-byte file.  To do so, 
  1717.  enter >filename as a command, with no actual command before the > character. 
  1718.  
  1719.  In addition to the standard redirection options above, 4OS2 also supports the 
  1720.  OS/2 CMD.EXE syntax: 
  1721.  
  1722.         n>file      Redirect handle n to the named file 
  1723.         n>&m        Redirect handle n to the same place as handle m 
  1724.  
  1725.  [n] and [m] are one-digit file handles between 0 and 9.  You may not put any 
  1726.  spaces between the n and the >, or between the >, &, and m in the second form. 
  1727.  OS/2 interprets "0" as standard input, "1" as standard output, and "2" as 
  1728.  standard error.  Handles 3 to 9 will probably not be useful unless you have an 
  1729.  application which uses those handles for a specific, documented purpose, or 
  1730.  you have opened a file with the %@FILEOPEN variable function and the file 
  1731.  handle is between 3 and 9. 
  1732.  
  1733.  The n>file syntax redirects output from handle n to a file.  You can use this 
  1734.  form to redirect two handles to different places.  For example: 
  1735.  
  1736.           [c:\] dir > outfile 2> errfil
  1737.  
  1738.  sends normal output to a file called OUTFILE and any error messages to a file 
  1739.  called ERRFILE. 
  1740.  
  1741.  The n>&m syntax redirects handle n to the same location as the previously 
  1742.  assigned handle m.  For example, to send standard error to the same file as 
  1743.  standard output, you could use this command: 
  1744.  
  1745.           [c:\] .dir > outfile 2>&1
  1746.  
  1747.  Notice that you can perform the same operations by using standard 4OS2 
  1748.  redirection features.  The two examples above could be written as 
  1749.  
  1750.           [c:\] dir > outfile >&> errfile
  1751.  
  1752.  and 
  1753.  
  1754.           [c:\] dir >&outfile
  1755.  
  1756.  
  1757. ΓòÉΓòÉΓòÉ 5.2.2. Piping ΓòÉΓòÉΓòÉ
  1758.  
  1759. You can create a "pipe" to send the standard output of one command to the 
  1760. standard input of another command: 
  1761.  
  1762.         command1 | command2             Send the standard output of command1 to 
  1763.                                         the standard input of command2 
  1764.         command1 |& command2            Send the standard output and standard 
  1765.                                         error of command1 to the standard input 
  1766.                                         of command2 
  1767.  
  1768.  For example, to take the output of the SET command (which displays a list of 
  1769.  your environment variables and their values) and pipe it to the SORT utility 
  1770.  to generate a sorted list, you would use the command: 
  1771.  
  1772.           [c:\] set | sort
  1773.  
  1774.  To do the same thing and then pipe the sorted list to the internal LIST 
  1775.  command for full-screen viewing: 
  1776.  
  1777.           [c:\] set | sort | list
  1778.  
  1779.  The TEE and Y commands are "pipe fittings" which add more flexibility to 
  1780.  pipes. 
  1781.  
  1782.  Like redirection, pipes are fully nestable.  For example, you can invoke a 
  1783.  batch file and send all of its output to another command with a pipe.  A pipe 
  1784.  on a command within the batch file will take effect for that command only; 
  1785.  when the command is completed, output will revert to the pipe in use for the 
  1786.  batch file as a whole.  You may also have 2 or more pipes operating 
  1787.  simultaneously if, for example, you have the pipes running in different 
  1788.  windows. 
  1789.  
  1790.  4OS2 implements pipes by starting a new process for the receiving program 
  1791.  instead of using temporary files.  The sending and receiving programs run 
  1792.  simultaneously; the sending program writes to the pipe and the receiving 
  1793.  program reads from the pipe.  When the receiving program finishes reading and 
  1794.  processing the piped data, it is ends automatically. 
  1795.  
  1796.  When you use pipes with 4OS2 make sure you think about any possible 
  1797.  consequences that can occur from using a separate process to run the receiving 
  1798.  program. 
  1799.  
  1800.  
  1801. ΓòÉΓòÉΓòÉ 5.3. Using the Keystack ΓòÉΓòÉΓòÉ
  1802.  
  1803. The Keystack overcomes two weaknesses of input redirection:  some programs 
  1804. ignore standard input and read the keyboard directly, and input redirection 
  1805. doesn't end until the program or command terminates.  You can't, for example, 
  1806. use redirection to send the opening commands to a program and then type the 
  1807. rest of the commands yourself.  But the Keystack lets you do exactly that. 
  1808.  
  1809. The Keystack sends keystrokes to an application program.  Once the Keystack is 
  1810. empty, the program will receive the rest of its input from the keyboard. The 
  1811. Keystack is useful when you want a program to take certain actions 
  1812. automatically when it starts.  It is most often used in batch files and 
  1813. aliases.  The Keystack is invoked with the KEYSTACK command. 
  1814.  
  1815. KEYSTACK depends on a program called KEYSTACK.EXE.  This file must be in the 
  1816. same directory as 4OS2.EXE, or in a directory listed in your PATH.  You don't 
  1817. have to take any special action to activate KEYSTACK.EXE; 4OS2 will run it 
  1818. automatically when you use the KEYSTACK command.  If 4OS2 cannot find 
  1819. KEYSTACK.EXE, the KEYSTACK command will display an error message. 
  1820.  
  1821. To place the letters, digits, and punctuation marks you would normally type for 
  1822. your program into the keystack, enclose them in double quotes: 
  1823.  
  1824.         [c:\] keystack "myfile"
  1825.  
  1826. Many other keys can be entered into the Keystack using their names.  This 
  1827. example puts the F1 key followed by the Enter key in the keystack: 
  1828.  
  1829.         [c:\] keystack F1 Enter
  1830.  
  1831. See Keys and Key Names for details on how key names are entered.  See the 
  1832. KEYSTACK command for information on using numeric key values along with or 
  1833. instead of key names, and other details about using the Keystack. 
  1834.  
  1835. The following command creates an alias that will run a FoxPro report called 
  1836. TIMEREP (it should be entered on one line): 
  1837.  
  1838.         [c:\] alias timerep `keystack "use times index times" Enter
  1839.               "report form timerep to print" Enter "quit" Enter & foxpro`
  1840.  
  1841. This command creates an alias called timerep which puts the following 
  1842. characters on the keystack: 
  1843.  
  1844.         the characters "use times index times" the Enter key's code the 
  1845.         characters "report form timerep to print" the Enter key's code the 
  1846.         characters "quit" and one more Enter key 
  1847.  
  1848.  The alias then runs the program FOXPRO which receives those characters just as 
  1849.  if you had typed them. 
  1850.  
  1851.  When you use the Keystack, remember that you must put the keystrokes into the 
  1852.  Keystack before you run the program that will receive them.  The Keystack will 
  1853.  hold the keystrokes until the program asks for them. 
  1854.  
  1855.  
  1856. ΓòÉΓòÉΓòÉ 5.4. Waiting for Applications to Finish ΓòÉΓòÉΓòÉ
  1857.  
  1858. When you start an OS/2 Presentation Manager application from the prompt, the 
  1859. command processor does not normally wait for the application to finish before 
  1860. returning to the prompt.    This default behavior allows you to continue your work 
  1861. at the prompt while the application is running.  You can force 4OS2 to wait for 
  1862. applications to finish before continuing by selecting the "Wait for Completion" 
  1863. option on the Options 2 page of the OPTION dialogs, with the ExecWait directive 
  1864. in the .INI file, or with the START command's /WAIT switch (you can also use 
  1865. START to control many other aspects of how your applications are started). 
  1866.  
  1867. Regardless of the ExecWait setting, 4OS2 always waits for applications which 
  1868. are run from batch files before continuing with subsequent commands in the 
  1869. batch file.  To start an application from a batch file and continue with the 
  1870. batch file immediately, without waiting for the application to finish, use the 
  1871. START command (without the /WAIT switch). 
  1872.  
  1873.  
  1874. ΓòÉΓòÉΓòÉ 5.5. Critical Errors ΓòÉΓòÉΓòÉ
  1875.  
  1876. OS/2 watches for physical errors during input and output operations.  Physical 
  1877. errors are those due to hardware problems, such as trying to read a floppy disk 
  1878. while the drive door is open. 
  1879.  
  1880. These errors are called critical errors because OS/2, 4OS2, or your application 
  1881. program cannot proceed until the error is resolved. 
  1882.  
  1883. When a critical error occurs, you will see a popup window asking you to choose 
  1884. one of four error handling options.  The message comes from OS/2 or 4OS2, and 
  1885. will vary slightly depending on whether you are in full-screen or windowed 
  1886. mode.  You can respond with a mouse click or menu selection.  The options and 
  1887. their meanings are similar in all cases: 
  1888.  
  1889.         Return error code to program.  Tell the program that the operation 
  1890.         failed.  This option returns an error code to 4OS2 or to the 
  1891.         application program that was running when the error occurred.  4OS2 
  1892.         generally stops the current command when an operation fails. 
  1893.  
  1894.         End program/command/operation.  Choose this option to stop the program 
  1895.         that was running when the error occurred and abort 4OS2. 
  1896.  
  1897.         Retry command or operation.  Choose this option if you have corrected 
  1898.         the problem. 
  1899.  
  1900.         Display help.  Display further information on the error. 
  1901.  
  1902.  
  1903. ΓòÉΓòÉΓòÉ 5.6. Conditional Commands ΓòÉΓòÉΓòÉ
  1904.  
  1905. When an internal command or external program finished, it returns a result 
  1906. called the exit code.  Conditional commands allow you to perform tasks based 
  1907. upon the previous command's exit code.  Many programs return a 0 if they are 
  1908. successful and a non-zero value if they encounter an error. 
  1909.  
  1910. If you separate two commands by && (AND), the second command will be executed 
  1911. only if the first returns an exit code of 0.  For example, the following 
  1912. command will only erase files if the BACKUP operation succeeds: 
  1913.  
  1914.         [c:\] backup c:\ a: && del c:\*.bak;*.lst
  1915.  
  1916. If you separate two commands by || (OR), the second command will be executed 
  1917. only if the first returns a non-zero exit code.  For example, if the following 
  1918. BACKUP operation fails, then ECHO will display a message: 
  1919.  
  1920.         [c:\] backup c:\ a: || echo Error in the backup!
  1921.  
  1922. All internal commands return an exit code, but not all external programs do. 
  1923. Conditional commands will behave unpredictably if you use them with external 
  1924. programs which do not return an explicit exit code.  To determine whether a 
  1925. particular external program returns a meaningful exit code use an ECHO %? 
  1926. command immediately after the program is finished.  If the program's 
  1927. documentation does not discuss exit codes you may need to experiment with a 
  1928. variety of conditions to see how the exit code changes. 
  1929.  
  1930.  
  1931. ΓòÉΓòÉΓòÉ 5.7. Command Grouping ΓòÉΓòÉΓòÉ
  1932.  
  1933. Command grouping allows you to logically group a set of commands together by 
  1934. enclosing them in parentheses.  The parentheses are similar in function to the 
  1935. BEGIN and END block statements in some programming languages. 
  1936.  
  1937. There are two primary uses for command grouping.  One is to execute multiple 
  1938. commands in a place where normally only a single command is allowed.  For 
  1939. example, suppose you want to execute two different REN commands in all 
  1940. subdirectories of your hard disk.  You could do it like this: 
  1941.  
  1942.         [c:\] global ren *.wx1 *.wxo
  1943.         [c:\] global ren *.tx1 *.txo
  1944.  
  1945. But with command grouping you can do the same thing in one command (enter this 
  1946. on one line): 
  1947.  
  1948.         [c:\]global (ren *.wx1 *.wxo & ren *.tx1 *.txo)
  1949.  
  1950. The two REN commands enclosed in the parentheses appear to GLOBAL as if they 
  1951. were a single command, so both commands are executed for every directory, but 
  1952. the directories are only scanned once, not twice. 
  1953.  
  1954. This kind of command grouping is most useful with the EXCEPT, FOR, GLOBAL, and 
  1955. IF commands.  When you use this approach in a batch file you must either place 
  1956. all of the commands in the group on one line, or place the opening parenthesis 
  1957. at the end of a line and place the commands on subsequent lines.  For example, 
  1958. the first two of these sequences will work properly, but the third will not: 
  1959.  
  1960.         for %f in (1 2 3) (echo hello %f & echo goodbye %f)
  1961.         for %f in (1 2 3) (
  1962.             echo hello %f
  1963.             echo goodbye %f
  1964.         )
  1965.         for %f in (1 2 3) (echo hello %f
  1966.         echo goodbye %f)
  1967.  
  1968. The second common use of command grouping is to redirect input or output for 
  1969. several commands without repeatedly using the redirection symbols.  For 
  1970. example, consider the following batch file fragment which uses the ECHO command 
  1971. to create a file (with >), and to append to the file (with >>): 
  1972.  
  1973.         echo Data files %_date > filelist
  1974.         dir *.dat >> filelist
  1975.         echo. >> filelist
  1976.         echo Text files %_date >> filelist
  1977.         dir *.txt >> filelist
  1978.  
  1979. Using command grouping, these commands can be written much more simply.  Enter 
  1980. this example on one line: 
  1981.  
  1982.         (echo Data files %_date & dir *.dat & echo. & echo Text files
  1983.         %_date & dir *.txt) > filelist
  1984.  
  1985. The redirection, which appears outside the parentheses, applies to all the 
  1986. commands within the parentheses.  Because the redirection is performed only 
  1987. once, the commands will run slightly faster than if each command was entered 
  1988. separately.  The same approach can be used for input redirection and for 
  1989. piping. 
  1990.  
  1991. You can also use command grouping in a batch file or at the prompt to split 
  1992. commands over several lines.  This last example is like the redirection example 
  1993. above, but is entered at the prompt.  Note the "More?" prompt after each 
  1994. incomplete line.  None of the commands are executed until the command group is 
  1995. completed with the closing parenthesis.  This example does not have to be 
  1996. entered on one line: 
  1997.  
  1998.         [c:\] (echo Data files %_date
  1999.         More? dir *.dat
  2000.         More? echo.
  2001.         More? echo Text files %_date
  2002.         More? dir *.txt) > filelist
  2003.         [c:\]
  2004.  
  2005. A group of commands in parentheses is like a long command line.  The total 
  2006. length of the group may not exceed 2,047 characters, whether the commands are 
  2007. entered from the prompt, an alias, or a batch file.  The limit includes the 
  2008. space required to expand aliases and environment variables used within the 
  2009. group.  In addition, each line you type at the normal prompt or the More? 
  2010. prompt, and each individual command within the line, must meet the usual length 
  2011. limit of 1,023 characters. 
  2012.  
  2013.  
  2014. ΓòÉΓòÉΓòÉ 5.8. Escape Character ΓòÉΓòÉΓòÉ
  2015.  
  2016. 4OS2 recognizes a user-definable escape character.  This character gives the 
  2017. following character a special meaning; it is not the same as the ASCII ESC that 
  2018. is often used in ANSI and printer control sequences. 
  2019.  
  2020. The default escape character is a caret [^]. 
  2021.  
  2022. If you don't like using the default escape character, you can pick another 
  2023. character using the SETDOS /E command, the Options 1 page of the OPTION 
  2024. dialogs, or the EscapeChar directive in your .INI file.  If you plan to share 
  2025. aliases or batch files between 4OS2 and 4DOS, 4NT, or Take Command, see Special 
  2026. Character Compatibility for details about choosing compatible escape characters 
  2027. for two or more products. 
  2028.  
  2029. Ten special characters are recognized when they are preceded by the escape 
  2030. character.  The combination of the escape character and one of these characters 
  2031. is translated to a single character, as shown below.  These are primarily 
  2032. useful for redirecting codes to the printer; ^e is also useful to generate ANSI 
  2033. "escape sequences" in your PROMPT, ECHO, or other output commands.  The special 
  2034. characters which can follow the escape character are: 
  2035.  
  2036.         b   backspace 
  2037.         c   comma 
  2038.         e   the ASCII ESC character (ASCII 27) 
  2039.         f   form feed 
  2040.         k   back quote 
  2041.         n   line feed 
  2042.         q   double quote 
  2043.         r   carriage return 
  2044.         s   space 
  2045.         t   tab character 
  2046.  
  2047.  If you follow the escape character with any other character, the escape 
  2048.  character is removed and the second character is copied directly to the 
  2049.  command line.  This allows you to suppress the normal meaning of special 
  2050.  characters (such as ? * / \ | " ` > < and &). For example, to display a 
  2051.  message containing a > symbol, which normally indicates redirection: 
  2052.  
  2053.           [c:\] echo 2 is ^> 4
  2054.  
  2055.  To send a form feed followed by the sequence ESC Y to the printer, you can use 
  2056.  this command: 
  2057.  
  2058.           [c:\] echos ^f^eY > prn
  2059.  The escape character has an additional use when it is the last character on 
  2060.  any line of a .BAT or BTM batch file.  4OS2 recognizes this use of the escape 
  2061.  character to signal line continuation:  the command processor removes the 
  2062.  escape character and appends the next line to the current line before 
  2063.  executing it. 
  2064.  
  2065.  
  2066. ΓòÉΓòÉΓòÉ 6. Commands ΓòÉΓòÉΓòÉ
  2067.  
  2068. The best way to learn the 4OS2 commands is to experiment with them.  The lists 
  2069. below categorize the available commands by topic and will help you find the 
  2070. ones that you need. 
  2071.  
  2072. System configuration: 
  2073.  
  2074.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2075.         ΓöéCHCP         CLS          COLOR        DATE         DIRHISTORY  Γöé
  2076.         Γöé                                                                Γöé
  2077.         ΓöéFREE         HISTORY      KEYS         KEYBD        LOG         Γöé
  2078.         Γöé                                                                Γöé
  2079.         ΓöéMEMORY       OPTION       PROMPT       REBOOT       SETDOS      Γöé
  2080.         Γöé                                                                Γöé
  2081.         ΓöéTIME         VER          VERIFY       VOL                      Γöé
  2082.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2083.  
  2084.  File and directory management: 
  2085.  
  2086.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2087.         ΓöéATTRIB       COPY         DEL          DESCRIBE     LIST        Γöé
  2088.         Γöé                                                                Γöé
  2089.         ΓöéMOVE         REN          SELECT       TOUCH        TREE        Γöé
  2090.         Γöé                                                                Γöé
  2091.         ΓöéTYPE                                                            Γöé
  2092.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2093.  
  2094.  Subdirectory management: 
  2095.  
  2096.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2097.         ΓöéCD           CDD          DIR          DIRS         MD          Γöé
  2098.         Γöé                                                                Γöé
  2099.         ΓöéPOPD         PUSHD        RD                                    Γöé
  2100.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2101.  
  2102.  Input and output: 
  2103.  
  2104.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2105.         ΓöéDRAWBOX      DRAWHLINE    DRAWVLINE    ECHO         ECHOSERR    Γöé
  2106.         Γöé                                                                Γöé
  2107.         ΓöéECHOS        ECHOERR      INKEY        INPUT        KEYSTACK    Γöé
  2108.         Γöé                                                                Γöé
  2109.         ΓöéSCREEN       SCRPUT       TEXT         VSCRPUT                  Γöé
  2110.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2111.  
  2112.  Commands primarily for use in or with batch files and aliases: 
  2113.  (some work only in batch files; see the individual commands for details) 
  2114.  
  2115.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2116.         ΓöéALIAS        BEEP         CALL         CANCEL       DELAY       Γöé
  2117.         Γöé                                                                Γöé
  2118.         ΓöéDO           ENDLOCAL     FOR          GLOBAL       GOSUB       Γöé
  2119.         Γöé                                                                Γöé
  2120.         ΓöéGOTO         IF           IFF          LOADBTM      ON          Γöé
  2121.         Γöé                                                                Γöé
  2122.         ΓöéPAUSE        QUIT         REM          RETURN       SETLOCAL    Γöé
  2123.         Γöé                                                                Γöé
  2124.         ΓöéSHIFT        SWITCH       UNALIAS                               Γöé
  2125.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2126.  
  2127.  Environment and path commands: 
  2128.  
  2129.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2130.         ΓöéDPATH        ESET         PATH         SET          UNSET       Γöé
  2131.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2132.  
  2133.  Other commands: 
  2134.  
  2135.         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2136.         Γöé?            ACTIVATE     DETACH       EXCEPT       EXIT        Γöé
  2137.         Γöé                                                                Γöé
  2138.         ΓöéFFIND        HELP         SHRALIAS     START        TEE         Γöé
  2139.         Γöé                                                                Γöé
  2140.         ΓöéTIMER        TITLE        WINDOW       Y                        Γöé
  2141.         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2142.  
  2143.  
  2144. ΓòÉΓòÉΓòÉ 6.1. ? - List the internal commands ΓòÉΓòÉΓòÉ
  2145.  
  2146.  Purpose:    Display a list of internal commands or, prompt for a command. 
  2147.  
  2148.  Format:     ? ["prompt " command ] 
  2149.  
  2150.              prompt :  Prompt text about whether to execute the command. 
  2151.              command :  Command to be executed if user answers Y 
  2152.  
  2153.  Usage 
  2154.  
  2155.  ? has two functions.  When you use the ? command by itself, it displays a list 
  2156.  of internal commands.  If you have disabled a command with SETDOS /I, it will 
  2157.  not appear in the list. 
  2158.  
  2159.  The second function of ? is to prompt the user before executing a specific 
  2160.  line in a batch file.  If you add a prompt and a command, ? will display the 
  2161.  prompt followed by "(Y/N)?" and wait for the user's response.  If the user 
  2162.  presses "Y" or "y", the command line will be executed.  If the user presses 
  2163.  "N" or "n", the command line will be ignored. 
  2164.  
  2165.  For example, the following command might be used in a batch file: 
  2166.  
  2167.           ? Load the network call netstart.btm
  2168.  
  2169.  When this command is executed, you will see the following prompt; if you 
  2170.  answer "Y", the CALL command will be executed: 
  2171.  
  2172.           Load the network (Y/N)?
  2173.  
  2174.  
  2175. ΓòÉΓòÉΓòÉ 6.2. ACTIVATE - Activate a window ΓòÉΓòÉΓòÉ
  2176.  
  2177.  Purpose:    Activate a window, set its state, or change its title. 
  2178.  
  2179.  Format:     ACTIVATE "window " [MAX | MIN | RESTORE | CLOSE] 
  2180.  
  2181.              window :  Current title of window to work with. 
  2182.  
  2183.  See also:  START, TITLE, and WINDOW. 
  2184.  
  2185.  Usage 
  2186.  
  2187.  The name of the window must be enclosed in double quotes. 
  2188.  
  2189.  If no options are used, the window named in the command will become the active 
  2190.  window and be able to receive keystrokes and mouse commands. 
  2191.  
  2192.  The MAX option expands the window to its maximum size, the MIN option reduces 
  2193.  the window to an icon, and the RESTORE option returns the window to its 
  2194.  default size and location on the desktop.  The CLOSE option closes the window 
  2195.  and ends the session running in the window. 
  2196.  
  2197.  This example maximizes and then renames the window called "4OS2": 
  2198.  
  2199.           [c:\] activate "4OS2" max
  2200.           [c:\] activate "4OS2" "Command Prompt"
  2201.  
  2202.  You can use wildcards in the window name if you only know the first part of 
  2203.  the title.  This is useful with applications that change their window title to 
  2204.  reflect the file currently in use. 
  2205.  
  2206.  ACTIVATE is often used before KEYSTACK to make sure the proper window receives 
  2207.  the keystrokes.  ACTIVATE works by sending the appropriate messages to the 
  2208.  named window.  If the window ignores or misinterprets the messages, ACTIVATE 
  2209.  may not have the effect you want. 
  2210.  
  2211.  
  2212. ΓòÉΓòÉΓòÉ 6.3. ALIAS - Create or display aliases ΓòÉΓòÉΓòÉ
  2213.  
  2214.  Purpose:    Create new command names that execute one or more commands or 
  2215.              redefine default options for existing commands; assign commands to 
  2216.              keystrokes; load or display the list of defined alias names. 
  2217.  
  2218.  Format:     ALIAS [/P /R file ...] [name [=][value ]] 
  2219.  
  2220.              file :  One or more files to read for alias definitions. 
  2221.              name :  Name for an alias, or for the key to execute the alias. 
  2222.              value :  Text to be substituted for the alias name. 
  2223.  
  2224.              /P(ause)                        /R(ead file) 
  2225.  
  2226.  See also:  UNALIAS. 
  2227.  
  2228.  Usage 
  2229.  
  2230.  The ALIAS command lets you create new command names or redefine internal 
  2231.  commands.  It also lets you assign one or more commands to a single keystroke. 
  2232.  An alias is often used to execute a complex series of commands with a few 
  2233.  keystrokes or to create "in memory batch files" that run much faster than 
  2234.  disk-based batch files. 
  2235.  
  2236.  For example, to create a single-letter command D to display a wide directory, 
  2237.  instead of useing the longer DIR /W, you could use the command: 
  2238.  
  2239.           [c:\] alias d = dir /w
  2240.  
  2241.  Now when you type a single d as a command, it will be translated into a DIR /W 
  2242.  command. 
  2243.  
  2244.  If you define aliases for commonly used application programs, you can often 
  2245.  remove the directories they're stored in from the PATH. For example, if you 
  2246.  use Quattro Pro and had the C:\QPRO directory in your path, you could define 
  2247.  the following alias: 
  2248.  
  2249.           [c:\] alias qpro = c:\qpro\q.exe
  2250.  
  2251.  With this alias defined, you can probably remove C:\QPRO from your PATH. 
  2252.  Quattro Pro will now load more quickly than it would if 4OS2 had to search the 
  2253.  PATH for it.  In addition, the PATH can be shorter, which will speed up 
  2254.  searches for other programs. 
  2255.  
  2256.  If you apply this technique for each application program, you can often reduce 
  2257.  your PATH to just two or three directories containing utility programs, and 
  2258.  significantly reduce the time it takes to load most software on your system. 
  2259.  Before removing a directory from the PATH, you will need to define aliases for 
  2260.  all the executable programs you commonly use which are stored in that 
  2261.  directory. 
  2262.  
  2263.  Aliases are stored in memory, and are not saved automatically when you turn 
  2264.  off your computer or end your current session.  See below for information on 
  2265.  saving and reloading your aliases. 
  2266.  
  2267.  Multiple Commands and Special Characters in Aliases 
  2268.  
  2269.  An alias can represent more than one command.  For example: 
  2270.  
  2271.           [c:\] alias letters = `cd \letters & text`
  2272.  
  2273.  creates a new command called LETTERS.  The command first uses CD to change to 
  2274.  a subdirectory called \LETTERS and then runs a program called TEXT.  The 
  2275.  ampersand [&] is the command separator and indicates that the two commands are 
  2276.  distinct and should be executed sequentially. 
  2277.  
  2278.  Aliases make extensive use of the command separator, and the parameter 
  2279.  character, and may also use the escape character. These characters differ 
  2280.  between 4OS2, 4DOS, 4NT, and Take Command.  In the text and examples below, we 
  2281.  use the 4OS2 characters.  If you want to use the same aliases under different 
  2282.  command processors, see Special Character Compatibility. 
  2283.  
  2284.  When you type alias commands at the command line or in a batch file, you must 
  2285.  use back quotes [`] around the definition if it contains multiple commands, 
  2286.  parameters (discussed below), environment variables, redirection, or piping. 
  2287.  The back quotes prevent premature expansion of these arguments.  You may use 
  2288.  back quotes around other definitions, but they are not required. (You do not 
  2289.  need back quotes when your aliases are loaded from an ALIAS /R file; see below 
  2290.  for details.)  The examples above and below include back quotes only when they 
  2291.  are required. 
  2292.  
  2293.  Nested Aliases 
  2294.  
  2295.  Aliases may invoke internal commands, external commands, or other aliases. 
  2296.  (However, an alias may not invoke itself, except in special cases where an IF 
  2297.  or IFF command is used to prevent an infinite loop.)  The two aliases below 
  2298.  demonstrate alias nesting (one alias invoking another).  The first line 
  2299.  defines an alias which runs a program called WP.EXE that is in the E:\WP60\ 
  2300.  subdirectory.  The second alias changes directories with the PUSHD command, 
  2301.  runs the WP alias, and then returns to the original directory with the POPD 
  2302.  command: 
  2303.  
  2304.           [c:\] alias wp = e:\wp60\wp.exe
  2305.           [c:\] alias w = `pushd c:\wp & wp & popd`
  2306.  
  2307.  The second alias above could have included the full path and name of the 
  2308.  WP.EXE program instead of calling the WP alias. However, writing two aliases 
  2309.  makes the second one easier to read and understand, and makes the first alias 
  2310.  available for independent use.  If you rename the WP.EXE program or move it to 
  2311.  a new directory, only the first alias needs to be changed. 
  2312.  
  2313.  Temporarily Disabling Aliases 
  2314.  
  2315.  If you put an asterisk [*] immediately before a command in the value of an 
  2316.  alias definition (the part after the equal sign), it tells 4OS2 not to attempt 
  2317.  to interpret that command as another (nested) alias.  An asterisk used this 
  2318.  way must be preceded by a space or the command separator and followed 
  2319.  immediately by an internal or external command name. 
  2320.  
  2321.  By using an asterisk, you can redefine the default options for any internal or 
  2322.  external command.  For example, suppose that you always want to use the DIR 
  2323.  command with the /2 (two column) and /P (pause at the end of each page) 
  2324.  options.  The following line will do just that: 
  2325.  
  2326.           [c:\] alias dir = *dir /2/p
  2327.  
  2328.  If you didn't include the asterisk, the second DIR on the line would be the 
  2329.  name of the alias itself, and 4OS2 would repeatedly re- invoke the DIR alias, 
  2330.  rather than running the DIR command.  This would cause an "Alias loop" or 
  2331.  "Command line too long" error. 
  2332.  
  2333.  An asterisk also helps you keep the names of internal commands from 
  2334.  conflicting with the names of external programs.  For example, suppose you 
  2335.  have a program called LIST.COM.  Normally, the internal LIST command will run 
  2336.  anytime you type LIST.  But two simple aliases will give you access to both 
  2337.  the LIST.COM program and the LIST command: 
  2338.  
  2339.           [c:\] alias list = c:\util\list.com
  2340.           [c:\] alias display = *list
  2341.  
  2342.  The first line above defines LIST as an alias for the LIST.COM program.  If 
  2343.  you stopped there, the external program would run every time you typed LIST 
  2344.  and you would not have easy access to the internal LIST command.  The second 
  2345.  line renames the internal LIST command as DISPLAY.  The asterisk is needed in 
  2346.  the second command to indicate that the following word means the internal 
  2347.  command LIST, not the LIST alias which runs your external program. 
  2348.  
  2349.  Another way to understand the asterisk is to remember that a command is always 
  2350.  checked for an alias first, then for an internal or external command, or a 
  2351.  batch file.  The asterisk at the beginning of a command name simply skips over 
  2352.  the usual check for aliases when processing that command, and allows the 
  2353.  command processor to go straight to checking for an internal command, external 
  2354.  command, or batch file. 
  2355.  
  2356.  You can also use an asterisk before a command that you enter at the command 
  2357.  line or in a batch file.  If you do, that command won't be interpreted as an 
  2358.  alias.  This can be useful when you want to be sure you are running the true, 
  2359.  original command and not an alias with the same name, or temporarily defeat 
  2360.  the purpose of an alias which changes the meaning or behavior of a command. 
  2361.  
  2362.  You can also disable aliases temporarily with the SETDOS /X command. 
  2363.  
  2364.  Partial Alias Names 
  2365.  
  2366.  You can also use an asterisk in the name of an alias.  When you do, the 
  2367.  characters following the asterisk are optional when you invoke the alias 
  2368.  command.  (Use of an asterisk in the alias name is unrelated to the use of an 
  2369.  asterisk in the alias value discussed above.)  For example, with this alias: 
  2370.  
  2371.           [c:\] alias wher*eis = dir /sp
  2372.  
  2373.  the new command, WHEREIS, can be invoked as WHER, WHERE, WHEREI, or WHEREIS. 
  2374.  Now if you type: 
  2375.  
  2376.           [c:\] where myfile.txt
  2377.  
  2378.  The WHEREIS alias will be expanded to the command: 
  2379.  
  2380.           dir /sp myfile.txt
  2381.  
  2382.  Keystroke Aliases 
  2383.  
  2384.  If you want to assign an alias to a keystroke, use the keyname on the left 
  2385.  side of the equal sign, preceded by an at sign [@]. For example, to assign the 
  2386.  command DIR /W to the F5 key, type 
  2387.  
  2388.           [c:\] alias @F5 = dir /w
  2389.  
  2390.  See Keys and Key Names for a complete listing of key names and a description 
  2391.  of the key name format. 
  2392.  
  2393.  When you define keystroke aliases, the assignments will only be in effect at 
  2394.  the command line, not inside application programs.  Be careful not to assign 
  2395.  aliases to keys that are already used at the command line (like F1 for Help). 
  2396.  The command-line meanings take precedence and the keystroke alias will never 
  2397.  be invoked.  If you want to use one of the command-line keys for an alias 
  2398.  instead of its normal meaning, you must first disable its regular use with the 
  2399.  NormalKey or NormalEditKey directives in your .INI file. 
  2400.  
  2401.  If you define a keystroke alias with a single at sign as shown above, then, 
  2402.  when you press the F5 key, the value of the alias (DIR /W above) will be 
  2403.  placed on the command line for you.  You can type additional parameters if you 
  2404.  wish and then press Enter to execute the command.  With this particular alias, 
  2405.  you can define the files that you want to display after pressing F5 and before 
  2406.  pressing Enter to execute the command. 
  2407.  
  2408.  If you want the keystroke alias to take action automatically without waiting 
  2409.  for you to edit the command line or press Enter, you can begin the definition 
  2410.  with two at signs [@@]. 4OS2 will execute the alias "silently," without 
  2411.  displaying its text on the command line.  For example, this command will 
  2412.  assign an alias to the F6 key that uses the CDD command to take you back to 
  2413.  the previous default directory: 
  2414.  
  2415.           [c:\] alias @@f6 = cdd -
  2416.  
  2417.  When you define keystroke aliases, the assignments will only be in effect at 
  2418.  the command line, not inside application programs.  Be careful not to assign 
  2419.  aliases to keys that are already used at the command line (like F1 for Help). 
  2420.  The command-line meanings take precedence and the keystroke alias will never 
  2421.  be invoked.  If you want to use one of the command-line keys for an alias 
  2422.  instead of its normal meaning, you must first disable its regular use with the 
  2423.  NormalKey or NormalEditKey directives in your .INI file. 
  2424.  
  2425.  You can also define a keystroke alias by using "@" or "@@" plus a scan code 
  2426.  for one of the permissible keys (see the Reference Tables for a list of scan 
  2427.  codes).  In most cases it will be easier to use key names.  Scan codes should 
  2428.  only be used with unusual keyboards where a key name is not available for the 
  2429.  key you are using. 
  2430.  
  2431.  Displaying Aliases 
  2432.  
  2433.  If you want to see a list of all current ALIAS commands, type: 
  2434.  
  2435.           [c:\] alias
  2436.  
  2437.  You can also view the definition of a single alias.  For example, if you want 
  2438.  to see the definition of the alias LIST, you can type: 
  2439.  
  2440.           [c:\] alias list
  2441.  
  2442.  Saving and Reloading Your Aliases 
  2443.  
  2444.  You can save your aliases to a file called ALIAS.LST this way: 
  2445.  
  2446.           [c:\] alias > alias.lst
  2447.  
  2448.  You can then reload all the alias definitions in the file the next time you 
  2449.  boot up with the command: 
  2450.  
  2451.           [c:\] alias /r alias.lst
  2452.  
  2453.  This is much faster than defining each alias individually in a batch file.  If 
  2454.  you keep your alias definitions in a separate file which you load when your 
  2455.  system starts, you can edit them with a text editor, reload the edited file 
  2456.  with ALIAS /R, and know that the same alias list will be loaded the next time 
  2457.  you boot your computer. 
  2458.  
  2459.  When you define aliases in a file that will be read with the ALIAS /R command, 
  2460.  you do not need back quotes around the value, even if back quotes would 
  2461.  normally be required when defining the same alias at the command line or in a 
  2462.  batch file. 
  2463.  
  2464.  To remove an alias, use the UNALIAS command. 
  2465.  
  2466.  Alias Parameters 
  2467.  
  2468.  Aliases can use command-line arguments or parameters like those in batch 
  2469.  files.  The command-line arguments are numbered from %0 to %127.  %0 contains 
  2470.  the alias name.  It is up to the alias to determine the meaning of the other 
  2471.  parameters.  You can use quotation marks to pass spaces, tabs, commas, and 
  2472.  other special characters in an alias parameter; see Argument Quoting for 
  2473.  details. 
  2474.  
  2475.  Parameters that are referred to in an alias, but which are missing on the 
  2476.  command line, appear as empty strings inside the alias.  For example, if you 
  2477.  put two parameters on the command line, any reference in the alias to %3 or 
  2478.  any higher-numbered parameter will be interpreted as an empty string. 
  2479.  
  2480.  The parameter %n$ has a special meaning.  4OS2 interprets it to mean "the 
  2481.  entire command line, from argument n to the end."  If n is not specified, it 
  2482.  has a default value of 1, so %$ means "the entire command line after the alias 
  2483.  name."  The special parameter %# contains the number of command-line 
  2484.  arguments. 
  2485.  
  2486.  For example, the following alias will change directories, perform a command, 
  2487.  and return to the original directory: 
  2488.  
  2489.           [c:\] alias in `pushd %1 & %2$ & popd`
  2490.  
  2491.  When this alias is invoked as: 
  2492.  
  2493.           [c:\] in c:\comm mycomm /zmodem /56K
  2494.  
  2495.  the first parameter, %1, has the value c:\comm. %2 is mycomm, %3 is  /zmodem, 
  2496.  and %4 is /56K.  The command line expands into these three separate commands: 
  2497.  
  2498.           pushd c:\comm
  2499.           mycomm /zmodem /56K
  2500.           popd
  2501.  
  2502.  This next example uses the IFF command to redefine the defaults for SET.  It 
  2503.  should be entered on one line: 
  2504.  
  2505.           [c:\] alias set = `iff %# == 0 then & *set /p
  2506.                & else & *set %& & endiff`
  2507.  
  2508.  This modifies the SET command so that if SET is entered with no arguments, it 
  2509.  is replaced by SET /P (pause after displaying each page), but if SET is 
  2510.  followed by an argument, it behaves normally. Note the use of asterisks (*set) 
  2511.  to prevent alias loops. 
  2512.  
  2513.  If an alias uses parameters, command-line arguments will be deleted up to and 
  2514.  including the highest referenced argument.  For example, if an alias refers 
  2515.  only to %1 and %4, then the first and fourth arguments will be used, the 
  2516.  second and third arguments will be discarded, and any additional arguments 
  2517.  beyond the fourth will be appended to the expanded command (after the value 
  2518.  portion of the alias).  If an alias uses no parameters, all of the 
  2519.  command-line arguments will be appended to the expanded command. 
  2520.  
  2521.  Aliases also have full access to all variables in the environment, internal 
  2522.  variables, and variable functions.  For example, you can create a simple 
  2523.  command-line calculator this way: 
  2524.  
  2525.           [c:\] alias calc = `echo The answer is: %@eval[%&]`
  2526.  
  2527.  Now, if you enter: 
  2528.  
  2529.           [c:\] calc 5 * 6
  2530.  
  2531.  the alias will display: 
  2532.  
  2533.           The answer is: 30
  2534.  
  2535.  Expanding Aliases at the Prompt 
  2536.  
  2537.  You can expand an alias on the command line and view or edit the results by 
  2538.  pressing Ctrl-F after typing the alias name, but before the command is 
  2539.  executed.  This replaces the alias with its contents, and substitutes values 
  2540.  for each alias paramter, just as if you had pressed the Enter key.  However, 
  2541.  the command is not executed; it is simply redisplayed on the command line for 
  2542.  additional editing. 
  2543.  
  2544.  Ctrl-F is especially useful when you are developing and debugging a complex 
  2545.  alias, or if you want to make sure that an alias that you may have forgotten 
  2546.  won't change the effect of your command. 
  2547.  
  2548.  Local and Global Aliases 
  2549.  
  2550.  The aliases can be stored in either a "local" or "global" list. 
  2551.  
  2552.  With a local alias list, any changes made to the aliases will only affect the 
  2553.  current copy of 4OS2.  They will not be visible in other shells or other 
  2554.  sessions. 
  2555.  
  2556.  With a global alias list, all copies of 4OS2 will share the same alias list, 
  2557.  and any changes made to the aliases in one copy will affect all other copies. 
  2558.  This is the default. 
  2559.  
  2560.  You can control the type of alias list with the LocalAliases directive in the 
  2561.  .INI file, and with the /L and /LA options of the START command. 
  2562.  
  2563.  Whenever you start a secondary shell which uses a local alias list, it 
  2564.  inherits a copy of the aliases from the previous shell. However, any changes 
  2565.  to the aliases made in the secondary shell will affect only that shell.  If 
  2566.  you want changes made in a secondary shell to affect the previous shell, use a 
  2567.  global alias list in both shells. 
  2568.  
  2569.  Retaining Global Aliases with SHRALIAS 
  2570.  
  2571.  If you select a global alias list for 4OS2 you can share the aliases among all 
  2572.  copies of 4OS2 running in any session.  When you close all 4OS2 sessions, the 
  2573.  memory for the global alias list is released, and a new, empty alias list is 
  2574.  created the next time you start 4OS2. 
  2575.  
  2576.  If you want the alias list to be retained in memory even when no command 
  2577.  processor session is running, execute the SHRALIAS command, which loads a 
  2578.  program to perform this service for the global alias list, the global command 
  2579.  history list, and the global directory history. 
  2580.  
  2581.  You may find it convenient to execute SHRALIAS from your 4START file, or from 
  2582.  STARTUP.CMD. 
  2583.  
  2584.  SHRALIAS retains the alias list in memory, but cannot preserve it when OS/2 
  2585.  itself is shut down.  To save your aliases when restarting OS/2, you must 
  2586.  store them in a file and reload them after the system restarts.  For details 
  2587.  on how to do so, see Saving and Reloading Your Aliases (above). 
  2588.  
  2589.  The UNKNOWN_CMD Alias 
  2590.  
  2591.  If you create an alias with the name UNKNOWN_CMD, it will be executed any time 
  2592.  4OS2 would normally issue an "Unknown command" error message.  This allows you 
  2593.  to define your own handler for unknown commands.  When the UNKNOWN_CMD alias 
  2594.  is executed, the command line which generated the error is passed to the alias 
  2595.  for possible processing.  For example, to display the command that caused the 
  2596.  error: 
  2597.  
  2598.           alias unknown_cmd `echo Error in command "%&"`
  2599.  
  2600.  If the UNKNOWN_CMD alias contains an unknown command, it will call itself 
  2601.  repeatedly.  If this occurs, the command processor will loop up to 10 times, 
  2602.  then display an "UKNOWN_CMD loop" error. 
  2603.  
  2604.  Options 
  2605.  
  2606.     /P:     (Pause) This option is only effective when ALIAS is used to display 
  2607.             existing definitions.  It pauses the display after each page and 
  2608.             waits for a keystroke before continuing (see Page and File 
  2609.             Prompts). 
  2610.  
  2611.     /R:     (Read file) This option loads an alias list from a file. The format 
  2612.             of the file is the same as that of the ALIAS display: 
  2613.  
  2614.                                 name=value
  2615.  
  2616.             where name is the name of the alias and value is its value.  You 
  2617.             can use an equal sign [=] or space to separate the name and value. 
  2618.             Back quotes are not required around the value.  You can add 
  2619.             comments to the file by starting each comment line with a colon 
  2620.             [:].  You can load multiple files with one ALIAS /R command by 
  2621.             placing the names on the command line, separated by spaces: 
  2622.  
  2623.                                 [c:\] alias /r alias1.lst alias2.lst
  2624.  
  2625.             Each definition in an ALIAS /R file can be up to 2047 characters 
  2626.             long. The definitions can span multiple lines in the file if each 
  2627.             line, except the last, is terminated with an escape character. 
  2628.  
  2629.  
  2630. ΓòÉΓòÉΓòÉ 6.4. ATTRIB - Change or view file attributes ΓòÉΓòÉΓòÉ
  2631.  
  2632.  Purpose:    Change or view file and subdirectory attributes. 
  2633.  
  2634.  Format:     ATTRIB [/A:[[-]rhsda] /D /E /P /Q /S] [+|-[AHRS]] file ... 
  2635.  
  2636.              file :  A file, directory, or list of files or directories on 
  2637.              which to operate. 
  2638.  
  2639.              /A: (Attribute select)          /P(ause) 
  2640.              /D(irectories)                  /Q(uiet) 
  2641.              /E (No error messages)          /S(ubdirectories) 
  2642.  
  2643.              Attribute flags: 
  2644.  
  2645.              +A      Set the archive attribute 
  2646.              -A      Clear the archive attribute 
  2647.              +H      Set the hidden attribute 
  2648.              -H      Clear the hidden attribute 
  2649.              +R      Set the read-only attribute 
  2650.              -R      Clear the read-only attribute 
  2651.              +S      Set the system attribute 
  2652.              -S      Clear the system attribute 
  2653.  
  2654.  File Selection 
  2655.  
  2656.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  2657.  
  2658.  Usage 
  2659.  
  2660.  Every file and subdirectory has 4 attributes that can be turned on (set) or 
  2661.  turned off (cleared):  Archive, Hidden, Read- only, and System. 
  2662.  
  2663.  The ATTRIB command lets you view, set, or clear attributes for any file, group 
  2664.  of files, or subdirectory.  You can view file attributes by entering ATTRIB 
  2665.  without specifying new attributes (i.e., without the [+|-[AHRS]] part of the 
  2666.  format), or with the DIR /T command. 
  2667.  
  2668.  You can view file attributes by entering ATTRIB without specifying new 
  2669.  attributes (i.e., without the [+|-[AHRS]] part of the format).  (You can also 
  2670.  view file attributes with the DIR /T command.) 
  2671.  
  2672.  The primary use of ATTRIB is to set attributes.  For example, you can set the 
  2673.  read-only and hidden attributes for the file MEMO: 
  2674.  
  2675.           [c:\] attrib +rh memo
  2676.  
  2677.  Attribute options apply to the file(s) that follow the options on the ATTRIB 
  2678.  command line.  The example below shows how to set different attributes on 
  2679.  different files with a single command.  It sets the archive attribute for all 
  2680.  .TXT files, then sets the system attribute and clears the archive attribute 
  2681.  for TEST.COM : 
  2682.  
  2683.           [c:\] attrib +a *.txt +s -a test.com
  2684.  
  2685.  When you use ATTRIB on an HPFS drive, you must quote any file names which 
  2686.  contain whitespace or special characters.  See File Names for additional 
  2687.  details. 
  2688.  
  2689.  To change directory attributes, use the /D switch.  If you give ATTRIB a 
  2690.  directory name instead of a file name, and omit /D, it will append "\*.*" to 
  2691.  the end of the name and act on all files in that directory, rather than acting 
  2692.  on the directory itself. 
  2693.  
  2694.  Your operating system also supports "D" (subdirectory) and "V" (volume label) 
  2695.  attributes.  These attributes cannot be altered with ATTRIB; they are designed 
  2696.  to be controlled only by the operating system itself. 
  2697.  
  2698.  ATTRIB will ignore underlines in the new attribute (the [+|-[AHRS]] part of 
  2699.  the command).  For example, ATTRIB sees these two commands as identical: 
  2700.  
  2701.           [c:\] attrib +a filename
  2702.           [c:\] attrib +__A_ filename
  2703.  
  2704.  This allows you to use a string of attributes from either the @ATTRIB variable 
  2705.  function or from ATTRIB itself (both of which use underscores to represent 
  2706.  attributes that are not set) and send that string back to ATTRIB to set 
  2707.  attributes for other files.  For example, to clear the attributes of FILE2 and 
  2708.  then set its attributes to match those of FILE1 (enter this on one line): 
  2709.  
  2710.           [c:\] attrib -arhs file2 & attrib +%@attrib[file1] file2
  2711.  
  2712.  Options 
  2713.  
  2714.     /A::    (Attribute select) Select only those files that have the specified 
  2715.             attribute(s) set.  Preceding the attribute character with a hyphen 
  2716.             [-] will select files that do not have that attribute set.  The 
  2717.             colon [:] after /A is required.  The attributes are: 
  2718.  
  2719.                            R  Read-only 
  2720.                            H  Hidden 
  2721.                            S  System 
  2722.                            D  Subdirectory 
  2723.                            A  Archive 
  2724.  
  2725.             If no attributes are listed at all (e.g., ATTRIB /A: ...), ATTRIB 
  2726.             will select all files and subdirectories including hidden and 
  2727.             system files.  If attributes are combined, all the specified 
  2728.             attributes must match for a file to be selected. For example, 
  2729.             /A:RHS will select only those files with all three attributes set. 
  2730.  
  2731.             The /A: switch specifies which files to select, not which 
  2732.             attributes to set.  For example, to remove the archive attribute 
  2733.             from all hidden files, you could use this command: 
  2734.  
  2735.                                 [c:\] attrib /a:h -a *.*
  2736.  
  2737.     /D:     (Directories) If you use the /D option, ATTRIB will modify the 
  2738.             attributes of subdirectories in addition to files (yes, you can 
  2739.             have a hidden subdirectory): 
  2740.  
  2741.                                 [c:\] attrib /d +h c:\mydir
  2742.  
  2743.             If you use a directory name instead of a file name, and omit /D, 
  2744.             ATTRIB will append "\*.*" to the end of the name and act on all 
  2745.             files in that directory, rather than acting on the directory 
  2746.             itself. 
  2747.  
  2748.     /E:     (No error messages) Suppress all non-fatal error messages, such as 
  2749.             "File Not Found."  Fatal error messages, such as "Drive not ready," 
  2750.             will still be displayed.  This option is most useful in batch files 
  2751.             and aliases. 
  2752.  
  2753.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  2754.             continuing the display.  Your options at the prompt are explained 
  2755.             in detail under Page and File Prompts. 
  2756.  
  2757.     /Q:     (Quiet) This option turns off ATTRIB's normal screen output. It is 
  2758.             most useful in batch files. 
  2759.  
  2760.     /S:     (Subdirectories) If you use the /S option, the ATTRIB command will 
  2761.             be applied to all matching files in the current or named directory 
  2762.             and all of its subdirectories. 
  2763.  
  2764.  
  2765. ΓòÉΓòÉΓòÉ 6.5. BEEP - Beep the speaker ΓòÉΓòÉΓòÉ
  2766.  
  2767.  Purpose:    Beep the speaker or play simple music. 
  2768.  
  2769.  Format:     BEEP [frequency duration ...] 
  2770.  
  2771.              frequency :  The beep frequency in Hertz (cycles per second). 
  2772.              duration :  The beep length in 1/18th second intervals. 
  2773.  
  2774.  Usage 
  2775.  
  2776.  BEEP generates a sound through your computer's speaker.  It is normally used 
  2777.  in batch files to signal that an operation has been completed, or that the 
  2778.  computer needs attention. 
  2779.  
  2780.  Because BEEP allows you to specify the frequency and duration of the sound, 
  2781.  you can also use it to play simple music or to create different kinds of 
  2782.  signals for the user. 
  2783.  
  2784.  You can include as many frequency and duration pairs as you wish. No sound 
  2785.  will be generated for frequencies less than 20 Hz, allowing you to use BEEP as 
  2786.  a way to create short delays.  The default value for frequency is 440 Hz; the 
  2787.  default value for duration is 2. 
  2788.  
  2789.  This batch file fragment runs a program called DEMO, then plays a few notes 
  2790.  and waits for you to press a key: 
  2791.  
  2792.           demo & beep 440 4  600 2  1040 6
  2793.           pause Finished with the demo - hit a key...
  2794.  
  2795.  The following table gives the frequency values for a five octave range (middle 
  2796.  C is 262 Hz): 
  2797.  
  2798.           ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  2799.           Γòæ C      Γöé  131  Γöé  262  Γöé  523  Γöé  1046  Γöé  2093 Γòæ
  2800.           Γòæ C#/Db  Γöé  139  Γöé  277  Γöé  554  Γöé  1108  Γöé  2217 Γòæ
  2801.           Γòæ D      Γöé  147  Γöé  294  Γöé  587  Γöé  1175  Γöé  2349 Γòæ
  2802.           Γòæ D#/Eb  Γöé  156  Γöé  311  Γöé  622  Γöé  1244  Γöé  2489 Γòæ
  2803.           Γòæ E      Γöé  165  Γöé  330  Γöé  659  Γöé  1318  Γöé  2637 Γòæ
  2804.           Γòæ F      Γöé  175  Γöé  349  Γöé  698  Γöé  1397  Γöé  2794 Γòæ
  2805.           Γòæ F#/Gb  Γöé  185  Γöé  370  Γöé  740  Γöé  1480  Γöé  2960 Γòæ
  2806.           Γòæ G      Γöé  196  Γöé  392  Γöé  784  Γöé  1568  Γöé  3136 Γòæ
  2807.           Γòæ G#/Ab  Γöé  208  Γöé  415  Γöé  831  Γöé  1662  Γöé  3322 Γòæ
  2808.           Γòæ A      Γöé  220  Γöé  440  Γöé  880  Γöé  1760  Γöé  3520 Γòæ
  2809.           Γòæ A#/Bb  Γöé  233  Γöé  466  Γöé  932  Γöé  1866  Γöé  3729 Γòæ
  2810.           Γòæ B      Γöé  248  Γöé  494  Γöé  988  Γöé  1973  Γöé  3951 Γòæ
  2811.           ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  2812.  
  2813.  
  2814. ΓòÉΓòÉΓòÉ 6.6. CALL - Execute one batch file from another ΓòÉΓòÉΓòÉ
  2815.  
  2816.  Purpose:    Execute one batch file from within another. 
  2817.  
  2818.  Format:     CALL [/Q] file 
  2819.  
  2820.              file :  The batch file to execute. 
  2821.  
  2822.              /Q(uiet) 
  2823.  
  2824.  See also:  CANCEL and QUIT. 
  2825.  
  2826.  Usage 
  2827.  
  2828.  CALL allows batch files to call other batch files (batch file nesting).  The 
  2829.  calling batch file is suspended while the called (second) batch file runs. 
  2830.  When the second batch file finishes, the original batch file resumes execution 
  2831.  at the next command.  If you execute a batch file from inside another batch 
  2832.  file without using CALL, the first batch file is terminated before the second 
  2833.  one starts. 
  2834.  
  2835.  The following batch file fragment compares an input line to "wp" and calls 
  2836.  another batch file if it matches: 
  2837.  
  2838.           input  Enter your choice:  %%option
  2839.           if "%option" == "wp" call wp.bat
  2840.  
  2841.  4OS2 supports batch file nesting up to ten levels deep. 
  2842.  
  2843.  The current ECHO state is inherited by a called batch file, except when the 
  2844.  /Q. 
  2845.  
  2846.  The called batch file should always either return (by executing its last line, 
  2847.  or using the QUIT command), or terminate batch file processing with CANCEL. 
  2848.  Do not restart or CALL the original batch file from within the called file as 
  2849.  this may cause an infinite loop or a stack overflow. 
  2850.  
  2851.  CALL returns an exit code which matches the batch file return code. You can 
  2852.  test this exit code with the %_? or %? environment variable, and use it with 
  2853.  conditional commands. 
  2854.  
  2855.  Options 
  2856.  
  2857.     /Q:     (Quiet) Starts the new batch file with echo off, regardless of the 
  2858.             current batch file's echo state.  This switch is provided for 
  2859.             compatibility with OS/2's CMD.EXE. 
  2860.  
  2861.  
  2862. ΓòÉΓòÉΓòÉ 6.7. CANCEL - Terminate batch file processing ΓòÉΓòÉΓòÉ
  2863.  
  2864.  Purpose:    Terminate batch file processing. 
  2865.  
  2866.  Format:     CANCEL [value ] 
  2867.  
  2868.              value :  The  numeric exit code to return to 4OS2. 
  2869.  
  2870.  See also:  CALL and QUIT. 
  2871.  
  2872.  Usage 
  2873.  
  2874.  The CANCEL command ends all batch file processing, regardless of the batch 
  2875.  file nesting level.  Use QUIT to end a nested batch file and return to the 
  2876.  previous batch file. 
  2877.  
  2878.  You can CANCEL at any point in a batch file.  If CANCEL is used from within an 
  2879.  alias it will end execution of both the alias and any batch files which are 
  2880.  running at the time. 
  2881.  
  2882.  The following batch file fragment compares an input line to "end" and 
  2883.  terminates all batch file processing if it matches: 
  2884.  
  2885.           input Enter your choice:  %%option
  2886.           if "%option" == "end" cancel
  2887.  
  2888.  If you specify a value, CANCEL will set the ERRORLEVEL or exit code to that 
  2889.  value (see the IF command, and the %? variable). 
  2890.  
  2891.  
  2892. ΓòÉΓòÉΓòÉ 6.8. CD - Change the current directory ΓòÉΓòÉΓòÉ
  2893.  
  2894.  Purpose:    Display or change the current directory. 
  2895.  
  2896.  Format:     CD [ path | - ] 
  2897.                 or 
  2898.              CHDIR [ path | - ] 
  2899.  
  2900.              path :  The directory to change to, including an optional drive 
  2901.              name. 
  2902.  
  2903.  See also:  CDD, MD, PUSHD, RD, CDPATH, and Directory Navigation. 
  2904.  
  2905.  Usage 
  2906.  
  2907.  CD and CHDIR are synonyms.  You can use either one. 
  2908.  
  2909.  CD lets you navigate through a drive's structure by changing the current 
  2910.  working directory.  If you enter CD and a directory name, the named directory 
  2911.  becomes the new current directory.  For example, to change to the subdirectory 
  2912.  C:\FINANCE\MYFILES : 
  2913.  
  2914.           [c:\] cd \finance\myfiles
  2915.           [c:\finance\myfiles]
  2916.  
  2917.  Every disk drive on the system has its own current directory. Specifying both 
  2918.  a drive and a directory in the CD command will change the current directory on 
  2919.  the specified drive, but will not change the default drive.  For example, to 
  2920.  change the default directory on drive A: 
  2921.  
  2922.           [c:\] cd a:\utility
  2923.           [c:\]
  2924.  
  2925.  Notice that this command does not change to drive A:.  Use the CDD command to 
  2926.  change the current drive and directory at the same time. 
  2927.  
  2928.  When you use CD to change to a directory on an HPFS drive, you must quote the 
  2929.  path name if it contains whitespace or special characters.  See File Names and 
  2930.  File Systems for additional details. 
  2931.  
  2932.  You can change to the parent directory with CD ..; you can also go up one 
  2933.  additional directory level with each additional [.]. For example, CD .... will 
  2934.  go up three levels in the directory tree (see Extended Parent Directory 
  2935.  Names).  You can move to a sibling directory -- one that branches from the 
  2936.  same parent directory as the current subdirectory -- with a command like CD 
  2937.  ..\newdir. 
  2938.  
  2939.  If you enter CD with no argument or with only a disk drive name, it will 
  2940.  display the current directory on the default or named drive. 
  2941.  
  2942.  If CD cannot change to the directory you have specified it will attempt to 
  2943.  search the CDPATH and the extended directory search database in order to find 
  2944.  a matching directory and switch to it.  You can also use wildcards in the path 
  2945.  to force an extended directory search.  See the section on Directory 
  2946.  Navigation for complete details on these and other directory navigation 
  2947.  features. 
  2948.  
  2949.  CD saves the current directory before changing to a new directory. You can 
  2950.  switch back to the previous directory by entering CD - (there must be a space 
  2951.  between the CD command and the hyphen).  You can switch back and forth between 
  2952.  two directories by repeatedly entering CD -.  The saved directory is the same 
  2953.  for both the CD and CDD commands.  Drive changes and automatic directory 
  2954.  changes also modify the saved directory, so you can use CD - to return to a 
  2955.  directory that you exited with an automatic directory change. 
  2956.  
  2957.  Directory changes made with CD are also recorded in the directory history list 
  2958.  and can be displayed in the directory history window, which allows you to 
  2959.  return quickly to a recently-used directory. 
  2960.  
  2961.  CD never changes the default drive.  If you change directories on one drive, 
  2962.  switch to another drive, and then enter CD -, the directory will be restored 
  2963.  on the first drive but the current drive will not be changed. 
  2964.  
  2965.  
  2966. ΓòÉΓòÉΓòÉ 6.9. CDD - Change the current drive and directory ΓòÉΓòÉΓòÉ
  2967.  
  2968.  Purpose:    Change the current disk drive and directory. 
  2969.  
  2970.  Format:     CDD [/A /S[drive ...]] [path | - ] 
  2971.  
  2972.              path :  The name of the directory (or drive and directory) to 
  2973.              change to. 
  2974.              drive :  A drive or list of drives to include in the extended 
  2975.              directory search database. 
  2976.  
  2977.              /A(ll drives)                   /S(earch tree) 
  2978.  
  2979.  See also:  CD, MD, PUSHD, RD, CDPATH, and Directory Navigation. 
  2980.  
  2981.  Usage 
  2982.  
  2983.  CDD is similar to the CD command, except that it also changes the default disk 
  2984.  drive if one is specified.  CDD will change to the directory and drive you 
  2985.  name.  To change from the root directory on drive A to the subdirectory C:\WP: 
  2986.  
  2987.           [a:\] cdd c:\wp
  2988.           [c:\wp]
  2989.  
  2990.  You can change to the parent directory with CDD ..; you can also go up one 
  2991.  additional directory level with each additional [.].  For example, CDD .... 
  2992.  will go up three levels in the directory tree (see Extended Parent Directory 
  2993.  Names). 
  2994.  
  2995.  CDD can also change to a network drive and directory specified with a UNC name 
  2996.  (see File Systems for more information about network directories). 
  2997.  
  2998.  When you use CDD to change to a directory on an HPFS drive, you must quote the 
  2999.  path name if it contains whitespace or special characters.  See File Names and 
  3000.  File Systems for additional details. 
  3001.  
  3002.  If CDD cannot change to the directory you have specified it will attempt to 
  3003.  search the CDPATH and the extended directory search database in order to find 
  3004.  a matching directory and switch to it.  You can also use wildcards in the path 
  3005.  to force an extended directory search.  See the section on Directory 
  3006.  Navigation for complete details on these and other directory navigation 
  3007.  features. 
  3008.  
  3009.  CDD saves the current drive and directory before changing to a new directory. 
  3010.  You can switch back to the previous drive and directory by entering CDD - 
  3011.  (there must be a space between the CDD command and the hyphen).  You can 
  3012.  switch back and forth between two drives and directories by repeatedly 
  3013.  entering CDD -.  The saved directory is the same for both the CD and CDD 
  3014.  commands.  Drive changes and automatic directory changes also modify the saved 
  3015.  directory, so you can use CDD - to return to a directory that you exited with 
  3016.  a drive change or an automatic directory change. 
  3017.  
  3018.  Directory changes made with CDD are also recorded in the directory history 
  3019.  list and can be displayed in the directory history window, which allows you to 
  3020.  return quickly to a recently-used directory. 
  3021.  
  3022.  Options 
  3023.  
  3024.     /A:     (All drives) When CDD is used with this option, it displays the 
  3025.             current directory on all drives from C: to the last drive in the 
  3026.             system.  You cannot move to a new drive and directory and use /A in 
  3027.             the same command. 
  3028.  
  3029.     /S:     (Search tree) Builds or rebuilds the Extended Directory Search 
  3030.             database, JPSTREE.IDX.  You cannot move to a new drive and 
  3031.             directory and use /S in the same command. 
  3032.  
  3033.             To include all local hard drives in the database use the command: 
  3034.  
  3035.                                 cdd /s
  3036.  
  3037.             To limit or add to the list of drives included in the database, 
  3038.             list the drives and network volume names after the /S switch.  For 
  3039.             example, to include drives C, D, E, and the network volume 
  3040.             \\server\dir1 in the database, use this command: 
  3041.  
  3042.                                 cdd /s cde \\server\dir1
  3043.  
  3044.             All non-hidden directories on the listed drives will be indexed; 
  3045.             you cannot restrict the database to certain directories within a 
  3046.             drive.  Each time you use /S, everything in the previous directory 
  3047.             database is replaced by the new database that is created. 
  3048.  
  3049.  
  3050. ΓòÉΓòÉΓòÉ 6.10. CHCP - Change the current code page ΓòÉΓòÉΓòÉ
  3051.  
  3052.  Purpose:    Display or change the current system code page. 
  3053.  
  3054.  Format:     CHCP [n ] 
  3055.  
  3056.              n :  A system code page number. 
  3057.  
  3058.  Usage 
  3059.  
  3060.  Code page switching allows you to select different character sets for language 
  3061.  support. 
  3062.  
  3063.  If you enter CHCP without a number, the current code page is displayed. 
  3064.  
  3065.           [c:\] chcp
  3066.           Active code page: 437
  3067.  
  3068.  If you enter CHCP plus a code page number, the system code page is changed. 
  3069.  For example, to set the code page to multilingual: 
  3070.  
  3071.           [c:\] chcp 850
  3072.  
  3073.  CHCP only affects the current 4OS2 session, and any new programs started from 
  3074.  within that session; the active code page in other sessions remains unchanged. 
  3075.  
  3076.  CHCP accepts one of the prepared system code pages.  An error message is 
  3077.  displayed if a code page is selected that has not been prepared for the 
  3078.  system. 
  3079.  
  3080.  See your OS/2 documentation for more information on CHCP. 
  3081.  
  3082.  
  3083. ΓòÉΓòÉΓòÉ 6.11. CLS - Clear the screen ΓòÉΓòÉΓòÉ
  3084.  
  3085.  Purpose:    Clear the video display and move the cursor to the upper left 
  3086.              corner; optionally change the default display and border colors. 
  3087.  
  3088.  Format:     CLS [[BRIght] [BLInk] fg ON [BRIght] bg ] [BORder bc ] 
  3089.  
  3090.              fg :  The new foreground color 
  3091.              bg :  The new background color 
  3092.              bc :  The new border color 
  3093.  
  3094.  Usage 
  3095.  
  3096.  CLS can be used to clear the screen without changing colors, or to clear the 
  3097.  screen and change the screen colors simultaneously. These three examples show 
  3098.  how to clear the screen to the default colors, to bright white letters on a 
  3099.  blue background, and to bright yellow letters on a magenta background with a 
  3100.  blue border: 
  3101.  
  3102.           [c:\] cls
  3103.           [c:\] cls bright white on blue
  3104.           [c:\] cls bri yel on mag bor blu
  3105.  
  3106.  CLS is often used in batch files to clear the screen before displaying text. 
  3107.  
  3108.  See Colors and Color Names for details about colors and notes on the use of 
  3109.  bright background colors. 
  3110.  
  3111.  
  3112. ΓòÉΓòÉΓòÉ 6.12. COLOR - Change the display colors ΓòÉΓòÉΓòÉ
  3113.  
  3114.  Purpose:    Change the default display colors. 
  3115.  
  3116.  Format:     COLOR [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  3117.  
  3118.              fg :  The new foreground color 
  3119.              bg :  The new background color 
  3120.              bc :  The new border color 
  3121.  
  3122.  See also:  CLS, and Colors and Color Names for details about using colors. 
  3123.  
  3124.  Usage 
  3125.  
  3126.  COLOR is normally used in batch files before displaying text. For example, to 
  3127.  set screen colors to bright white on blue, you can use this command: 
  3128.  
  3129.           [c:\] color bright white on blue
  3130.  
  3131.  
  3132. ΓòÉΓòÉΓòÉ 6.13. COPY - Copy files ΓòÉΓòÉΓòÉ
  3133.  
  3134.  Purpose:    Copy data between disks, directories, files, or physical hardware 
  3135.              devices (such as your printer or serial port). 
  3136.  
  3137.  Format:     COPY [/A:[[-]rhsda] /C /E /H /K /M /N /P /Q /R /S /T /U /V /X /Z] 
  3138.              source [+] ... [/A /B] destination [/A /B] 
  3139.  
  3140.              source :  A file or list of files or a device to copy from . 
  3141.              destination :  A file, directory, or device to copy to . 
  3142.  
  3143.              /A(SCII)                        /P(rompt) 
  3144.              /A: (Attribute select)          /Q(uiet) 
  3145.              /B(inary)                       /R(eplace) 
  3146.              /C(hanged)                      /S(ubdirectories) 
  3147.              /E (no Error messages)          /T(otals) 
  3148.              /H(idden)                       /U(pdate) 
  3149.              /K(eep attributes)              /V(erify) 
  3150.              /M(odified)                     /X (clear archive) 
  3151.              /N(othing)                      /Z (overwrite) 
  3152.  
  3153.  See also:  ATTRIB, MOVE, and REN. 
  3154.  
  3155.  File Selection 
  3156.  
  3157.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  3158.  Date, time, size, or exclude ranges anywhere on the line apply to all source 
  3159.  files. 
  3160.  
  3161.  Usage 
  3162.  
  3163.  The COPY command accepts all traditional syntax and options and adds many new 
  3164.  features. 
  3165.  
  3166.  The simplest use of COPY is to make a copy of a file, like this example which 
  3167.  makes a copy of a file called FILE1.ABC : 
  3168.  
  3169.           [c:\] copy file1.abc file2.def
  3170.  
  3171.  You can also copy a file to another drive and/or directory.  The following 
  3172.  command copies FILE1 to the \MYDIR directory on drive E: 
  3173.  
  3174.           [c:\] copy file1 e:\mydir
  3175.  
  3176.  You can copy several files at once by using wildcards: 
  3177.  
  3178.           [c:\] copy *.txt e:\mydir
  3179.  
  3180.  When you COPY files to or from an HPFS drive, you must quote the path name if 
  3181.  it contains whitespace or special characters.  See File Names and File Systems 
  3182.  for additional details. 
  3183.  
  3184.  Copying Files 
  3185.  
  3186.  You can copy several files at once by using wildcards: 
  3187.  
  3188.           [c:\] copy *.txt e:\mydir
  3189.  
  3190.  You can also list several source files in one command.  The following command 
  3191.  copies 3 files from the current directory to the \MYDIR directory on drive E: 
  3192.  
  3193.           [c:\] copy file1 file2 file3 e:\mydir
  3194.  
  3195.  COPY also understands include lists, so you can specify several different 
  3196.  kinds of files in the same command.  This command copies the .TXT,  .DOC, and 
  3197.  .BAT files from the E:\MYDIR directory to the root directory of drive A: 
  3198.  
  3199.           [c:\] copy e:\mydir\*.txt;*.doc;*.bat a:\
  3200.  
  3201.  If there is only one argument on the line, COPY assumes it is the source, and 
  3202.  uses the current drive and directory as the destination.  For example, the 
  3203.  following command copies all the .DAT files on drive A to the current 
  3204.  directory on drive C: 
  3205.  
  3206.           [c:\data] copy a:*.dat
  3207.  
  3208.  If there are two or more arguments on the line, separated by spaces, then COPY 
  3209.  assumes that the last argument is the destination and copies all source files 
  3210.  to this new location.  If the destination is a drive, directory, or device 
  3211.  name then the source files are copied individually to the new location.  If 
  3212.  the destination is a file name, the first source file is copied to the 
  3213.  destination, and any additional source files are then appended to the new 
  3214.  destination file. 
  3215.  
  3216.  For example, the first of these commands copies the .DAT files from the 
  3217.  current directory on drive A individually to C:\MYDIR (which must already 
  3218.  exist as a directory); the second appends all the .DAT files together into one 
  3219.  large file called C:\DATA (assuming C:\DATA is not a directory): 
  3220.  
  3221.           [c:\] copy a:*.dat c:\mydir\
  3222.           [c:\] copy a:*.dat c:\data
  3223.  
  3224.  When you copy to a directory, if you add a backslash [\] to the end of the 
  3225.  name as shown in the first example above, COPY will display an error message 
  3226.  if the name does not refer to an existing directory.  You can use this feature 
  3227.  to keep COPY from treating a mistyped destination directory name as a file 
  3228.  name and attempting to append all your source files to a destination file, 
  3229.  when you really meant to copy them individually to a destination directory. 
  3230.  
  3231.  To copy a file to a device such as the printer, use the device name as the 
  3232.  destination, for example: 
  3233.  
  3234.           [c:\] copy schedule.txt prn
  3235.  
  3236.  To copy text to or from the clipboard use CLIP: as the device name.  Using 
  3237.  CLIP: with non-text data will produce unpredictable results.  See Redirection 
  3238.  for additional information on CLIP:. 
  3239.  
  3240.  Appending Files 
  3241.  
  3242.  A plus [+] tells COPY to append two or more files to a single destination 
  3243.  file.  If you list several source files separated with [+] and don't specify a 
  3244.  destination, COPY will use the name of the first source file as the 
  3245.  destination, and append each subsequent file to the first file. 
  3246.  
  3247.  For example, the following command will append the contents of C:\MEMO2 and 
  3248.  C:\MEMO3 to C:\MEMO1 and leave the combined contents in the file named 
  3249.  C:\MEMO1 : 
  3250.  
  3251.           [c:\] copy memo1+memo2+memo3
  3252.  
  3253.  To append the same three files but store the result in BIGMEMO: 
  3254.  
  3255.           [c:\] copy memo1+memo2+memo3 bigmemo
  3256.  
  3257.  To append C:\MEM\MEMO2 and C:\MEM\MEMO3 to D:\DATA\MEMO1, and leave the result 
  3258.  in C:\MEM\MEMO1 :  If no destination is specified, the destination file will 
  3259.  always be created in the current directory even if the first source file is in 
  3260.  another directory or on another drive.  For example, this command will append 
  3261.  C:\MEM\MEMO2 and C:\MEM\MEMO3 to D:\DATA\MEMO1, and leave the result in 
  3262.  C:\MEM\MEMO1 : 
  3263.  
  3264.           [c:\mem] copy d:\data\memo1+memo2+memo3
  3265.  
  3266.  You cannot append files to a device (such as a printer); if you try to do so, 
  3267.  COPY will ignore the [+] signs and copy the files individually.  If you 
  3268.  attempt to append several source files to a destination directory or disk, 
  3269.  COPY will append the files and place the copy in the new location with the 
  3270.  same name as the first source file. 
  3271.  
  3272.  Advanced Features 
  3273.  
  3274.  If your destination has wildcards in it, COPY will attempt to match them with 
  3275.  the source names.  For example, this command copies the .DAT files from drive 
  3276.  A to C:\MYDIR and gives the new copies the extension .DX : 
  3277.  
  3278.           [c:\] copy a:*.dat c:\mydir\*.dx
  3279.  
  3280.  This feature can give you unexpected results if you use it with multiple 
  3281.  source file names.  For example, suppose that drive A contains XYZ.DAT and 
  3282.  XYZ.TXT.  The command 
  3283.  
  3284.           [c:\] copy a:\*.dat a:\*.txt c:\mydir\*.dx
  3285.  
  3286.  will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will copy A:XYZ.TXT to 
  3287.  C:\MYDIR\XYZ.DX, overwriting the first file it copied. 
  3288.  
  3289.  COPY also understands include lists, so you can specify several different 
  3290.  kinds of files in the same command.  This command copies the .TXT, .DOC, and 
  3291.  .BAT files from the E:\MYDIR directory to the root directory of drive A: 
  3292.  
  3293.           [c:\] copy e:\mydir\*.txt;*.doc;*.bat a:\
  3294.  
  3295.  You can use date, time, and size ranges to further define the files that you 
  3296.  want to copy.  This example copies every file in the E:\MYDIR directory, which 
  3297.  was created or modified yesterday, and which is also 10,000 bytes or smaller 
  3298.  in size, to the root directory of drive A: 
  3299.  
  3300.           [c:\] copy /[d-1] /[s0,10000] e:\mydir\*.* a:\
  3301.  
  3302.  You can also use file exclusion ranges to restrict the list of files that 
  3303.  would normally be selected with wildcards.  This example copies every file in 
  3304.  the E:\MYDIR directory except backup (.BAK or .BK!) files: 
  3305.  
  3306.           [c:\] copy /[!*.bak;*.bk!] e:\mydir\*.* a:\
  3307.  
  3308.  COPY will normally process source files which do not have the hidden or system 
  3309.  attribute, and will ignore the read-only and archive attributes.  It will 
  3310.  always set the archive attribute and clear the read-only attribute of 
  3311.  destination files.  In addition, if the destination is an existing file with 
  3312.  the read-only attribute, COPY will generate an "Access Denied" error and 
  3313.  refuse to overwrite the file.  You can alter some of these behaviors with 
  3314.  switches: 
  3315.  
  3316.     /A:     Forces COPY to process source files with the attributes you specify 
  3317.             after the ":", or to process all source files regardless of 
  3318.             attributes (if /A: is used by itself). 
  3319.  
  3320.     /H      Forces COPY to process hidden and system source files, as well as 
  3321.             normal files.  The hidden and system attributes from each source 
  3322.             file will be preserved when creating the destination files. 
  3323.  
  3324.     /K      Retains the read-only attribute from each source file when creating 
  3325.             the destinationfile.  See /K below for a special note if you are 
  3326.             running under Novell Netware. 
  3327.  
  3328.     /Z      Forces COPY to overwrite an existing read-only destination file. 
  3329.  
  3330.  Use caution with /A:, /H, or /K when both the source and destination 
  3331.  directories contain file descriptions.  If the source file specification 
  3332.  matches the description file name (normally DESCRIPT.ION), and you use a 
  3333.  switch which tells COPY to process hidden files, the DESCRIPT.ION file itself 
  3334.  will be copied, overwriting any existing file descriptions in the destination 
  3335.  directory.  For example, if the \DATA directory contains file descriptions 
  3336.  this command would overwrite any existing descriptions in the \SAVE directory: 
  3337.  
  3338.           [c:\data] copy /h d*.* \save\
  3339.  
  3340.  (If you remove the hidden attribute from the DESCRIPT.ION file the same 
  3341.  caution applies even if you do not use /A:, /H, or /K, as DESCRIPT.ION is then 
  3342.  treated like any other file.) 
  3343.  
  3344.  If you copy a file from a FAT volume to an HPFS volume, and you do not give an 
  3345.  explicit destination name (i.e. you are moving the file to the current 
  3346.  directory, or your destination name is made up entirely of wildcards), COPY 
  3347.  will look for a .LONGNAME extended attribute for the source file.  If it finds 
  3348.  that attribute, it will use the long filename for the destination file.  If it 
  3349.  does not, it will use the short name. 
  3350.  
  3351.  Similarly, if you COPY files with long filenames from an HPFS volume to a FAT 
  3352.  volume, 4OS2 will create the destination files with short, FAT-compatible 
  3353.  names and save the long filenames in the .LONGNAME extended attribute.  The 
  3354.  short name is created by replacing special characters with underscores, adding 
  3355.  numeric digits to the filename (if necessary) to make the new name unique, and 
  3356.  truncating the name to fit with in the "8.3" FAT name structure. 
  3357.  
  3358.  Options 
  3359.  
  3360.  The /A(SCII) and /B(inary) options apply to the preceding filename and to all 
  3361.  subsequent filenames on the command line until the file name preceding the 
  3362.  next /A or /B, if any.  The other options (/A:, /C, /E, /H, /K, /M, /N, /P, 
  3363.  /Q, /R, /S, /T, /U, /V, /X, /Z) apply to all filenames on the command line, no 
  3364.  matter where you put them.  For example, either of the following commands 
  3365.  could be used to copy a font file to the printer in binary mode: 
  3366.  
  3367.           [c:\] copy /b myfont.dat prn
  3368.           [c:\] copy myfont.dat /b prn
  3369.  
  3370.  Some options do not make sense in certain contexts, in which case COPY will 
  3371.  ignore them.  For example, you cannot prompt before replacing an existing file 
  3372.  when the destination is a device such as the printer -- there's no such thing 
  3373.  as an "existing file" on the printer.  If you use conflicting output options, 
  3374.  like /Q and /P, COPY will generally take a "conservative" approach and give 
  3375.  priority to the option which generates more prompts or more information. 
  3376.  
  3377.     /A:     (ASCII) If you use /A with a source filename, the file will be 
  3378.             copied up to, but not including, the first Ctrl-Z (Control-Z or 
  3379.             ASCII 26) character in the file (some application programs use the 
  3380.             Ctrl-Z to mark the end of a file).  If you use /A with a 
  3381.             destination filename, a Ctrl-Z will be added to the end of the 
  3382.             file.  /A is the default when appending files, or when the 
  3383.             destination is a device like NUL or PRN, rather than a disk file. 
  3384.             Also see /B. 
  3385.  
  3386.     /A::    (Attribute select) Select only those files that have the specified 
  3387.             attribute(s) set.  Preceding the attribute character with a hyphen 
  3388.             [-] will select files that do not have that attribute set.  The 
  3389.             colon [:] after /A is required.  The attributes are: 
  3390.  
  3391.                            R  Read-only 
  3392.                            H  Hidden 
  3393.                            S  System 
  3394.                            D  Subdirectory 
  3395.                            A  Archive 
  3396.  
  3397.             If no attributes are listed at all (e.g., COPY /A: ...), COPY will 
  3398.             select all files and subdirectories including hidden and system 
  3399.             files.  If attributes are combined, all the specified attributes 
  3400.             must match for a file to be selected. For example, /A:RHS will 
  3401.             select only those files with all three attributes set. 
  3402.  
  3403.             See the cautionary note under Advanced Features above before using 
  3404.             /A: when both source and destination directories contain file 
  3405.             descriptions. 
  3406.  
  3407.             You must include the colon with this option to distinguish it from 
  3408.             the /A(SCII) switch, above. 
  3409.  
  3410.     /B:     (Binary) If you use /B with a source filename, the entire file is 
  3411.             copied; Ctrl-Z characters in the file do not affect the copy 
  3412.             operation.  Using /B with a destination filename prevents addition 
  3413.             of a Ctrl-Z to the end of the destination file.  /B is the default 
  3414.             for normal file copies.  Also see /A. 
  3415.  
  3416.     /C:     (Changed files) Copy files only if the destination file exists and 
  3417.             is older than the source (see also /U).  This option is useful for 
  3418.             updating the files in one directory from those in another without 
  3419.             copying any newly created files. 
  3420.  
  3421.     /E:     (no Error messages) Suppress all non-fatal error messages, such as 
  3422.             "File not found."  Fatal error messages, such as "Drive not ready," 
  3423.             will still be displayed.  This option is most useful in batch files 
  3424.             and aliases. 
  3425.  
  3426.     /H:     (Hidden) Copy all matching files including those with the hidden 
  3427.             and/or system attribute set. 
  3428.  
  3429.             See the cautionary note under Advanced Features above before using 
  3430.             /H when both source and destination directories contain file 
  3431.             descriptions. 
  3432.  
  3433.     /K:     (Keep attributes) To maintain compatibility with CMD.EXE, COPY 
  3434.             normally maintains the hidden and system attributes, sets the 
  3435.             archive attribute, and removes the read-only attribute on the 
  3436.             destination file.  /K tells COPY to also maintain the read-only 
  3437.             attribute on the destination file.  However, if the destination is 
  3438.             on a Novell Netware volume, this option will fail to maintain the 
  3439.             read-only attribute.  This is due to the way Netware handles file 
  3440.             attributes, and is not a problem in COPY. 
  3441.  
  3442.     /M:     (Modified) Copy only those files with the archive attribute set, 
  3443.             i.e., those which have been modified since the last backup.  The 
  3444.             archive attribute of the source will not be cleared after copying; 
  3445.             to clear it use the /X switch, or use ATTRIB. 
  3446.  
  3447.     /N:     (Nothing) Do everything except actually perform the copy.  This 
  3448.             option is useful for testing what the result of a complex COPY 
  3449.             command will be.  /N does not prevent creation of destination 
  3450.             subdirectories when it is used with /s. 
  3451.  
  3452.     /P:     (Prompt) Ask the user to confirm each source file.  Your options at 
  3453.             the prompt are explained in detail under Page and File Prompts. 
  3454.  
  3455.     /Q:     (Quiet) Don't display filenames or the total number of files 
  3456.             copied.  This option is most often used in batch files.  See also 
  3457.             /T. 
  3458.  
  3459.     /R:     (Replace) Prompt the user before overwriting an existing file. 
  3460.             Your options at the prompt are explained in detail under Page and 
  3461.             File Prompts. 
  3462.  
  3463.     /S:     (Subdirectories) Copy the subdirectory tree starting with the files 
  3464.             in the source directory plus each subdirectory below that.  The 
  3465.             destination must be a directory; if it doesn't exist, COPY will 
  3466.             attempt to create it.  COPY will also attempt to create needed 
  3467.             subdirectories on the tree below the destination, including empty 
  3468.             source directories.  If COPY /S creates one or more destination 
  3469.             directories, they will be added automatically to the extended 
  3470.             directory search database. 
  3471.  
  3472.             If you attempt to use COPY /S to copy a subdirectory tree into part 
  3473.             of itself, COPY will detect the resulting infinite loop, display an 
  3474.             error message, and exit. 
  3475.  
  3476.     /T:     (Totals) Turns off  the display of filenames, like /Q, but does 
  3477.             display the total number of files copied. 
  3478.  
  3479.     /U:     (Update) Copy each source file only if it is newer than a matching 
  3480.             destination file or if a matching destination file does not exist 
  3481.             (see also /C).  This option is useful for keeping one directory 
  3482.             matched with another with a minimum of copying. 
  3483.  
  3484.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  3485.             VERIFY ON command, but is only active during the COPY.  /V does not 
  3486.             read back the file and compare its contents with what was written; 
  3487.             it only verifies that the data written to disk is physically 
  3488.             readable. 
  3489.  
  3490.     /X:     Clears the archive attribute from the source file after a 
  3491.             successful copy.  This option is most useful if you are using COPY 
  3492.             to maintain a set of backup files. 
  3493.  
  3494.     /Z:     Overwrites read-only destination files.  Without this option, COPY 
  3495.             will fail with an "Access denied" error if the destination file has 
  3496.             its read-only attribute set.  This option allows COPY to overwrite 
  3497.             read-only files without generating any errors. 
  3498.  
  3499.  
  3500. ΓòÉΓòÉΓòÉ 6.14. DATE - Change the system date ΓòÉΓòÉΓòÉ
  3501.  
  3502.  Purpose:    Display and optionally change the system date. 
  3503.  
  3504.  Format:     DATE [mm -dd -yy ] 
  3505.  
  3506.              mm :  The month (1 - 12). 
  3507.              dd :  The day (1 - 31). 
  3508.              yy :  The year (00 - 99, or a 4- digit year). 
  3509.  
  3510.  See also:  TIME. 
  3511.  
  3512.  Usage 
  3513.  
  3514.  If you simply type DATE without any parameters, you will see the current 
  3515.  system date and time, and be prompted for a new date.  Press ENTER if you 
  3516.  don't wish to change the date.  If you type a new date, it will become the 
  3517.  current system date, which is included in the directory entry for each file as 
  3518.  it is created or altered: 
  3519.  
  3520.           [c:\] date
  3521.           Mon  Dec 22, 1997  9:30:06
  3522.           Enter new date (mm-dd-yy):
  3523.  
  3524.  You can also enter a new system date by typing the DATE command plus the new 
  3525.  date on the command line: 
  3526.  
  3527.           [c:\] date 10-16-97
  3528.  
  3529.  You can use hyphens, slashes, or periods to separate the month, day, and year 
  3530.  entries.  The year can be entered as a 4-digit or 2-digit value.  Two-digit 
  3531.  years between 80 and 99 are interpreted as 1980 - 1999; values between 00 and 
  3532.  79 are interpreted as 2000 - 2079. 
  3533.  
  3534.  DATE adjusts the format it expects depending on your country settings.  When 
  3535.  entering the date, use the correct format for the country setting currently in 
  3536.  effect on your system. 
  3537.  
  3538.  
  3539. ΓòÉΓòÉΓòÉ 6.15. DEL - Delete one or more files ΓòÉΓòÉΓòÉ
  3540.  
  3541.  Purpose:    Erase one file, a group of files, or entire subdirectories. 
  3542.  
  3543.  Format:     DEL [/A:[[-]rhsda] /E /F /N /P /Q /S /T /W /X /Y /Z] file ... 
  3544.                 or 
  3545.              ERASE [/A:[[-]rhsda] /E /F /N /P /Q /S /T /W /X /Y /Z] file ... 
  3546.  
  3547.              file :  The file, subdirectory, or list of files or subdirectories 
  3548.              to erase. 
  3549.  
  3550.              /A: (ttribute select)           /S(ubdirectories) 
  3551.              /E (no Error messages)          /T(otal) 
  3552.              /F(orce delete)                 /W(ipe) 
  3553.              /N(othing)                      /X (remove empty subdirectories) 
  3554.              /P(rompt)                       /Y(es to all prompts) 
  3555.              /Q(uiet)                        /Z(ap hidden and read-only files) 
  3556.  
  3557.  File Selection 
  3558.  
  3559.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  3560.  
  3561.  Usage 
  3562.  
  3563.  DEL and ERASE are synonyms, you can use either one. 
  3564.  
  3565.  Use the DEL and ERASE commands with caution; the files and subdirectories that 
  3566.  you erase may be impossible to recover without specialized utilities and a lot 
  3567.  of work. 
  3568.  
  3569.  To erase a single file, simply enter the file name: 
  3570.  
  3571.           [c:\] del letters.txt
  3572.  
  3573.  You can also erase multiple files in a single command.  For example, to erase 
  3574.  all the files in the current directory with a .BAK or .PRN extension: 
  3575.  
  3576.           [c:\] del *.bak *.prn
  3577.  
  3578.  When you use DEL on an HPFS drive, you must quote any file names which contain 
  3579.  whitespace or special characters.  See File Names for additional details. 
  3580.  
  3581.  To exclude files from a DEL command, use a file exclusion range.  For example, 
  3582.  to delete all files in the current directory except those whose extension is 
  3583.  .TXT, use a command like this: 
  3584.  
  3585.           [c:\] del /[!*.TXT] *.*
  3586.  
  3587.  When using exclusion ranges or other more complex options you may want to use 
  3588.  the /N switch first, to preview the effects of the DEL without actually 
  3589.  deleting any files. 
  3590.  
  3591.  If you enter a subdirectory name, or a filename composed only of wildcards (* 
  3592.  and/or ?), DEL asks for confirmation (Y or N) unless you specified the /Y 
  3593.  option.  If you respond with a Y, DEL will delete all the files in that 
  3594.  subdirectory (hidden, system, and read-only files are only deleted if you use 
  3595.  the /Z option). 
  3596.  
  3597.  DEL displays the amount of disk space recovered, unless the /Q option is used 
  3598.  (see below).  It does so by comparing the amount of free disk space before and 
  3599.  after the DEL command is executed.  This amount may be incorrect if you are 
  3600.  using a deletion tracking system which stores deleted files in a hidden 
  3601.  directory, or if, under a multitasking system, another program performs a file 
  3602.  operation while the DEL command is executing. 
  3603.  
  3604.  Remember that DEL removes file descriptions along with files.  Most deletion 
  3605.  tracking systems will not be able to save or recover a file's description, 
  3606.  even if they can save or recover the data in a file. 
  3607.  
  3608.  When a file is deleted, its disk space is returned to the operating system for 
  3609.  use by other files.  However, the contents of the file remain on the disk 
  3610.  until they are overwritten by another file.  If you wish to obliterate a file 
  3611.  or wipe its contents clean, use DEL /W, which overwrites the file with zeros 
  3612.  before deleting it.  Use this option with caution -- once a file is 
  3613.  obliterated, it is impossible to recover. 
  3614.  
  3615.  DEL returns a non-zero exit code if no files are deleted, or if another error 
  3616.  occurs.  You can test this exit code with the %_? environment variable, and 
  3617.  use it with the conditional commands && and ||). 
  3618.  
  3619.  Options 
  3620.  
  3621.     /A::    (Attribute select) Select only those files that have the specified 
  3622.             attribute(s) set.  Preceding the attribute character with a hyphen 
  3623.             [-] will select files that do not have that attribute set.  The 
  3624.             colon [:] after /A is required.  The attributes are: 
  3625.  
  3626.                            R  Read-only 
  3627.                            H  Hidden 
  3628.                            S  System 
  3629.                            D  Subdirectory 
  3630.                            A  Archive 
  3631.  
  3632.             If no attributes are listed at all (e.g., DEL /A: ...), DEL will 
  3633.             select all files and subdirectories including hidden and system 
  3634.             files.  If attributes are combined, all the specified attributes 
  3635.             must match for a file to be selected. For example, /A:RHS will 
  3636.             select only those files with all three attributes set. 
  3637.  
  3638.     /E:     (No error messages) Suppress all non-fatal error messages, such as 
  3639.             "File Not Found."  Fatal error messages, such as "Drive not ready," 
  3640.             will still be displayed.  This option is most useful in batch files 
  3641.             and aliases. 
  3642.  
  3643.     /F:     (Force delete) This option forces deletion of the file without 
  3644.             saving it to the DELDIR directory (if DELDIR is not in use, /F has 
  3645.             no effect). 
  3646.  
  3647.     /N:     (Nothing) Do everything except actually delete the file(s).  This 
  3648.             is useful for testing what the result of a DEL would be. 
  3649.  
  3650.     /P:     (Prompt) Prompt the user to confirm each erasure.  Your options at 
  3651.             the prompt are explained in detail under Page and File Prompts. 
  3652.  
  3653.     /Q:     (Quiet) Don't display filenames as they are deleted, or the number 
  3654.             of files deleted or bytes freed.  See also /T. 
  3655.  
  3656.     /S:     (Subdirectories) Delete the specified files in this directory and 
  3657.             all of its subdirectories.  This can be used to delete all the 
  3658.             files in a subdirectory tree or even a whole disk.  It should be 
  3659.             used with caution! 
  3660.  
  3661.     /T:     (Total) Don't display filenames as they are deleted, but display 
  3662.             the total number of files deleted plus the amount of free disk 
  3663.             space recovered.  Unlike /Q, the /T option will not speed up 
  3664.             deletions under DOS. 
  3665.  
  3666.     /W:     (Wipe) Clear the file to zeros before deleting it.  Use this option 
  3667.             to completely obliterate a file's contents from your disk.  Once 
  3668.             you have used this option it is impossible to recover the file even 
  3669.             if you are using an undelete utility, because the contents of the 
  3670.             file are destroyed before it is deleted.  /W overwrites the file 
  3671.             only once; it does not adhere to security standards which require 
  3672.             multiple overwrites with varying data when destroying sensitive 
  3673.             information. 
  3674.  
  3675.     /X:     (Remove empty subdirectories) Remove empty subdirectories after 
  3676.             deleting (only useful when used with /S).  If DEL deletes one or 
  3677.             more directories, they will be removed automatically from the 
  3678.             extended directory search database. 
  3679.  
  3680.     /Y:     (Yes) The reverse of /P -- it assumes a Y response to everything, 
  3681.             including deleting an entire subdirectory tree.  4OS2 normally 
  3682.             prompts before deleting files when the name consists only of 
  3683.             wildcards or a subdirectory name (see above); /Y overrides this 
  3684.             protection, and should be used with extreme caution! 
  3685.  
  3686.     /Z:     (Zap) Delete read-only, hidden, and system files as well as normal 
  3687.             files.  Files with the read-only, hidden, or system attribute set 
  3688.             are normally protected from deletion; /Z overrides this protection, 
  3689.             and should be used with caution.  Because EXCEPT works by hiding 
  3690.             files, /Z will override an EXCEPT command.  However, files 
  3691.             specified in a file exclusion range will not be deleted by DEL /Z. 
  3692.  
  3693.             For example, to delete the entire subdirectory tree starting with 
  3694.             C:\UTIL, including hidden and read-only files, without prompting 
  3695.             (use this command with CAUTION!): 
  3696.  
  3697.                                 [c:\] del /sxyz c:\util\
  3698.  
  3699.  
  3700. ΓòÉΓòÉΓòÉ 6.16. DELAY - Pause for a specified length of time ΓòÉΓòÉΓòÉ
  3701.  
  3702.  Purpose:    Pause for a specified length of time. 
  3703.  
  3704.  Format:     DELAY [seconds ] 
  3705.  
  3706.              seconds :  The number of seconds to delay. 
  3707.  
  3708.  Usage 
  3709.  
  3710.  DELAY is useful in batch file loops while waiting for something to occur.  To 
  3711.  wait for 10 seconds: 
  3712.  
  3713.           delay 10
  3714.  
  3715.  DELAY is most useful when you need to wait a specific amount of time for an 
  3716.  external event, or check a system condition periodically.  For example, this 
  3717.  batch file checks the battery status (as reported by your Advanced Power 
  3718.  Management drivers) every 15 seconds, and gives a warning when battery life 
  3719.  falls below 30%: 
  3720.  
  3721.           do forever
  3722.              iff %_apmlife lt 30 then
  3723.                 beep 440 4 880 4 440 4 880 4
  3724.                 echo Low Battery!!
  3725.              endiff
  3726.              delay 15
  3727.           enddo
  3728.  
  3729.  The seconds value can be as large as 4 million seconds (49 days). 
  3730.  
  3731.  For delays shorter than one second, use the BEEP command with an inaudible 
  3732.  frequency (below 20 Hz). 
  3733.  
  3734.  4OS2 uses the minimum possible processor time during a DELAY, in order to 
  3735.  allow other applications full use of system resources. 
  3736.  
  3737.  You can cancel a delay by pressing Ctrl-C or Ctrl-Break. 
  3738.  
  3739.  
  3740. ΓòÉΓòÉΓòÉ 6.17. DESCRIBE - Create or modify file descriptions ΓòÉΓòÉΓòÉ
  3741.  
  3742.  Purpose:    Create, modify, or delete file and subdirectory descriptions. 
  3743.  
  3744.  Format:     DESCRIBE [/A:[[-]rhsda]] file [[/D]"description "] ... 
  3745.  
  3746.              file :  The file, directory, or list of files and directories to 
  3747.              operate on. 
  3748.              description :  The description to attach to the file. 
  3749.  
  3750.              /A: (Attribute select)          /D(escription follows) 
  3751.  
  3752.  File Selection 
  3753.  
  3754.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  3755.  
  3756.  Usage 
  3757.  
  3758.  DESCRIBE adds descriptions to files and subdirectories.  The descriptions can 
  3759.  be displayed by DIR in single-column mode and by SELECT.  Descriptions let you 
  3760.  identify your files in much more meaningful ways than you can in an 
  3761.  eight-character filename. 
  3762.  
  3763.  You enter a description on the command line by typing the DESCRIBE command, 
  3764.  the filename, and the description in quotation marks, like this: 
  3765.  
  3766.           [c:\] describe memo.txt "Memo to Bob about party"
  3767.  
  3768.  If you don't put a description on the command line, DESCRIBE will prompt you 
  3769.  for it: 
  3770.  
  3771.           [c:\] describe memo.txt
  3772.           Describe "memo.txt" : Memo to Bob about party
  3773.  
  3774.  If you use wildcards or multiple filenames with the DESCRIBE command and don't 
  3775.  include the description text, you will be prompted to enter a description for 
  3776.  each file.  If you do include the description on the command line, all 
  3777.  matching files will be given the same description. 
  3778.  
  3779.  If you use DESCRIBE on an HPFS drive, you must quote the file name if it 
  3780.  contains whitespace or special characters.  See File Names for additional 
  3781.  details. 
  3782.  
  3783.  If you enter a quoted description on the command line, and the text matches 
  3784.  the name of a file in the current directory, the command processor will treat 
  3785.  the string as a quoted file name, not as description text as you intended.  To 
  3786.  resolve this problem use the /D switch immediately prior to the quoted 
  3787.  description (with no intervening spaces).  For example, if the current 
  3788.  directory contains the files DATA.TST and "Test File", the first of these 
  3789.  commands will work as intended, but the second will not (in the second example 
  3790.  the string "test file" will be treated as a second file name, when it is 
  3791.  intended to be description text): 
  3792.  
  3793.           [c:\] describe data.tst /D"test file"
  3794.           [c:\] describe data.tst "test file"
  3795.  
  3796.  On HPFS drives you will not see file descriptions in a normal DIR display, 
  3797.  because DIR must leave space for the long filenames.  To view the 
  3798.  descriptions, use DIR /Z to display the directory in FAT format. 
  3799.  
  3800.  Each description can be up to 511 characters long.  You can change this limit 
  3801.  with the DescriptionMax directive in 4OS2.INI.  In order to fit your 
  3802.  descriptions on a single line in a standard DIR display, keep them to 4o 
  3803.  characters or less (longer descriptions are wrapped in the DIR output). 
  3804.  DESCRIBE can edit descriptions longer than DescriptionMax (up to a limit of 
  3805.  511 characters), but will not allow you to lengthen the existing text. 
  3806.  
  3807.  The descriptions are stored in each directory in a hidden file called 
  3808.  DESCRIPT.ION.  Use the ATTRIB command to remove the hidden attribute from this 
  3809.  file if you need to copy or delete it.  DESCRIPT.ION is always created as a 
  3810.  hidden file, but will not be re-hidden by 4OS2 if you remove the hidden 
  3811.  attribute. 
  3812.  
  3813.  You can change the description file name with the SETDOS /D command, or the 
  3814.  DescriptionName directive in 4OS2.INI, and retrieve it with the _DName 
  3815.  internal variable.  Use caution when changing the description file name, as 
  3816.  changing the name from the default will make it difficult to transfer file 
  3817.  descriptions to another system. 
  3818.  
  3819.  The description file is modified appropriately whenever you perform an 
  3820.  internal command which affects it (such as COPY, MOVE, DEL, or RENAME), but 
  3821.  not if you use an external program (such as XCOPY or a visual shell).  You can 
  3822.  disable description processing on the Options 1 page of the OPTION dialogs, 
  3823.  with the Descriptions directive in the .INI file, or with SETDOS /D. 
  3824.  
  3825.  When you COPY or MOVE files between two directories, both of which have 
  3826.  descriptions, and you use switches which enable processing of hidden files (or 
  3827.  you have removed the hidden attribute from DESCRIPT.ION), you must use caution 
  3828.  to avoid overwriting existing file descriptions in the destination directory 
  3829.  with the DESCRIPT.ION file from the source directory.  See the notes under the 
  3830.  Advanced Features sections of COPY and MOVE for additional details. 
  3831.  
  3832.  Options 
  3833.  
  3834.     /A::    (Attribute select) Select only those files that have the specified 
  3835.             attribute(s) set.  Preceding the attribute character with a hyphen 
  3836.             [-] will select files that do not have that attribute set.  The 
  3837.             colon [:] after /A is required.  The attributes are: 
  3838.  
  3839.                            R  Read-only 
  3840.                            H  Hidden 
  3841.                            S  System 
  3842.                            D  Subdirectory 
  3843.                            A  Archive 
  3844.  
  3845.             If no attributes are listed at all (e.g., DESCRIBE /A: ...), 
  3846.             DESCRIBE will select all files and subdirectories including hidden 
  3847.             and system files.  If attributes are combined, all the specified 
  3848.             attributes must match for a file to be selected. For example, 
  3849.             /A:RHS will select only those files with all three attributes set. 
  3850.  
  3851.     /D:     (Description follows) The quoted string immediately following this 
  3852.             switch is a description, not a file name. Use /D to avoid any 
  3853.             ambiguity in the meaning of quoted strings.  See the Usage section 
  3854.             above for details. 
  3855.  
  3856.  
  3857. ΓòÉΓòÉΓòÉ 6.18. DETACH - Start a program in detached mode ΓòÉΓòÉΓòÉ
  3858.  
  3859.  Purpose:    Start an OS/2 program in detached mode. 
  3860.  
  3861.  Format:     DETACH command 
  3862.  
  3863.              command :  The name of a command to execute, including an optional 
  3864.              drive and path specification. 
  3865.  
  3866.  See also:  START. 
  3867.  
  3868.  Usage 
  3869.  
  3870.  When you start a program with DETACH, that program cannot use the keyboard, 
  3871.  mouse, or video display.  It is "detached" from the normal means of user input 
  3872.  and output.  However, you can redirect the program's standard I/O to other 
  3873.  devices if necessary, using redirection symbols. 
  3874.  
  3875.  The command can be an internal command, external command, alias, or batch 
  3876.  file.  If it is not an external command, 4OS2 will detach a copy of itself to 
  3877.  execute the command. 
  3878.  
  3879.  For example, the following command will detach a copy of 4OS2 to run the batch 
  3880.  file XYZ.BTM : 
  3881.  
  3882.           [c:\] detach xyz.btm
  3883.  
  3884.  Once the program has started, 4OS2 returns to the prompt immediately.  It does 
  3885.  not wait for a detached program to finish. 
  3886.  
  3887.  There is no standard way to stop a detached program.  If the program does not 
  3888.  terminate on its own you must reboot the system or use an appropriate task 
  3889.  manager or external utility to stop it. 
  3890.  
  3891.  
  3892. ΓòÉΓòÉΓòÉ 6.19. DIR - Display directories ΓòÉΓòÉΓòÉ
  3893.  
  3894.  Purpose:    Display information about files and subdirectories. 
  3895.  
  3896.  Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /D /E /F /G /H /I"text" /J /K /L 
  3897.              /M /N /O[[:][-]adeginrsu] /P /R /S /T[:acw] /U /V /W /Z] [file 
  3898.              ...] 
  3899.  
  3900.              file :  The file, directory, or list of files or directories to 
  3901.              display. 
  3902.  
  3903.              /1 (one column)                 /L(ower case) 
  3904.              /2 (two columns)                /M (suppress footer) 
  3905.              /4 (four columns)               /N(ew format) 
  3906.              /A(ttribute select)             /O(rder) 
  3907.              /B(are)                         /P(ause) 
  3908.              /D(isable color coding)         /R (disable wRap) 
  3909.              /E (use upper case)             /S(ubdirectories) 
  3910.              /F(ull path)                    /T (aTtribute) or (Time) 
  3911.              /G (allocated size)             /U (sUmmary information) 
  3912.              /H(ide dots)                    /V(ertical sort) 
  3913.              /I (match descriptions)         /W(ide) 
  3914.              /J(ustify names)                /Z (use FAT format) 
  3915.              /K (suppress header) 
  3916.  
  3917.  See also:  ATTRIB, DESCRIBE, SELECT, and SETDOS. 
  3918.  
  3919.  File Selection 
  3920.  
  3921.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  3922.  
  3923.  Usage 
  3924.  
  3925.  DIR can be used to display information about files from one or more of your 
  3926.  disk directories, in a wide range of formats.  Depending on the options 
  3927.  chosen, you can display the file name, attributes, and size; the time and date 
  3928.  of the last change to the file; the file description; and the file's 
  3929.  compression ratio.  You can also display information in 1, 2, 4, 5, or more 
  3930.  columns, sort the files several different ways, use color to distinguish file 
  3931.  types, and pause after each full screen. 
  3932.  
  3933.  The various DIR displays are controlled through options or switches.  The best 
  3934.  way to learn how to use the many options available with the DIR command is to 
  3935.  experiment.  You will soon know which options you want to use regularly.  You 
  3936.  can select those options permanently by using the ALIAS command. 
  3937.  
  3938.  For example, to display all the files in the current directory, in 2 columns, 
  3939.  sorted vertically (down one column then down the next), and with a pause at 
  3940.  the end of each page: 
  3941.  
  3942.           [c:\] dir /2/p/v
  3943.  
  3944.  To set up this format as the default, using an alias: 
  3945.  
  3946.           [c:\] alias dir=*dir /2/p/v
  3947.  
  3948.  When you use DIR on an HPFS drive, you must quote any file names which contain 
  3949.  whitespace or special characters.  See File Names for additional details. 
  3950.  
  3951.  The following sections group DIR's features together in several categories. 
  3952.  Many of the sections move from a general discussion to more technical 
  3953.  material.  If you find some of the information in a category too detailed for 
  3954.  your needs, feel free to skip to the beginning of the next section.  The 
  3955.  sections are: 
  3956.  
  3957.             Selecting Files 
  3958.             Default DIR Output Format 
  3959.             Switching Formats 
  3960.             Multiple Column Displays 
  3961.             Color-Coded Directories 
  3962.             Redirected Output 
  3963.             Other Notes 
  3964.             Options 
  3965.  
  3966.  Selecting Files 
  3967.  
  3968.  DIR can display information about a single file or about several, dozens, 
  3969.  hundreds, or thousands of files at once.  To display information about a 
  3970.  single file, just add the name of the file to the DIR command line: 
  3971.  
  3972.           [c:\] dir january.wks
  3973.  
  3974.  The simplest way to view information about several files at once is to use 
  3975.  wildcards.  DIR can work with traditional wildcard characters (* and ?) and 
  3976.  the extended wildcards.  For example to display all of the .WKS files in the 
  3977.  current directory: 
  3978.  
  3979.           [c:\] dir *.wks
  3980.  
  3981.  To display all .TXT files whose names begin with A, B, or C: 
  3982.  
  3983.           [c:\] dir [abc]*.txt
  3984.  
  3985.  If you don't specify a filename, DIR defaults to *.* on traditional FAT 
  3986.  drives, and * on HPFS drives.  This default displays all non-hidden files and 
  3987.  subdirectories in the current directory. 
  3988.  
  3989.  If you link two or more filenames together with spaces, DIR will display all 
  3990.  of the files that match the first name and then all of the files that match 
  3991.  the second name.  You may use a different drive and path for each filename. 
  3992.  This example lists all of the .WKS and then all of the .WK1 files in the 
  3993.  current directory: 
  3994.  
  3995.           [c:\] dir *.wks *.wk1
  3996.  
  3997.  If you use an include list to link multiple filenames, DIR will display the 
  3998.  matching filenames in a single listing.  Only the first filename in an include 
  3999.  list can have a path; the other files must be in the same path.  This example 
  4000.  displays the same files as the previous example, but the .WKS and .WK1 files 
  4001.  are intermixed: 
  4002.  
  4003.           [c:\] dir *.wks;*.wk1
  4004.  
  4005.  You can include files in the current or named directory plus all of its 
  4006.  subdirectories by using the /S option.  This example displays all of the .WKS 
  4007.  and .WK1 files in the D:\DATA directory and each of its subdirectories: 
  4008.  
  4009.           [c:\] dir /s d:\data\*.wks;*.wk1
  4010.  
  4011.  You can also select files by their attributes by using the /A option.  For 
  4012.  example, this command displays the names of all of the subdirectories of the 
  4013.  current directory: 
  4014.  
  4015.           [c:\] dir /a:d
  4016.  
  4017.  Finally, with the /I option, DIR can select files to display based on their 
  4018.  descriptions (see the DESCRIBE command for more information on file 
  4019.  descriptions).  DIR will display a file if its description matches the text 
  4020.  after the /I switch.  The search is not case sensitive.  You can use wildcards 
  4021.  and extended wildcards as part of the text.  For example, to display any file 
  4022.  described as a "Test File" you can use this command: 
  4023.  
  4024.           [c:\] dir /i"test file"
  4025.  
  4026.  If you want to display files that include the words "test file" anywhere in 
  4027.  their descriptions, use extended wildcards like this: 
  4028.  
  4029.           [c:\] dir /i"*test file*"
  4030.  
  4031.  To display only those files which do not have descriptions, use: 
  4032.  
  4033.           [c:\] dir /I"[]"
  4034.  
  4035.  In addition, you can use ranges to select or exclude specific sets of files. 
  4036.  For example, to display all files modified in the last week, all files except 
  4037.  those with a .BAK extension, and all files over 500 KB in size: 
  4038.  
  4039.           [c:\] dir /[d-7]
  4040.           [c:\] dir /[!*.bak]
  4041.           [c:\] dir /[s500K]
  4042.  
  4043.  You can, of course, mix any of these file selection techniques in whatever 
  4044.  ways suit your needs. 
  4045.  
  4046.  Default DIR Output Format 
  4047.  
  4048.  DIR's output varies based on the type of volume or drive on which the files 
  4049.  are stored.  On an HPFS volume, the default DIR format contains 4 columns: the 
  4050.  date of the last file modification or write, the time of last write, the file 
  4051.  size in bytes, and the file name.  The name is displayed as it is stored on 
  4052.  the disk, in upper, lower, or mixed case.  DIR will wrap filenames from one 
  4053.  line to the next if they are too long to fit the width of the display.  The 
  4054.  standard output format is: 
  4055.  
  4056.            Volume in drive C is C - BOOTUP    Serial ...
  4057.            Directory of  C:\4OS230\*.*
  4058.  
  4059.           10-24-96  12:17         <DIR>    .
  4060.           10-24-96  12:17         <DIR>    ..
  4061.           10-28-96   7:57             967  4os2 3.txt
  4062.           10-21-96  18:08         212,854  4OS2.EXE
  4063.           11-02-96  10:08              45  4OS2.INI
  4064.  
  4065.  (See Switching Formats below for information on changing the standard long 
  4066.  filename format to allow room for file descriptions.) 
  4067.  
  4068.  On FAT volumes which do not support long file names, the default DIR format 
  4069.  contains 5 columns: the file name, the file size in bytes, the date of the 
  4070.  last write, the time of the last write, and the file's description.  File 
  4071.  names are listed in lower-case; directory names in upper case: 
  4072.  
  4073.            Volume in drive C is C - BOOTUP    Serial ...
  4074.            Directory of  C:\4OS230\*.*
  4075.  
  4076.           .            <DIR>     10-24-96  12:17
  4077.           ..           <DIR>     10-24-96  12:17
  4078.           TEST         <DIR>     11-01-96  16:21
  4079.           4os23.txt         967  10-28-96   7:57
  4080.           4os2.exe       212854  10-21-96  18:08 4OS2 exe ...
  4081.           4os2.ini           45  11-02-96  10:08 4OS2 conf ...
  4082.  
  4083.  DIR's output is normally sorted by name, with directories listed first.  You 
  4084.  can change the sort order with the /O option.  For example, these two commands 
  4085.  sort the output by date -- the first command lists the oldest file first; the 
  4086.  second command lists the oldest file last: 
  4087.  
  4088.           [c:\] dir /o:d
  4089.           [c:\] dir /o:-d
  4090.  
  4091.  When displaying file descriptions, DIR wraps long lines to fit on the screen. 
  4092.  DIR displays a maximum of 40 characters of text in each line of a description, 
  4093.  unless your screen width allows a wider display.  If you disable description 
  4094.  wrapping with the /R option, the description is truncated at the right edge of 
  4095.  the screen, and a right arrow [] is added at the end of the line to alert you 
  4096.  to the existence of additional description text. 
  4097.  
  4098.  Regardless of the volume type, DIR's default output is sorted.  It displays 
  4099.  directory names first, with "<DIR>" inserted instead of a file size, and then 
  4100.  filenames.  DIR assumes that sequences of digits should be sorted numerically 
  4101.  (for example, the file DRAW2 is listed before DRAW03 because 2 is numerically 
  4102.  smaller than 03), rather than strictly alphabetically (where DRAW2 would come 
  4103.  second because "2" is after "0" in alphanumeric order).  You can change the 
  4104.  sort order with the /O option.  When DIR displays file names in a multi-column 
  4105.  format, it sorts file names horizontally unless you use the /V option to 
  4106.  display vertically sorted output. 
  4107.  
  4108.  DIR's display can be modified in many ways to meet different needs.  Most of 
  4109.  the following sections describes the various ways you can change DIR's output 
  4110.  format. 
  4111.  
  4112.  Switching Formats 
  4113.  
  4114.  On HPFS volumes, you can force DIR to use a FAT-like format (file name first, 
  4115.  followed by file information) with the /Z option.  If necessary, DIR /Z 
  4116.  truncates long file names on HPFS drives, and adds a right arrow [] to show 
  4117.  that the name contains additional characters. 
  4118.  
  4119.  The standard HPFS output format does not provide enough space to show 
  4120.  descriptions along with file names.  Therefore, if you wish to view file 
  4121.  descriptions as part of the DIR listing on an HPFS volume, you must use the /Z 
  4122.  option. 
  4123.  
  4124.  If you use the /B option, DIR displays just file names and omits the file 
  4125.  size, time stamp, and description for each file, for example: 
  4126.  
  4127.           [c:\] dir i* /b
  4128.  
  4129.           IBMCOM
  4130.           IBMI18N
  4131.           IBMINST
  4132.           IBMVESA
  4133.           IBMLVL.INI
  4134.           .....
  4135.  
  4136.  There are several ways to modify the display produced by /B.  The /F option is 
  4137.  similar to /B, but displays the full path and name of each file, instead of 
  4138.  just its name.  To view the same information for a directory and its 
  4139.  subdirectories use /B /S or /F /S. 
  4140.  
  4141.  Multiple Column Displays 
  4142.  
  4143.  DIR has three options, /2, /4, and /W, that create multi-column displays.  On 
  4144.  HPFS drives, all 3 of these options force the use of truncated names. 
  4145.  
  4146.  The /2 option creates a 2-column display.  On HPFS drives, only the name of 
  4147.  each file is displayed, with directory names placed in square brackets to 
  4148.  distinguish them from file names.  On FAT drives, support long filenames, or 
  4149.  when /Z or /X is used (see below), the display includes the name, file size, 
  4150.  and time stamp for each file. 
  4151.  
  4152.  The /4 option is similar to /2, but displays directory information in 4 
  4153.  columns.     On drives which do not support long filenames, or when /Z or /X is 
  4154.  used (see below), the display shows the file name and the file size in 
  4155.  kilobytes (KB) or megabytes (MB), with "<D>" in the size column for 
  4156.  directories. 
  4157.  
  4158.  The /W option displays directory information in 5 or more columns, depending 
  4159.  on your screen width.  Each entry in a DIR /W display contains either the name 
  4160.  of a file or the name of a directory.  Directory names are placed in square 
  4161.  brackets to distinguish them from file names. 
  4162.  
  4163.  If you use one of these options on an HPFS drive and do not select an 
  4164.  alternate display format with /Z or /X, the actual number of columns will be 
  4165.  based on the longest name to be displayed and your screen width, and may be 
  4166.  less than the number you requested (for example, you might see only three 
  4167.  columns even though you used /4).  If the longest name is too long to fit in 
  4168.  on a single line the display will be reduced to one column, and each name will 
  4169.  be wrapped, with "extra" blank lines added so that each name takes the same 
  4170.  number of lines. 
  4171.  
  4172.  Color-Coded Directories 
  4173.  
  4174.  The DIR command can display each file name and the associated file information 
  4175.  in a different color, depending on the file's extension. 
  4176.  
  4177.  To choose the display colors, you must either use the SET command to create an 
  4178.  environment variable called COLORDIR, or use the Commands page of the OPTION 
  4179.  dialogs or a text editor to set the ColorDir directive in your .INI file.  If 
  4180.  you do not use the COLORDIR variable or the ColorDir directive, DIR will use 
  4181.  the default screen colors for all files. 
  4182.  
  4183.  If you use both the COLORDIR variable and the ColorDir directive, the 
  4184.  environment variable will override the settings in your .INI file.  You may 
  4185.  find it useful to use the COLORDIR variable for experimenting, then to set 
  4186.  permanent directory colors with the ColorDir directive. 
  4187.  
  4188.  The format for both the COLORDIR environment variable and the ColorDir 
  4189.  directive in the .INI file is: 
  4190.  
  4191.           ext ... :ColorName; ...
  4192.  
  4193.  where "ext" is a file extension (which may include wildcards) or one of the 
  4194.  following file types: 
  4195.  
  4196.           DIRS        Directories
  4197.           RDONLY      Read-only files
  4198.           HIDDEN      Hidden files
  4199.           SYSTEM      System files
  4200.           ARCHIVE     Files modified since the last backup
  4201.  
  4202.  and "ColorName" is any valid color name (see Colors and Color Names). 
  4203.  
  4204.  Unlike most color specifications, the background portion of the color name may 
  4205.  be omitted for directory colors.  If you don't specify a background color, DIR 
  4206.  will use the current screen background color. 
  4207.  
  4208.  For example, to display the .COM and .EXE files in red on the current 
  4209.  background, the .C and .ASM files in bright cyan on the current background, 
  4210.  and the read-only files in blinking green on white (this should be entered on 
  4211.  one line): 
  4212.  
  4213.           [c:\] set colordir=com exe:red; c asm:bright cyan;
  4214.                 rdonly:blink green on white
  4215.  
  4216.  Extended wildcards can be used in directory color specifications.  For 
  4217.  example, to display .BAK, .BAX, and .BAC files in red: 
  4218.  
  4219.           [c:\] set colordir=BA[KXC]:red
  4220.  
  4221.   Redirected Output 
  4222.  
  4223.  The output of the DIR command, like that of most other internal commands, can 
  4224.  be redirected to a file, printer, serial port, or other device.  However, you 
  4225.  may need to take certain DIR command options into account when you redirect 
  4226.  DIR's output. 
  4227.  
  4228.  DIR wraps both long file names and file descriptions at the width of your 
  4229.  display.  Its redirected output will also wrap at the screen width.  Use the 
  4230.  /R option if you wish to disable wrapping of long descriptions. 
  4231.  
  4232.  If you redirect a color-coded directory to a file, DIR will remove the color 
  4233.  data as it sends the directory information to a file.  It will usually do the 
  4234.  same if you redirect output to a character device such as a printer or serial 
  4235.  port.  However, it is not always possible for DIR to tell whether or not a 
  4236.  device is a character device.  If you notice that non-colored lines are being 
  4237.  sent to the output device and colored lines are appearing on your screen, you 
  4238.  can use the /D option to temporarily disable color-coding when you redirect 
  4239.  DIR's output. 
  4240.  
  4241.  To redirect DIR output to the clipboard, use CLIP: as the output device name, 
  4242.  for example: 
  4243.  
  4244.           [c:\] dir *.exe > clip:
  4245.  
  4246.  Other Notes 
  4247.  
  4248.  If you have selected a specific country code for your system, DIR will display 
  4249.  the date in the format for that country.  The default date format is U.S. 
  4250.  (mm-dd-yy).  The separator character in the file time will also be affected by 
  4251.  the country code.  Thousands and decimal separators in numeric displays are 
  4252.  affected by the country code, and by the ThousandsChar and DecimalChar 
  4253.  settings selected on the Options 1 page of the OPTION dialogs or in the .INI 
  4254.  file. 
  4255.  
  4256.  Options 
  4257.  
  4258.  Options on the command line apply only to the filenames which follow the 
  4259.  option, and options at the end of the line apply to the preceding filename 
  4260.  only.  This allows you to specify different options for different groups of 
  4261.  files, yet retains compatibility with the traditional DIR command when a 
  4262.  single filename is specified. 
  4263.  
  4264.     /1:     Single column display -- display the filename, size, date, and 
  4265.             time; also displays the description on drives which do not support 
  4266.             long filenames.  This is the default.  If /T is used the attributes 
  4267.             are displayed instead of the description.  This option is most 
  4268.             useful if you wish to override a default /2, /4, or /W setting 
  4269.             stored in an alias. 
  4270.  
  4271.     /2:     Two column display -- display just the name (on HPFS drives), or 
  4272.             display the filename, size, date, and time on other drives.  See 
  4273.             Multiple Column Displays above for more details. 
  4274.  
  4275.     /4:     Four column display -- display just the name (on HPFS drives); or 
  4276.             display the filename and size, in K (kilobytes) or M (megabytes), 
  4277.             with files between 1 and 9.9 megabytes in size displayed in tenths 
  4278.             (i.e. "2.4M").  See Multiple Column Displays above for more 
  4279.             details. 
  4280.  
  4281.     /A:     (Attribute select) Select only those files that have the specified 
  4282.             attribute(s) set.  Preceding the attribute character with a hyphen 
  4283.             [-] will select files that do not have that attribute set.  The 
  4284.             colon [:] after /A is optional.  The attributes are: 
  4285.  
  4286.               R  Read-only 
  4287.               H  Hidden 
  4288.               S  System 
  4289.               D  Subdirectory 
  4290.               A  Archive 
  4291.  
  4292.             If no attributes are listed at all (e.g., DIR /A ...), DIR will 
  4293.             display all files and subdirectories including hidden and system 
  4294.             files.  If attributes are combined, all the specified attributes 
  4295.             must match for a file to be included in the listing.  For example, 
  4296.             /A:RHS will display only those files with all three attributes set. 
  4297.  
  4298.     /B:     (Bare)  Suppress the header and summary lines, and display file or 
  4299.             subdirectory names only, in a single column.  This option is most 
  4300.             useful when you want to redirect a list of names to a file or 
  4301.             another program.  If you use /B with /S, DIR will show the full 
  4302.             path of each file (the same display as /F) instead of simply its 
  4303.             name and extension. 
  4304.  
  4305.     /D:     (Disable color coding)  Temporarily disable directory color coding. 
  4306.             May be required when color-coded directories are used and DIR 
  4307.             output is redirected to a character device like the printer (e.g., 
  4308.             PRN or LPT1) or serial port (e.g., COM1 or COM2).  /D is not 
  4309.             required when DIR output is redirected to a file. 
  4310.  
  4311.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  4312.             and the UpperCase directive in 4OS2.INI. 
  4313.  
  4314.     /F:     (Full path)  Display each filename with its drive letter and path 
  4315.             in a single column, without other information.  If you use /F with 
  4316.             /X on a volume which supports long filenames, the "short" version 
  4317.             of the entire path is displayed. 
  4318.  
  4319.     /G:     Display the allocated disk space instead of the actual size of each 
  4320.             file. 
  4321.  
  4322.     /H:     (Hide dots)  Suppress the display of the "." and ".." directories. 
  4323.  
  4324.     /I:     Display filenames by matching text in their descriptions.  The text 
  4325.             can include wildcards and extended wildcards.  The search text must 
  4326.             be enclosed in quotation marks.  You can select all filenames that 
  4327.             have a description with /I"[?]*", or all filenames that do not have 
  4328.             a description with /I"[]". 
  4329.  
  4330.             The /I option may be used to select files even if descriptions are 
  4331.             not displayed (for example, if /2 is used).  However, /I will be 
  4332.             ignored if /O:c is used. 
  4333.  
  4334.     /J:     (Justify names)  Justify (align) filename extensions and display 
  4335.             them in the traditional format. 
  4336.  
  4337.     /K:     Suppress the header (disk and directory name) display. 
  4338.  
  4339.     /L:     (Lower case)  Display file and directory names in lower case; also 
  4340.             see SETDOS /U and the UpperCase directive in 4OS2.INI. 
  4341.  
  4342.     /M:     Suppress the footer (file and byte count totals) display. 
  4343.  
  4344.     /N:     Use the HPFS display format, even if the files are stored on a 
  4345.             volume which does not support long names.  See also /Z. 
  4346.  
  4347.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  4348.             following sorting options; if multiple options are used, the 
  4349.             listing will be sorted with the first sort option as the primary 
  4350.             key, the next as the secondary key, and so on: 
  4351.  
  4352.               -  Reverse the sort order for the next option. 
  4353.               a  Sort in ASCII order, not numerically, when there are digits in 
  4354.             the name. 
  4355.               d  Sort by date and time (oldest first); for HPFS drives, also 
  4356.             see /T. 
  4357.               e  Sort by extension. 
  4358.               g  Group subdirectories first, then files. 
  4359.               i  Sort by file description (ignored if /O:c is used). 
  4360.               n  Sort by filename (this is the default). 
  4361.               r  Reverse the sort order for all options. 
  4362.               s  Sort by size. 
  4363.               u  Unsorted. 
  4364.  
  4365.  
  4366.     /P:     (Pause)  Wait for a key to be pressed after each screen page before 
  4367.             continuing the display.  Your options at the prompt are explained 
  4368.             in detail under Page and File Prompts. 
  4369.  
  4370.     /R      (disable wRap)  Forces long descriptions to be displayed on a 
  4371.             single line, rather than wrapped onto two or more lines.  Use /R 
  4372.             when output is redirected to a character device, such as a serial 
  4373.             port or the printer; or when you want descriptions truncated, 
  4374.             rather than wrapped, in the on-screen display. 
  4375.  
  4376.     /S:     (Subdirectories)  Display file information from the current 
  4377.             directory and all of its subdirectories.  DIR will only display 
  4378.             headers and summaries for those directories which contain files 
  4379.             that match the filename(s), ranges, and attributes that you specify 
  4380.             on the command line. 
  4381.  
  4382.     /T      (aTtribute display)  Display the filenames, attributes, and 
  4383.             descriptions.  The descriptions will be wrapped onto the next line, 
  4384.             if necessary, unless you also use the /R (truncate) option.  If you 
  4385.             use both /T and /R, descriptions are truncated after 34 characters 
  4386.             on an 80-column display.  The attributes are displayed in the 
  4387.             format RHSA, with the following meanings: 
  4388.  
  4389.               R  Read-only 
  4390.               H  Hidden 
  4391.               D  Directory 
  4392.               S  System 
  4393.               A  Archive 
  4394.  
  4395.             On HPFS drives, if you wish to add another option after /T, you 
  4396.             must start the next option with a forward slash.  If you don't, 
  4397.             4OS2 will interpret the /T as the time display switch and the 
  4398.             following character as a valid or invalid time selector.  For 
  4399.             example: 
  4400.  
  4401.                                 [c:\] dir /tz     incorrect, will display error
  4402.                                 [c:\] dir /t/z    correct
  4403.  
  4404.     /T:acw  (Time display)  Specify which of the date and time fields on an 
  4405.             HPFS drive should be displayed and used for sorting: 
  4406.  
  4407.               a  Last access date and time. 
  4408.               c  Creation date and time. 
  4409.               w  Last write date and time (default). 
  4410.  
  4411.     /U      (sUmmary information)  Only display the number of files, the total 
  4412.             file size, and the total amount of disk space used.  Information on 
  4413.             individual files is not displayed. 
  4414.  
  4415.     /V:     (Vertical sort)  Display the filenames sorted vertically rather 
  4416.             than horizontally (use with the /2, /4 or /W options). 
  4417.  
  4418.     /W:     (Wide)  Display filenames only, horizontally across the screen.  On 
  4419.             FAT drives, /W displays as many columns as it can fit into the 
  4420.             command processor window, using 16 characters in each column. 
  4421.             Otherwise (i.e., when long filenames are displayed) the number of 
  4422.             columns depends on the width of the longest name in the listing. 
  4423.             See Multiple Column Displays above for more details. 
  4424.  
  4425.     /Z:     Display an HPFS directory in the traditional FAT format, with the 
  4426.             filename at the left and the description at the right.  Long names 
  4427.             will be truncated to 12 characters unless /X is also used; if the 
  4428.             name is longer than 12 characters, it will be followed by a right 
  4429.             arrow [] to show that one or more characters have been truncated. 
  4430.  
  4431.  
  4432. ΓòÉΓòÉΓòÉ 6.20. DIRHISTORY - Display, read, or modify the directory history list ΓòÉΓòÉΓòÉ
  4433.  
  4434.  Purpose:    Display, add to, clear, or read the directory history list. 
  4435.  
  4436.  Format:     DIRHISTORY [/A directory /F /P /R filename ] 
  4437.  
  4438.              directory :  The name of a directory to be added to the directory 
  4439.              history. 
  4440.              filename :  The name of a file containing entries to be added to 
  4441.              the directory history. 
  4442.  
  4443.              /A(dd)                          /P(ause) 
  4444.              /F(ree)                         /R(ead) 
  4445.  
  4446.  See also:  HISTORY. 
  4447.  
  4448.  Usage 
  4449.  
  4450.  Every time you change to a new directory or drive, 4OS2 records the current 
  4451.  directory in an internal directory history list.  See Directory History for 
  4452.  information on directory history window, which allows you to use the list to 
  4453.  return to a previous directory.  Also see Directory Navigation. 
  4454.  
  4455.  The DIRHISTORY command lets you view and manipulate the directory history list 
  4456.  directly.  If no parameters are entered, DIRHISTORY will display the current 
  4457.  directory history list: 
  4458.  
  4459.           [c:\] dirhistory
  4460.  
  4461.  With the options explained below, you can clear the list, add new directories 
  4462.  to the list without changing to them, save the list in a file, or read a new 
  4463.  list from a file. 
  4464.  
  4465.  The number of directories saved in the directory history list depends on the 
  4466.  length of each directory name.  The list size can be specified at startup from 
  4467.  256 to 32767 characters by using the DirHistory directive in 4OS2.INI. 
  4468.  
  4469.  Your directory history list can be stored either locally (a separate history 
  4470.  list for each copy of the command processor) or globally (all copies of the 
  4471.  command processor share the same list).  See Directory History for the 
  4472.  discussion of local and global directory history lists. 
  4473.  
  4474.  You can save the directory history list by redirecting the output of 
  4475.  DIRHISTORY to a file.  This example saves the history to a file called DIRHIST 
  4476.  and reads it back again: 
  4477.  
  4478.           [c:\] dirhistory > dirhist
  4479.               .....
  4480.           [c:\] dirhistory /r dirhist
  4481.  
  4482.  Because the directory history stores each name only once, you don't have to 
  4483.  delete its contents before reading back the file unless you want to delete the 
  4484.  directories that were visited by the intervening commands. 
  4485.  
  4486.  If you need to save your directory history at the end of each day's work, you 
  4487.  might use commands like this in your 4START.BTM file: 
  4488.  
  4489.           if exist c:\dirhist dirhistory /r c:\dirhist
  4490.  
  4491.           alias shut*down `dirhistory > c:\dirhist`
  4492.  
  4493.  This restores the previous history list if it exists, then defines an alias 
  4494.  which will allow you to save the history before shutting off the system. 
  4495.  
  4496.  Options 
  4497.  
  4498.     /A:     (Add) Add a directory to the directory history list. 
  4499.     /F:     (Free) Erase all entries in the directory history list. 
  4500.     /P:     (Prompt) Wait for a key after displaying each page of the list. 
  4501.             Your options at the prompt are explained in Page and File Prompts. 
  4502.     /R:     (Read) Read the directory history from the specified file and 
  4503.             append it to the list currently held in memory. 
  4504.  
  4505.  
  4506. ΓòÉΓòÉΓòÉ 6.21. DIRS - Display the directory stack ΓòÉΓòÉΓòÉ
  4507.  
  4508.  Purpose:    Display the current directory stack. 
  4509.  
  4510.  Format:     DIRS 
  4511.  
  4512.  See also:  PUSHD, POPD, and Directory Navigation. 
  4513.  
  4514.  Usage 
  4515.  
  4516.  The PUSHD command adds the current default drive and directory to the 
  4517.  directory stack, a list that 4OS2 maintains in memory.  The POPD command 
  4518.  removes the top entry of the directory stack and makes that drive and 
  4519.  directory the new default.  The DIRS command displays the contents of the 
  4520.  directory stack, with the most recent entries on top (i.e., the next POPD will 
  4521.  retrieve the first entry that DIRS displays). 
  4522.  
  4523.  The directory stack holds 511 characters, enough for 20 to 40 typical drive 
  4524.  and directory entries. 
  4525.  
  4526.  
  4527. ΓòÉΓòÉΓòÉ 6.22. DO - Create loops in batch files ΓòÉΓòÉΓòÉ
  4528.  
  4529.  Purpose:    Create loops in batch files. 
  4530.  
  4531.  Format:     DO [n | FOREVER] 
  4532.                 or 
  4533.              DO varname = start TO end [BY n ] 
  4534.                 or 
  4535.              DO [WHILE | UNTIL] condition 
  4536.              DO varname IN [@]set 
  4537.                 commands 
  4538.              [ITERATE] 
  4539.              [LEAVE] 
  4540.                 commands 
  4541.              ENDDO 
  4542.  
  4543.              varname :  The environment variable that will hold the loop 
  4544.              counter, filename, or line from a file. 
  4545.              n, start, end :  Integers between 0 and 2,147,483,647 inclusive, 
  4546.              or an internal variables or variable functions that evaluate to 
  4547.              such a value. 
  4548.              condition :  A test to determine if the loop should be executed. 
  4549.              set :  A set of values for the variable. 
  4550.              commands :  One or more commands to execute each time through the 
  4551.              loop.  If you use multiple commands, they must be separated by 
  4552.              command separators or be placed on separate lines. 
  4553.  
  4554.  File Selection 
  4555.  
  4556.  Supports extended wildcards, ranges, and include lists for the set. 
  4557.  
  4558.  Usage 
  4559.  
  4560.  DO can only be used in batch files.  It cannot be used in aliases. 
  4561.  
  4562.  DO can be used to create 4 different kinds of loops.  The first, introduced by 
  4563.  DO n, is a counted loop.  The batch file lines between DO and ENDDO are 
  4564.  repeated n times.  For example: 
  4565.  
  4566.           do 5
  4567.              beep
  4568.           enddo
  4569.  
  4570.  You can also specify "forever" for n if you wish to create an endless loop 
  4571.  (you can use LEAVE or GOTO to exit such a loop; see below for details). 
  4572.  
  4573.  The second type of loop is similar to a "for loop" in programming languages 
  4574.  like BASIC.  DO creates an environment variable, varname, and sets it equal to 
  4575.  the value start (if varname already exists in the environment, it will be 
  4576.  overwritten).  DO then begins the loop process by comparing the value of 
  4577.  varname with the value of end.  If varname is less than or equal to end, DO 
  4578.  executes the batch file lines up to the ENDDO.  Next, DO adds 1 to the value 
  4579.  of varname, or adds the value n if BY n is specified, and repeats the compare 
  4580.  and execute process until varname is greater than end.  This example displays 
  4581.  the even numbers from 2 through 20: 
  4582.  
  4583.           do i = 2 to 20 by 2
  4584.              echo %i
  4585.           enddo
  4586.  
  4587.  DO can also count down, rather than up.  If n is negative, varname will 
  4588.  decrease by n with each loop, and the loop will stop when varname is less than 
  4589.  end.  For example, to display the even numbers from 2 through 20 in reverse 
  4590.  order, replace the first line of the example above with: 
  4591.  
  4592.           do i = 20 to 2 by -2
  4593.  
  4594.  The third type of loop is called a "while loop" or "until loop." DO evaluates 
  4595.  the condition, which can be any of the tests supported by the IF command, and 
  4596.  executes the lines between DO and ENDDO as long as the condition is true.  The 
  4597.  loop ends when the condition becomes false. 
  4598.  
  4599.  WHILE tests the condition at the start of the loop.  Therefore, if the 
  4600.  condition is false when the loop starts, the statements within the loop will 
  4601.  never be executed, and the batch file will continue with the statement after 
  4602.  the ENDDO. 
  4603.  
  4604.  UNTIL tests the condition at the end of the loop.  Therefore, if the condition 
  4605.  is false when the loop starts, the statements within the loop will still be 
  4606.  executed at least once. 
  4607.  
  4608.  The fourth type of loop executes the lines between DO and ENDDO once for every 
  4609.  member of a set (this is similar to the set used in the FOR command). 
  4610.  Normally, the set is a list of files specified with wildcards.  For example: 
  4611.  
  4612.           do x in *.txt
  4613.  
  4614.  will execute the loop once for every .TXT file in the current directory; each 
  4615.  time through the loop the variable x will be set to the name of the next file 
  4616.  that matches the file specification. 
  4617.  
  4618.  If, between DO and ENDDO, you create a new file that could be included in the 
  4619.  list of files, it may or may not appear in an iteration of the DO loop. 
  4620.  Whether the new file appears depends on its physical location in the directory 
  4621.  structure, a condition over which 4OS2 has no control. 
  4622.  
  4623.  You can also execute the loop once for each line of text in a file by placing 
  4624.  an [@] in front of the file name.  If you have a file called DRIVES.TXT that 
  4625.  contains a list of drives on your computer, one drive name per line, you can 
  4626.  execute the loop once for each drive this way: 
  4627.  
  4628.           do x in @drives.txt
  4629.  
  4630.  To execute the loop once for each line of text in the clipboard, use CLIP: as 
  4631.  the file name (e.g. DO X IN @CLIP:).  CLIP: will not return any data unless 
  4632.  the clipboard contains text.  See Redirection for additional information on 
  4633.  CLIP:. 
  4634.  
  4635.  Two special commands, ITERATE and LEAVE, can only be used inside a DO / ENDDO 
  4636.  loop.  ITERATE ignores the remaining lines inside the loop and returns to the 
  4637.  beginning of loop for another iteration (unless DO determines that the loop is 
  4638.  finished).  LEAVE exits from the current DO loop and continues with the line 
  4639.  following ENDDO. Both ITERATE and LEAVE are most often used in an IF or IFF 
  4640.  command: 
  4641.  
  4642.           do while "%var" != "%var1"
  4643.              ...
  4644.              if "%var" == "%val2" leave
  4645.           enddo
  4646.  
  4647.  You can nest DO loops up to 15 levels deep. 
  4648.  
  4649.  The DO and ENDDO commands must be on separate lines, and cannot be placed 
  4650.  within a command group, or on the same line as other commands (this is the 
  4651.  reason DO cannot be used in aliases).  However, commands within the DO loop 
  4652.  can use command groups or the command separator in the normal way. 
  4653.  
  4654.  You can exit from all DO / ENDDO loops by using GOTO to a line past the last 
  4655.  ENDDO.  However, be sure to read the cautionary notes about GOTO and DO under 
  4656.  the GOTO command before using a GOTO in any other way inside any DO loop. 
  4657.  
  4658.  
  4659. ΓòÉΓòÉΓòÉ 6.23. DPATH - Set the data search path ΓòÉΓòÉΓòÉ
  4660.  
  4661.  Purpose:    Specify the subdirectories which applications will search to find 
  4662.              files that are not in the current directory. 
  4663.  
  4664.  Format:     DPATH [directory [;directory... ]] 
  4665.  
  4666.              directory :  The full name of a directory to include in the DPATH 
  4667.              (data path) setting. 
  4668.  
  4669.  See also:  PATH, SET, and ESET. 
  4670.  
  4671.  Usage 
  4672.  
  4673.  When most OS/2 applications try to open a data file, they look for the file in 
  4674.  the current directory first.  If they fail to find the file there, they may 
  4675.  search each of the directories in the DPATH setting in the order that they are 
  4676.  included.  Internal commands like TYPE do not search the DPATH directories for 
  4677.  files. 
  4678.  
  4679.  For example, the following DPATH command directs applications to look for 
  4680.  files in this order:  the current directory, the INIT directory on C, and the 
  4681.  CONFIG directory on D: 
  4682.  
  4683.           [c:\] dpath c:\init;d:\config
  4684.  
  4685.  The listing of directories to be searched can be set or viewed with DPATH. 
  4686.  The list is stored as an environment string with the variable name DPATH, and 
  4687.  can also be set or viewed with the SET command and edited with the ESET 
  4688.  command. 
  4689.  
  4690.  Directory names in the DPATH must be separated with semicolons [;].  4OS2 will 
  4691.  not shift directory names in the DPATH to upper case as it does with those in 
  4692.  the PATH setting.  If you want the names in the DPATH to be in upper case you 
  4693.  must enter them that way. 
  4694.  
  4695.  If you enter DPATH with no parameters, 4OS2 displays the current DPATH search 
  4696.  list. 
  4697.  
  4698.  
  4699. ΓòÉΓòÉΓòÉ 6.24. DRAWBOX - Draw a box ΓòÉΓòÉΓòÉ
  4700.  
  4701.  Purpose:    Draw a box on the screen. 
  4702.  
  4703.  Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk] fg ON 
  4704.              [BRIght] bg [FILl [BRIght] bgfill ] [ZOOm] [SHAdow] 
  4705.  
  4706.              ulrow :  Row for upper left corner 
  4707.              ulcol :  Column for upper left corner 
  4708.              lrrow :  Row for lower right corner 
  4709.              lrcol :  Column for lower right corner 
  4710.              style :  Box drawing style: 
  4711.                  0   No lines (box is drawn with blanks) 
  4712.                  1   Single line 
  4713.                  2   Double line 
  4714.                  3   Single line on top and bottom, double on sides 
  4715.                  4   Double line on top and bottom, single on sides 
  4716.              fg :  Foreground character color 
  4717.              bg :  Background character color 
  4718.              bgfill :  Background fill color (for the inside of the box) 
  4719.  
  4720.  See also:  DRAWHLINE and DRAWVLINE. 
  4721.  
  4722.  Usage 
  4723.  
  4724.  DRAWBOX is useful for creating attractive screen displays in batch files. 
  4725.  
  4726.  For example, to draw a box around the edge of an 80x25 screen with bright 
  4727.  white lines on a blue background: 
  4728.  
  4729.           drawbox 0 0 24 79 1 bri whi on blu fill blu
  4730.  
  4731.  See Colors and Color Names for details about colors and notes on the use of 
  4732.  bright background colors. 
  4733.  
  4734.  If you use ZOOM, the box appears to grow in steps to its final size.  The 
  4735.  speed of the zoom operation depends on the speed of your computer and video 
  4736.  system. 
  4737.  
  4738.  If you use SHADOW, a drop shadow is created by changing the characters in the 
  4739.  row under the box and the 2 columns to the right of the box to normal 
  4740.  intensity text with a black background (this will make characters displayed in 
  4741.  black disappear entirely). 
  4742.  
  4743.  The row and column values are zero-based, so on a standard 25 line by 80 
  4744.  column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  4745.  
  4746.  DRAWBOX checks for valid row and column values, and displays a "Usage" error 
  4747.  message if any values are out of range. 
  4748.  
  4749.  Unlike DRAWHLINE and DRAWVLINE, DRAWBOX does not automatically connect boxes 
  4750.  to existing lines on the screen with the proper connector characters.  If you 
  4751.  want to draw lines inside a box and have the proper connectors drawn 
  4752.  automatically, draw the box first, then use DRAWHLINE and DRAWVLINE to draw 
  4753.  the lines. 
  4754.  
  4755.  DRAWBOX uses the standard line and box drawing characters in the U.S. English 
  4756.  extended ASCII character set.  If your system is configured for a different 
  4757.  country or language, or a font which does not include these characters, the 
  4758.  box may not appear on your screen as you expect. 
  4759.  
  4760.  
  4761. ΓòÉΓòÉΓòÉ 6.25. DRAWHLINE - Draw a horizontal line ΓòÉΓòÉΓòÉ
  4762.  
  4763.  Purpose:    Draw a horizontal line on the screen. 
  4764.  
  4765.  Format:     DRAWHLINE row column len style [BRIght] [BLInk] fg ON [BRIght] bg 
  4766.  
  4767.              row :  Starting row 
  4768.              column :  Starting column 
  4769.              len :  Length of line 
  4770.              style :  Line drawing style: 
  4771.                  1   Single line 
  4772.                  2   Double line 
  4773.              fg :  Foreground character color 
  4774.              bg :  Background character color 
  4775.  
  4776.  See also:  DRAWBOX and DRAWVLINE. 
  4777.  
  4778.  Usage 
  4779.  
  4780.  DRAWHLINE is useful for creating attractive screen displays in batch files. 
  4781.  It detects other lines and boxes on the display, and creates the appropriate 
  4782.  connector characters when possible (not all types of lines can be connected 
  4783.  with the available characters). 
  4784.  
  4785.  For example, the following command draws a double line along the top row of 
  4786.  the display with green characters on a blue background: 
  4787.  
  4788.           drawhline 0 0 80 2 green on blue
  4789.  
  4790.  The row and column values are zero-based, so on a standard 25 line by 80 
  4791.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWHLINE 
  4792.  checks for a valid row and column, and displays a "Usage" error message if 
  4793.  either value is out of range. 
  4794.  
  4795.  See Colors and Color Names for details about colors and notes on the use of 
  4796.  bright background colors. 
  4797.  
  4798.  DRAWHLINE uses the standard line and box drawing characters in the U.S. 
  4799.  English extended ASCII character set.  If your system is configured for a 
  4800.  different country or language, or a font which does not include these 
  4801.  characters, the box may not appear on your screen as you expect. 
  4802.  
  4803.  
  4804. ΓòÉΓòÉΓòÉ 6.26. DRAWVLINE - Draw a vertical line ΓòÉΓòÉΓòÉ
  4805.  
  4806.  Purpose:    Draw a vertical line on the screen. 
  4807.  
  4808.  Format:     DRAWVLINE row column len style [BRIght][BLInk] fg ON [BRIght] bg 
  4809.  
  4810.              row :  Starting row 
  4811.              column :  Starting column 
  4812.              len :  Length of line 
  4813.              style :  Line drawing style: 
  4814.                  1   Single line 
  4815.                  2   Double line 
  4816.              fg :  Foreground character color 
  4817.              bg :  Background character color 
  4818.  
  4819.  See also:  DRAWBOX and DRAWHLINE. 
  4820.  
  4821.  Usage 
  4822.  
  4823.  DRAWVLINE is useful for creating attractive screen displays in batch files. 
  4824.  It detects other lines and boxes on the display, and creates the appropriate 
  4825.  connector characters when possible (not all types of lines can be connected 
  4826.  with the available characters). 
  4827.  
  4828.  For example, to draw a double width line along the left margin of the display 
  4829.  with bright red characters on a black background: 
  4830.  
  4831.           drawvline 0 0 25 2 bright red on black
  4832.  
  4833.  The row and column values are zero-based, so on a standard 25 line by 80 
  4834.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWVLINE 
  4835.  checks for a valid row and column, and displays a "Usage" error message if 
  4836.  either value is out of range. 
  4837.  
  4838.  See Colors and Color Names for details about colors and notes on the use of 
  4839.  bright background colors. 
  4840.  
  4841.  DRAWVLINE uses the standard line and box drawing characters in the U.S. 
  4842.  English extended ASCII character set.  If your system is configured for a 
  4843.  different country or language, or a font which does not include these 
  4844.  characters, the box may not appear on your screen as you expect. 
  4845.  
  4846.  
  4847. ΓòÉΓòÉΓòÉ 6.27. ECHO and ECHOERR - Display a message / set echo state ΓòÉΓòÉΓòÉ
  4848.  
  4849.  Purpose:    Display a message, enable or disable batch file or command-line 
  4850.              echoing, or display the echo status. 
  4851.  
  4852.  Format:     ECHO [ON | OFF | message ] 
  4853.              ECHOERR message 
  4854.  
  4855.              message :  Text to display. 
  4856.  
  4857.  See also:  ECHOS, SCREEN, SCRPUT, SETDOS and TEXT. 
  4858.  
  4859.  Usage 
  4860.  
  4861.  4OS2 has a separate echo capability for batch files and for the command line. 
  4862.  The command-line ECHO state is independent of the batch file ECHO state; 
  4863.  changing ECHO in a batch file has no effect on the display at the command 
  4864.  prompt, and vice versa. 
  4865.  
  4866.  To see the current echo state, use the ECHO command with no arguments.  This 
  4867.  displays either the batch file or command-line echo state, depending on where 
  4868.  the ECHO command is performed. 
  4869.  
  4870.  In a batch file, if you turn ECHO on, each line of the file is displayed 
  4871.  before it is executed.  If you turn ECHO off, each line is executed without 
  4872.  being displayed.  ECHO can also be used in a batch file to display a message 
  4873.  on the screen.  Regardless of the ECHO state, a batch file line that begins 
  4874.  with the [@] character will not be displayed.  To turn off batch file echoing, 
  4875.  without displaying the ECHO command, use this line: 
  4876.  
  4877.           @echo off
  4878.  
  4879.  ECHO commands in a batch file will send messages to the screen while the batch 
  4880.  file executes, even if ECHO is set OFF.  For example, this line will display a 
  4881.  message in a batch file: 
  4882.  
  4883.           echo Processing your print files...
  4884.  
  4885.  If you want to echo a blank line from within a batch file, enter: 
  4886.  
  4887.           echo.
  4888.  
  4889.  You cannot use the command separator character [&], or the redirection symbols 
  4890.  [| > <] in an ECHO message, unless you enclose them in quotes (see Argument 
  4891.  Quoting) or precede them with the escape character. 
  4892.  
  4893.  ECHO defaults to ON in batch files.  The current ECHO state is inherited by 
  4894.  called batch files.  You can change the default setting to ECHO OFF with the 
  4895.  SETDOS /V0 command, the Options 1 page of the OPTION dialogs, or the BatchEcho 
  4896.  directive in the .INI file. 
  4897.  
  4898.  If you turn the command-line ECHO on, each command will be displayed before it 
  4899.  is executed.  This will let you see the command line after expansion of all 
  4900.  aliases and variables.  The command-line ECHO is most useful when you are 
  4901.  learning how to use advanced features.  This example will turn command-line 
  4902.  echoing on: 
  4903.  
  4904.           [c:\] echo on
  4905.  
  4906.  ECHO defaults to OFF at the command line. 
  4907.  
  4908.  ECHOERR acts like ECHO but sends its output to the standard error device 
  4909.  (usually the screen) instead of the standard output device.  If the standard 
  4910.  output of a batch file is redirected to a file or another device with >, 
  4911.  ECHOERR will still generate a screen message.  See Redirection and Piping for 
  4912.  more information about the standard output and standard error devices and 
  4913.  redirection. 
  4914.  
  4915.  
  4916. ΓòÉΓòÉΓòÉ 6.28. ECHOS and ECHOSERR - Display a message without CR/LF ΓòÉΓòÉΓòÉ
  4917.  
  4918.  Purpose:    Display a message without a trailing carriage return and line 
  4919.              feed. 
  4920.  
  4921.  Format:     ECHOS message 
  4922.              ECHOSERR message 
  4923.  
  4924.  See also:  ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT. 
  4925.  
  4926.  Usage 
  4927.  
  4928.  ECHOS is useful for text output when you don't want to add a carriage return / 
  4929.  linefeed pair at the end of the line.  For example, you can use ECHOS when you 
  4930.  need to redirect control sequences to your printer; this example sends the 
  4931.  sequence Esc P to the printer on LPT1: 
  4932.  
  4933.           [c:\] echos ^eP > lpt1:
  4934.  
  4935.  You cannot use the command separator character [&] or the redirection symbols 
  4936.  [| > <] in an ECHOS message, unless you enclose them in quotes (see Argument 
  4937.  Quoting) or precede them with the escape character. 
  4938.  
  4939.  ECHOS does not translate or modify the message text.  For example, carriage 
  4940.  return characters are not translated to CR/LF pairs.  ECHOS sends only the 
  4941.  characters you enter (after escape character and back quote processing).  The 
  4942.  only character you cannot put into an ECHOS message is the NUL character 
  4943.  (ASCII 0). 
  4944.  
  4945.  ECHOSERR acts like ECHOS but sends its output to the standard error device 
  4946.  (usually the screen) instead of the standard output device.  If the standard 
  4947.  output of a batch file is redirected to a file or another device with >, 
  4948.  ECHOSERR will still generate a screen message.  See Redirection and Piping for 
  4949.  more information about the standard output and standard error devices and 
  4950.  redirection. 
  4951.  
  4952.  
  4953. ΓòÉΓòÉΓòÉ 6.29. ENDLOCAL - Restore the saved environment ΓòÉΓòÉΓòÉ
  4954.  
  4955.  Purpose:    Restore the saved disk drive, directory, environment, alias list, 
  4956.              and special characters. 
  4957.  
  4958.  Format:     ENDLOCAL 
  4959.  
  4960.  See also:  SETLOCAL. 
  4961.  
  4962.  Usage 
  4963.  
  4964.  The SETLOCAL command in a batch file saves the current disk drive, default 
  4965.  directory, all environment variables, the alias list, and the command 
  4966.  separator, escape character, parameter character, decimal separator, and 
  4967.  thousands separator.  ENDLOCAL restores everything that was saved by the 
  4968.  previous SETLOCAL command. 
  4969.  
  4970.  For example, this batch file fragment saves everything, removes all aliases so 
  4971.  that user aliases will not affect batch file commands, changes the disk and 
  4972.  directory, changes the command separator, runs a program, and then restores 
  4973.  the original values: 
  4974.  
  4975.           setlocal
  4976.           unalias *
  4977.           cdd d:\test
  4978.           setdos /c~
  4979.           program ~ echo Done!
  4980.           endlocal
  4981.  
  4982.  SETLOCAL and ENDLOCAL can only be used in batch files, not in aliases or from 
  4983.  the command line. 
  4984.  
  4985.  
  4986. ΓòÉΓòÉΓòÉ 6.30. ESET - Edit environment variables and aliases ΓòÉΓòÉΓòÉ
  4987.  
  4988.  Purpose:    Edit environment variables and aliases. 
  4989.  
  4990.  Format:     ESET [/A] variable name ... 
  4991.  
  4992.              variable name :  The name of an environment variable or alias to 
  4993.              edit. 
  4994.  
  4995.              /A(lias) 
  4996.  
  4997.  See also:  ALIAS, UNALIAS, SET, and UNSET. 
  4998.  
  4999.  Usage 
  5000.  
  5001.  ESET allows you to edit environment variables and aliases using line editing 
  5002.  commands (see Command-Line Editing). 
  5003.  
  5004.  For example, to edit the executable file search path: 
  5005.  
  5006.           [c:\] eset path
  5007.           path=c:\;c:\dos;c:\util
  5008.  
  5009.  To create and then edit an alias: 
  5010.  
  5011.           [c:\] alias d = dir /d/j/p
  5012.           [c:\] eset d
  5013.           d=dir /d/j/p
  5014.  
  5015.  ESET will search for environment variables first and then aliases. If you have 
  5016.  an environment variable and an alias with the same name, ESET will edit the 
  5017.  environment variable and ignore the alias unless you use the /A option. 
  5018.  
  5019.  Environment variable and alias names are normally limited to 80 characters. 
  5020.  Their values are normally limited to 1,023 characters.  However, if you use 
  5021.  special techniques to create a longer environment variable, ESET will edit it 
  5022.  provided the variable contains no more than 2,047 characters of text. 
  5023.  
  5024.  If you have enabled global aliases (see ALIAS), any changes made to an alias 
  5025.  with ESET will immediately affect all other copies of 4OS2 which are using the 
  5026.  same alias list. 
  5027.  
  5028.  Options 
  5029.  
  5030.     /A:     (Alias) Edit the named alias even if an environment variable of the 
  5031.             same name exists.  If you have an alias and an environment variable 
  5032.             with the same name, you must use this switch to be able to edit the 
  5033.             alias. 
  5034.  
  5035.  
  5036. ΓòÉΓòÉΓòÉ 6.31. EXCEPT - Exclude files from a command ΓòÉΓòÉΓòÉ
  5037.  
  5038.  Purpose:    Perform a command on all available files except those specified. 
  5039.  
  5040.  Format:     EXCEPT (file ) command 
  5041.  
  5042.              file :  The file or files to exclude from the command. 
  5043.              command :  The command to execute, including all appropriate 
  5044.              arguments and switches. 
  5045.  
  5046.  See also:  ATTRIB and File Exclusion Ranges. 
  5047.  
  5048.  File Selection 
  5049.  
  5050.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5051.  Ranges must appear immediately after the EXCEPT keyword. 
  5052.  
  5053.  Usage 
  5054.  
  5055.  EXCEPT provides a means of executing a command on a group of files and/or 
  5056.  subdirectories, and excluding a subgroup from the operation. The command can 
  5057.  be an internal command or alias, an external command, or a batch file. 
  5058.  
  5059.  You may use wildcards to specify the files to exclude from the command.  The 
  5060.  first example erases all the files in the current directory except those 
  5061.  beginning with MEMO, and those whose extension is .WKS.  The second example 
  5062.  copies all the files and subdirectories on drive C to drive D except those in 
  5063.  C:\MSC and C:\DOS, using the COPY command: 
  5064.  
  5065.           [c:\] except (memo*.* *.wks) erase *.*
  5066.           [c:\] except (c:\msc c:\dos) copy c:\*.* d:\ /s
  5067.  
  5068.  Date, time, and size ranges can be used immediately after the word EXCEPT to 
  5069.  further qualify which files should be excluded from the command.  If the 
  5070.  command is an internal command that supports ranges, an independent range can 
  5071.  also be used in the command itself. 
  5072.  
  5073.  When you use EXCEPT on an HPFS drive, you must quote any file names inside the 
  5074.  parentheses which contain whitespace or special characters. For example, to 
  5075.  copy all files except those in the "Program Files" directory to drive E:\: 
  5076.  
  5077.           [c:\] except ("Program Files") copy /s *.* e:\
  5078.  
  5079.  EXCEPT prevents operations on the specified file(s) by setting the hidden 
  5080.  attribute, performing the command, and then clearing the hidden attribute.  If 
  5081.  the command is aborted in an unusual way, you may need to use the ATTRIB 
  5082.  command to remove the hidden attribute from the file(s). 
  5083.  
  5084.  Caution:  EXCEPT will not work with programs or commands that ignore the 
  5085.  hidden attribute or which work explicitly with hidden files, including DEL /Z, 
  5086.  and the /H (process hidden files) switch available in some 4OS2 file 
  5087.  processing commands. 
  5088.  
  5089.  File exclusion ranges provide a faster and more flexible method of excluding 
  5090.  files from internal commands, and do not manipulate file attributes, as EXCEPT 
  5091.  does.  However, exclusion ranges can only be used with 4OS2 internal commands; 
  5092.  you must use EXCEPT for external commands. 
  5093.  
  5094.  Date, time, and size ranges can be used immediately after the word EXCEPT to 
  5095.  further qualify which files should be excluded from the command.  If the 
  5096.  command is an internal command that supports ranges, an independent range can 
  5097.  also be used in the command itself.  You can also use a file exclusion range 
  5098.  within the EXCEPT command; however, this will select files to be excluded from 
  5099.  EXCEPT, and therefore included in execution of the command. 
  5100.  
  5101.  You can use command grouping to execute multiple commands with a single 
  5102.  EXCEPT.  For example, the following command copies all files in the current 
  5103.  directory whose extensions begin with .DA, except the .DAT files, to the 
  5104.  D:\SAVE directory, then changes the first two characters of the extension of 
  5105.  the copied files to .SA : 
  5106.  
  5107.           [c:\data] except (*.dat) (copy *.da* d:\save & ren *.da* *.sa*)
  5108.  
  5109.  If you use filename completion (see Filename Completion) to enter the 
  5110.  filenames inside the parentheses, type a space after the open parenthesis 
  5111.  before entering a partial filename or pressing Tab.  Otherwise, the 
  5112.  command-line editor will treat the open parenthesis as the first character of 
  5113.  the filename to be completed. 
  5114.  
  5115.  
  5116. ΓòÉΓòÉΓòÉ 6.32. EXIT - Exit 4OS2 ΓòÉΓòÉΓòÉ
  5117.  
  5118.  Purpose:    Return from 4OS2. 
  5119.  
  5120.  Format:     EXIT [value ] 
  5121.  
  5122.              value :  The numeric exit code to return. 
  5123.  
  5124.  Usage 
  5125.  
  5126.  EXIT terminates the current copy of 4OS2.  Use it to return to an application 
  5127.  when you have "shelled out" to work at the prompt, or to end an OS/2 
  5128.  command-line session. 
  5129.  
  5130.  To close the session, or to return to the application that started 4OS2, type: 
  5131.  
  5132.           [c:\] exit
  5133.  
  5134.  If you specify a value, EXIT will return that value to the program that 
  5135.  started 4OS2.  For example: 
  5136.  
  5137.           [c:\] exit 255
  5138.  
  5139.  The value is a number you can use to inform the program of some result, such 
  5140.  as the success or failure of a batch file.  It can range from 0 - 
  5141.  4,294,967,295.  This feature is most useful for systems which use batch files 
  5142.  to automate their operation, such as bulletin boards, or custom application 
  5143.  programs like databases that shell to 4OS2 to perform certain tasks. 
  5144.  
  5145.  
  5146. ΓòÉΓòÉΓòÉ 6.33. FFIND - Search for files ΓòÉΓòÉΓòÉ
  5147.  
  5148.  Purpose:    Search for files by name or contents. 
  5149.  
  5150.  Format:     FFIND [/A[:][[-]rhsda] /B /C /D[list ] /E /I /K /L /M 
  5151.              /O[[:][-]acdeginrsu] /P /R /S /T"xx" /V /X["xx xx ..."] file... 
  5152.  
  5153.              list :  A list of disk drive letters (without colons). 
  5154.              file :  The file, directory, or list of files or directories to 
  5155.              display. 
  5156.  
  5157.              /A(ttribute select)             /M (no footers) 
  5158.              /B(are)                         /O(rder) 
  5159.              /C(ase sensitive)               /P(ause) 
  5160.              /D(rive)                        /R(everse) 
  5161.              /E (upper case display)         /S(ubdirectories) 
  5162.              /I(gnore wildcards)             /T"xx" (text search string) 
  5163.              /K (no headers)                 /V(erbose) 
  5164.              /L(ine numbers)                 /X["xx"] (hex display/search 
  5165.                                              string) 
  5166.  
  5167.  File Selection 
  5168.  
  5169.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5170.  
  5171.  Usage 
  5172.  
  5173.  FFIND is a flexible search command that looks for files based on their names 
  5174.  and their contents. Depending on the options you choose, FFIND can display 
  5175.  filenames, matching text, or a combination of both in a variety of formats. 
  5176.  
  5177.  If you want to search for files by name, FFIND works much like the DIR 
  5178.  command.  For example, to generate a list of all the .BTM files in the current 
  5179.  directory, you could use the command: 
  5180.  
  5181.           [c:\] ffind *.btm
  5182.  
  5183.  The output from this command is a list of full pathnames, followed by the 
  5184.  number of files found. 
  5185.  
  5186.  If you want to limit the output to a list of *.BTM files which contain the 
  5187.  string color, you could use this command instead: 
  5188.  
  5189.           [c:\] ffind /t"color" *.btm
  5190.  
  5191.  The output from this command is a list of files that contain the string color 
  5192.  along with the first line in each file that contains that string.  By default, 
  5193.  FFIND uses a case-insensitve search, so the command above will include files 
  5194.  that contain COLOR, Color, color, or any other combination of upper-case and 
  5195.  lower-case letters. 
  5196.  
  5197.  If you would rather see the last line of each file that contains the search 
  5198.  string, use the /R option, which forces FFIND to search from the end of each 
  5199.  file to the beginning.  This option will also speed up searches somewhat if 
  5200.  you are looking for text that will normally be at the end of a file, such as a 
  5201.  signature line: 
  5202.  
  5203.           [c:\] ffind /r /t"Sincerely," *.txt
  5204.  
  5205.  You can use extended wildcards in the search string to increase the 
  5206.  flexibility of FFIND's search.  For example, the following command will find 
  5207.  .TXT files which contain either the string June or July.  It will also find 
  5208.  Juny and Jule.  The /C option makes the search case-sensitive: 
  5209.  
  5210.           [c:\] ffind /c /t"Ju[nl][ey]" *.txt
  5211.  
  5212.  If you want to search for text that contains wildcard characters (*, ?, [, or 
  5213.  ]), you can use the /I option to force FFIND to interpret these as normal 
  5214.  characters instead of wildcards.  The following command, for example, finds 
  5215.  all .TXT files that contain a question mark: 
  5216.  
  5217.           [c:\] ffind /i /t"?" *.txt
  5218.  
  5219.  At times, you may need to search for data that cannot be represented by ASCII 
  5220.  characters.  You can use FFIND's /X option to represent the search string in 
  5221.  hexadecimal format (this option also changes the output to show hexadecimal 
  5222.  offsets rather than text lines).  With /X, the search must be represented by 
  5223.  pairs of hexadecimal digits separated by spaces; a search of this type is 
  5224.  always case-sensitive (in the example below, 41 63 65 is the hex code for 
  5225.  "Ace"): 
  5226.  
  5227.           [c:\] ffind /x"41 63 65" *.txt
  5228.  
  5229.  You can use FFIND's other options to further specify the files for which you 
  5230.  are searching and to modify the way in which the output is displayed. 
  5231.  
  5232.  Options 
  5233.  
  5234.     /A:     (Attribute select) Select only those files that have the specified 
  5235.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5236.             [-] will select files that do not have that attribute set.  The 
  5237.             colon [:] after /A is optional.  The attributes are: 
  5238.  
  5239.                            R  Read-only 
  5240.                            H  Hidden 
  5241.                            S  System 
  5242.                            D  Subdirectory 
  5243.                            A  Archive 
  5244.  
  5245.             If no attributes are listed at all (e.g., FFIND /A ...), FFIND will 
  5246.             select all files and subdirectories including hidden and system 
  5247.             files.  If attributes are combined, all the specified attributes 
  5248.             must match for a file to be selected.  For example, /A:RHS will 
  5249.             select only those files with all three attributes set. 
  5250.  
  5251.     /B:     (Bare) Display file names only and omit the text that matches the 
  5252.             search.  This option is only useful in combination with /T or /X, 
  5253.             which normally force FFIND to display file names and matching text. 
  5254.  
  5255.     /C:     (Case sensitive) Perform a case-sensitive search.  This option is 
  5256.             only valid with /T, which defaults to a case-insensitive search. 
  5257.             It is not needed with a /X hexadecimal search, which is always 
  5258.             case-sensitive. 
  5259.  
  5260.     /D:     (Drive)  Search all files on one or more drives.  If you use /D 
  5261.             without a list of drives, FFIND will search the drives specified in 
  5262.             the list of files.  If no drive letters are listed, FFIND will 
  5263.             search all of the current drive.  You can include a list of drives 
  5264.             or a range of drives to search as part of the /D option.  For 
  5265.             example, to search drives C:, D:, E:, and G:, you can use either of 
  5266.             these commands: 
  5267.  
  5268.                                 [c:\] ffind /dcdeg ...
  5269.                                 [c:\] ffind /dc-eg ...
  5270.  
  5271.             Drive letters listed after /D will be ignored when processing file 
  5272.             names which also include a drive letter.  For example, this command 
  5273.             displays all the .BTM files on C: and E:, but only the .BAT files 
  5274.             on D: 
  5275.  
  5276.                                 [c:\] ffind /s /dce *.btm d:\*.bat
  5277.  
  5278.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  5279.             and the UpperCase directive in 4OS2.INI. 
  5280.  
  5281.     /I:     (Ignore wildcards) Only meaningful when used in conjunction with 
  5282.             the /T"text" option.  Suppresses the recognition of wildcard 
  5283.             characters in the search text.  This option is useful if you need 
  5284.             to search for characters that would normally be interpreted as 
  5285.             wildcards: *, ?, [, and ]. 
  5286.  
  5287.     /K:     (No headers) Suppress the display of the header or filename for 
  5288.             each matching text line. 
  5289.  
  5290.     /L:     (Line numbers) Include the line number for each text line 
  5291.             displayed. 
  5292.  
  5293.     /M:     (No footers) Suppress the footer (the number of files and number of 
  5294.             matches) at the end of FFIND's display. 
  5295.  
  5296.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  5297.             following sorting options; if multiple options are used, the 
  5298.             listing will be sorted with the first sort option as the primary 
  5299.             key, the next as the secondary key, and so on: 
  5300.  
  5301.                            -  Reverse the sort order for the next option. 
  5302.                            a  Sort in ASCII order, not numerically, when there 
  5303.                          are digits in the name. 
  5304.                            d  Sort by date and time ( oldest first); for HPFS 
  5305.                          drives, also see /T. 
  5306.                            e  Sort by extension. 
  5307.                            g  Group subdirectories first, then files. 
  5308.                            i  Sort by file description (ignored if /C or /O:c 
  5309.                          is used). 
  5310.                            n  Sort by filename (this is the default). 
  5311.                            r  Reverse the sort order for all options. 
  5312.                            s  Sort by size. 
  5313.                            u  Unsorted. 
  5314.  
  5315.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  5316.             continuing the display.  Your options at the prompt are explained 
  5317.             in detail under Page and File Prompts. 
  5318.  
  5319.     /R:     (Reverse) Only meaningful when used in conjuction with the /T"text" 
  5320.             or /X  options.  Searches each file from the end backwards to the 
  5321.             beginning.  This option is useful if you want to display the last 
  5322.             occurrence of the search string in each file instead of the first 
  5323.             (the default).  It can also speed up searches for information that 
  5324.             is normally at the end of a file, such as a signature. 
  5325.  
  5326.     /S:     (Subdirectories) Display matches from the current directory and all 
  5327.             of its subdirectories. 
  5328.  
  5329.     /T"xx": (Text search) Specify the text search string.  /T must be followed 
  5330.             by a text string in double quotes (e.g., /t"color").  FFIND will 
  5331.             perform a case-insensitive search unless you also use the /C 
  5332.             option.  For a hexadecimal search and/or hexadecimal display of the 
  5333.             location where the search string is found, see /X.   You can 
  5334.             specify a search string with either /T or /X, but not both. 
  5335.  
  5336.     /V:     (Verbose) Show every matching line.  FFIND's default behavior is to 
  5337.             show only the first matching line then and then go on to the next 
  5338.             file.  This option is only valid with /T or /X. 
  5339.  
  5340.     /X:     (Hexadecimal display / search) Specify hexadecimal display and an 
  5341.             optional hexadecimal search string. 
  5342.  
  5343.             If /X is followed by one or more pairs of hexadecimal digits in 
  5344.             quotes (e.g., /x"44 63 65"), FFIND will search for that exact 
  5345.             sequence of characters or data bytes without regard to the meaning 
  5346.             of those bytes as text.  If those bytes are found, the offset is 
  5347.             displayed (in both decimal and hexadecimal).  A search of this type 
  5348.             will always be case-sensitive. 
  5349.  
  5350.             If /X is not followed by a hexadecimal search string it must be 
  5351.             used in conjunction with /T, and will change the output format to 
  5352.             display offsets (in both decimal and hexadecimal) rather than 
  5353.             actual text lines when the search string is found.  For example, 
  5354.             this command uses /T to display the first line in each .BTM file 
  5355.             containing the word hello: 
  5356.  
  5357.                                 [c:\] ffind /t"hello" *.btm
  5358.                                 ---- c:\test.btm:
  5359.                                 echo hello
  5360.  
  5361.                                     1 line in 1 file
  5362.  
  5363.             If you use the same command with /X, the offset is displayed 
  5364.             instead of the text: 
  5365.  
  5366.                                 [c:\] ffind /t"hello" /x *.btm
  5367.                                 ---- c:\test.btm:
  5368.                                 Offset: 26 (1Ah)
  5369.  
  5370.                                     1 line in 1 file
  5371.  
  5372.             You can specify a search string with either /T or /X, but not both. 
  5373.  
  5374.  
  5375. ΓòÉΓòÉΓòÉ 6.34. FOR - Repeat a command ΓòÉΓòÉΓòÉ
  5376.  
  5377.  Purpose:    Repeat a command for several values of a variable. 
  5378.  
  5379.  Format:     FOR [/A:[[-]rhsda] /D /F ["options "] /H /L /R [path ]] %var IN 
  5380.              ([@]set | start, step, end ) [DO] command ... 
  5381.  
  5382.              options :  Parsing options for a "file parsing" FOR. 
  5383.              path :  The starting directory for a "recursive" FOR. 
  5384.              %var :  The variable to be used in the command ("FOR variable"). 
  5385.              set :  A set of values for the variable. 
  5386.              start :  The starting increment for a "counted" FOR. 
  5387.              step :  The increment value for a "counted" FOR. 
  5388.              end :  The limit value for a "counted" FOR. 
  5389.              command :  A command or group of commands to be executed for each 
  5390.              value of the variable. 
  5391.  
  5392.              /A: (Attribute select)          /L (counted loop) 
  5393.              /F(ile parsing)                 /R(ecursive) 
  5394.              /H(ide dots) 
  5395.  
  5396.  File Selection 
  5397.  
  5398.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5399.  Ranges must appear immediately after the FOR keyword. 
  5400.  
  5401.  Usage 
  5402.  
  5403.  FOR begins by creating a set.  It then executes a command for every member of 
  5404.  the set.  The command can be an internal command, an alias, an external 
  5405.  command, or a batch file.  The members of the set can be a list of file names, 
  5406.  text strings, a group of numeric values, or text read from a list of files. 
  5407.  
  5408.  When the set is made up of text or several separate file names (not an include 
  5409.  list), the elements must be separated by spaces, tabs, commas, or the switch 
  5410.  character (normally a slash [/]). 
  5411.  
  5412.  FOR includes a large number of options, some of which duplicate functions 
  5413.  available in other 4OS2 commands, and/or do not follow conventions you may 
  5414.  find in our other commands.  Most of these extra options are included for 
  5415.  compatibility with Windows NT 4.0's CMD.EXE.  However, we make them available 
  5416.  in 4OS2, 4DOS, and 4NT so that aliases and batch files which use them can work 
  5417.  under all three products. 
  5418.  
  5419.  The first three sections below (Working with Files, Working with Text, and 
  5420.  Retrieving Text from Files) describe the traditional FOR command and the 
  5421.  enhancements to it which are part of 4OS2.  The sections on Parsing Text from 
  5422.  Files and Counted FOR Loops describe features added for compatibility of our 
  5423.  line of text mode products with Windows NT 4.0.  The section entitled Other 
  5424.  Notes contains information you may need if you use any aspect of the FOR 
  5425.  command extensively. 
  5426.  
  5427.  Working with Files 
  5428.  
  5429.  Normally, the set is a list of files specified with wildcards.  For example, 
  5430.  if you use this line in a batch file: 
  5431.  
  5432.           for %x in (*.txt) do list %x
  5433.  
  5434.  then LIST will be executed once for each file in the current directory with 
  5435.  the extension .TXT.  The FOR variable %x is set equal to each of the file 
  5436.  names in turn, then the LIST command is executed for each file.  (You could do 
  5437.  the same thing more easily with a simple LIST *.TXT.  We used FOR here so you 
  5438.  could get a feel for how it operates, using a simple example.  Many of the 
  5439.  examples in this section are constructed in the same way.) 
  5440.  
  5441.  The set can include multiple files or an include list, like this: 
  5442.  
  5443.           for %x in (d:\*.txt;*.doc;*.asc) do type %x
  5444.  
  5445.  FOR supports wildcards and extended wildcards, as well as extended parent 
  5446.  directory names (e.g., ...\*.txt to process all of the .TXT files that are 
  5447.  contained in the directory 2 levels above the current directory). 
  5448.  
  5449.  When you use FOR on an HPFS drive, you must quote any file names within the 
  5450.  set which contain whitespace or special characters.  The same restriction 
  5451.  applies to names returned in the FOR variable, if you pass them to 4OS2 
  5452.  internal commands, or other commands which require quoting filenames with 
  5453.  whitespace.  FOR does not quote returned names automatically, even if you 
  5454.  included quotes in the set.  See File Names for additional details on file 
  5455.  name quoting. 
  5456.  
  5457.  If the set includes filenames, the file list can be further refined by using 
  5458.  date, time, size and file exclusion ranges.  The range or ranges must be 
  5459.  placed immediately after the word FOR.  Ranges will be ignored if no wildcards 
  5460.  are used inside the parentheses.  For example, this set is made up of all of 
  5461.  the .TXT files that were created or updated on October 4, 1997: 
  5462.  
  5463.           for /[d10-4-97,+0] %x in (*.txt) do ...
  5464.  
  5465.  If the command is an internal command that supports ranges, an independent 
  5466.  range can also be used in the command itself. 
  5467.  
  5468.  You can also refine the list by limiting it with the /A: option to select only 
  5469.  files that have specific attributes. 
  5470.  
  5471.  By default, FOR works only with files in the current directory or a specified 
  5472.  directory.  With the /R option, FOR will also search for files in 
  5473.  subdirectories.  For example, to work with all of the .TXT files in the 
  5474.  current directory and its subdirectories: 
  5475.  
  5476.           for /r %x in (*.txt) do ...
  5477.  
  5478.  If you specify a directory name immediately after /R, FOR will start in that 
  5479.  directory and then search each of its subdirectories.  This example works with 
  5480.  all of the .BAK files on drive D: 
  5481.  
  5482.           for /r d:\ %x in (*.bak) do ...
  5483.  
  5484.  When you use wildcards to specify the set, FOR scans the directory and finds 
  5485.  each file which matches the wildcard name(s) you specified.  If, during the 
  5486.  processing of the FOR command, you create a file that could be included in the 
  5487.  set, it may or may not appear in a future interation of the same FOR command. 
  5488.  Whether the new file appears depends on its physical location in the directory 
  5489.  structure.  For example, if you use FOR to execute a command for all .TXT 
  5490.  files, and the command also creates one or more new .TXT files, those new 
  5491.  files may or may not be processed during the current FOR command, depending on 
  5492.  where they are placed in the physical structure of the directory.  This is an 
  5493.  operating system constraint over which 4OS2 have no control.  Therefore, in 
  5494.  order to achieve consistent results you should construct FOR commands which do 
  5495.  not create files that could become part of the set for the current command. 
  5496.  
  5497.  Working with Text 
  5498.  
  5499.  The set can also be made up of text instead of file names.  For example, to 
  5500.  create three files named file1, file2, and file3, each containing a blank 
  5501.  line: 
  5502.  
  5503.           for %suffix in (1 2 3) do echo. > file%suffix
  5504.  
  5505.  You could also use the names of environment variables as the text.  This 
  5506.  example displays the name and content of several variables from the 
  5507.  environment (see Environment Variables and Functions for details on the use of 
  5508.  square brackets when expanding environment variables).  Enter this on one 
  5509.  line: 
  5510.  
  5511.           for %var in (path prompt comspec) do echo %var=%[%var]
  5512.  
  5513.  Retrieving Text from Files 
  5514.  
  5515.  FOR can extract text from files in two different ways.  The first method 
  5516.  extracts each line from each file in the set and places it in the variable. 
  5517.  To use this method, place an [@] at the beginning of the set, in front of the 
  5518.  file name or names. 
  5519.  
  5520.  For example, if you have a file called DRIVES.TXT that contains a list of 
  5521.  drives on your computer, one drive name per line (with a ":" after each drive 
  5522.  letter), you can print the free space on each drive this way: 
  5523.  
  5524.           for %d in (@drives.txt) do free %d > prn
  5525.  
  5526.  Because the [@] is also a valid filename character, FOR first checks to see if 
  5527.  the file exists with the [@] in its name (i.e., a file named @DRIVES.TXT ). 
  5528.  If so, the filename is treated as a normal argument.  If it doesn't exist, FOR 
  5529.  uses the filename (without the [@]) as the file from which to retrieve text. 
  5530.  
  5531.  If you use @CON as the filename, FOR will read from standard input (a 
  5532.  redirected input file) or a pipe; see Redirection and Piping for more 
  5533.  information).  If you use @CLIP: as the filename, FOR will read any text 
  5534.  available from the OS/2 clipboard (see Redirection for details). 
  5535.  
  5536.  Parsing Text from Files 
  5537.  
  5538.  The second method of working with text from files is to have FOR parse each 
  5539.  line of each file for you.  To begin a "file-parsing" FOR, you must use the /F 
  5540.  option and then include one or more file names in the set.  When you use this 
  5541.  form of FOR, the variable must be a single letter, for example, %a. 
  5542.  
  5543.  This method of parsing, included for compatibility with Windows NT 4.0's 
  5544.  CMD.EXE, can be cumbersome and inflexible.  For a more powerful method, use 
  5545.  FOR with @filename as the set to retrieve each line from the file, as 
  5546.  described in the previous section.  Then use variable functions like @INSTR, 
  5547.  @LEFT, @RIGHT, and @WORD to parse the line. 
  5548.  
  5549.  By default, FOR will extract the first word or token from each line and return 
  5550.  it in the variable.  For example, to display the first word on each line in 
  5551.  the file FLIST.TXT: 
  5552.  
  5553.           for /f %a in (flist.txt) do echo %a
  5554.  
  5555.  You can control the way FOR /F parses each line by specifying one or more 
  5556.  parsing options in a quoted string immediately after the /F.  The available 
  5557.  options are: 
  5558.  
  5559.     skip=n:   FOR /F will skip "n" lines at the beginning of each file before 
  5560.               parsing the remainder of the file. 
  5561.     tokens=n, m, ... :By default, FOR /F returns just the first word or "token" 
  5562.               from each parsed line in the variable you named.  You can have it 
  5563.               return more than one token in the variable, or return tokens in 
  5564.               several variables, with this option. 
  5565.  
  5566.               This option is followed by a list of numbers separated by commas. 
  5567.               The first number tells FOR /F which token to return in the first 
  5568.               variable, the second number tells it which to return in the 
  5569.               second variable, etc.  The variables follow each other 
  5570.               alphabetically starting with the variable you name on the FOR 
  5571.               command line.  This example returns the first word of each line 
  5572.               in each text file in %d, the second in %e, and the third in %f: 
  5573.  
  5574.                                     for /f "tokens=1,2,3" %d in (*.txt) do ...
  5575.  
  5576.               You can also indicate a range of tokens by separating the numbers 
  5577.               with a hyphen [-].  This example returns the first word of each 
  5578.               line in %p, the second through fifth words in %q, and the eighth 
  5579.               word in %r: 
  5580.  
  5581.                                     for /f "tokens=1,2-5,8" %p in (*.txt) do ...
  5582.  
  5583.               To return the rest of the line in a variable, use a range that 
  5584.               ends with a number higher than the last token in any line, such 
  5585.               as 999.  This final example returns the first word of each line 
  5586.               in %a and the remainder of each line (assuming that no line has 
  5587.               more than 999 words!) in %b: 
  5588.  
  5589.                                     for /f "tokens=1,2-999" %a in (*.txt) do ...
  5590.  
  5591.  
  5592.     eol=c :   If FOR /F finds the character "c" in the line, it will assume 
  5593.               that the character and any text following it are part of a 
  5594.               comment and ignore the rest of the line. 
  5595.     delims=xxx... :By default, FOR /F sees spaces and tabs as word or token 
  5596.               delimiters.  This option replaces those delimiters with all of 
  5597.               the characters following the equal sign to the end of the string. 
  5598.               This option must therefore be the last one used in the quoted 
  5599.               options string. 
  5600.  
  5601.  You can also use FOR /F to parse a single string instead of each line of a 
  5602.  file by using the string, in quotes, as the set.  For example, this command 
  5603.  will assign variable A to the string "this", B to "is", etc., then display 
  5604.  "this" (enter the command on one line): 
  5605.  
  5606.           for /f "tokens=1,2,3,4" %a in ("this is a test") do echo %a
  5607.  
  5608.  "Counted" FOR Loop 
  5609.  
  5610.  The "counted FOR" loop is included only for compatibility with Windows NT 
  5611.  4.0's CMD.EXE.  In most cases, you will find the DO command more useful for 
  5612.  performing counted loops. 
  5613.  
  5614.  In a counted FOR command, the set is made up of numeric values instead of text 
  5615.  or file names.  To begin a counted FOR command, you must use the /L option and 
  5616.  then include three values, separated by commas, in the set.  These are the 
  5617.  start, step, and end values.  During the first iteration of the FOR loop, the 
  5618.  variable is set equal to the start value.  Before each iteration, the variable 
  5619.  is increased by the step value.  The loop ends when the variable exceeds the 
  5620.  end value.  This example will print the numbers from 1 to 10: 
  5621.  
  5622.           for /l %val in (1,1,10) do echo %val
  5623.  
  5624.  This example will print the odd numbers from 1 to 10 (1, 3, 5, 7, and 9): 
  5625.  
  5626.           for /l %val in (1,2,10) do echo %val
  5627.  
  5628.  The step value can be negative.  If it is, the loop will end when the variable 
  5629.  is less than the end value. 
  5630.  
  5631.  Other Notes 
  5632.  
  5633.  You can use either % or %% in front of the variable name.  Either form will 
  5634.  work, whether the FOR command is typed from the command line or is part of an 
  5635.  alias or batch file (some of the traditional command processors require a 
  5636.  single % if FOR is used at the command line, but require %% if FOR is used in 
  5637.  a batch file).  The variable name can be up to 80 characters long.  The word 
  5638.  DO is optional. 
  5639.  
  5640.  If you use a single-character FOR variable name, that name is given priority 
  5641.  over any environment variable which starts with the same letter, in order to 
  5642.  maintain compatibility with the traditional FOR command.  For example, the 
  5643.  following command tries to add a: and b: to the end of the PATH, but will not 
  5644.  work as intended: 
  5645.  
  5646.           [c:\] for %p in (a: b:) do path %path;%p
  5647.  
  5648.  The "%p" in "%path" will be interpreted as the FOR variable %p followed by the 
  5649.  text "ath", which is not what was intended.  To get around this, use a 
  5650.  different letter or a longer name for the FOR variable, or use square brackets 
  5651.  around the variable name (see Environment). 
  5652.  
  5653.  The following example uses FOR with variable functions to delete the .BAK 
  5654.  files for which a corresponding .TXT file exists in the current directory: 
  5655.  
  5656.           [c:\docs] for %file in (*.txt) do del %@name[%file].bak
  5657.  
  5658.  The above command would not work properly on an HPFS drive, because the 
  5659.  returned FILE variable might contain whitespace.  To correct this problem, you 
  5660.  would need two sets of quotes, one for DEL and one for %@NAME: 
  5661.  
  5662.           [c:\docs] for %file in (*.txt) do del "%@name["%file"].bak"
  5663.  
  5664.  You can use command grouping to execute multiple commands for each element in 
  5665.  the set.  For example, the following command copies each .WKQ file in the 
  5666.  current directory to the D:\WKSAVE directory, then changes the extension of 
  5667.  each file in the current directory to .SAV.  This should be entered on one 
  5668.  line: 
  5669.  
  5670.           [c:\text] for %file in (*.wkq) do (copy "%file" d:\wksave\ &
  5671.                     ren "%file" *.sav)
  5672.  
  5673.  In a batch file you can use GOSUB to execute a subroutine for every element in 
  5674.  the set.  Within the subroutine, the FOR variable can be used just like any 
  5675.  environment variable.  This is a convenient way to execute a complex sequence 
  5676.  of commands for every element in the set without CALLing another batch file. 
  5677.  
  5678.  One unusual use of FOR is to execute a collection of batch files or other 
  5679.  commands with the same parameter.  For example, you might want to have three 
  5680.  batch files all operate on the same data file.  The FOR command could look 
  5681.  like this: 
  5682.  
  5683.           [c:\] for %cmd in (filetest fileform fileprnt) do %cmd datafile
  5684.  
  5685.  This line will expand to three separate commands: 
  5686.  
  5687.           filetest datafile
  5688.           fileform datafile
  5689.           fileprnt datafile
  5690.  
  5691.  The variable that FOR uses (the %CMD in the example above) is created in the 
  5692.  environment and then erased when the FOR command is done.  (For compatibility 
  5693.  with CMD.EXE, a single-character FOR variable is created in a special way that 
  5694.  does not overwrite an existing environment variable with the same name.)  When 
  5695.  using a multi-character variable name you must be careful not to use the name 
  5696.  of one of your environment variables as a FOR variable.  For example, a 
  5697.  command that begins 
  5698.  
  5699.           [c:\] for %path in ...
  5700.  
  5701.  will write over your current path setting, then erase the path variable 
  5702.  completely when FOR is done. 
  5703.  
  5704.  FOR statements can be nested. 
  5705.  
  5706.  Options 
  5707.  
  5708.     /A::    (Attribute select) Select only those files that have the specified 
  5709.             attribute(s) set.  /A: will be used only when processing wildcard 
  5710.             file names in the set.  It will be ignored for filenames without 
  5711.             wildcards or other items in the set.  Preceding the attribute 
  5712.             character with a hyphen [-] will select files that do not have that 
  5713.             attribute set.  The colon [:] after /A is required.  The attributes 
  5714.             are: 
  5715.  
  5716.               R  Read-only 
  5717.               H  Hidden 
  5718.               S  System 
  5719.               D  Subdirectory 
  5720.               A  Archive 
  5721.  
  5722.             If no attributes are listed (e.g., FOR /A: ...), FOR will process 
  5723.             all files including hidden and system files.  If attributes are 
  5724.             combined, all the specified attributes must match for a file to be 
  5725.             included.  For example, /A:RHS will include only those files with 
  5726.             all three attributes set. 
  5727.  
  5728.             For example, to process only those files with the archive attribute 
  5729.             set: 
  5730.  
  5731.                                 for /a:a %f in (*.*) echo %f needs a backup!
  5732.  
  5733.     /F:     (File parsing) Return one or more words or tokens from each line of 
  5734.             each file in the set.  The /F option can be followed by one or more 
  5735.             options in a quoted string which control how the parsing is 
  5736.             performed.  See the details under Parsing Text From Files, above. 
  5737.     /H:     (Hide dots) Suppress the assignment of the "." and ".." directories 
  5738.             to the FOR variable. 
  5739.     /L:     (counted loop) Interpret the three values in the set as the start, 
  5740.             step, and end values of a counted loop.  See the details under 
  5741.             "Counted" FOR Loop, above. 
  5742.     /R:     (Recursive) Look in the current directory and all of its 
  5743.             subdirectories for files in the set.  If the /R is followed by a 
  5744.             directory name, look for files in that directory and all of its 
  5745.             subdirectories. 
  5746.  
  5747.  
  5748. ΓòÉΓòÉΓòÉ 6.35. FREE - Display total and free disk space ΓòÉΓòÉΓòÉ
  5749.  
  5750.  Purpose:    Display the total disk space, total bytes used, and total bytes 
  5751.              free on the specified (or default) drive(s). 
  5752.  
  5753.  Format:     FREE [drive: ...] 
  5754.  
  5755.              drive :  One or more drives to include in the report. 
  5756.  
  5757.  See also:  MEMORY. 
  5758.  
  5759.  Usage 
  5760.  
  5761.  FREE provides the same disk information as the external command CHKDSK, but 
  5762.  without the wait, since it does not check the integrity of the file and 
  5763.  directory structure of the disk. 
  5764.  
  5765.  A colon [:] is required after each drive letter.  This example displays the 
  5766.  status of drives A and C: 
  5767.  
  5768.           [c:\] free a: c:
  5769.  
  5770.            Volume in drive A: is unlabeled    Serial number is 213A:15D5
  5771.               1,213,952 bytes total disk space
  5772.               1,115,136 bytes used
  5773.                  98,816 bytes free
  5774.  
  5775.            Volume in drive C: is DEVELOPMENT  Serial number is 2944:15D9
  5776.             242,496,000 bytes total disk space
  5777.             236,851,712 bytes used
  5778.               5,644,288 bytes free
  5779.  
  5780.  
  5781. ΓòÉΓòÉΓòÉ 6.36. GLOBAL - Execute a command all subdirectories ΓòÉΓòÉΓòÉ
  5782.  
  5783.  Purpose:    Execute a command in the current directory and its subdirectories. 
  5784.  
  5785.  Format:     GLOBAL [/H /I /P /Q] command 
  5786.  
  5787.              command :  The command to execute, including arguments and 
  5788.              switches. 
  5789.  
  5790.              /H(idden directories)           /P(rompt) 
  5791.              /I(gnore exit codes)            /Q(uiet) 
  5792.  
  5793.  Usage 
  5794.  
  5795.  GLOBAL performs the command first in the current directory and then in every 
  5796.  subdirectory under the current directory.  The command can be an internal 
  5797.  command, an alias, an external command, or a batch file. 
  5798.  
  5799.  This example copies the files in every directory on drive A to the directory 
  5800.  C:\TEMP : 
  5801.  
  5802.           [a:\] global copy *.* c:\temp
  5803.  
  5804.  If you use the /P option, GLOBAL will prompt for each subdirectory before 
  5805.  performing the command.  You can use this option if you want to perform the 
  5806.  command in most, but not all subdirectories of the current directory. 
  5807.  
  5808.  You can use command grouping to execute multiple commands in each 
  5809.  subdirectory.  For example, the following command copies each .TXT file in the 
  5810.  current directory and all of its subdirectories to drive A.  It then changes 
  5811.  the extension of each of the copied files to .SAV : 
  5812.  
  5813.           [c:\] global (copy *.txt a: & ren *.txt *.sav)
  5814.  
  5815.  Options 
  5816.  
  5817.     /H:     (Hidden directories) Forces GLOBAL to look for hidden directories. 
  5818.             If you don't use this switch, hidden directories are ignored. 
  5819.  
  5820.     /I:     (Ignore exit codes) If this option is not specified, GLOBAL will 
  5821.             terminate if the command returns a non-zero exit code.  Use /I if 
  5822.             you want the command to continue in additional subdirectories even 
  5823.             if it returns an error in one subdirectory.  Even if you use /I, 
  5824.             GLOBAL will hnormally alt execution if the command processor 
  5825.             receives a Ctrl-C or Ctrl-Break. 
  5826.  
  5827.     /P:     (Prompt) Forces GLOBAL to prompt with each directory name before it 
  5828.             performs the command.  Your options at the prompt are explained in 
  5829.             detail under Page and File Prompts. 
  5830.  
  5831.     /Q:     (Quiet) Do not display the directory names as each directory is 
  5832.             processed. 
  5833.  
  5834.  
  5835. ΓòÉΓòÉΓòÉ 6.37. GOSUB - Execute a subroutine in a batch file ΓòÉΓòÉΓòÉ
  5836.  
  5837.  Purpose:    Execute a subroutine in the current batch file. 
  5838.  
  5839.  Format:     GOSUB label 
  5840.  
  5841.              label :  The batch file label at the beginning of the subroutine. 
  5842.  
  5843.  See also:  CALL, GOTO and RETURN. 
  5844.  
  5845.  Usage 
  5846.  
  5847.  GOSUB can only be used in batch files. 
  5848.  
  5849.  4OS2 allows subroutines in batch files.  A subroutine must start with a label 
  5850.  (a colon [:] followed by a one-word label name) which appears on a line by 
  5851.  itself.  Case differences are ignored when matching labels.  Labels may be one 
  5852.  or more words long.  The subroutine must end with a RETURN statement. 
  5853.  
  5854.  The subroutine is invoked with a GOSUB command from another part of the batch 
  5855.  file.  After the RETURN, processing will continue with the command following 
  5856.  the GOSUB command.  For example, the following batch file fragment calls a 
  5857.  subroutine which displays the directory and returns: 
  5858.  
  5859.           echo Calling a subroutine
  5860.           gosub subr1
  5861.           echo Returned from the subroutine
  5862.           quit
  5863.           :subr1
  5864.           dir /a/w
  5865.           return
  5866.  
  5867.  4OS2 begins its search for the label on the next line of the batch file (after 
  5868.  the GOSUB command).  If the label is not found between the current position 
  5869.  and the end of the file, GOSUB will restart the search at the beginning of the 
  5870.  file.  If the label does not exist, the batch file is terminated with the 
  5871.  error message "Label not found." 
  5872.  
  5873.  GOSUB saves the IFF and DO states, so IFF and DO statements inside a 
  5874.  subroutine won't interfere with statements in the part of the batch file from 
  5875.  which the subroutine was called. 
  5876.  
  5877.  Subroutines can be nested. 
  5878.  
  5879.  
  5880. ΓòÉΓòÉΓòÉ 6.38. GOTO - Branch within a batch file ΓòÉΓòÉΓòÉ
  5881.  
  5882.  Purpose:    Branch to a specified line inside the current batch file. 
  5883.  
  5884.  Format:     GOTO [/I] label 
  5885.  
  5886.              label :  The batch file label to branch to. 
  5887.  
  5888.              /I(FF and DO continue) 
  5889.  
  5890.  See also:  GOSUB. 
  5891.  
  5892.  Usage 
  5893.  
  5894.  GOTO can only be used in batch files. 
  5895.  
  5896.  After a GOTO command in a batch file, the next line to be executed will be the 
  5897.  one immediately after the label.  The label must begin with a colon [:] and 
  5898.  appear on a line by itself. The colon is required on the line where the label 
  5899.  is defined, but is not required in the GOTO command itself.  Case differences 
  5900.  are ignored when matching labels.  Labels may be one or more words long. 
  5901.  
  5902.  This batch file fragment checks for the existence of the file CONFIG.SYS.  If 
  5903.  the file exists, the batch file jumps to C_EXISTS and copies all the files 
  5904.  from the current directory to the root directory on A:.  Otherwise, it prints 
  5905.  an error message and exits. 
  5906.  
  5907.           if exist config.sys goto C_EXISTS
  5908.           echo CONFIG.SYS doesn't exist - exiting.
  5909.           quit
  5910.           :C_EXISTS
  5911.           copy *.* a:\
  5912.  
  5913.  GOTO begins its search for the label on the next line of the batch file (after 
  5914.  the GOTO command).  If the label is not found between the current position and 
  5915.  the end of the file, GOTO will restart the search at the beginning of the 
  5916.  file.  If the label does not exist, the batch file is terminated with the 
  5917.  error message "Label not found." 
  5918.  
  5919.  To avoid errors in the processing of nested statements and loops, GOTO cancels 
  5920.  all active IFF statements and DO / ENDDO loops unless you use /I.  This means 
  5921.  that a normal GOTO (without /I) may not branch to any label that is between an 
  5922.  IFF and the corresponding ENDIFF or between a DO and the corresponding ENDDO. 
  5923.  
  5924.  For compatibility with Windows NT's CMD.EXE, the command 
  5925.  
  5926.           GOTO :EOF
  5927.  
  5928.  will end processing of the current batch file if the label :EOF does not 
  5929.  exist.  However, this is less efficient than using the QUIT or CANCEL command 
  5930.  to end a batch file. 
  5931.  
  5932.  Options 
  5933.  
  5934.     /I:     (IFF and DO continue) Prevents GOTO from canceling IFF statements 
  5935.             and DO loops.  Use this option only if you are absolutely certain 
  5936.             that your GOTO command is branching entirely within any current IFF 
  5937.             statement and any active DO / ENDDO block.  Using /I under any 
  5938.             other conditions will cause an error later in your batch file. 
  5939.  
  5940.             You cannot branch into another IFF statement, another DO loop, or a 
  5941.             different IFF or DO nesting level, whether you use the /I option or 
  5942.             not.  If you do, you will eventually receive an "unknown command" 
  5943.             error (or execution of the UNKNOWN_CMD alias) on a subsequent 
  5944.             ENDDO, ELSE, ELSEIFF, or ENDIFF statement. 
  5945.  
  5946.  
  5947. ΓòÉΓòÉΓòÉ 6.39. HELP - Display help ΓòÉΓòÉΓòÉ
  5948.  
  5949.  Purpose:    Display help for internal commands.  Help for external commands is 
  5950.              also available in some cases. 
  5951.  
  5952.  Format:     HELP [topic ] 
  5953.  
  5954.              topic :  A help topic, internal command, or external command. 
  5955.  
  5956.  See also:  The 4OS2 Help System. 
  5957.  
  5958.  Usage 
  5959.  
  5960.  Online help is available for 4OS2.  The 4OS2 help system uses the OS/2 help 
  5961.  facility. 
  5962.  
  5963.  See the Introduction and Installation Guide for a more thorough explanation of 
  5964.  the online help available. 
  5965.  
  5966.  If you type the command HELP by itself (or press F1 when the command line is 
  5967.  empty), the table of contents is displayed.  If you type HELP plus a topic 
  5968.  name, that topic is displayed.  For example: 
  5969.  
  5970.           help copy
  5971.  
  5972.  displays information about the COPY command and its options. 
  5973.  
  5974.  You can configure the HELP command to display OS/2's command-line help along 
  5975.  with the 4OS2's (the default), display only the 4OS2 help, or display some 
  5976.  other combination of help "books".  For details, see the HelpBook directive 
  5977.  and your Introduction and Installation Guide. 
  5978.  
  5979.  
  5980. ΓòÉΓòÉΓòÉ 6.40. HISTORY - Manage the history list ΓòÉΓòÉΓòÉ
  5981.  
  5982.  Purpose:    Display, add to, clear, or read the history list. 
  5983.  
  5984.  Format:     HISTORY [/A command /F /P /R filename ] 
  5985.  
  5986.              command :  A command to be added to the history list. 
  5987.              filename :  The name of a file containing entries to be added to 
  5988.              the history list. 
  5989.  
  5990.              /A(dd)                          /P(ause) 
  5991.              /F(ree)                         /R(ead) 
  5992.  
  5993.  See also:  DIRHISTORY and LOG. 
  5994.  
  5995.  Usage 
  5996.  
  5997.  4OS2 keeps a list of the commands you have entered on the command line.  See 
  5998.  Command History and Recall for information on command recall, which allows you 
  5999.  to use the history list to repeat or edit commands you have previously 
  6000.  executed. 
  6001.  
  6002.  The HISTORY command lets you view and manipulate the command history list 
  6003.  directly.  If no parameters are entered, HISTORY will display the current 
  6004.  command history list: 
  6005.  
  6006.           [c:\] history
  6007.  
  6008.  With the options explained below, you can clear the list, add new commands to 
  6009.  the list without executing them, save the list in a file, or read a new list 
  6010.  from a file. 
  6011.  
  6012.  The number of commands saved in the history list depends on the length of each 
  6013.  command line.  The history list size can be specified at startup from 256 to 
  6014.  32767 characters (see the History directive).  The default size is 1024 
  6015.  characters. 
  6016.  
  6017.  Your history list can be stored either locally (a separate history list for 
  6018.  each copy of 4OS2) or globally (all copies of 4OS2 share the same list).  For 
  6019.  full details see the discussion of local and global history lists under 
  6020.  Command History and Recall. 
  6021.  
  6022.  You can use the HISTORY command as an aid in writing batch files by 
  6023.  redirecting the HISTORY output to a file and then editing the file 
  6024.  appropriately.  However, it may be easier to use the LOG /H command for this 
  6025.  purpose. 
  6026.  
  6027.  You can disable the history list or specify a minimum command-line length to 
  6028.  save with on the Command Line 1 page of the OPTION dialogs, or with the 
  6029.  HistMin directive in the .INI file. 
  6030.  
  6031.  You can save the history list by redirecting the output of HISTORY to a file. 
  6032.  This example saves the command history to a file called HISTFILE and reads it 
  6033.  back again immediately.  If you leave out the HISTORY /F command on the second 
  6034.  line, the contents of the file will be appended to the current history list 
  6035.  instead of replacing it: 
  6036.  
  6037.           [c:\] history > histfile
  6038.           [c:\] history /f
  6039.           [c:\] history /r histfile
  6040.  
  6041.  If you need to save your history at the end of each day's work, you might use 
  6042.  commands like this in your AUTOEXEC.BAT or other startup file: 
  6043.  
  6044.           if exist c:\histfile history /r c:\histfile
  6045.           alias shut*down `history > c:\histfile`
  6046.  
  6047.  This restores the previous history list if it exists, then defines an alias 
  6048.  which will allow you to save the history before shutting off the system. 
  6049.  
  6050.  Options 
  6051.  
  6052.     /A:     (Add) Add a command to the history list.  This performs the same 
  6053.             function as the Ctrl-K key at the command line (see Command History 
  6054.             and Recall). 
  6055.  
  6056.     /F:     (Free) Erase all entries in the command history list. 
  6057.  
  6058.     /P:     (Prompt) Wait for a key after displaying each page of the list. 
  6059.             Your options at the prompt are explained in detail under Page and 
  6060.             File Prompts. 
  6061.  
  6062.     /R:     (Read) Read the command history from the specified file and append 
  6063.             it to the history list currently held in memory.  Each line in the 
  6064.             file must fit within the command-line length limit). 
  6065.  
  6066.             If you are creating a HISTORY /R file by hand, and need to create 
  6067.             an entry that spans multiple lines in the file, you can do so by 
  6068.             terminating each line, except the last, with an escape character. 
  6069.             However, you cannot use this method to exceed the command-line 
  6070.             length limit. 
  6071.  
  6072.  
  6073. ΓòÉΓòÉΓòÉ 6.41. IF - Execute a command if a condition is true ΓòÉΓòÉΓòÉ
  6074.  
  6075.  Purpose:    Execute a command if a condition or set of conditions is true. 
  6076.  
  6077.  Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] 
  6078.              command 
  6079.  
  6080.              condition :  A test or set of tests to determine if the command 
  6081.              should be executed. 
  6082.              command :  The command to execute if the condition is true. 
  6083.  
  6084.  See also:  IFF, @IF. 
  6085.  
  6086.  Usage 
  6087.  
  6088.  IF is normally used only in aliases and batch files.  It is always followed by 
  6089.  one or more conditions and then a command.  First, the conditions are 
  6090.  evaluated.  If they are true, the command is executed.  Otherwise, the command 
  6091.  is ignored.  If you add a NOT before a condition, the command is executed only 
  6092.  when the condition is false. 
  6093.  
  6094.  You can link conditions with .AND., .OR., or .XOR., and you can group 
  6095.  conditions with parentheses (see Combining Tests below).  You can also nest IF 
  6096.  statements. 
  6097.  
  6098.  The conditions can test strings, numbers, the existence of a file or 
  6099.  subdirectory, the exit code returned by the preceding external command, and 
  6100.  the existence of aliases and internal commands. 
  6101.  
  6102.  The command can be an alias, an internal command, an external command, or a 
  6103.  batch file.  The entire IF statement, including all conditions and the 
  6104.  command, must fit on one line. 
  6105.  
  6106.  Some examples of IF conditions and commands are included below; additional 
  6107.  examples can be found in the EXAMPLES.BTM file which came with 4OS2. 
  6108.  
  6109.  You can use command grouping to execute multiple commands if the condition is 
  6110.  true.  For example, the following command tests if any .TXT files exist.  If 
  6111.  they do, they are copied to drive A: and their extensions are changed to .TXO 
  6112.  : 
  6113.  
  6114.           if exist *.txt (copy *.txt a: & ren *.txt *.txo)
  6115.  
  6116.  (Note that the IFF command provides a more structured method of executing 
  6117.  multiple commands if a condition or set of conditions is true.) 
  6118.  
  6119.  When an IF test fails, the remainder of the command is discarded, and the 
  6120.  command processor normally continues with the next command on the line, or the 
  6121.  next line.  This behavior is not compatible with CMD.EXE, which discards all 
  6122.  remaining commands on the line when an IF test fails, including those after a 
  6123.  command separator or pipe character.  To change the behavior so that IF 
  6124.  affects all commands on the line, as in CMD.EXE, set DuplicateBugs to Yes in 
  6125.  4OS2.INI. 
  6126.  
  6127.  For example, if DuplicateBugs is set to Yes (the default), the following 
  6128.  command will display nothing, because the second ECHO command is discarded 
  6129.  along with the first when the condition fails.  If DuplicateBugs is set to No, 
  6130.  it will display "hello": 
  6131.  
  6132.           [c:\] if 1 == 2 echo Wrong! & echo hello
  6133.  
  6134.  Conditions 
  6135.  
  6136.  The conditional tests listed in the following sections are available in both 
  6137.  the IF and IFF commands.  They fit into two categories:  string and numeric 
  6138.  tests, and status tests.  The tests can use environment variables, internal 
  6139.  variables and variable functions, file names, literal text, and numeric values 
  6140.  as their arguments. 
  6141.  
  6142.  String and Numeric Tests 
  6143.  
  6144.  Six test conditions can be used to test character strings.  The same 
  6145.  conditions are available for both numeric and normal text strings (see below 
  6146.  for details).  In each case you enter the test as: 
  6147.  
  6148.           string1 operator string2
  6149.  
  6150.  The operator defines the type of test (equal, greater than or equal, and so 
  6151.  on).  You should always use spaces on both sides of the operator  The 
  6152.  operators are: 
  6153.  
  6154.         EQ or ==    string1 equal to string2 
  6155.         NE or !=    string1 not equal to string2 
  6156.         LT          string1 less than string2 
  6157.         LE          string1 less than or equal to string2 
  6158.         GE          string1 greater than or equal to string2 
  6159.         GT          string1 greater than string2 
  6160.  
  6161.  When IF compares two character strings, it will use either a numeric 
  6162.  comparison or a string comparison.  A numeric comparison treats the strings as 
  6163.  numeric values and tests them arithmetically.  A string comparison treats the 
  6164.  strings as text. 
  6165.  
  6166.  The difference between numeric and string comparisons is best explained by 
  6167.  looking at the way two values are tested.  For example, consider comparing the 
  6168.  values 2 and 19.  Numerically, 2 is smaller, but as a string it is "larger" 
  6169.  because its first digit is larger than the first digit of 19.  So the first of 
  6170.  these conditions will be true, and the second will be false: 
  6171.  
  6172.           if 2 lt 19 ...
  6173.           if "2" lt "19" ...
  6174.  
  6175.  IF determines which kind of test to do by examining the first character of 
  6176.  each string.  If both strings begin with a numeric character (a digit, sign, 
  6177.  or decimal separator), a numeric comparison is used.  (If a string begins with 
  6178.  a decimal separator it is not considered numeric unless the next character is 
  6179.  a digit, and there are no more decimal separators within the string.  For 
  6180.  example, ".07" is numeric, but ".a" and ".07.01" are not.)  If either value is 
  6181.  non-numeric, a string comparison is used.  To force a string comparison when 
  6182.  both values are or may be numeric, use double quotes around the values you are 
  6183.  testing, as shown above.  Because the double quote is not a numeric character, 
  6184.  IF performs a string comparison. 
  6185.  
  6186.  Case differences are ignored in string comparisons.  If two strings begin with 
  6187.  the same text but one is shorter, the shorter string is considered to be "less 
  6188.  than" the longer one.  For example, "a" is less than "abc", and "hello_there" 
  6189.  is greater than "hello". 
  6190.  
  6191.  When you compare text strings, you should always enclose the arguments in 
  6192.  double quotes in order to avoid syntax errors which may occur if one of the 
  6193.  argument values is empty. 
  6194.  
  6195.  Numeric comparisons work with both integer and decimal values.  The values to 
  6196.  be compared must contain only numeric digits, decimal points, and an optional 
  6197.  sign (+ or -). The number may contain up to 16 digits to the left of the 
  6198.  decimal point, and 8 digits to the right. 
  6199.  
  6200.  Internal variables and variable functions are very powerful when combined with 
  6201.  string and numeric comparisons.  They allow you to test the state of your 
  6202.  system, the characteristics of a file, date and time information, or the 
  6203.  result of a calculation.  You may want to review the variables and variable 
  6204.  functions when determining the best way to set up an IF test. 
  6205.  
  6206.  This batch file fragment runs a program called MONOPROG if a monochrome 
  6207.  monitor is attached to the system: 
  6208.  
  6209.           if "%_monitor" == "mono" monoprog
  6210.  
  6211.  This batch file fragment tests for a string value: 
  6212.  
  6213.           input "Enter your selection : " %%cmd
  6214.           if "%cmd" == "WP" goto wordproc
  6215.           if "%cmd" NE "GRAPHICS" goto badentry
  6216.  
  6217.  This example calls GO.BTM if the first two characters in the file MYFILE are 
  6218.  "GO": 
  6219.  
  6220.           if "%@left[2,%@line[myfile,0]]" == "GO" call go.btm
  6221.  
  6222.  Status Tests 
  6223.  
  6224.  These conditions test the system or command processor status.  You can use 
  6225.  internal variables and variable functions to test many other parts of the 
  6226.  system status. 
  6227.  
  6228.     DEFINED variable
  6229.         If the variable exists in the environment, the condition is true.  This 
  6230.         is equivalent to testing whether the variable is not empty, for example 
  6231.         the following two commands are equivalent: 
  6232.  
  6233.                         if defined abc echo Hello
  6234.                         if "%abc" != "" echo Hello
  6235.  
  6236.     ERRORLEVEL [operator] n
  6237.         This test retrieves the exit code of the preceding external program. 
  6238.         By convention, programs return an exit code of 0 when they are 
  6239.         successful and a number between 1 and 255 to indicate an error 
  6240.         (depending on the program you are running, the maximum return value may 
  6241.         be larger).  The condition can be any of the operators listed above 
  6242.         (EQ, !=, GT, etc.).  If no operator is specified, the default is GE. 
  6243.         The comparison is done numerically. 
  6244.  
  6245.         Not all programs return an explicit exit code.  For programs which do 
  6246.         not, the behavior of ERRORLEVEL is undefined. 
  6247.  
  6248.     EXIST filename
  6249.         If the file exists, the condition is true.  You can use wildcards in 
  6250.         the filename, in which case the condition is true if any file matching 
  6251.         the wildcard name exists. 
  6252.  
  6253.         Do not use IF EXIST to test for existence of a directory (use IF ISDIR 
  6254.         instead).  Due to variations in operating system internals, IF EXIST 
  6255.         will not return consistent results when used to test for the existence 
  6256.         of a directory. 
  6257.  
  6258.     ISALIAS aliasname
  6259.         If the name is defined as an alias, the condition is true. 
  6260.  
  6261.     ISDIR | DIREXIST path
  6262.         If the subdirectory exists, the condition is true. 
  6263.  
  6264.     ISINTERNAL command
  6265.         If the specified command is an active internal command, the condition 
  6266.         is true.  Commands can be activated and deactivated with the SETDOS /I 
  6267.         command. 
  6268.  
  6269.     ISLABEL label
  6270.         If the specified label exists in the current batch file, the condition 
  6271.         is true.  Labels may be one or more words long. 
  6272.  
  6273.  This batch file fragment tests for the existence of A:\JAN.DOC before copying 
  6274.  it to drive C (this avoids an error message if the file does not exist): 
  6275.  
  6276.           if exist a:\jan.doc copy a:\jan.doc c:\
  6277.  
  6278.  This example tests the exit code of the previous program and stops all batch 
  6279.  file processing if an error occurred: 
  6280.  
  6281.           if errorlevel == 0 goto success
  6282.           echo "External Error -- Batch File Ends!"
  6283.           cancel
  6284.  
  6285.  Combining Tests 
  6286.  
  6287.  You can negate the result of any test with NOT, and combine tests of any type 
  6288.  with .AND., .OR., and .XOR. 
  6289.  
  6290.  When two tests are combined with .AND., the result is true if both individual 
  6291.  tests are true.  When two tests are combined with .OR., the result is true if 
  6292.  either (or both) individual tests are true.  When two tests are combined with 
  6293.  .XOR., the result is true only if one of the tests is true and the other is 
  6294.  false. 
  6295.  
  6296.  This example runs a program called HIGHRES if either an EGA or VGA video 
  6297.  adapter is in use.  Enter this on one line: 
  6298.  
  6299.           if "%_video" == "EGA" .or. "%_video" == "vga" highres
  6300.  
  6301.  Test conditions are always scanned from left to right  there is no implied 
  6302.  order of precedence, as there is in some programming languages.  You can, 
  6303.  however, force a specific order of testing by grouping conditions with 
  6304.  parentheses, for example (enter this on one line): 
  6305.  
  6306.           if (%a == 1 .or. (%b == 2 .and. %c == 3)) echo something
  6307.  
  6308.  Parentheses can only be used when the portion of the condition inside the 
  6309.  parentheses contains at least one ".and.", ".or.", or ".xor.".  Parentheses on 
  6310.  a simple condition which does not combine two or more tests will be taken as 
  6311.  part of the string to be tested, and will probably make the test fail.  For 
  6312.  example, the first of these IF tests would fail; the second would succeed: 
  6313.  
  6314.           if (a == a) ...
  6315.           if (a == a .and. b == b) ...
  6316.  
  6317.  
  6318. ΓòÉΓòÉΓòÉ 6.42. IFF - IF / THEN / ELSE conditional command execution ΓòÉΓòÉΓòÉ
  6319.  
  6320.  Purpose:    Perform IF / THEN / ELSE conditional execution of commands. 
  6321.  
  6322.  Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition  ...] 
  6323.              THEN & commands 
  6324.              [ELSEIFF condition  THEN & commands ] ... 
  6325.              [ELSE & commands ] 
  6326.              & ENDIFF 
  6327.  
  6328.              condition :  A test to determine if the command(s) should be 
  6329.              executed. 
  6330.              commands :  One or more commands to execute if the condition(s) is 
  6331.              true.  If you use multiple commands, they must be separated by 
  6332.              command separators or be placed on separate lines of a batch file. 
  6333.  
  6334.  See also:  IF and @IF. 
  6335.  
  6336.  Usage 
  6337.  
  6338.  IFF is similar to the IF command, except that it can perform one set of 
  6339.  commands when a condition or set of conditions is true and different commands 
  6340.  when the conditions are false. 
  6341.  
  6342.  IFF can also execute multiple commands when the conditions are true or false; 
  6343.  IF normally executes only one command.  IFF imposes no limit on the number of 
  6344.  commands and is generally a "cleaner" and more structured command than IF. 
  6345.  
  6346.  IFF is always followed by one or more conditions.  If they are true, the 
  6347.  commands that follow the word THEN are executed.  Additional conditions can be 
  6348.  tested with ELSEIFF.  If none of these conditions are true, the commands that 
  6349.  follow the word ELSE are executed.  After the selected commands (if any) are 
  6350.  executed, processing continues after the word ENDIFF. 
  6351.  
  6352.  If you add a NOT before the condition, the THEN commands are executed only 
  6353.  when the condition is false and the ELSE commands are executed only when the 
  6354.  condition is true. 
  6355.  
  6356.  The commands may be separated by command separators, or may be on separate 
  6357.  lines of a batch file.  You should include a command separator or a line break 
  6358.  after a THEN, before an ELSEIFF, and before and after an ELSE. 
  6359.  
  6360.  You can link conditions with .AND., .OR., or .XOR., and you can group 
  6361.  conditions with parentheses.  You can nest IFF statements up to 15 levels 
  6362.  deep.  The conditions can test strings or numbers, the existence of a file or 
  6363.  subdirectory, the errorlevel returned from the preceding external command, and 
  6364.  the existence of alias names and internal commands. 
  6365.  
  6366.  See the IF command for a list of the possible conditions, and details on 
  6367.  useing .AND., .OR., .XOR., and parentheses. 
  6368.  
  6369.  The commands can include any internal command, alias, external command, or 
  6370.  batch file. 
  6371.  
  6372.  The following batch file fragment tests the monitor type (monochrome or 
  6373.  color), and sets the appropriate colors and prompt (enter the "prompt" lines 
  6374.  on one line of the batch file): 
  6375.  
  6376.           iff "%_monitor" == "color" then
  6377.              color bright white on blue & cls
  6378.              prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path: $p$e[u$e[44;37m$n$g
  6379.           else
  6380.              prompt=$e[s$e[1;1f$e[0;7m$e[K  Path: $p$e[u$e[0m$n$g
  6381.           endiff
  6382.  
  6383.  The alias in this second example checks to see if the argument is a 
  6384.  subdirectory.  If so, the alias deletes the subdirectory's files and removes 
  6385.  it (enter this on one line): 
  6386.  
  6387.           [c:\] alias prune `iff isdir %1 then & del /sxz %1
  6388.                 & else & echo Not a directory! & endiff`
  6389.  
  6390.  Be sure to read the cautionary notes about GOTO and IFF under the GOTO command 
  6391.  before using a GOTO inside an IFF statement. 
  6392.  
  6393.  If you pipe data to an IFF, the data will be passed to the command(s) 
  6394.  following the IFF, not to IFF itself. 
  6395.  
  6396.  
  6397. ΓòÉΓòÉΓòÉ 6.43. INKEY - Get a character from the keyboard ΓòÉΓòÉΓòÉ
  6398.  
  6399.  Purpose:    Get a single keystroke from the user and store it in an 
  6400.              environment variable. 
  6401.  
  6402.  Format:     INKEY [/C /D /K"keys" /P /Wn /X] [prompt ] %%varname 
  6403.  
  6404.              prompt :  Optional text that is displayed as a prompt. 
  6405.              varname :  The variable that will hold the user's keystroke. 
  6406.  
  6407.              /C(lear buffer)                 /P(assword) 
  6408.              /D(igits only)                  /W(ait) 
  6409.              /K(valid keystrokes)            /X (no carriage return) 
  6410.  
  6411.  See also:  INPUT. 
  6412.  
  6413.  Usage 
  6414.  
  6415.  INKEY optionally displays a prompt.  Then it waits for a specified time or 
  6416.  indefinitely for a keystroke, and places the keystroke into an environment 
  6417.  variable.  It is normally used in batch files and aliases to get a menu choice 
  6418.  or other single-key input.  Along with the INPUT command, INKEY allows great 
  6419.  flexibility in reading input from within a batch file or alias. 
  6420.  
  6421.  If prompt text is included in an INKEY command, it is displayed while INKEY 
  6422.  waits for input. 
  6423.  
  6424.  The following batch file fragment prompts for a character and stores it in the 
  6425.  variable NUM: 
  6426.  
  6427.           inkey Enter a number from 1 to 9:  %%num
  6428.  
  6429.  INKEY reads standard input for the keystroke, so it will accept keystrokes 
  6430.  from a redirected file or from the KEYSTACK.  You can supply a list of valid 
  6431.  keystrokes with the /K option. 
  6432.  
  6433.  Standard keystrokes with ASCII values between 1 and 255 are stored directly in 
  6434.  the environment variable.  Extended keystrokes (for example, function keys and 
  6435.  cursor keys) are stored as a string in decimal format, with a leading @ (for 
  6436.  example, the F1 key is @59).  The Enter key is stored as an extended 
  6437.  keystroke, with the code @28.  See the Reference Tables for a list of the 
  6438.  ASCII and extended key codes. 
  6439.  
  6440.  To test for a non-printing ASCII keystroke returned by INKEY use the @ASCII 
  6441.  function to get the numeric value of the key.  For example, to test for Esc, 
  6442.  which has an ASCII value of 27: 
  6443.  
  6444.           inkey Enter a key:  %%key
  6445.           if "%@ascii[%key]" == "27" echo Esc pressed
  6446.  
  6447.  If you press Ctrl-C or Ctrl-Break while INKEY is waiting for a key, execution 
  6448.  of an alias will be terminated, and execution of a batch file will be 
  6449.  suspended while you are asked whether to cancel the batch job.  A batch file 
  6450.  can handle Ctrl-C and Ctrl-Break itself with the ON BREAK command. 
  6451.  
  6452.  Options 
  6453.  
  6454.     /C:     (Clear buffer) Clears the keyboard buffer before INKEY accepts 
  6455.             keystrokes.  If you use this option, INKEY will ignore any 
  6456.             keystrokes which you type, either accidentally or intentionally, 
  6457.             before it is ready to accept input. 
  6458.  
  6459.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  6460.             digit from 0 to 9. 
  6461.  
  6462.     /K"keys":Specify the permissible keystrokes.  The list of valid keystrokes 
  6463.             should be enclosed in double quotes.  For alphabetic keys the 
  6464.             validity test is not case sensitive.  You can specify extended keys 
  6465.             by enclosing their names in square brackets (within the quotes), 
  6466.             for example: 
  6467.  
  6468.                                 inkey /k"ab[Alt-F10]" Enter A, B, Alt-F10 %%var
  6469.  
  6470.             See Keys and Key Names for a complete listing of the key names you 
  6471.             can use within the square brackets, and a description of the key 
  6472.             name format. 
  6473.  
  6474.             If an invalid keystroke is entered, 4OS2 will echo the keystroke if 
  6475.             possible, beep, move the cursor back one character, and wait for 
  6476.             another keystroke. 
  6477.  
  6478.     /P:     (Password) Prevents INKEY from echoing the character. 
  6479.  
  6480.     /W:     (Wait) Timeout period, in seconds, to wait for a response. If no 
  6481.             keystroke is entered by the end of the timeout period, INKEY 
  6482.             returns with the variable unchanged.  This allows you to continue 
  6483.             the batch file if the user does not respond in a given period of 
  6484.             time.  You can specify /W0 to return immediately if there are no 
  6485.             keys waiting in the keyboard buffer. 
  6486.  
  6487.             For example, the following batch file fragment waits up to 10 
  6488.             seconds for a character, then tests to see if a "Y" was entered: 
  6489.  
  6490.                                 set net=N
  6491.                                 inkey /K"YN" /w10 Load network (Y/N)?  %%net
  6492.                                 iff "%net" == "Y" then
  6493.                                 rem Commands to load the network go here
  6494.                                 endiff
  6495.  
  6496.     /X:     (No carriage return) Prevents INKEY from displaying a carriage 
  6497.             return and line feed after the user's entry. 
  6498.  
  6499.  
  6500. ΓòÉΓòÉΓòÉ 6.44. INPUT - Get a string from the keyboard ΓòÉΓòÉΓòÉ
  6501.  
  6502.  Purpose:    Get a string from the keyboard and save it in an environment 
  6503.              variable. 
  6504.  
  6505.  Format:     INPUT [/C /D /E /Ln /N /P /Wn /X] [prompt ] %%varname 
  6506.  
  6507.              prompt :  Optional text that is displayed as a prompt. 
  6508.              varname :  The variable that will hold the user's input. 
  6509.  
  6510.              /C(lear buffer)                 /N(o colors) 
  6511.              /D(igits only)                  /P(assword) 
  6512.              /E(dit)                         /W(ait) 
  6513.              /L(ength)                       /X (no carriage return) 
  6514.  
  6515.  See also:  INKEY. 
  6516.  
  6517.  Usage 
  6518.  
  6519.  INPUT optionally displays a prompt.  Then it waits for a specified time or 
  6520.  indefinitely for your entry.  It places any characters you type into an 
  6521.  environment variable.  INPUT is normally used in batch files and aliases to 
  6522.  get multi-key input.  Along with the INKEY command, INPUT allows great 
  6523.  flexibility in reading user input from within a batch file or alias. 
  6524.  
  6525.  If prompt text is included in an INPUT command, it is displayed while INPUT 
  6526.  waits for input.  Standard command-line editing keys may be used to edit the 
  6527.  input string as it is entered.  If you use the /P password option, INPUT will 
  6528.  echo asterisks instead of the keys you type. 
  6529.  
  6530.  All characters entered up to, but not including, the carriage return are 
  6531.  stored in the variable. 
  6532.  
  6533.  The following batch file fragment prompts for a string and stores it in the 
  6534.  variable FNAME: 
  6535.  
  6536.           input Enter the file name:  %%fname
  6537.  
  6538.  INPUT reads standard input, so it will accept text from a redirected file. 
  6539.  
  6540.  If you press Ctrl-C or Ctrl-Break while INPUT is waiting for input, execution 
  6541.  of an alias will be terminated, and execution of a batch file will be 
  6542.  suspended while you are asked whether to cancel the batch job.  A batch file 
  6543.  can handle Ctrl-C and Ctrl-Break itself with the ON BREAK command. 
  6544.  
  6545.  You should not pipe text to INPUT.  If you do, INPUT will set the variable to 
  6546.  the first line it receives, but it will set the variable in the "child" 
  6547.  process used to handle the right hand side fo the pipe.  This variable will 
  6548.  not be available in the original copy of 4OS2 used to start the pipe. 
  6549.  
  6550.  Options 
  6551.  
  6552.     /C:     (Clear buffer) Clears the keyboard buffer before INPUT accepts 
  6553.             keystrokes.  If you use this option, INPUT will ignore any 
  6554.             keystrokes which you type, either accidentally or intentionally, 
  6555.             before INPUT is ready. 
  6556.  
  6557.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  6558.             digit from 0 to 9. 
  6559.  
  6560.     /E:     (Edit) Allows you to edit an existing value.  If there is no 
  6561.             existing value for varname, INPUT proceeds as if /E had not been 
  6562.             used, and allows you to enter a new value. 
  6563.  
  6564.     /Ln:    (Length) Sets the maximum number of characters which INPUT will 
  6565.             accept to n.  If you attempt to enter more than this number of 
  6566.             characters, INPUT will beep and prevent further input (you will 
  6567.             still be able to edit the characters typed before the limit was 
  6568.             reached). 
  6569.  
  6570.     /N:     (No colors) Disables the use of input colors defined in the 
  6571.             InputColors directive in 4OS2.INI, and forces INPUT to use the 
  6572.             default display colors. 
  6573.  
  6574.     /P:     (Password) Tells INPUT to echo asterisks, instead of the characters 
  6575.             you type. 
  6576.  
  6577.     /Wn:    (Wait) Timeout period, in seconds, to wait for a response.  If no 
  6578.             keystroke is entered by the end of the timeout period, INPUT 
  6579.             returns with the variable unchanged.  This allows you to continue 
  6580.             the batch file if the user does not respond in a given period of 
  6581.             time.  If you enter a key before the timeout period, INPUT will 
  6582.             wait indefinitely for the remainder of the line.  You can specify 
  6583.             /W0 to return immediately if there are no keys waiting in the 
  6584.             keyboard buffer. 
  6585.  
  6586.     /X:     (No carriage return) Prevents INPUT from displaying a carriage 
  6587.             return and line feed after the user's entry. 
  6588.  
  6589.  
  6590. ΓòÉΓòÉΓòÉ 6.45. KEYBD - Set the keyboard toggles ΓòÉΓòÉΓòÉ
  6591.  
  6592.  Purpose:    Set the state of the keyboard toggles:  Caps Lock, Num Lock, and 
  6593.              Scroll Lock. 
  6594.  
  6595.  Format:     KEYBD [/Cn /Nn /Sn ] 
  6596.  
  6597.              n :  0 to turn off the toggle, or 1 to turn on the toggle. 
  6598.  
  6599.              /C(aps lock)                    /S(croll lock) 
  6600.              /N(um lock) 
  6601.  
  6602.  Usage 
  6603.  
  6604.  Most keyboards have 3 toggle keys, the Caps Lock, Num Lock, and Scroll Lock. 
  6605.  The toggle key status is usually displayed by three lights at the top right 
  6606.  corner of the keyboard. 
  6607.  
  6608.  This command lets you turn any toggle key on or off.  It is most useful in 
  6609.  batch files and aliases if you want the keys set a particular way before 
  6610.  collecting input from the user. 
  6611.  
  6612.  For example, to turn off the Num Lock and Caps Lock keys, you can use this 
  6613.  command: 
  6614.  
  6615.           [c:\] keybd /c0 /n0
  6616.  
  6617.  If you use the KEYBD command with no switches, it will display the present 
  6618.  state of the toggle keys. 
  6619.  
  6620.  The toggle key state is typically the same for all sessions, and changes made 
  6621.  with KEYBD in one session will therefore affect all other sessions. 
  6622.  
  6623.  Options 
  6624.  
  6625.     /C:     (Caps lock) Turn the Caps Lock key on or off. 
  6626.  
  6627.     /N:     (Num lock) Turn the Num Lock key on or off. 
  6628.  
  6629.     /S:     (Scroll lock) Turn the Scroll Lock key on or off. 
  6630.  
  6631.  
  6632. ΓòÉΓòÉΓòÉ 6.46. KEYS - Enable or disable the history list ΓòÉΓòÉΓòÉ
  6633.  
  6634.  Purpose:    Enable, disable, or display the history list. 
  6635.  
  6636.  Format:     KEYS [ON | OFF | LIST] 
  6637.  
  6638.  See also:  HISTORY. 
  6639.  
  6640.  Usage 
  6641.  
  6642.  This command is provided for compatibility with the KEYS command in CMD.EXE, 
  6643.  which controls the history list in OS/2.  The same functions are available by 
  6644.  setting the HistMin directive in the .INI file, and by using the HISTORY 
  6645.  command. 
  6646.  
  6647.  The history list collects the commands you type for later recall, editing, and 
  6648.  viewing.  You can view the contents of the list through the history list 
  6649.  window or by typing any of the following commands: 
  6650.  
  6651.           [c:\] history
  6652.           [c:\] history /p
  6653.           [c:\] keys list
  6654.  
  6655.  The first command displays the entire history list.  The second displays the 
  6656.  entire list and pauses at the end of each full screen.  The third command 
  6657.  produces the same output as the first, except that each line is numbered. 
  6658.  
  6659.  You can disable the collection and storage of commands in the history list by 
  6660.  typing: 
  6661.  
  6662.           [c:\] keys off
  6663.  
  6664.  You can turn the history back on with the command: 
  6665.  
  6666.           [c:\] keys on
  6667.  
  6668.  If you issue the KEYS command without any parameters, 4OS2 will show you the 
  6669.  current status of the history list. 
  6670.  
  6671.  KEYS also affects the way 4OS2 reads input from the keyboard.  KEYS OFF will 
  6672.  force 4OS2 into line input mode; KEYS ON will return input to the usual 
  6673.  character by character method.  See the LineInput directive, or the /L option 
  6674.  of the SETDOS command, for details on line input mode. 
  6675.  
  6676.  
  6677. ΓòÉΓòÉΓòÉ 6.47. KEYSTACK - Feed keystrokes to a program or command ΓòÉΓòÉΓòÉ
  6678.  
  6679.  Purpose:    Feed keystrokes to a program or command automatically. 
  6680.  
  6681.  Format:     KEYSTACK [!] [/Wn] ["abc "] [keyname [n]] ... 
  6682.  
  6683.              ! :  Signal to clear the Keystack and the keyboard buffer. 
  6684.              abc :  Literal characters to be placed in the Keystack. 
  6685.              keyname :  Name or code for a key to be placed in the Keystack. 
  6686.              n :  Number of times to repeat the named key. 
  6687.  
  6688.              /W(ait) 
  6689.  
  6690.  See also:  Using the Keystack. 
  6691.  
  6692.  Usage 
  6693.  
  6694.  KEYSTACK takes a series of keystrokes and feeds them to a program or command 
  6695.  as if they were typed at the keyboard.  When the program has used all of the 
  6696.  keystrokes in the keystack buffer, it will begin to read the keyboard for 
  6697.  input, as it normally would. 
  6698.  
  6699.  KEYSTACK sends the keystrokes to the current active window.  If you want to 
  6700.  send keystrokes to another program (rather than have them function with 4OS2 
  6701.  itself), you must start the program or ACTIVATE its window so it can receive 
  6702.  the keystrokes.  The KEYSTACK command must be executed after you start or 
  6703.  ACTIVATE the program which is to receive the keystrokes. 
  6704.  
  6705.  KEYSTACK is most often used for programs started from batch files.  In order 
  6706.  for 4OS2's KEYSTACK to work in a batch file, you must start the program with 
  6707.  the START command, then use the KEYSTACK command.  If you start the program 
  6708.  directly - without using START - the batch file will wait for the application 
  6709.  to complete before continuing and running the KEYSTACK command, and the 
  6710.  keystrokes will be placed in the buffer too late. 
  6711.  
  6712.  If you use KEYSTACK in an alias executed from the prompt, the considerations 
  6713.  are essentially the same, but depend on whether ExecWait is set.  If ExecWait 
  6714.  is not set, you can use KEYSTACK immediately after an application is started. 
  6715.  However, if ExecWait is set, the KEYSTACK command will not be executed until 
  6716.  the program has finished, and the keystrokes will be placed in the buffer too 
  6717.  late. 
  6718.  
  6719.  You may not be able to use KEYSTACK effectively if you have programs running 
  6720.  in the background which change the active window (for example, by popping up a 
  6721.  dialog box).  If a window pops up in the midst of your KEYSTACK sequence, 
  6722.  keystrokes stored in the KEYSTACK buffer may go to that window, and not to the 
  6723.  application you intended. 
  6724.  
  6725.  KEYSTACK will only work if the program KEYSTACK.EXE is in the same directory 
  6726.  4OS2.EXE, or a directory listed in your PATH.  If KEYSTACK.EXE cannot be 
  6727.  found, the KEYSTACK command will display an error message.  KEYSTACK can send 
  6728.  keystrokes to Presentation Manager applications and to OS/2 character-mode 
  6729.  applications running in a window.  It cannot send keystrokes to DOS 
  6730.  applications, or to character-mode applications running in a full-screen 
  6731.  session. 
  6732.  
  6733.  Characters entered within double quotes ("abc") will be sent "as is" to the 
  6734.  application.  The only items allowed outside double quotes are key names, the 
  6735.  ! and /W options, and a repeat count. 
  6736.  
  6737.  See Keys and Key Names for a complete listing of key names and a description 
  6738.  of the key name and numeric key code format.  If you want to send the same key 
  6739.  name or numeric code several times, you can follow it with a repeat count in 
  6740.  square brackets.  For example, to send the Enter key 4 times, you can use this 
  6741.  command: 
  6742.  
  6743.           keystack enter [4]
  6744.  
  6745.  The repeat count works only with individual keystrokes, or numeric keystroke 
  6746.  or character values.  It cannot be used with quoted strings. 
  6747.  
  6748.  An exclamation mark [!] will clear all pending keystrokes in the KEYSTACK 
  6749.  buffer. 
  6750.  
  6751.  For example, to start a program that needs a single space to skip its opening 
  6752.  screen you could use the command: 
  6753.  
  6754.           [c:\comm] keystack 32 & progname
  6755.  
  6756.  This places a space ( ASCII code 32) in the buffer, then runs the program. 
  6757.  When the program looks for a keystroke to end the display of the opening 
  6758.  screen the keystroke is already in the buffer, and the opening screen is 
  6759.  removed immediately. 
  6760.  
  6761.  You can store a maximum of 1023 characters in the 4OS2 KEYSTACK buffer.  The 
  6762.  count is determined by the number of characters on the KEYSTACK command line, 
  6763.  not by the actual number of characters sent to the application. 
  6764.  
  6765.  Each time the KEYSTACK command is executed, it will clear any remaining 
  6766.  keystrokes stored by a previous KEYSTACK command. 
  6767.  
  6768.  You may need to experiment with your programs and insert delays (see the /W 
  6769.  option) to find a keystroke sequence that works for a particular program. 
  6770.  
  6771.  Advanced Options 
  6772.  
  6773.  KEYSTACK treats the number 0 as a special case; it is used with programs that 
  6774.  flush the keyboard buffer.  When KEYSTACK processes a key value of 0, it tells 
  6775.  the program the buffer is clear, so subsequent keystrokes will be accepted 
  6776.  normally.  Some programs will require several "0"s before they will accept 
  6777.  input; you may need to experiment to determine the correct number. 
  6778.  
  6779.  For example, the following batch file starts a spreadsheet programand loads 
  6780.  the file specified on the command line when the batch file is invoked (the 
  6781.  KEYSTACK command should be entered on one line): 
  6782.  
  6783.           pushd c:\finance
  6784.           keystack 0 Enter 0 Enter 0 Enter 0 Enter 0
  6785.             Enter "/FR" 0 "%1" Enter
  6786.           spread
  6787.           popd
  6788.  
  6789.  The sequence of "0 Enter" pairs tells the program that the keyboard buffer is 
  6790.  empty, then passes a carriage return, repeating this sequence five times. 
  6791.  (You must determine the actual sequence required by your software through 
  6792.  experimentation.  Few programs require as long a startup sequence as is shown 
  6793.  here.)  This gets the program to a point where an empty spreadsheet is 
  6794.  displayed.  The rest of the KEYSTACK line issues a File Retrieve command 
  6795.  (/FR), simulates an empty keyboard buffer once more, enters the file name 
  6796.  passed on the batch command line (%1), and finally enters a carriage return to 
  6797.  end the file name. 
  6798.  
  6799.  Here's the same command defined as an alias (enter this on one line): 
  6800.  
  6801.           alias sload `pushd c:\finance & keystack 0 Enter 0 Enter 0
  6802.             Enter 0 Enter 0 Enter "/FR" 0 "%1" Enter & spread & popd`
  6803.  
  6804.  KEYSTACK mimics the BIOS by stacking both an ASCII code and a scan code for 
  6805.  each key.  It does so by calculating the code for each character, whether it 
  6806.  is entered as part of a quoted string, as a key name, or as an ASCII value 
  6807.  less than 128.  However, if you are stacking keys for a program which 
  6808.  distinguishes between keys with the same symbol, like the plus on the keyboard 
  6809.  and the gray plus, you will have to calculate the codes for the keys on the 
  6810.  numeric keypad yourself.  Calculate the value ((256 * scan code) + ASCII code) 
  6811.  and enter that numeric value as an argument for KEYSTACK. 
  6812.  
  6813.  For example, for the Enter key on the numeric keypad, the scan code is 224 and 
  6814.  the ASCII code is 13, so to stack both values use ((256 * 224) + 13) or 
  6815.  KEYSTACK 57357.  Try this approach if a "normal" KEYSTACK command does not 
  6816.  work (for example, if you use "KEYSTACK Enter" for the Enter key and the 
  6817.  program doesn't see the correct character).  To stack such combined key codes 
  6818.  you must use the numeric value, not the key name.  See Reference Tables for 
  6819.  ASCII and scan codes. 
  6820.  
  6821.  Options 
  6822.  
  6823.     /W:     (Wait) Delay the next keystroke in the KEYSTACK buffer by a 
  6824.             specified number of clock "ticks".  A clock tick is approximately 
  6825.             1/18 second.  The number of clock ticks to delay should be placed 
  6826.             immediately after the W, and must be between 1 and 65535 (65535 
  6827.             ticks is about 1 hour).  You can use the /W option as many times as 
  6828.             desired and at any point in the string of keystrokes except within 
  6829.             double quotes.  Some programs may need the delays provided by /W in 
  6830.             order to receive keystrokes properly from KEYSTACK.  The only way 
  6831.             to determine what delay is needed is to experiment.  Sometimes a 
  6832.             combination of a delay and an "empty buffer" signal (a 0) are 
  6833.             required.  For example, to start the program CADX and send it an 
  6834.             F7, a delay of one second, an indication that the keyboard buffer 
  6835.             is empty, and a carriage return: 
  6836.  
  6837.                                 [c:\] keystack F7 /W18 0 Enter & cadx
  6838.  
  6839.  
  6840. ΓòÉΓòÉΓòÉ 6.48. LIST - Display a file ΓòÉΓòÉΓòÉ
  6841.  
  6842.  Purpose:    Display a file, with forward and backward paging and scrolling. 
  6843.  
  6844.  Format:     LIST [/A:[[-]rhsda] /H /I /R /S /T /W /X] file ... 
  6845.  
  6846.              file :  A file or list of files to display. 
  6847.  
  6848.              /A: (Attribute select)          /S(tandard input) 
  6849.              /H(igh bit off)                 /T (search for Text) 
  6850.              /I(gnore wildcards)             /W(rap) 
  6851.              /R(everse)                      /X (heX display mode) 
  6852.  
  6853.  See also:  TYPE. 
  6854.  
  6855.  File Selection 
  6856.  
  6857.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6858.  
  6859.  Usage 
  6860.  
  6861.  LIST provides a fast and flexible way to view a file, without the overhead of 
  6862.  loading and using a text editor. 
  6863.  
  6864.  For example, to display a file called MEMO.DOC: 
  6865.  
  6866.           [c:\] list memo.doc
  6867.  
  6868.  LIST is most often used for displaying ASCII text files.  It can be used for 
  6869.  other files which contain non-alphabetic characters, but you may need to use 
  6870.  hex mode (see below) to read these files. 
  6871.  
  6872.  LIST uses the cursor pad to scroll through the file.  The following keys have 
  6873.  special meanings: 
  6874.  
  6875.         Home           Display the first page of the file. 
  6876.         End            Display the last page of the file. 
  6877.         Esc            Exit the current file. 
  6878.         Ctrl-PgUp      Display previous file. 
  6879.         Ctrl-PgDn      Display next file. 
  6880.         Ctrl-C         Quit LIST. 
  6881.         PgUp           Scroll up one page. 
  6882.         PgDn or Space  Scroll down one page. 
  6883.                       Scroll up one line. 
  6884.                       Scroll down one line. 
  6885.                       Scroll left 8 columns. 
  6886.                       Scroll right 8 columns. 
  6887.         Ctrl          Scroll left 40 columns. 
  6888.         Ctrl          Scroll right 40 columns. 
  6889.         F1             Display online help 
  6890.         B              Go back one file to the previous file in the current 
  6891.                        group of files. 
  6892.         Ctrl-F         Prompt and search for a string, searching backward from 
  6893.                        the end of the file. 
  6894.         F              Prompt and search for a string. 
  6895.         G              Go to a specific line, or, in hex mode, to a specific 
  6896.                        hexadecimal offset. 
  6897.         H              Toggle the "strip high bit" (/H) option. 
  6898.         I              Display information on the current file (the full name, 
  6899.                        size, date, and time). 
  6900.         N              Find next matching string. 
  6901.         Ctrl-N         Find previous match in the file. 
  6902.         P              Print the current page or the entire file. 
  6903.         W              Toggle the "line wrap" (/W) option. 
  6904.         X              Toggle the hex-mode display (/X) option. 
  6905.  
  6906.  Text searches performed with F, N, Ctrl-F, and Ctrl-N are not case-sensitive. 
  6907.  However, if the display is currently in hexadecimal mode and you press F or 
  6908.  Ctrl-F, you will be prompted for whether you want to search in hexadecimal 
  6909.  mode.  If you answer Y, you should then enter the search string as a sequence 
  6910.  of 2-digit hexadecimal numbers separated by spaces, for example 41 63 65 
  6911.  (these are the ASCII values for the string "Ace"; see ASCII for a complete 
  6912.  list of ASCII codes).  Hexadecimal searches are case-sensitive, and search for 
  6913.  exactly the string you enter. 
  6914.  
  6915.  When the search string is found LIST displays the line containing the string 
  6916.  at the top of the screen, and highlights the string it found.  Any additional 
  6917.  occurrences of the string on the same display page are also highlighted. 
  6918.  Highlighting is intended for use with text files; in binary files the search 
  6919.  string will be found, but may not be highlighted properly. 
  6920.  
  6921.  You can use wildcards in the search string.  For example, you can search for 
  6922.  the string "to*day" to find the next line which contains the word "to" 
  6923.  followed by the word "day" later on the same line, or search for the numbers 
  6924.  "101" or "401" with the search string "[14]01".  If you begin the search 
  6925.  string with a back-quote [`], or enclose it in back-quotes, wildcard 
  6926.  characters in the string will be treated as normal text with no special 
  6927.  wildcard meaning. 
  6928.  
  6929.  LIST saves the search string used by F, N, Ctrl-F, and Ctrl-N so you can LIST 
  6930.  multiple files and search for the same string simply by pressing N in each 
  6931.  file, or repeat your search the next time you use LIST. 
  6932.  
  6933.  You can use the /T switch to specify search text for the first file.  When you 
  6934.  do so, LIST begins a search as soon as the file is loaded.  Use /I to ignore 
  6935.  wildcards in the initial search string, and /R to make the initial search go 
  6936.  backwards from the end of the file.  When you LIST multiple files with a 
  6937.  single LIST command, these switches affect only the first file; they are 
  6938.  ignored for the second and subsequent files. 
  6939.  
  6940.  LIST normally allows long lines in the file to extend past the right edge of 
  6941.  the screen.  You can use the horizontal scrolling keys (see above) to view 
  6942.  text that extends beyond the screen width.  If you use the W command or /W 
  6943.  switch to wrap the display, each line is wrapped when it reaches the right 
  6944.  edge of the screen, and the horizontal scrolling keys are disabled. 
  6945.  
  6946.  To view text from the clipboard, use CLIP: as the file to be listed.  CLIP: 
  6947.  will not return any data unless the clipboard contains text.  See Redirection 
  6948.  for additional information on CLIP:. 
  6949.  
  6950.  If you print the file which LIST is displaying, the print format will match 
  6951.  the display format.  If you have switched to hexadecimal or wrapped mode, that 
  6952.  mode will be used for the printed output as well.  If you print in wrapped 
  6953.  mode, long lines will be wrapped at the width of the display.  If you print in 
  6954.  normal display mode without line wrap, long lines will be wrapped or truncated 
  6955.  by the printer, not by LIST. 
  6956.  
  6957.  Printed output normally goes to device LPT1.  If you wish to send the printed 
  6958.  output to another device, use the Commands page of the OPTION dialogs, or the 
  6959.  Printer directive in 4OS2.INI. 
  6960.  
  6961.  If you specify a directory name instead of a filename as an argument, LIST 
  6962.  will display each of the files in that directory. 
  6963.  
  6964.  Most of the LIST keystrokes can be reassigned with .INI file key mapping 
  6965.  directives. 
  6966.  
  6967.  You can set the colors used by LIST on the Commands page of the OPTION 
  6968.  dialogs, or the ListColors and ListStatBarColors directives in the .INI file. 
  6969.  If ListColors is not used, the LIST display will use the current default 
  6970.  colors.  If ListStatBarColors is not used, the status bar will use the reverse 
  6971.  of the LIST display colors. 
  6972.  
  6973.  By default, LIST sets tab stops every 8 columns.  You can change this behavior 
  6974.  on the Display page of the OPTION dialogs, or with the TabStops .INI file 
  6975.  directive. 
  6976.  
  6977.  Options 
  6978.  
  6979.     /A:     (Attribute select) Select only those files that have the specified 
  6980.             attribute(s) set.  Preceding the attribute character with a hyphen 
  6981.             [-] will select files that do not have that attribute set.  The 
  6982.             colon [:] after /A is required.  The attributes are: 
  6983.  
  6984.                            R  Read-only 
  6985.                            H  Hidden 
  6986.                            S  System 
  6987.                            D  Subdirectory 
  6988.                            A  Archive 
  6989.  
  6990.             If no attributes are listed at all (e.g., LIST /A: ...), LIST will 
  6991.             select all files and subdirectories including hidden and system 
  6992.             files.  If attributes are combined, all the specified attributes 
  6993.             must match for a file to be selected. For example, /A:RHS will 
  6994.             select only those files with all three attributes set. 
  6995.  
  6996.     /H:     (High bit off) Strip the high bit from each character before 
  6997.             displaying.  This is useful when displaying files created by some 
  6998.             word processors that turn on the high bit for formatting purposes. 
  6999.             You can toggle this option on and off from within LIST with the H 
  7000.             key. 
  7001.  
  7002.     /I:     (Ignore wildcards) Only meaningful when used in conjunction with 
  7003.             the /T "text" option.  Directs LIST to interpret characters such as 
  7004.             *, ?, [, and ] as literal characters instead of wildcard 
  7005.             characters.  /I affects only the initial search started by /T, not 
  7006.             subsequent searches started from within LIST. 
  7007.  
  7008.     /R:     (Reverse) Only meaningful when used in conjuction with the /T 
  7009.             "text" option.  Directs LIST to search for text from the end of the 
  7010.             file instead of from the beginning of the file.  Using this switch 
  7011.             can speed up searches for text that is normally near the end of the 
  7012.             file, such as a signature.  /R affects only the initial search 
  7013.             started by /T, not subsequent searches started from within LIST. 
  7014.  
  7015.     /S:     (Standard input) Read from standard input rather than a file.  This 
  7016.             allows you to redirect command output and view it with LIST. 
  7017.             Normally, LIST will detect input from a redirected command and 
  7018.             adjust automatically.  However, you may find circumstances when /S 
  7019.             is required.  For example, to use LIST to display the output of DIR 
  7020.             you could use either of these commands: 
  7021.  
  7022.                                 [c:\] dir | list
  7023.                                 [c:\] dir | list /s
  7024.  
  7025.  
  7026.     /T:     (Text) Search for text in the first file.  This option is the same 
  7027.             as pressing F, but it allows you to specify the search text on the 
  7028.             command line.  The text must be contained in quotation marks if it 
  7029.             contains spaces, punctuation, or wildcard characters.  For example, 
  7030.             to search for the string 4OS2 in the file README.DOC, you can use 
  7031.             this command: 
  7032.  
  7033.                                 [c:\] list /t4os2 readme.doc
  7034.  
  7035.             The search text may include wildcards and extended wildcards.  For 
  7036.             example, to search for the words Hello and John on the same line in 
  7037.             the file LETTER.DAT: 
  7038.  
  7039.                                 [c:\] list /t"Hello*John" letter.dat
  7040.  
  7041.             When you LIST multiple files with a single LIST command, /T only 
  7042.             initiates a search in the first file.  It is ignored for the second 
  7043.             and subsequent files.  Also see /I and /R. 
  7044.  
  7045.     /W:     (Wrap) Wrap the text at the right edge of the screen.  This option 
  7046.             is useful when displaying files that don't have a carriage return 
  7047.             at the end of each line.  The horizontal scrolling keys do not work 
  7048.             when the display is wrapped.  You can toggle this option on and off 
  7049.             from within LIST with the W key. 
  7050.  
  7051.     /X      (heX mode):  Display the file in hexadecimal (hex) mode. This 
  7052.             option is useful when displaying executable files and other files 
  7053.             that contain non-text characters.  Each byte of the file is shown 
  7054.             as a pair of hex characters.  The corresponding text is displayed 
  7055.             to the right of each line of hexadecimal data.  You can toggle this 
  7056.             mode on and off from within LIST with the X key. 
  7057.  
  7058.  
  7059. ΓòÉΓòÉΓòÉ 6.49. LOADBTM - Switch a batch file's mode ΓòÉΓòÉΓòÉ
  7060.  
  7061.  Purpose:    Switch a batch file to or from BTM mode. 
  7062.  
  7063.  Format:     LOADBTM [ON | OFF] 
  7064.  
  7065.  Usage 
  7066.  
  7067.  4OS2 recognizes two kinds of batch files: .BAT or .CMD, and .BTM.  Batch files 
  7068.  executing in BTM mode run two to ten times faster than in BAT or CMD mode. 
  7069.  Batch files automatically start in the mode indicated by their extension. 
  7070.  
  7071.  The LOADBTM command turns BTM mode on and off.  It can be used to switch modes 
  7072.  in either a .BAT / .CMD, or .BTM file.  If you use LOADBTM with no argument, 
  7073.  it will display the current batch mode:  LOADBTM ON or LOADBTM OFF. 
  7074.  
  7075.  Using LOADBTM to repeatedly switch modes within a batch file is not efficient. 
  7076.  In most cases the speed gained by running some parts of the file in BTM mode 
  7077.  will be more than offset by the speed lost through repeated loading of the 
  7078.  file each time BTM mode is invoked. 
  7079.  
  7080.  LOADBTM can only be used within a batch file.  It is most often used to 
  7081.  convert a .BAT or .CMD file to BTM mode without changing its extension. 
  7082.  
  7083.  
  7084. ΓòÉΓòÉΓòÉ 6.50. LOG - Save a log of commands ΓòÉΓòÉΓòÉ
  7085.  
  7086.  Purpose:    Save a log of commands to a disk file. 
  7087.  
  7088.  Format:     LOG [/H /W file ] [ON | OFF | text ] 
  7089.  
  7090.              file :  The name of the file to hold the log. 
  7091.              text :  An optional message that will be added to the log. 
  7092.  
  7093.              /H(istory log)                  /W(rite to). 
  7094.  
  7095.  See also:  HISTORY. 
  7096.  
  7097.  Usage 
  7098.  
  7099.  LOG keeps a record of all internal and external commands you use, whether they 
  7100.  are executed from the prompt or from a batch file.  Each entry includes the 
  7101.  current system date and time, along with the actual command after any alias or 
  7102.  variable expansion.  You can use the log file as a record of your daily 
  7103.  activities. 
  7104.  
  7105.  LOG with the /H option keeps a similar record called a "history log".  The 
  7106.  history log records only commands entered at the prompt; it does not record 
  7107.  batch file commands.  In addition, the history log does not record the date 
  7108.  and time for each command, and it records commands before aliases and 
  7109.  variables are expanded. 
  7110.  
  7111.  The two logging options are independent.  You can have both a regular log and 
  7112.  a history log enabled simultaneously. 
  7113.  
  7114.  By default, LOG writes to the file 4OS2LOG in the root directory of the boot 
  7115.  drive.  The default file name for the history log is 4OS2HLOG.  You can set 
  7116.  the default log file names on the Options 2 page of the OPTION dialogs, or 
  7117.  with the LogName and HistLogName directives in 4OS2.INI. 
  7118.  
  7119.  Entering LOG or LOG /H with no parameters displays the name of the log file 
  7120.  and the log status (ON or OFF): 
  7121.  
  7122.           [c:\] log
  7123.           LOG (C:\4OS2LOG) is OFF
  7124.  
  7125.  To enable or disable logging, add the word "ON" or "OFF" after the LOG 
  7126.  command: 
  7127.  
  7128.           [c:\] log on
  7129.  
  7130.  or 
  7131.  
  7132.           [c:\] log /h on
  7133.  
  7134.  Entering LOG or LOG /H with text writes a message to the log file, even if 
  7135.  logging is set OFF.  This allows you to enter headers in the log file: 
  7136.  
  7137.           [c:\] log "Started work on the database system"
  7138.  
  7139.  The LOG file format looks like this: 
  7140.  
  7141.           [date  time]  command
  7142.  
  7143.  where the date and time are formatted according to the country code set for 
  7144.  your system. 
  7145.  
  7146.  The LOG /H output can be used as the basis for writing batch files.  Start LOG 
  7147.  /H, then execute the commands that you want the batch file to execute.  When 
  7148.  you are finished, turn LOG /H off.  The resulting file can be turned into a 
  7149.  batch file that performs the same commands with little or no editing. 
  7150.  
  7151.  You can have both a regular log (with time and date stamping) and a history 
  7152.  log (without the time stamps) enabled simultaneously. 
  7153.  
  7154.  Options 
  7155.  
  7156.     /H:     (History log) This option makes the other options on the command 
  7157.             line (after the /H) apply to the history log.  For example, to turn 
  7158.             on history logging and write to the file C:\LOG\HLOG : 
  7159.  
  7160.                                 [c:\]  log /h /w c:\log\hlog
  7161.  
  7162.     /W:     (Write) This switch specifies a different filename for the LOG or 
  7163.             LOG /H output.  It also automatically performs a LOG ON command. 
  7164.             For example, to turn logging on and write the log to C:\LOG\LOGFILE 
  7165.             : 
  7166.  
  7167.                                 [c:\] log /w c:\log\logfile
  7168.  
  7169.             Once you select a new file name with the LOG /W or LOG /H/W 
  7170.             command, LOG will use that file until you issue another LOG /W or 
  7171.             LOG /H/W command, or until you reboot your computer.  Turning LOG 
  7172.             or LOG /H off or on does not change the file name. 
  7173.  
  7174.  
  7175. ΓòÉΓòÉΓòÉ 6.51. MD - Create a subdirectory ΓòÉΓòÉΓòÉ
  7176.  
  7177.  Purpose:    Create a subdirectory. 
  7178.  
  7179.  Format:     MD [/N /S] path ... 
  7180.                 or 
  7181.              MKDIR [/N /S] path ... 
  7182.  
  7183.              path :  The name of one or more directories to create. 
  7184.  
  7185.              /N(o update)                    /S(ubdirectories) 
  7186.  
  7187.  See also:  RD. 
  7188.  
  7189.  Usage 
  7190.  
  7191.  MD and MKDIR are synonyms.  You can use either one. 
  7192.  
  7193.  MD creates a subdirectory anywhere in the directory tree.  To create a 
  7194.  subdirectory from the root, start the path with a backslash [\].  For example, 
  7195.  this command creates a subdirectory called MYDIR in the root directory: 
  7196.  
  7197.           [c:\] md \mydir
  7198.  
  7199.  If no path is given, the new subdirectory is created in the current directory. 
  7200.  This example creates a subdirectory called DIRTWO in the current directory: 
  7201.  
  7202.           [c:\mydir] md dirtwo
  7203.  
  7204.  To create a directory from the parent of the current directory (that is, to 
  7205.  create a sibling of the current directory), start the pathname with two 
  7206.  periods and a backslash [..\]. 
  7207.  
  7208.  When creating a directory on an HPFS drive, you must quote any path which 
  7209.  contains whitespace or special characters.  See File Names for additional 
  7210.  details on file name quoting. 
  7211.  
  7212.  If MD creates one or more directories, they will be added automatically to the 
  7213.  extended directory search database unless the /N option is specified. 
  7214.  
  7215.  Options 
  7216.  
  7217.     /N:     (No Update) Do not update the extended directory search database, 
  7218.             JPSTREE.IDX  This is useful when creating a temporary directory 
  7219.             which you do not want to appear in the extended search database. 
  7220.  
  7221.     /S:     (Subdirectories) MD creates one directory at a time unless you use 
  7222.             the /S option.  If you need to create the directory 
  7223.             C:\ONE\TWO\THREE and none of the named directories exist, you can 
  7224.             use /S to have MD create all of the necessary subdirectories for 
  7225.             you in a single command: 
  7226.  
  7227.                                 [c:\] md /s \one\two\three
  7228.  
  7229.  
  7230. ΓòÉΓòÉΓòÉ 6.52. MEMORY - Display memory statistics ΓòÉΓòÉΓòÉ
  7231.  
  7232.  Purpose:    Display the amount and status of system RAM. 
  7233.  
  7234.  Format:     MEMORY 
  7235.  
  7236.  Usage 
  7237.  
  7238.  MEMORY lists the total physical and resident RAM in your system, the largest 
  7239.  free block of RAM, the swap file size, the total and free environment and 
  7240.  alias space, and the total history space.  If you use a non-standard swap file 
  7241.  location, the swap file size will be displayed as 0 unless you set the 
  7242.  SwapFilePath directive. 
  7243.  
  7244.  
  7245. ΓòÉΓòÉΓòÉ 6.53. MOVE - Move files ΓòÉΓòÉΓòÉ
  7246.  
  7247.  Purpose:    Move files to a new directory and drive. 
  7248.  
  7249.  Format:     MOVE  [/A:[[-]rhsda] /C /D /E /F /H /M /N /P /Q /R /S /T /U /V] 
  7250.              source ... destination 
  7251.  
  7252.              source :  A file or list of files to move. 
  7253.              destination :  The new location for the files. 
  7254.  
  7255.              /A: (Attribute select)          /P(rompt) 
  7256.              /C(hanged)                      /Q(uiet) 
  7257.              /D(irectory)                    /R(eplace) 
  7258.              /E (No error messages)          /S(ubdirectory tree) 
  7259.              /F(orce delete)                 /T(otal) 
  7260.              /H(idden and system)            /U(pdate) 
  7261.              /M(odified files)               /V(erify) 
  7262.              /N(othing) 
  7263.  
  7264.  See also:  COPY and RENAME. 
  7265.  
  7266.  File Selection 
  7267.  
  7268.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  7269.  Date, time, or size ranges anywhere on the line apply to all source files. 
  7270.  
  7271.  Usage 
  7272.  
  7273.  The MOVE command moves one or more files from one directory to another, 
  7274.  whether the directories are on the same drive or not.  It has the same effect 
  7275.  as copying the files to a new location and then deleting the originals.  Like 
  7276.  COPY and RENAME, MOVE works with single files, multiple files, and sets of 
  7277.  files specified with an include list. 
  7278.  
  7279.  The simplest MOVE command moves a single source file to a new location and, 
  7280.  optionally, gives it a new name.  These two examples both move one file from 
  7281.  drive C: to the root directory on drive A: 
  7282.  
  7283.           [c:\] move myfile.dat a:\
  7284.           [c:\] move myfile.dat a:\savefile.dat
  7285.  
  7286.  In both cases, MYFILE.DAT is removed from drive C: after it has been copied to 
  7287.  drive A:.  If a file called MYFILE.DAT in the first example, or SAVEFILE.DAT 
  7288.  in the second example, already existed on drive A:, it would be overwritten. 
  7289.  (This demonstrates the difference between MOVE and RENAME.  MOVE will move 
  7290.  files between drives and will overwrite the destination file if it exists; 
  7291.  RENAME will not.) 
  7292.  
  7293.  When you move a single file, the destination can be a directory name or a file 
  7294.  name.  If it is a directory name, and you add a backslash [\] to the end of 
  7295.  the name, MOVE will display an error message if the name does not refer to an 
  7296.  existing directory.  You can use this feature to keep MOVE from treating a 
  7297.  mistyped destination directory name as a file name, and attempting to move the 
  7298.  source file to that name. 
  7299.  
  7300.  If you move multiple files, the destination must be a directory name.  MOVE 
  7301.  will move each file into the destination directory with its original name.  If 
  7302.  the destination is not a directory, MOVE will display an error message and 
  7303.  exit.  For example, if C:\FINANCE\MYFILES is not a directory, this command 
  7304.  will display an error; otherwise, the files will be moved to that directory: 
  7305.  
  7306.           [c:\] move *.wks *.txt c:\finance\myfiles
  7307.  
  7308.  The /D option can be used for single or multiple file moves; it checks to see 
  7309.  whether the destination is a directory, and will prompt to see if you want to 
  7310.  create the destination directory if it doesn't exist. 
  7311.  
  7312.  If MOVE creates one or more destination directories, they will be added 
  7313.  automatically to the extended directory search database. 
  7314.  
  7315.  You cannot move a file to a character device like the printer, or to itself. 
  7316.  
  7317.  Be careful when you use MOVE with the SELECT command.  If you SELECT multiple 
  7318.  files and the destination is not a directory (for example, because of a 
  7319.  misspelling), MOVE will assume it is a file name.  In this case each file will 
  7320.  be moved in turn to the destination file, overwriting the previous file, and 
  7321.  then the original will be erased before the next file is moved.  At the end of 
  7322.  the command, all of the original files will have been erased and only the last 
  7323.  file will exist as the destination file. 
  7324.  
  7325.  You can avoid this problem by using square brackets with SELECT instead of 
  7326.  parentheses (be sure that you don't allow the command line to get too long -- 
  7327.  watch the character count in the upper left corner while you're selecting 
  7328.  files).  MOVE will then receive one list of files to move instead of a series 
  7329.  of individual filenames, and it will detect the error and halt.  You can also 
  7330.  add a backslash [\] to the end of the destination name to ensure that it is 
  7331.  the name of a subdirectory (see above). 
  7332.  
  7333.  Advanced Features and Options 
  7334.  
  7335.  MOVE first attempts to rename the file(s), which is the fastest way to move 
  7336.  files between subdirectories on the same drive.  If that fails (e.g., because 
  7337.  the destination is on a different drive or already exists), MOVE will copy the 
  7338.  file(s) and then delete the originals. 
  7339.  
  7340.  If MOVE must physically copy the files and delete the originals, rather than 
  7341.  renaming them (see above), then some disk space may be freed on the source 
  7342.  drive.  The free space may be the result of moving the files to another drive, 
  7343.  or of overwriting a larger destination file with a smaller source file.  MOVE 
  7344.  displays the amount of disk space recovered unless the /Q option is used (see 
  7345.  below).  It does so by comparing the amount of free disk space before and 
  7346.  after the MOVE command is executed.  However, this amount may be incorrect if 
  7347.  you are using a deletion tracking system which retains deleted files for later 
  7348.  recovery, or if another program performs a file operation while the MOVE 
  7349.  command is executed. 
  7350.  
  7351.  When physically copying files, MOVE preserves the hidden, system, and 
  7352.  read-only attributes of the source files, and sets the archive attribute of 
  7353.  the destination files.  However, if the files can be renamed, and no copying 
  7354.  is required, then the file attributes are not changed. 
  7355.  
  7356.  Use caution with the /A: and /H switches (both of which can allow MOVE to 
  7357.  process hidden files) when you are physically moving files, and both the 
  7358.  source and destination directories contain file descriptions.  If the source 
  7359.  file specification matches the description file name (normally DESCRIPT.ION), 
  7360.  and you tell MOVE to process hidden files, the DESCRIPT.ION file itself will 
  7361.  be moved, overwriting any existing file descriptions in the destination 
  7362.  directory.  For example, if the C:\DATA directory contains file descriptions, 
  7363.  this command would overwrite any existing descriptions in the D:\SAVE 
  7364.  directory: 
  7365.  
  7366.           [c:\data] move /h d*.* d:\save\
  7367.  
  7368.  (If you remove the hidden attribute from the DESCRIPT.ION file the same 
  7369.  caution applies even if you do not use /A: or /H, as DESCRIPT.ION is then 
  7370.  treated like any other file.) 
  7371.  
  7372.  If you move a file from a FAT volume to an HPFS volume, and you do not give an 
  7373.  explicit destination name (i.e. you are moving the file to the current 
  7374.  directory, or your destination name is made up entirely of wildcards), MOVE 
  7375.  will look for a .LONGNAME extended attribute for the source file.  If it finds 
  7376.  that attribute, it will use the long filename for the destination file.  If it 
  7377.  does not, it will use the short name. 
  7378.  
  7379.  Similarly, if you MOVE files with long filenames from an HPFS volume to a FAT 
  7380.  volume, 4OS2 will create the destination files with short, FAT-compatible 
  7381.  names and save the long filenames in the .LONGNAME extended attribute.  The 
  7382.  short name is created by replacing special characters with underscores, adding 
  7383.  numeric digits to the filename (if necessary) to make the new name unique, and 
  7384.  truncating the name to fit with in the "8.3" FAT name structure. 
  7385.  
  7386.  Options 
  7387.  
  7388.     /A::    (Attribute select) Select only those files that have the specified 
  7389.             attribute(s) set.  Preceding the attribute character with a hyphen 
  7390.             [-] will select files that do not have that attribute set.  The 
  7391.             colon [:] after /A is required.  The attributes are: 
  7392.  
  7393.                            R  Read-only 
  7394.                            H  Hidden 
  7395.                            S  System 
  7396.                            D  Subdirectory 
  7397.                            A  Archive 
  7398.  
  7399.             If no attributes are listed at all (e.g., MOVE /A: ...), MOVE will 
  7400.             select all files and subdirectories including hidden and system 
  7401.             files.  If attributes are combined, all the specified attributes 
  7402.             must match for a file to be selected.  For example, /A:RHS will 
  7403.             select only those files with all three attributes set. 
  7404.  
  7405.             See the cautionary note under Advanced Features and Options above 
  7406.             before using /A: when both source and destination directories 
  7407.             contain file descriptions. 
  7408.  
  7409.     /C:     (Changed files) Move files only if the destination file exists and 
  7410.             is older than the source (see also /U).  This option is useful for 
  7411.             updating the files in one directory from those in another without 
  7412.             moving any newly-created files. 
  7413.  
  7414.     /D:     (Directory) Requires that the destination be a directory.  If the 
  7415.             destination does not exist, MOVE will prompt to see if you want to 
  7416.             create it.  If the destination exists as a file, MOVE will fail 
  7417.             with an "Access denied" error.  Use this option to avoid having 
  7418.             MOVE accidentally interpret your destination name as a file name 
  7419.             when it's really a mistyped directory name. 
  7420.  
  7421.     /E:     (No error messages) Suppress all non-fatal error messages, such as 
  7422.             "File Not Found."  Fatal error messages, such as "Drive not ready," 
  7423.             will still be displayed.  This option is most useful in batch files 
  7424.             and aliases. 
  7425.  
  7426.     /F:     (Force delete) This option forces deletion of the source file 
  7427.             without saving it to the DELDIR directory (if DELDIR is not in use, 
  7428.             /F has no effect).  /F is only effective when MOVE must copy the 
  7429.             source file(s) and delete the originals (i.e., if the destination 
  7430.             is on a different drive or the destination file already exists). 
  7431.             If the files are simply renamed, /F has no effect. 
  7432.  
  7433.     /H:     (Hidden) Move all files, including hidden and system files.  See 
  7434.             the cautionary note under Advanced Features and Options above 
  7435.             before using /H when both source and destination directories 
  7436.             contain file descriptions. 
  7437.  
  7438.     /M:     (Modified files) Move only files that have the archive bit set. The 
  7439.             archive bit will remain set after the MOVE; to clear it use ATTRIB. 
  7440.  
  7441.     /N:     (Nothing) Do everything except actually move the file(s). This 
  7442.             option is most useful for testing what a complex MOVE command will 
  7443.             do. 
  7444.  
  7445.     /P:     (Prompt) Prompt the user to confirm each move.  Your options at the 
  7446.             prompt are explained in detail under Page and File Prompts. 
  7447.  
  7448.     /Q:     (Quiet) Don't display filenames, the total number of files moved, 
  7449.             or the amount of disk space recovered, if any.  This option is most 
  7450.             often used in batch files. See also /T. 
  7451.  
  7452.     /R:     (Replace) Prompt for a Y or N response before overwriting an 
  7453.             existing destination file. 
  7454.  
  7455.     /S:     (Subdirectories) Move an entire subdirectory tree to another 
  7456.             location.  MOVE will attempt to create the destination directories 
  7457.             if they don't exist, and will remove empty subdirectories after the 
  7458.             move.  When /D is used with /S, you will be prompted if the first 
  7459.             destination directory does not exist, but subdirectories below that 
  7460.             will be created automatically by MOVE.  If MOVE /S creates one or 
  7461.             more destination directories, they will be added automatically to 
  7462.             the extended directory search database. 
  7463.  
  7464.             If you attempt to use /S to move a subdirectory tree into part of 
  7465.             itself, MOVE will detect the resulting infinite loop, display an 
  7466.             error message, and exit. 
  7467.  
  7468.     /T:     (Total) Don't display filenames as they are moved, but display the 
  7469.             total number of files moved and the amount of free disk space 
  7470.             recovered, if any. 
  7471.  
  7472.     /U:     (Update) Move each source file only if it is newer than a matching 
  7473.             destination file or if a matching destination file does not exist 
  7474.             (also see /C).  This option is useful for moving new or changed 
  7475.             files from one directory to another. 
  7476.  
  7477.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  7478.             VERIFY ON command, but is only active during the MOVE.  /V does not 
  7479.             read back the file and compare its contents with what was written; 
  7480.             it only verifies that the data written to disk is physically 
  7481.             readable. 
  7482.  
  7483.  
  7484. ΓòÉΓòÉΓòÉ 6.54. ON - Handle Ctrl-Break and errors in batch files ΓòÉΓòÉΓòÉ
  7485.  
  7486.  Purpose:    Execute a command in a batch file when a specific condition 
  7487.              occurs. 
  7488.  
  7489.  Format:     ON BREAK [command ] 
  7490.                 or 
  7491.              ON ERROR [command ] 
  7492.                 or 
  7493.              ON ERRORMSG [command ] 
  7494.  
  7495.  Usage 
  7496.  
  7497.  ON can only by used in batch files. 
  7498.  
  7499.  ON sets a "watchdog" that remains in effect for the duration of the current 
  7500.  batch file.  Whenever a BREAK or ERROR condition occurs after ON has been 
  7501.  executed, the corresponding command is automatically executed. 
  7502.  
  7503.  ON BREAK will execute the command if the user presses Ctrl-C or Ctrl-Break. 
  7504.  
  7505.  ON ERROR and ON ERRORMSG will execute the command after any command processor 
  7506.  or operating system error (including critical errors).  That is, they will 
  7507.  detect errors such as a disk write error, and 4OS2 errors such as a COPY 
  7508.  command that fails to copy any files, or the use of an unacceptable command 
  7509.  option. 
  7510.  
  7511.  ON ERROR executes the command immediately after the error occurs, without 
  7512.  displaying any command processor error message (operating system errors may 
  7513.  still be displayed in some cases).  ON ERRORMSG displays the appropriate error 
  7514.  message, then executes the command.  If both are specified, ON ERROR will take 
  7515.  precedence, and the ON ERRORMSG setting will be ignored.  The remainder of 
  7516.  this section discusses both settings together, using the term "ON ERROR[MSG]". 
  7517.  
  7518.  ON BREAK and ON ERROR[MSG] are independent of each other.  You can use either 
  7519.  one, or both, in any batch file. 
  7520.  
  7521.  Each time ON BREAK or ON ERROR[MSG] is used, it defines a new command to be 
  7522.  executed for a break or error, and any old command is discarded.  If you use 
  7523.  ON BREAK or ON ERROR[MSG] with no following command, that type of error 
  7524.  handling is disabled.  Error handling is also automatically disabled when the 
  7525.  batch file exits. 
  7526.  
  7527.  ON BREAK and ON ERROR[MSG] only affect the current batch file.  If you CALL 
  7528.  another batch file, the first batch file's error handling is suspended, and 
  7529.  the CALLed file must define its own error handling.  When control returns to 
  7530.  the first batch file, its error handling is reactivated. 
  7531.  
  7532.  The command can be any command that can be used on a batch file line by 
  7533.  itself.  Frequently, it is a GOTO or GOSUB command.  For example, the 
  7534.  following fragment traps any user attempt to end the batch file by pressing 
  7535.  Ctrl-C or Ctrl-Break.  It scolds the user for trying to end the batch file and 
  7536.  then continues displaying the numbers from 1 to 1000: 
  7537.  
  7538.           on break gosub gotabreak
  7539.           do i = 1 to 1000
  7540.              echo %i
  7541.           enddo
  7542.           quit
  7543.           :gotabreak
  7544.           echo Hey!  Stop that!!
  7545.           return
  7546.  
  7547.  You can use a command group as the command if you want to execute multiple 
  7548.  commands, for example: 
  7549.  
  7550.           on break (echo Oops, got a break! & quit)
  7551.  
  7552.  ON BREAK and ON ERROR[MSG] always assume that you want to continue executing 
  7553.  the batch file.  After the command is executed, control automatically returns 
  7554.  to the next command in the batch file (the command after the one that was 
  7555.  interrupted by the break or error).  The only way to avoid continuing the 
  7556.  batch file after a break or error is for the command to transfer control to 
  7557.  another point with GOTO, end the batch file with QUIT or CANCEL, or start 
  7558.  another batch file (without CALLing it). 
  7559.  
  7560.  When handling an error condition with ON ERROR[MSG], you may find it useful to 
  7561.  use internal variables, particularly %_? and %_SYSERR, to help determine the 
  7562.  cause of the error. 
  7563.  
  7564.  The ON ERROR[MSG] command will not be invoked if an error occurs while reading 
  7565.  or writing a redirected input file, output file, or pipe. 
  7566.  
  7567.  Caution:  If a break or error occurs while the command specified in ON BREAK 
  7568.  or ON ERROR[MSG] is executing, the command will be restarted.  This means you 
  7569.  must use caution to avoid or handle any possible errors in the commands 
  7570.  invoked by ON ERROR[MSG], since such errors can cause an infinite loop. 
  7571.  
  7572.  
  7573. ΓòÉΓòÉΓòÉ 6.55. OPTION - Modify the command processor configuration ΓòÉΓòÉΓòÉ
  7574.  
  7575.  Purpose:    Modify the command processor configuration 
  7576.  
  7577.  Format:     OPTION [//optname =value ...] 
  7578.  
  7579.              optname :  An INI file directive to set or modify. 
  7580.              value :  A new value for that directive. 
  7581.  
  7582.  See also:  4OS2.INI. 
  7583.  
  7584.  Usage 
  7585.  
  7586.  OPTION displays a settings notebook which allows you to modify many of the 
  7587.  configuration options stored in the file 4OS2.INI. 
  7588.  
  7589.  When you exit from the notebook, you can select the Save button to save your 
  7590.  changes in 4OS2.INI for use in the current session and all future sessions, 
  7591.  select the OK button to use your changes in the current session only, or 
  7592.  select the Cancel button to discard the changes. 
  7593.  
  7594.  Save saves all changes since the last Save, or since the last time you started 
  7595.  the command processor.  If you run OPTION and exit with OK, any changes will 
  7596.  not be saved in 4OS2.INI at that time.  However, if you run OPTION again and 
  7597.  exit with Save, any earlier changes will automatically be saved in the .INI 
  7598.  file along with any new changes. 
  7599.  
  7600.  In most cases, changes you make in the Startup section of the OPTION dialogs 
  7601.  or notebook will only take effect when you restart your command processor. 
  7602.  
  7603.  Other changes take effect as soon as you exit the dialogs or notebook with 
  7604.  Save  or OK.  However, not all option changes will appear immediately, even if 
  7605.  they have taken effect.  For example, some color changes will only appear 
  7606.  after a CLS command. 
  7607.  
  7608.  OPTION handles most standard 4OS2.INI file settings.  More advanced settings, 
  7609.  including all those listed under Key Mapping Directives and Advanced 
  7610.  Directives cannot be modified with the OPTION dialogs or notebook.  These 
  7611.  settings must be inserted or modified in 4OS2.INI manually. 
  7612.  
  7613.  OPTION does not preserve comments when saving modified settings in the 
  7614.  4OS2.INI file.  To be sure .INI file comments are preserved, put them on 
  7615.  separate lines in the file.  See Modifying the .INI File additional details. 
  7616.  
  7617.  OPTION runs the external program OPTION.EXE to display the notebook.  If the 
  7618.  command processor cannot find OPTION.EXE it will display an error message. 
  7619.  OPTION.EXE must be run with the OPTION command, and will not work if you 
  7620.  invoke it directly. 
  7621.  
  7622.  Setting Individual Options 
  7623.  
  7624.  If you follow the OPTION command with one or more sequences of a double slash 
  7625.  mark [//] followed by an option=value setting, the OPTION notebook will not 
  7626.  appear.  Instead, the new settings will take effect immediately, and will be 
  7627.  in effect for the current session only.  This example turns off batch file 
  7628.  echo and changes the input colors to bright cyan on black (enter this all on 
  7629.  one line): 
  7630.  
  7631.           [c:\] option //BatchEcho = No //InputColors = bri cya on bla
  7632.  
  7633.  Option values may contain whitespace.  However, you cannot enter an option 
  7634.  value which contains the "//" string. 
  7635.  
  7636.  This feature is most useful for testing settings quickly, and in aliases or 
  7637.  batch files which depend on certain options being in effect. 
  7638.  
  7639.  Changes made with // are temporary.  They will not be saved in 4OS2.INI, even 
  7640.  if you subsequently load the option dialogs and select Save. 
  7641.  
  7642.  
  7643. ΓòÉΓòÉΓòÉ 6.56. PATH - Set the executable file search path ΓòÉΓòÉΓòÉ
  7644.  
  7645.  Purpose:    Display or alter the list of directories that 4OS2 will search for 
  7646.              executable files, batch files, and files with executable 
  7647.              extensions that are not in the current directory. 
  7648.  
  7649.  Format:     PATH [directory [;directory ...]] 
  7650.  
  7651.              directory :  The full name of a directory to include in the path 
  7652.              setting. 
  7653.  
  7654.  See also:  ESET and SET. 
  7655.  
  7656.  Usage 
  7657.  
  7658.  When 4OS2 is asked to execute an external command (a .COM, .EXE, .BTM, .BAT, 
  7659.  or .CMD file or executable extension), it first looks for the file in the 
  7660.  current directory. If it fails to find an executable file there, it then 
  7661.  searches each of the directories specified in the PATH setting. 
  7662.  
  7663.  For example, after the following PATH command, 4OS2 will search for an 
  7664.  executable file in four directories:  the current directory, then the root 
  7665.  directory on drive C, then the DOS subdirectory on C, and then the UTIL 
  7666.  subdirectory on C: 
  7667.  
  7668.           [c:\] path c:\;c:\dos;c:\util
  7669.  
  7670.  The list of directories to search can be set or viewed with the PATH command. 
  7671.  The list is stored as an environment string, and can also be set or viewed 
  7672.  with SET, and edited with ESET. 
  7673.  
  7674.  Directory names in the path must be separated by semicolons [;].  Each 
  7675.  directory name is shifted to upper case to maintain compatibility with 
  7676.  programs which can only recognize upper case directory names in the path.  If 
  7677.  you modify your path with the SET or ESET command, you may include directory 
  7678.  names in lower case.  These may cause trouble with some programs, which assume 
  7679.  that all path entries have been shifted to upper case. 
  7680.  
  7681.  If you enter PATH with no parameters, the current path is displayed: 
  7682.  
  7683.           [c:\] path
  7684.           PATH=C:\;C:\DOS;C:\UTIL
  7685.  
  7686.  Entering PATH and a semicolon clears the search path so that only the current 
  7687.  directory is searched for executable files (this is the default at system 
  7688.  startup). 
  7689.  
  7690.  Some applications also use the PATH to search for their data files. 
  7691.  
  7692.  If you include an explicit file extension on a command name (for example, 
  7693.  WP.EXE ), the search will find files with that name and extension in the 
  7694.  current directory and every directory in the path. It will not locate other 
  7695.  executable files with the same base name (e.g., WP.COM). 
  7696.  
  7697.  If you have an entry in the path which consists of a single period [.], the 
  7698.  current directory will not be searched first, but instead will be searched 
  7699.  when 4OS2 reaches the "." in the path.  This allows you to delay the search of 
  7700.  the current directory for executable files and files with executable 
  7701.  extensions.  In rare cases, this feature may not be compatible with 
  7702.  applications which use the path to find their files; if you experience a 
  7703.  problem, you will have to remove the "." from the path while using any such 
  7704.  application. 
  7705.  
  7706.  To create a path longer than the command-line length limit, use PATH 
  7707.  repeatedly to append additional directories to the path: 
  7708.  
  7709.           path [first list of directories]
  7710.           path %path;[second list of directories]
  7711.           ...
  7712.  
  7713.  You cannot use this method to extend the path beyond 2042 characters (the 
  7714.  internal buffer limit, with room for "PATH ").  It is usually more efficient 
  7715.  to use aliases to load application programs than to create a long PATH.  See 
  7716.  ALIAS for details. 
  7717.  
  7718.  If you specify an invalid directory in the path, it will be skipped and the 
  7719.  search will continue with the next directory in the path. 
  7720.  
  7721.  
  7722. ΓòÉΓòÉΓòÉ 6.57. PAUSE - Suspend batch file or alias execution ΓòÉΓòÉΓòÉ
  7723.  
  7724.  Purpose:    Suspend batch file or alias execution. 
  7725.  
  7726.  Format:     PAUSE [text ] 
  7727.  
  7728.              text :  The message to be displayed as a user prompt. 
  7729.  
  7730.  Usage 
  7731.  
  7732.  A PAUSE command will suspend execution of a batch file or alias, giving you 
  7733.  the opportunity to change disks, turn on the printer, etc. 
  7734.  
  7735.  PAUSE waits for any key to be pressed and then continues execution. You can 
  7736.  specify the text that PAUSE displays while it waits for a keystroke, or let it 
  7737.  use the default message: 
  7738.  
  7739.           Press any key when ready...
  7740.  
  7741.  For example, the following batch file fragment prompts the user before erasing 
  7742.  files: 
  7743.  
  7744.           pause Press Ctrl-C to abort, any other key to erase all .LST files
  7745.           erase *.lst
  7746.  
  7747.  If you press Ctrl-C or Ctrl-Break while PAUSE is waiting for a key, execution 
  7748.  of an alias will be terminated, and execution of a batch file will be 
  7749.  suspended while you are asked whether to cancel the batch job.  In a batch 
  7750.  file you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  7751.  
  7752.  
  7753. ΓòÉΓòÉΓòÉ 6.58. POPD - Restore the disk drive and directory ΓòÉΓòÉΓòÉ
  7754.  
  7755.  Purpose:    Return to the disk drive and directory at the top of the directory 
  7756.              stack.. 
  7757.  
  7758.  Format:     POPD [*] 
  7759.  
  7760.  See also:  DIRS, PUSHD, and Directory Navigation. 
  7761.  
  7762.  Usage 
  7763.  
  7764.  Each time you use the PUSHD command, it saves the current disk drive and 
  7765.  directory on the internal directory stack.  POPD restores the last drive and 
  7766.  directory that was saved with PUSHD and removes that entry from the stack. 
  7767.  You can use these commands together to change directories, perform some work, 
  7768.  and return to the starting drive and directory. 
  7769.  
  7770.  Directory changes made with POPD are recorded in the directory history list 
  7771.  and can be displayed in the directory history window.  See Directory 
  7772.  Navigation for complete details on this and other directory navigation 
  7773.  features. 
  7774.  
  7775.  This example saves and changes the current disk drive and directory with 
  7776.  PUSHD, and then restores it.  The current directory is shown in the prompt: 
  7777.  
  7778.           [c:\] pushd d:\database\test
  7779.           [d:\database\test] pushd c:\wordp\memos
  7780.           [c:\wordp\memos] pushd a:\123
  7781.           [a:\123] popd
  7782.           [c:\wordp\memos] popd
  7783.           [d:\database\test] popd
  7784.           [c:\]
  7785.  
  7786.  You can use the DIRS command to see the complete list of saved drives and 
  7787.  directories (the directory stack). 
  7788.  
  7789.  The POPD command followed by an asterisk [*] clears the directory stack 
  7790.  without changing the current drive and directory. 
  7791.  
  7792.  If the directory on the top of the stack is not on the current drive, POPD 
  7793.  will switch to the drive and directory on the top of the stack without 
  7794.  changing the default directory on the current drive. 
  7795.  
  7796.  
  7797. ΓòÉΓòÉΓòÉ 6.59. PROMPT - Change the command-line prompt ΓòÉΓòÉΓòÉ
  7798.  
  7799.  Purpose:    Change the command-line prompt. 
  7800.  
  7801.  Format:     PROMPT [text ] 
  7802.  
  7803.              text :  Text to be used as the new command-line prompt. 
  7804.  
  7805.  Usage 
  7806.  
  7807.  You can change and customize the command-line prompt at any time.  The prompt 
  7808.  can include normal text, and system information such as the current drive and 
  7809.  directory, the time and date, and the amount of memory available.  You can 
  7810.  create an informal "Hello, Bob!" prompt or an official-looking prompt full of 
  7811.  impressive information.  The prompt text can contain special commands in the 
  7812.  form $?, where ? is one of the characters listed below: 
  7813.  
  7814.         b     The vertical bar character [|]. 
  7815.         c     The open parenthesis [(]. 
  7816.         d     Current date, in the format:  Fri 2-12-97 (the month, day, and 
  7817.               year are formatted according to your current country settings). 
  7818.         D     Current date, in the format:  Fri  Dec 12, 1997. 
  7819.         e     The ASCII ESC character (decimal 27). 
  7820.         f     The close parenthesis [)]. 
  7821.         g     The > character. 
  7822.         h     Backspace over the previous character. 
  7823.         i     Display the OS/2 prompt header line, which reminds you of how to 
  7824.               return to the OS/2 desktop, or get help. 
  7825.         l     The < character. 
  7826.         m     Time in hours and minutes using 24-hour format:  16:07 
  7827.         M     Time in hours and minutes using the default country format and 
  7828.               retaining "a" or "p", e.g. 4:07p. 
  7829.         n     Current drive letter. 
  7830.         p     Current directory (lower case). 
  7831.         P     Current directory (upper case on FAT drives; directory names 
  7832.               shown in mixed case as stored on the disk on HPFS drives). 
  7833.         q     The = character. 
  7834.         r     The numeric exit code of the last external command. 
  7835.         s     The space character. 
  7836.         t     Current 24-hour time, in the format hh:mm:ss. 
  7837.         T     Current 12-hour time, in the format hh:mm:ss[a|p]. 
  7838.         v     Operating system version number, in the format 3.10. 
  7839.         xd:   Current directory on drive d:, in lower case, including the drive 
  7840.               letter (uses the actual case of the directory name as stored on 
  7841.               the disk for HPFS drives). 
  7842.         Xd:   Current directory on drive d:, in upper case, including the drive 
  7843.               letter. 
  7844.         z     Current shell nesting level; the primary command processor is 
  7845.               shell 0. 
  7846.         +     Display one + character for each directory on the PUSHD directory 
  7847.               stack. 
  7848.         $     The $ character. 
  7849.         _     CR/LF (go to beginning of a new line). 
  7850.  
  7851.  For example, to set the prompt to the current date and time, with a ">" at the 
  7852.  end: 
  7853.  
  7854.           [c:\] prompt $D $t $g
  7855.           Fri  Jun 6, 1997 10:29:19 >
  7856.  
  7857.  To set the prompt to the current date and time, followed by the current drive 
  7858.  and directory in upper case on the next line, with a ">" at the end: 
  7859.  
  7860.           [c:\] prompt $d $t$_$P$g
  7861.           Fri  Dec 2, 1994 10:29:19
  7862.           [c:\]
  7863.  
  7864.  The 4OS2 prompt can be set in CONFIG.SYS (see below), and the prompt for any 
  7865.  command processor can be set in 4START, or in any batch file that runs when 
  7866.  4OS2 starts. 
  7867.  
  7868.  The 4OS2 default prompt is [$n] (drive name in square brackets) on floppy 
  7869.  drives, and [$p] (current drive and directory in square brackets) on all other 
  7870.  drives.  When OS/2 is installed, it inserts a SET PROMPT statement in 
  7871.  CONFIG.SYS to set the prompt to $i[$p].  This prompt will override the 4OS2 
  7872.  defaults.  The $i adds a header line to the default prompt to remind you of 
  7873.  certain OS/2 keystrokes.  You must delete this statement if you want to use 
  7874.  the default 4OS2 prompt. 
  7875.  
  7876.  If you enter PROMPT with no arguments, the prompt will be reset to its default 
  7877.  value.  The PROMPT command sets the environment variable PROMPT, so to view 
  7878.  the current prompt setting use the command: 
  7879.  
  7880.           [c:\] set prompt
  7881.  
  7882.  (If the prompt is not set at all, the PROMPT environment variable will not be 
  7883.  used, in which case the SET command above will give a "Not in environment" 
  7884.  error.) 
  7885.  
  7886.  Along with literal text, special characters, and ANSI sequences you can 
  7887.  include the text of any environment variable, internal variable, or variable 
  7888.  function in a prompt.  For example, if you want to include the size of the 
  7889.  largest free memory block in the command prompt, plus the current drive and 
  7890.  directory, you could use this command: 
  7891.  
  7892.           [c:\] prompt (%%@dosmem[K]K) $p$g
  7893.           (601K) [c:\data]
  7894.  
  7895.  Notice that the @DOSMEM function is shown with two leading percent signs [%]. 
  7896.  If you used only one percent sign, the @DOSMEM function would be expanded once 
  7897.  when the PROMPT command was executed, instead of every time the prompt is 
  7898.  displayed.  As a result, the amount of memory would never change from the 
  7899.  value it had when you entered the PROMPT command.  You can also use back 
  7900.  quotes to delay expanding the variable function until the prompt is displayed: 
  7901.  
  7902.           [c:\] prompt `(%@dosmem[K]K) $p$g`
  7903.  
  7904.  You can use this feature along with the @EXEC variable function to create a 
  7905.  complex prompt which not only displays information but executes commands.  For 
  7906.  example, to execute an alias which checks battery status each time the prompt 
  7907.  is displayed (enter the alias on one line): 
  7908.  
  7909.           [c:\] alias cbatt `if %_apmlife lt 30 beep 440 4 880 4 440
  7910.            4 880 4`
  7911.           [c:\] prompt `%@exec[@cbatt]$p$g`
  7912.  
  7913.  You can include ANSI escape sequences in the PROMPT text.  See ANSI for 
  7914.  complete details on ANSI commands.  This example uses ANSI sequences to set a 
  7915.  prompt that displays the shell level, date, time and path in color on the top 
  7916.  line of the screen (enter the command as one line): 
  7917.  
  7918.           [c:\] prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  7919.                 Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  7920.  
  7921.  A few older batch files use the PROMPT command to transmit ANSI.SYS control 
  7922.  sequences to the screen (for example, to redefine function keys).  This 
  7923.  technique will not work with 4OS2, because it doesn't display a prompt within 
  7924.  batch files; hence, the characters in the PROMPT string are never sent to 
  7925.  ANSI.SYS.  To send ANSI sequences in 4OS2, use the ECHO command, substituting 
  7926.  an escape character followed by an e for $e in the PROMPT string. 
  7927.  
  7928.  You may find it helpful to define a different prompt in secondary shells, 
  7929.  perhaps including $z in the prompt to display the shell level.  To do so, 
  7930.  place a PROMPT command in your 4START file and use IF or IFF statements to set 
  7931.  the appropriate prompt for different shells. 
  7932.  
  7933.  
  7934. ΓòÉΓòÉΓòÉ 6.60. PUSHD - Save the disk drive and directory ΓòÉΓòÉΓòÉ
  7935.  
  7936.  Purpose:    Save the current disk drive and directory, optionally changing to 
  7937.              a new drive and directory. 
  7938.  
  7939.  Format:     PUSHD [path ] 
  7940.  
  7941.              path :  The name of the new default drive and directory. 
  7942.  
  7943.  See also:  DIRS, POPD, and Directory Navigation. 
  7944.  
  7945.  Usage 
  7946.  
  7947.  PUSHD saves the current drive and directory on a "last in, first out" 
  7948.  directory stack.  The POPD command returns to the last drive and directory 
  7949.  that was saved by PUSHD.  You can use these commands together to change 
  7950.  directories, perform some work, and return to the starting drive and 
  7951.  directory.  The DIRS command displays the contents of the directory stack. 
  7952.  
  7953.  To save the current drive and directory, without changing directories, use the 
  7954.  PUSHD command by itself, with no path. 
  7955.  
  7956.  If a path is specified as part of the PUSHD command, the current drive and 
  7957.  directory are saved and PUSHD changes to the specified drive and directory. 
  7958.  If the path includes a drive letter, PUSHD changes to the specified directory 
  7959.  on the new drive without changing the current directory on the original drive. 
  7960.  
  7961.  This example saves the current directory and changes to C:\WORDP\MEMOS, then 
  7962.  returns to the original directory: 
  7963.  
  7964.           [c:\] pushd \wordp\memos
  7965.           [c:\wordp\memos] popd
  7966.           [c:\]
  7967.  
  7968.  When you use PUSHD to change to a directory on an HPFS drive, you must quote 
  7969.  the path name if it contains whitespace or special characters.  See File Names 
  7970.  for additional details. 
  7971.  
  7972.  PUSHD can also change to a network drive and directory specified with a UNC 
  7973.  name (see File Systems for a description of UNC names). 
  7974.  
  7975.  If PUSHD cannot change to the directory you have specified it will attempt to 
  7976.  search the CDPATH and the extended directory search database.  You can also 
  7977.  use wildcards in the path to force an extended directory search.  See the 
  7978.  Directory Navigation section for complete details on these and other directory 
  7979.  navigation features. 
  7980.  
  7981.  Directory changes made with PUSHD are also recorded in the directory history 
  7982.  list and can be displayed in the directory history window. 
  7983.  
  7984.  The directory stack can hold up to 511 characters, or about 20 to 40 entries 
  7985.  (depending on the length of the names).  If you exceed this limit, the oldest 
  7986.  entry is removed before adding a new entry. 
  7987.  
  7988.  
  7989. ΓòÉΓòÉΓòÉ 6.61. QUIT - Terminate a batch file ΓòÉΓòÉΓòÉ
  7990.  
  7991.  Purpose:    Terminate the current batch file. 
  7992.  
  7993.  Format:     QUIT [value ] 
  7994.  
  7995.              value :  The numeric exit code to return to 4OS2 or to the 
  7996.              previous batch file. 
  7997.  
  7998.  See also:  CANCEL. 
  7999.  
  8000.  Usage 
  8001.  
  8002.  QUIT provides a simple way to exit a batch file before reaching the end of the 
  8003.  file.  If you QUIT a batch file called from another batch file, you will be 
  8004.  returned to the previous file at the line following the original CALL. 
  8005.  
  8006.  QUIT only ends the current batch file.  To end all batch file processing, use 
  8007.  the CANCEL command. 
  8008.  
  8009.  If you specify a value, QUIT will set the ERRORLEVEL or exit code to that 
  8010.  value.  For information on exit codes see the IF command, and the %? variable. 
  8011.  
  8012.  You can also use QUIT to terminate an alias.  If you QUIT an alias while 
  8013.  inside a batch file, QUIT will end both the alias and the batch file and 
  8014.  return you to the command prompt or to the calling batch file. 
  8015.  
  8016.  
  8017. ΓòÉΓòÉΓòÉ 6.62. RD - Remove subdirectories ΓòÉΓòÉΓòÉ
  8018.  
  8019.  Purpose:    Remove one or more subdirectories. 
  8020.  
  8021.  Format:     RD path ... 
  8022.                 or 
  8023.              RMDIR path ... 
  8024.  
  8025.              path :  The name of one or more subdirectories to remove. 
  8026.  
  8027.  See also:  MD. 
  8028.  
  8029.  File Selection 
  8030.  
  8031.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8032.  
  8033.  Usage 
  8034.  
  8035.  RD and RMDIR are synonyms.  You can use either one. 
  8036.  
  8037.  RD removes directories from the directory tree.  For example, to remove the 
  8038.  subdirectory MEMOS from the subdirectory WP, you can use this command: 
  8039.  
  8040.           [c:\] rd \wp\memos
  8041.  
  8042.  Before using RD, you must delete all files and subdirectories (and their 
  8043.  files) in the path you want to remove.  Remember to remove hidden and 
  8044.  read-only files as well as normal files (you can use DEL /Z to delete hidden 
  8045.  and read-only files). 
  8046.  
  8047.  You can use wildcards in the path. 
  8048.  
  8049.  When removing a directory on an HPFS drive, you must quote any path which 
  8050.  contains whitespace or special characters.  See File Names for additional 
  8051.  details. 
  8052.  
  8053.  If RD removes one or more directories, they will be deleted automatically from 
  8054.  the extended directory search database. 
  8055.  
  8056.  You cannot remove the root directory, the current directory (.), any directory 
  8057.  above the current directory in the directory tree, or any directory in use by 
  8058.  another process in a multitasking system. 
  8059.  
  8060.  
  8061. ΓòÉΓòÉΓòÉ 6.63. REBOOT - Reboot the system ΓòÉΓòÉΓòÉ
  8062.  
  8063.  Purpose:    Do a system reboot. 
  8064.  
  8065.  Format:     REBOOT [/S /V] 
  8066.  
  8067.              /S(hutdown)                     /V(erify) 
  8068.  
  8069.  Usage 
  8070.  
  8071.  REBOOT will log off or shut down the operating system, or completely restart 
  8072.  your computer.  It normally performs a warm reboot, which is comparable to 
  8073.  pressing Ctrl-Alt-Delete.  A reboot is necessary to activate any changes to 
  8074.  your CONFIG.SYS file. 
  8075.  
  8076.  The following example prompts you to verify the reboot, then does a warm boot: 
  8077.  
  8078.           [c:\] reboot /v
  8079.  
  8080.  REBOOT defaults to performing a warm boot, with no prompting. 
  8081.  
  8082.  REBOOT flushes the disk buffers, resets the drives, and waits one second 
  8083.  before rebooting, to allow disk caching programs to finish writing any cached 
  8084.  data.  4OS2 issues commands to shut down OS/2 before rebooting. 
  8085.  
  8086.  REBOOT uses the DOS.SYS device driver to reboot your system.  DOS.SYS is 
  8087.  loaded via a DEVICE= statement in your CONFIG.SYS file.  If DOS.SYS is not 
  8088.  loaded, REBOOT will not work. 
  8089.  
  8090.  Options 
  8091.  
  8092.     /S:     (Shutdown) Shut down the system, but do not reboot.  This option is 
  8093.             equivalent to clicking the "Shutdown" choice on the Workplace Shell 
  8094.             popup menu. 
  8095.  
  8096.     /V:     (Verify) Prompt for confirmation (Y or N) before rebooting or 
  8097.             taking the action specified by other REBOOT options. 
  8098.  
  8099.  
  8100. ΓòÉΓòÉΓòÉ 6.64. REM - Put a comment in a batch file ΓòÉΓòÉΓòÉ
  8101.  
  8102.  Purpose:    Put a comment in a batch file. 
  8103.  
  8104.  Format:     REM [comment ] 
  8105.  
  8106.              comment :  The text to include in the batch file. 
  8107.  
  8108.  Usage 
  8109.  
  8110.  The REM command lets you place a remark or comment in a batch file.  Batch 
  8111.  file comments are useful for documenting the purpose of a batch file and the 
  8112.  procedures you have used. 
  8113.  
  8114.  REM must be followed by a space or tab character and then your comment. 
  8115.  Comments can be up to 1023 characters long.  4OS2 will normally ignore 
  8116.  everything on the line after the REM command, including quote characters, 
  8117.  redirection symbols, and other commands (see below for the exception to this 
  8118.  rule). 
  8119.  
  8120.  If ECHO is ON, the comment is displayed.  Otherwise, it is ignored.  If ECHO 
  8121.  is ON and you don't want to display the line, preface the REM command with an 
  8122.  at sign [@]. 
  8123.  
  8124.  You can also place a comment in a batch file by starting the comment line with 
  8125.  two colons [::].  In essence this creates a batch file "label" without a valid 
  8126.  label name.  Such comments are processed slightly faster than those entered 
  8127.  with REM, because they do not require the command processor to handle a 
  8128.  command. 
  8129.  
  8130.  You can use REM to create a zero-byte file if you use a redirection symbol 
  8131.  after the REM command.  No text is permitted between the REM command and the 
  8132.  redirection symbol.  For example, to create the zero-byte file C:\FOO : 
  8133.  
  8134.           [c:\] rem > foo
  8135.  
  8136.  (This capability is included for compatibility with CMD.EXE.  A simpler method 
  8137.  for creating a zero-byte file with 4OS2 is to use >filename as a command, with 
  8138.  no actual command before the [>] redirection character.) 
  8139.  
  8140.  
  8141. ΓòÉΓòÉΓòÉ 6.65. REN - Rename files or subdirectories ΓòÉΓòÉΓòÉ
  8142.  
  8143.  Purpose:    Rename files or subdirectories. 
  8144.  
  8145.  Format:     REN [/A:[[-]rhsda] /E /N /P /Q /S /T] old_name ... new_name 
  8146.                 or 
  8147.              RENAME [/A:[[-]rhsda] /E /N /P /Q /S /T] old_name ... new_name 
  8148.  
  8149.              old_name :  Original name of the file(s) or subdirectory. 
  8150.              new_name :  New name to use, or new path on the same drive. 
  8151.  
  8152.              /A: (Attribute select)          /Q(uiet) 
  8153.              /E (No error messages)          /S(ubdirectory) 
  8154.              /N(othing)                      /T(otal) 
  8155.              /P(rompt) 
  8156.  
  8157.  See also:  COPY and MOVE. 
  8158.  
  8159.  File Selection 
  8160.  
  8161.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8162.  
  8163.  Usage 
  8164.  
  8165.  REN and RENAME are synonyms.  You may use either one. 
  8166.  
  8167.  REN lets you change the name of a file or a subdirectory, or move one or more 
  8168.  files to a new subdirectory on the same drive.  (If you want to move files to 
  8169.  a different drive, use MOVE.) 
  8170.  
  8171.  In its simplest form, you give REN the old_name of an existing file or 
  8172.  subdirectory and then a new_name.  The new_name must not already exist -- you 
  8173.  can't give two files the same name (unless they are in different directories). 
  8174.  The first example renames the file MEMO.TXT to MEM.TXT.  The second example 
  8175.  changes the name of the \WORD directory to \WP : 
  8176.  
  8177.           [c:\] rename memo.txt mem.txt
  8178.           [c:\] rename \word \wp
  8179.  
  8180.  If you use REN to rename a directory, the extended directory search database 
  8181.  will be automatically updated to reflect the change. 
  8182.  
  8183.  When you rename files on an HPFS drive, you must quote any file names which 
  8184.  contain whitespace or special characters.  See File Names for additional 
  8185.  details. 
  8186.  
  8187.  You can also use REN to rename a group of files that you specify with 
  8188.  wildcards, as multiple files, or in an include list.  When you do, the 
  8189.  new_name must use one or more wildcards to show what part of each filename to 
  8190.  change.  Both of the next two examples change the extensions of multiple files 
  8191.  to .SAV : 
  8192.  
  8193.           [c:\] ren config.sys autoexec.bat 4start.btm *.sav
  8194.           [c:\] ren *.txt *.sav
  8195.  
  8196.  REN can move files to a different subdirectory on the same drive.  When it is 
  8197.  used for this purpose, REN requires one or more filenames for the old_name and 
  8198.  a directory name for the new_name : 
  8199.  
  8200.           [c:\] ren memo.txt \wp\memos\
  8201.           [c:\] ren oct.dat nov.dat \data\save\
  8202.  
  8203.  The final backslash in the last two examples is optional.  If you use it, you 
  8204.  force REN to recognize the last argument as the name of a directory, not a 
  8205.  file.  The advantage of this approach is that if you accidentally mistype the 
  8206.  directory name, REN will report an error instead of renaming your files in a 
  8207.  way that you didn't intend. 
  8208.  
  8209.  Finally, REN can move files to a new directory and change their name at the 
  8210.  same time if you specify both a path and file name for new_name.  In this 
  8211.  example, the files are renamed with an extension of .SAV as they are moved to 
  8212.  a new directory: 
  8213.  
  8214.           [c:\] ren *.dat \data\save\*.sav
  8215.  
  8216.  You cannot rename a subdirectory to a new location on the directory tree. 
  8217.  
  8218.  REN does not change a file's attributes.  The new_name file(s) will have the 
  8219.  same attributes as old_name. 
  8220.  
  8221.  Options 
  8222.  
  8223.     /A::    (Attribute select) Select only those files that have the specified 
  8224.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8225.             [-] will select files that do not have that attribute set.  The 
  8226.             colon [:] after /A is required.  The attributes are: 
  8227.  
  8228.                            R  Read-only 
  8229.                            H  Hidden 
  8230.                            S  System 
  8231.                            D  Subdirectory 
  8232.                            A  Archive 
  8233.  
  8234.             If no attributes are listed at all (e.g., REN /A: ...), REN will 
  8235.             select all files and subdirectories including hidden and system 
  8236.             files.  If attributes are combined, all the specified attributes 
  8237.             must match for a file to be selected.  For example, /A:RHS will 
  8238.             select only those files with all three attributes set. 
  8239.  
  8240.     /E:     (No error messages) Suppress all non-fatal error messages, such as 
  8241.             "File Not Found."  Fatal error messages, such as "Drive not ready," 
  8242.             will still be displayed.  This option is most useful in batch 
  8243.             files. 
  8244.  
  8245.     /N:     (Nothing) Do everything except actually rename the file(s).  This 
  8246.             option is useful for testing what a REN command will actually do. 
  8247.  
  8248.     /P:     (Prompt) Prompt the user to confirm each rename operation.  Your 
  8249.             options at the prompt are explained in detail under Page and File 
  8250.             Prompts. 
  8251.  
  8252.     /Q:     (Quiet) Don't display filenames or the number of files renamed. 
  8253.             This option is most often used in batch files.  See also /T. 
  8254.  
  8255.     /S:     (Subdirectory) Normally, you can rename a subdirectory only if you 
  8256.             do not use any wildcards in the new_name.  This prevents 
  8257.             subdirectories from being renamed inadvertently when a group of 
  8258.             files is being renamed with wildcards.  /S will let you rename a 
  8259.             subdirectory even when you use wildcards.  /S does not cause REN to 
  8260.             process files in the current directory and all subdirectories as it 
  8261.             does in some other file processing commands.  To rename files 
  8262.             throughout a directory tree, use a GLOBAL REN. 
  8263.  
  8264.     /T:     (Total) Don't display filenames as they are renamed, but report the 
  8265.             number of files renamed.  See also /Q. 
  8266.  
  8267.  
  8268. ΓòÉΓòÉΓòÉ 6.66. RETURN - Return from a subroutine in a batch file ΓòÉΓòÉΓòÉ
  8269.  
  8270.  Purpose:    Return from a GOSUB (subroutine) in a batch file. 
  8271.  
  8272.  Format:     RETURN [value ] 
  8273.  
  8274.              value :  The exit code from 0 to 255 to return to the command 
  8275.              processor or to the previous batch file. 
  8276.  
  8277.  See also:  GOSUB. 
  8278.  
  8279.  Usage 
  8280.  
  8281.  4OS2 allows subroutines in batch files. 
  8282.  
  8283.  A subroutine begins with a label (a colon followed by a word) and ends with a 
  8284.  RETURN command. 
  8285.  
  8286.  The subroutine is invoked with a GOSUB command from another part of the batch 
  8287.  file.  When a RETURN command is encountered the subroutine terminates, and 
  8288.  execution of the batch file continues on the line following the original 
  8289.  GOSUB.  If RETURN is encountered without a GOSUB, the command processor will 
  8290.  display a "Missing GOSUB" error. 
  8291.  
  8292.  The following batch file fragment calls a subroutine which displays the files 
  8293.  in the current directory: 
  8294.  
  8295.           echo Calling a subroutine
  8296.           gosub subr1
  8297.           echo Returned from the subroutine
  8298.           quit
  8299.  
  8300.           :subr1
  8301.           dir /a/w
  8302.           return
  8303.  
  8304.  If you specify a value, RETURN will set the ERRORLEVEL or exit code to that 
  8305.  value.  For information on exit codes see the IF command, and the %? variable. 
  8306.  
  8307.  
  8308. ΓòÉΓòÉΓòÉ 6.67. SCREEN - Position the cursor and display text ΓòÉΓòÉΓòÉ
  8309.  
  8310.  Purpose:    Position the cursor on the screen and optionally display a 
  8311.              message. 
  8312.  
  8313.  Format:     SCREEN row column [text ] 
  8314.  
  8315.              row :  The new row location for the cursor. 
  8316.              column :  The new column location for the cursor. 
  8317.              text :  Optional text to display at the new cursor location. 
  8318.  
  8319.  See also:  ECHO, SCRPUT, TEXT, and VSCRPUT. 
  8320.  
  8321.  Usage 
  8322.  
  8323.  SCREEN allows you to create attractive screen displays in batch files.  You 
  8324.  use it to specify where a message will appear on the screen.  You can use 
  8325.  SCREEN to create menus and other similar displays.  The following batch file 
  8326.  fragment displays a menu: 
  8327.  
  8328.           @echo off
  8329.           cls
  8330.           screen 3 10  Select a number from 1 to 4:
  8331.           screen 6 20  1 - Word Processing
  8332.           screen 7 20  2 - Spreadsheet
  8333.           screen 8 20  3 - Telecommunications
  8334.           screen 9 20  4 - Quit
  8335.  
  8336.  SCREEN does not change the screen colors.  To display text in specific colors, 
  8337.  use SCRPUT or VSCRPUT.  SCREEN always leaves the cursor at the end of the 
  8338.  displayed text. 
  8339.  
  8340.  The row and column values are zero-based, so on a standard 25 line by 80 
  8341.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can 
  8342.  also specify the row and column as offsets from the current cursor position. 
  8343.  Begin the value with a plus sign [+] to move the cursor down the specified 
  8344.  number of rows or to the right the specified number of columns, or with a 
  8345.  minus sign [-] to move the cursor up or to the left.  This example prints a 
  8346.  string 3 lines above the current position, in absolute column 10: 
  8347.  
  8348.           screen -3 10 Hello, World!
  8349.  
  8350.  If you specify 999 for the row, SCREEN will center the text vertically on the 
  8351.  display.  If you specify 999 for the column, SCREEN will center the text 
  8352.  horizontally.  This example prints a message at the center of the display: 
  8353.  
  8354.           screen 999 999 Hello, World
  8355.  
  8356.  SCREEN checks for a valid row and column, and displays a "Usage" error message 
  8357.  if either value is out of range. 
  8358.  
  8359.  
  8360. ΓòÉΓòÉΓòÉ 6.68. SCRPUT - Display text in color ΓòÉΓòÉΓòÉ
  8361.  
  8362.  Purpose:    Position text on the screen and display it in color. 
  8363.  
  8364.  Format:     SCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  8365.  
  8366.              row :  Starting row 
  8367.              col :  Starting column 
  8368.              fg :  Foreground character color 
  8369.              bg :  Background character color 
  8370.              text :  The text to display 
  8371.  
  8372.  See also:  ECHO, SCREEN, TEXT, and VSCRPUT. 
  8373.  
  8374.  Usage 
  8375.  
  8376.  SCRPUT allows you to create attractive screen displays in batch files.  You 
  8377.  use it to specify where a message will appear on the screen and what colors 
  8378.  will be used to display the message text.  You can use SCRPUT to create menu 
  8379.  displays, logos, etc. 
  8380.  
  8381.  SCRPUT works like SCREEN, but requires you to specify the display colors.  See 
  8382.  Colors and Color Names for details about colors and notes on the use of bright 
  8383.  background colors. 
  8384.  
  8385.  The row and column are zero-based, so on a standard 25 line by 80 column 
  8386.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  SCRPUT checks 
  8387.  for a valid row and column, and displays a "Usage" error message if either 
  8388.  value is out of range. 
  8389.  
  8390.  You can also specify the row and column as offsets from the current cursor 
  8391.  position.  Begin the value with a plus sign [+] to move down the specified 
  8392.  number of rows or to the right the specified number of columns, or with a 
  8393.  minus sign [-] to move up or to the left. 
  8394.  
  8395.  If you specify 999 for the row, SCRPUT will center the text vertically on the 
  8396.  display.  If you specify 999 for the column, SCRPUT will center the text 
  8397.  horizontally. 
  8398.  
  8399.  SCRPUT does not move the cursor when it displays the text. 
  8400.  
  8401.  The following batch file fragment displays part of a menu, in color: 
  8402.  
  8403.           cls white on blue
  8404.           scrput 6 20 bri red on blu 1 - Word Processing
  8405.           scrput 7 20 bri yel on blu 2 - Spreadsheet
  8406.           scrput 8 20 bri gre on blu 3 - Communications
  8407.           scrput 9 20 bri mag on blu 4 - Quit
  8408.  
  8409.  
  8410. ΓòÉΓòÉΓòÉ 6.69. SELECT - Select files for a command ΓòÉΓòÉΓòÉ
  8411.  
  8412.  Purpose:    Interactively select files for a command. 
  8413.  
  8414.  Format:     SELECT [/A[[:][-][rhsda]] /D /E /H /I"text" /J /L 
  8415.              /O[:][-]adeginrsu /T:acw /Z] [command ] ... (files ...)... 
  8416.  
  8417.              command :  The command to execute with the selected files. 
  8418.              files :  The files from which to select.  File names may be 
  8419.              enclosed in either parentheses or square brackets.  The difference 
  8420.              is explained below. 
  8421.  
  8422.              /A(ttribute select)             /J(ustify names) 
  8423.              /D(isable color coding)         /L(ower case) 
  8424.              /E (use upper case)             /O(rder) 
  8425.              /H(ide dots)                    /T(ime) 
  8426.              /I (match descriptions)         /Z (use FAT format) 
  8427.  
  8428.  File Selection 
  8429.  
  8430.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8431.  Ranges must appear immediately after the SELECT keyword. 
  8432.  
  8433.  Usage 
  8434.  
  8435.  SELECT allows you to select files for internal and external commands by using 
  8436.  a full-screen "point and shoot" display.  You can have SELECT execute a 
  8437.  command once for each file you select, or have it create a list of files for a 
  8438.  command to work with.  The command can be an internal command, an alias, an 
  8439.  external command, or a batch file. 
  8440.  
  8441.  If you use parentheses around the files, SELECT executes the command once for 
  8442.  each file you have selected.  During each execution, one of the selected files 
  8443.  is passed to the command as an argument.  If you use square brackets around 
  8444.  files, the SELECTed files are combined into a single list, separated by 
  8445.  spaces.  The command is then executed once with the entire list presented as 
  8446.  part of its command-line arguments. 
  8447.  
  8448.  Using the SELECT File List 
  8449.  
  8450.  When you execute the SELECT command, the file list is displayed in a 
  8451.  full-screen format which includes a top-line status bar and shows the command 
  8452.  to be executed, the number of files marked, and the number of Kbytes in those 
  8453.  files. 
  8454.  
  8455.  SELECT uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through 
  8456.  the file list.  You can also use character matching to find specific files, 
  8457.  just as you can in any popup window.  While the file list is displayed you can 
  8458.  enter any of the following keys to select or unselect files, display files, 
  8459.  execute the command, or exit: 
  8460.  
  8461.  + or space               Select a file, or unselect a marked file. 
  8462.  -                        Unselect a marked file. 
  8463.  *                        Reverse all of the current marks (except those on 
  8464.                           subdirectories).  If no files have been marked you 
  8465.                           can use *  to mark all of the files. 
  8466.  /                        Unselect all files. 
  8467.  Ctrl-L                   View the current highlighted file with LIST  When you 
  8468.                           exit from LIST, the SELECT screen will be restored. 
  8469.  Enter                    Execute the command with the marked files, or with 
  8470.                           the currently highlighted file if no files have been 
  8471.                           marked. 
  8472.  Esc                      Skip the files in the current display and go on to 
  8473.                           the next file specification inside the parentheses or 
  8474.                           brackets (if any). 
  8475.  Ctrl-C or Ctrl-Break     Cancel the current SELECT command entirely. 
  8476.  
  8477.  On FAT drives the file list is shown in standard FAT directory format, with 
  8478.  names at the left an descriptions at the right.  On HPFS drives the format is 
  8479.  similar but more space is allowed for the name, and the description is not 
  8480.  shown.  In this format long names are truncated if they do not fit in the 
  8481.  allowable space.  For a short-name format (including descriptions) on long 
  8482.  filename drives, use the /Z switch. 
  8483.  
  8484.  When displaying descriptions in the short filename format, SELECT adds a right 
  8485.  arrow [] at the end of the line if the description is too long to fit on the 
  8486.  screen.  This symbol will alert you to the existence of additional description 
  8487.  text.  You can use the left and right arrow keys to scroll the description 
  8488.  area of the screen horizontally and view the additional text. 
  8489.  
  8490.  You can display the filenames in color by using the SET command to create an 
  8491.  environment variable called COLORDIR, or using the Commands page of the OPTION 
  8492.  dialogs or a text editor to set the ColorDir directive in your 4OS2.INI file. 
  8493.  If you do not use the COLORDIR variable or the ColorDir directive, SELECT will 
  8494.  use the default screen colors for all files.  See the discussion of 
  8495.  color-coded directories under DIR for more details.  To disable directory 
  8496.  color coding within SELECT, use the /D option. 
  8497.  
  8498.  You can set the default colors used by SELECT on the Commands page of the 
  8499.  OPTION dialogs or with the SelectColors and SelectStatBarColors directives in 
  8500.  the .INI file.  If SelectColors is not used, the SELECT display will use the 
  8501.  current default colors.  If SelectStatBarColors is not used, the status bar 
  8502.  will use the reverse of the SELECT colors. 
  8503.  
  8504.  Creating SELECT Commands 
  8505.  
  8506.  In the simplest form of SELECT, you merely specify the command and then the 
  8507.  list of files from which you will make your selection(s).  For example: 
  8508.  
  8509.           [c:\] select copy (*.com *.exe) a:\
  8510.  
  8511.  will let you select from among the .COM files on the current drive and will 
  8512.  then invoke the COPY command to copy each file you select to drive A:.  After 
  8513.  the .COM files are done, the operations will be repeated for the .EXE files. 
  8514.  
  8515.  If you want to select from a list of all the .COM and .EXE files mixed 
  8516.  together, create an include list inside the parentheses by inserting a 
  8517.  semicolon: 
  8518.  
  8519.           [c:\] select copy (*.com;*.exe) a:\
  8520.  
  8521.  Finally, if you want the SELECT command to send a single list of files to 
  8522.  COPY, instead of invoking COPY once for each file you select, put the file 
  8523.  names in square brackets instead of parentheses: 
  8524.  
  8525.           [c:\] select copy [*.com;*.exe] a:\
  8526.  
  8527.  If you use brackets, you have to be sure that the resulting command (the word 
  8528.  COPY, the list of files, and the destination drive in this example) does not 
  8529.  exceed the command line length limit of 1,023 characters.  The current line 
  8530.  length is displayed by SELECT while you are marking files to help you to 
  8531.  conform to this limit. 
  8532.  
  8533.  The parentheses or brackets enclosing the file name(s) can appear anywhere 
  8534.  within the command; SELECT assumes that the first set of parentheses or 
  8535.  brackets it finds is the one containing the list of files from which you wish 
  8536.  to make your selection. 
  8537.  
  8538.  When you use SELECT on an HPFS drive, you must quote any file names inside the 
  8539.  parentheses which contain whitespace or special characters.  See File Names 
  8540.  for additional details.  For example, to copy selected files from the "Program 
  8541.  Files" directory to the E:\SAVE directory: 
  8542.  
  8543.           [c:\] select copy ("Program Files\*.*") e:\save\
  8544.  
  8545.  File names passed to the command will be quoted automatically if they contain 
  8546.  whitespace or special characters. 
  8547.  
  8548.  The list of files from which you wish to select can be further refined by 
  8549.  using date, time, size, and file exclusion ranges.  The range(s) must be 
  8550.  placed immediately after the word SELECT.  If the command is an internal 
  8551.  command that supports ranges, an independent range can also be used in the 
  8552.  command itself. 
  8553.  
  8554.  You cannot use command grouping to make SELECT execute several commands, 
  8555.  because SELECT will assume that the parentheses are marking the list of files 
  8556.  from which to select, and will display an error message or give incorrect 
  8557.  results if you try to use parentheses for command grouping instead.  (You can 
  8558.  use a SELECT command inside command grouping parentheses, you just can't use 
  8559.  command grouping to specify a group of commands for SELECT to execute.) 
  8560.  
  8561.  Advanced Topics 
  8562.  
  8563.  If you don't specify a command, the selected filename(s) will become the 
  8564.  command.  For example, this command defines an alias called UTILS that selects 
  8565.  from the executable files in the directory C:\UTIL, and then executes them in 
  8566.  the order marked: 
  8567.  
  8568.           [c:\] alias utils select (c:\util\*.com;*.exe;*.btm;*.bat)
  8569.  
  8570.  If you want to use filename completion to enter the filenames inside the 
  8571.  parentheses, type a space after the opening parenthesis.  Otherwise, the 
  8572.  command-line editor will treat the open parenthesis as the first character of 
  8573.  the filename. 
  8574.  
  8575.  With the /I option, you can select files based on their descriptions.  SELECT 
  8576.  will display files if their description matches the text after the /I switch. 
  8577.  The search is not case sensitive.  You can use wildcards and extended 
  8578.  wildcards as part of the text. 
  8579.  
  8580.  When sorting file names and extensions for the SELECT display, 4OS2 normally 
  8581.  assumes that sequences of digits should be sorted numerically (for example, 
  8582.  the file DRAW2 would come before DRAW03 because 2 is numerically smaller than 
  8583.  03), rather than strictly alphabetically (where DRAW2 would come second 
  8584.  because "2" comes after "0").  You can defeat this behavior and force a strict 
  8585.  alphabetic sort with the /O:a option. 
  8586.  
  8587.  Options 
  8588.  
  8589.     /A:     (Attribute select) Select only those files that have the specified 
  8590.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8591.             [-] will select files that do not have that attribute set.  The 
  8592.             colon [:] after /A is optional.  The attributes are: 
  8593.  
  8594.               R  Read-only 
  8595.               H  Hidden 
  8596.               S  System 
  8597.               D  Subdirectory 
  8598.               A  Archive 
  8599.  
  8600.             If no attributes are listed at all (e.g., SELECT /A ...), SELECT 
  8601.             will display all files and subdirectories including hidden and 
  8602.             system files. If attributes are combined, all the specified 
  8603.             attributes must match for a file to be included in the listing. 
  8604.             For example, /A:RHS will display only those files with all three 
  8605.             attributes set. 
  8606.  
  8607.     /D:     (Disable color coding) Temporarily turn off directory color coding 
  8608.             within SELECT. 
  8609.  
  8610.     /E      (use upper case) Display filenames upper case; also see SETDOS /U 
  8611.             and the UpperCase  directive in 4OS2.INI. 
  8612.  
  8613.     /H      (Hide dots) Suppress the display of the "." and ".." directories. 
  8614.  
  8615.     /I      (match descriptions) Display filenames by matching text in their 
  8616.             descriptions.  The text can include wildcards and extended 
  8617.             wildcards.  The search text must be enclosed in quotation marks. 
  8618.             You can select all filenames that have a description with /I"[?]*", 
  8619.             or all filenames that do not have a description with /I"[]". 
  8620.  
  8621.     /J      (Justify names) Justify (align) filename extensions and display 
  8622.             them in the traditional format. 
  8623.  
  8624.     /L      (Lower case) Display file and directory names in lower case; also 
  8625.             see SETDOS /U and the UpperCase directive in 4OS2.INI. 
  8626.  
  8627.     /O:     (Order) Set the sort order for the files.  The order can be any 
  8628.             combination of the following options: 
  8629.  
  8630.               -  Reverse the sort order for the next option. 
  8631.               a  Sort in ASCII order, not numerically, when there are digits in 
  8632.             the name. 
  8633.               d  Sort by date and time (oldest first); for HPFS drives also see 
  8634.             /T. 
  8635.               e  Sort by extension. 
  8636.               g  Group subdirectories first, then files. 
  8637.               i  Sort by file description. 
  8638.               n  Sort by filename (this is the default). 
  8639.               r  Reverse the sort order for all options. 
  8640.               s  Sort by size. 
  8641.               u  Unsorted. 
  8642.  
  8643.     /T:     (Time display) Specify which of the date and time fields on an HPFS 
  8644.             drive should be displayed and used for sorting: 
  8645.  
  8646.               a  last access date and time 
  8647.               c  creation date and time 
  8648.               w  last write date and time (default) 
  8649.  
  8650.     /Z:     Display HPFS filenames in the traditional FAT format, with the 
  8651.             filename at the left and the description at the right. Long names 
  8652.             will be truncated to 12 characters; if the name is longer than 12 
  8653.             characters, it will be followed by a right arrow [] to show that 
  8654.             one or more characters have been truncated. 
  8655.  
  8656.  
  8657. ΓòÉΓòÉΓòÉ 6.70. SET - Create or modify environment variables ΓòÉΓòÉΓòÉ
  8658.  
  8659.  Purpose:    Display, create, modify, or delete environment variables. 
  8660.  
  8661.  Format:     SET [/P /R file ...] [name [=][value ]] 
  8662.  
  8663.              file :  One or more files containing variable definitions. 
  8664.              name :  The name of the environment variable to define or modify. 
  8665.              value :  The new value for the variable. 
  8666.  
  8667.              /P(ause)                        /R(ead from file) 
  8668.  
  8669.  See also:  ESET and UNSET. 
  8670.  
  8671.  Usage 
  8672.  
  8673.  Every program and command inherits an environment, which is a list of variable 
  8674.  names, each of which is followed by an equal sign and some text.  Many 
  8675.  programs use entries in the environment to modify their own actions. 
  8676.  
  8677.  If you simply type the SET command with no options or arguments, it will 
  8678.  display all the names and values currently stored in the environment. 
  8679.  Typically, you will see an entry called COMSPEC, an entry called PATH, an 
  8680.  entry called CMDLINE, and whatever other environment variables you and your 
  8681.  programs have established: 
  8682.  
  8683.           [c:\] set
  8684.           COMSPEC=C:\4OS2\$OS2.EXE
  8685.           PATH=C:\;C:\OS2;C:\OS2\SYSTEM;C:\UTIL
  8686.           CMDLINE=C:\4OS2\4START.CMD
  8687.  
  8688.  To add a variable to the environment, type SET, a space, the variable name, an 
  8689.  equal sign, and the text: 
  8690.  
  8691.           [c:\] set mine=c:\finance\myfiles
  8692.  
  8693.  The variable name is converted to upper case by 4OS2.  The text after the 
  8694.  equal sign will be left just as you entered it.  If the variable already 
  8695.  exists, its value will be replaced with the new text that you entered. 
  8696.  
  8697.  Normally you should not put a space on either side of the equal sign.  A space 
  8698.  before the equal sign will become part of the name ; a space after the equal 
  8699.  sign will become part of the value. 
  8700.  
  8701.  If you use SET to create a variable with the same name as one of the 4OS2 
  8702.  internal variables, you will disable the internal variable.  If you later 
  8703.  execute a batch file or alias that depends on that internal variable, it may 
  8704.  not operate correctly. 
  8705.  
  8706.  To display the contents of a single variable, type SET plus the variable name: 
  8707.  
  8708.           [c:\] set mine
  8709.  
  8710.  You can edit environment variables with the ESET command.  To remove variables 
  8711.  from the environment, use UNSET, or type SET plus a variable name and an equal 
  8712.  sign: 
  8713.  
  8714.           [c:\] set mine=
  8715.  
  8716.  The variable name is limited to a maximum of 80 characters. The name and value 
  8717.  together cannot be longer than 1,023 characters. 
  8718.  
  8719.  In 4OS2 the size of the environment is set automatically, and increased as 
  8720.  necessary as you add variables. 
  8721.  
  8722.  4OS2 supports the "pseudo-variables" BeginLIBPath and EndLIBPath introduced in 
  8723.  OS/2 Warp.  If you use either of these as a variable name, 4OS2 will pass the 
  8724.  library path information from the SET command to the operating system, but the 
  8725.  variables will not appear in the environment.  See your OS/2 documentation for 
  8726.  more information about these "variables". 
  8727.  
  8728.  Options 
  8729.  
  8730.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  8731.             continuing the display.  Your options at the prompt are explained 
  8732.             in detail under Page and File Prompts. 
  8733.  
  8734.     /R:     (Read) Read environment variables from a file.  This is much faster 
  8735.             than loading variables from a batch file with multiple SET 
  8736.             commands.  Each entry in the file must fit within the 1,023-byte 
  8737.             command-line length limit for 4OS2.  The file is in the same format 
  8738.             as the SET display (i.e., name =value ), so SET /R can accept as 
  8739.             input a file generated by redirecting SET output.  For example, the 
  8740.             following commands will save the environment variables to a file, 
  8741.             and then reload them from that file: 
  8742.  
  8743.                                 set > varlist
  8744.                                 set /r varlist
  8745.  
  8746.             You can load variables from multiple files by listing the filenames 
  8747.             individually after the /R.  You can add comments to a variable file 
  8748.             by starting the comment line with a colon [:]. 
  8749.  
  8750.             If you are creating a SET /R file by hand, and need to create an 
  8751.             entry that spans multiple lines in the file, you can do so by 
  8752.             terminating each line, except the last, with an escape character. 
  8753.             However, you cannot use this method to exceed the command-line 
  8754.             length limit. 
  8755.  
  8756.  
  8757. ΓòÉΓòÉΓòÉ 6.71. SETDOS - Set the 4OS2 configuration ΓòÉΓòÉΓòÉ
  8758.  
  8759.  Purpose:    Display or set the 4OS2 configuration. 
  8760.  
  8761.  Format:     SETDOS [/A? /B? /C? /D? /E? /Fn.n /G?? /I+|- command /L? /M? /N? 
  8762.              /P? /R? /S?:? /U? /V? /X[+|-]n /Y?] 
  8763.  
  8764.              /B(right background)            /N(o clobber) 
  8765.              /C(ompound)                     /P(arameter character) 
  8766.              /D(escriptions)                 /R(ows) 
  8767.              /E(scape character)             /S(hape of cursor) 
  8768.              /F(ormat for @EVAL)             /U(pper case) 
  8769.              /G (numeric separators)         /V(erbose) 
  8770.              /I(nternal commands)            /X (expansion, special characters) 
  8771.              /L(ine)                         /Y (debug batch file) 
  8772.              /M(ode for editing) 
  8773.  
  8774.  Usage 
  8775.  
  8776.  SETDOS allows you to customize certain aspects of 4OS2 to suit your personal 
  8777.  tastes or the configuration of your system.  Each of these options is 
  8778.  described below. 
  8779.  
  8780.  You can display the value of all SETDOS options by entering the SETDOS command 
  8781.  with no parameters. 
  8782.  
  8783.  Most of the SETDOS options can be initialized when 4OS2 executes the 
  8784.  configuration directives in 4OS2.INI, and can also be set on the Command Line 
  8785.  1, Command Line 2, Options 1, or Options 2 pages of the OPTION dialogs.  The 
  8786.  name of the corresponding directive is listed with each option below; if none 
  8787.  is listed, that option cannot be set with OPTION or from the .INI file.  You 
  8788.  can also define the SETDOS options in your AUTOEXEC.BAT, 4START, or other 
  8789.  startup file (see Automatic Batch Files), in aliases, or at the command line. 
  8790.  
  8791.  Secondary shells automatically inherit most configuration settings currently 
  8792.  in effect in the previous shell.  If values have been changed by SETDOS since 
  8793.  4OS2 started, the new values will be passed to the secondary shell. 
  8794.  
  8795.  SETDOS /I settings are not inherited by secondary shells.  If you want to use 
  8796.  SETDOS /I- to disable commands in all shells, place the SETDOS command(s) in 
  8797.  your 4START file, which is executed when any shell starts. 
  8798.  
  8799.  Options 
  8800.  
  8801.     /B:     (Bright background) This option determines whether 4OS2 configures 
  8802.             your video adapter for blinking text (/B0, the default) or bright 
  8803.             background colors (/B1), or leave the video bright / blink 
  8804.             configuration unchanged (/B2).  See Colors and Color Names for a 
  8805.             detailed discussion of this option.  Also see the BrightBG 
  8806.             directive. 
  8807.  
  8808.     /C:     (Compound character) This option sets the character used for 
  8809.             separating multiple commands on the same line.  The default is the 
  8810.             ampersand [&].  You cannot use any of the redirection characters (| 
  8811.             > <), or the blank, tab, comma, or equal sign as the command 
  8812.             separator.  The command separator is saved by SETLOCAL and restored 
  8813.             by ENDLOCAL.  This example changes the separator to a tilde [~]: 
  8814.  
  8815.                                 [c:\] setdos /c~
  8816.  
  8817.             If you want to share batch files or aliases among 4DOS, 4OS2, 4NT, 
  8818.             and Take Command, see the %+ variable, which retrieves the current 
  8819.             command separator, and Special Character Compatibility for details 
  8820.             on using compatible command separators for all the products you 
  8821.             use.  Also see the CommandSep directive. 
  8822.  
  8823.     /D:     (Descriptions) This option controls whether file processing 
  8824.             commands like COPY, DEL, MOVE, and REN process file descriptions 
  8825.             along with the files they belong to.  /D1 turns description 
  8826.             processing on, which is the default.  /D0 turns description 
  8827.             processing off.  Also see the Descriptions directive. 
  8828.  
  8829.             You can also use /D to set the name of the hidden file in each 
  8830.             directory that contains file descriptions.  To do so, follow /D 
  8831.             with the filename in quotes: 
  8832.  
  8833.                                 [c:\] setdos /d"files.bbs"
  8834.  
  8835.             Use this option with caution because changing the name of the 
  8836.             description file will make it difficult to transfer file 
  8837.             descriptions to another system.  This option is provided for 
  8838.             bulletin board system operators and others who have special needs. 
  8839.  
  8840.             Also see the DescriptionName directive. 
  8841.  
  8842.     /E:     (Escape character) This option sets the character used to suppress 
  8843.             the normal meaning of the following character.  Any character 
  8844.             following the escape character will be passed unmodified to the 
  8845.             command.  The default escape character is a caret [^].  You cannot 
  8846.             use any of the redirection characters (| > <) or the blank, tab, 
  8847.             comma, or equal sign as the escape character.  The escape character 
  8848.             is saved by SETLOCAL and restored by ENDLOCAL.  Certain characters 
  8849.             (b, c, e, f, k, n, q, r, s, and t) have special meanings when 
  8850.             immediately preceded by the escape character. 
  8851.  
  8852.             If you want to share batch files or aliases among 4DOS, 4OS2, 4NT, 
  8853.             and Take Command, see the %= variable, which retrieves the current 
  8854.             escape character, and Special Character Compatibility for details 
  8855.             on using compatible escape characters for all the products you use. 
  8856.             Also see the EscapeChar directive. 
  8857.  
  8858.     /F:     (Format for @EVAL) This option lets you set default decimal 
  8859.             precision for the @EVAL variable function. The maximum precision is 
  8860.             16 digits to the left of the decimal point and 8 digits to the 
  8861.             right of the decimal point.  The general form of this option is 
  8862.             /Fx.y, where x sets the minimum number of digits to the right of 
  8863.             the decimal place and y sets the maximum number of digits.  You can 
  8864.             use =x,y instead of =x.y if the comma is your decimal separator. 
  8865.             Both values can range from 0 to 8; if x is greater than y, it is 
  8866.             ignored.  You can specify either or both values:  /F2.5, /F2, and 
  8867.             /F.5 are all valid entries. 
  8868.  
  8869.             See @EVAL if you want to set the precision for a single 
  8870.             computation. 
  8871.  
  8872.             Also see the EvalMax and EvalMin directives. 
  8873.  
  8874.     /G:     (Numeric separators) This option sets the decimal and thousands 
  8875.             separator characters.  The format is /Gxy where x is the new 
  8876.             decimal separator and y is the new thousands separator.  Both 
  8877.             characters must be included.  The only valid settings are /G., 
  8878.             (period is the decimal separator, comma is the thousands 
  8879.             separator); /G,. (the reverse); or /G0 to remove any custom setting 
  8880.             and use the default separators associated with your current country 
  8881.             code (this is the default). 
  8882.  
  8883.             The decimal separator is used for @EVAL, numeric IF and IFF tests, 
  8884.             version numbers, and other similar uses.  The thousands separator 
  8885.             is used for numeric output, and is skipped when performing 
  8886.             calculations in @EVAL. 
  8887.  
  8888.     /I:     (Internal) This option allows you to disable or enable internal 
  8889.             commands.  To disable a command, precede the command name with a 
  8890.             minus [-].  To re-enable a command, precede it with a plus [+]. 
  8891.             For example, to disable the internal LIST command to force 4OS2 to 
  8892.             use an external command: 
  8893.  
  8894.                                 [c:\] setdos /i-list
  8895.  
  8896.  
  8897.     /L:     (Line) This option controls how 4OS2 gets its input from the 
  8898.             command line.  /L0 tells 4OS2 to use character input (the default). 
  8899.             /L1 tells it to use line input (like CMD.EXE ).  /L1 will disable 
  8900.             command-line editing, history recall, filename completion, and the 
  8901.             directory history window, and will reduce the 4OS2 input length 
  8902.             limit from 1023 characters to 255 characters.  It should only be 
  8903.             used if it is needed for compatibility with a specific program.  If 
  8904.             you have a program that requires line input, you can use the 
  8905.             following line in an alias or batch file to change the line input 
  8906.             option just for that single program: 
  8907.  
  8908.                                 setdos /L1 & program %& & setdos /L0
  8909.  
  8910.             See README.DOC for information on programs which require this 
  8911.             option.  Also see the LineInput directive. 
  8912.  
  8913.     /M:     (Mode) This option controls the initial line editing mode.  To 
  8914.             start in overstrike mode at the beginning of each command line, use 
  8915.             /M0 (the default).  To start in insert mode, use /M1.  Also see the 
  8916.             EditMode directive. 
  8917.  
  8918.     /N:     (No clobber) This option controls output redirection).  /N0 means 
  8919.             existing files will be overwritten by output redirection (with >) 
  8920.             and that appending (with >>) does not require the file to exist 
  8921.             already.  This is the default.  /N1 means existing files may not be 
  8922.             overwritten by output redirection, and that when appending the 
  8923.             output file must exist.  A /N1 setting can be overridden with the 
  8924.             [!] character.  If you use /N1, you may have problems with a few 
  8925.             unusual programs that shell out to run a command with redirection, 
  8926.             and expect to be able to overwrite an existing file.  Also see the 
  8927.             NoClobber directive. 
  8928.  
  8929.     /P:     (Parameter character) This option sets the character used after a 
  8930.             percent sign to specify all or all remaining command-line arguments 
  8931.             in a batch file or alias (e.g., %& or %n&.  The default is the 
  8932.             dollar sign [$].  The parameter character is saved by SETLOCAL and 
  8933.             restored by ENDLOCAL. 
  8934.  
  8935.             If you want to share batch files or aliases among 4DOS, 4OS2, 4NT, 
  8936.             and Take Command, see Special Character Compatibility for details 
  8937.             on selecting compatible parameter characters for all the products 
  8938.             you use.  Also see the ParameterChar directive. 
  8939.  
  8940.     /R:     (Rows) This option sets the number of screen rows used by the video 
  8941.             display.  Normally 4OS2 detects the screen size, but if you have a 
  8942.             non-standard display you may need to set it explicitly.  This 
  8943.             option does not affect screen scrolling (which is controlled by 
  8944.             your video driver).  It also does not set the screen size; it is 
  8945.             used only to specify the screen height for LIST, SELECT, paged 
  8946.             output options (i.e., TYPE /P), and error checking in the screen 
  8947.             output commands.  Also see the ScreenRows directive. 
  8948.  
  8949.     /S:     (Shape) This option sets the cursor shape.  The format is /So:i 
  8950.             where o is the cursor size for overstrike mode and i is the cursor 
  8951.             size for insert mode.  The size is entered as a percentage of the 
  8952.             total character height.  The default values are 10:100 (a 10% 
  8953.             underscore cursor for overstrike mode, and a 100% block cursor for 
  8954.             insert mode).  Because of the way video drivers remap the cursor 
  8955.             shape, you may not get a smooth progression in the cursor size from 
  8956.             0% - 100%.  To disable the cursor, enter /S0:0. 
  8957.  
  8958.             If either value is -1, 4OS2 will not attempt to modify the cursor 
  8959.             shape at all.  You can use this feature to give another program 
  8960.             full control of the cursor shape.  You can retrieve the current 
  8961.             cursor shape values with the %_CI and %_CO internal variables. 
  8962.  
  8963.             Also see the CursorOver and CursorIns directives. 
  8964.  
  8965.     /U:     (Upper) This option controls the default case (upper or lower) for 
  8966.             file and directory names displayed by internal commands like COPY 
  8967.             and DIR.  /U0 displays file names in lower case (the default).  /U1 
  8968.             displays file names in the traditional upper case.  The /U setting 
  8969.             is ignored for HPFS filenames.  HPFS names are always displayed in 
  8970.             the case in which they are stored. 
  8971.  
  8972.             Also see the UpperCase directive. 
  8973.  
  8974.     /V:     (Verbose) This option controls the default for command echoing in 
  8975.             batch files.  /V0 disables echoing of batch file commands unless 
  8976.             ECHO is explicitly set ON.  /V1, the default setting, enables 
  8977.             echoing of batch file commands unless ECHO is explicitly set OFF. 
  8978.             Also see the BatchEcho directive. 
  8979.  
  8980.             /V2 forces echoing of all batch file commands, even if ECHO is set 
  8981.             OFF or the line begins with an "@".  This allows you to turn 
  8982.             echoing on for a batch file without editing the batch file and 
  8983.             removing the ECHO OFF command(s) within it.  /V2 is intended for 
  8984.             debugging, and can be set with SETDOS, but not with the OPTION 
  8985.             command or the BatchEcho directive in 4OS2.INI. 
  8986.  
  8987.             For more information on batch file debugging see Debugging Batch 
  8988.             Files and /Y below. 
  8989.  
  8990.     /X[+|-]n:(eXpansion and special characters) This option enables and 
  8991.             disables alias and environment variable expansion, and controls 
  8992.             whether special characters have their usual meaning or are treated 
  8993.             as text.  It is most often used in batch files to process text 
  8994.             strings which may contain special characters. 
  8995.  
  8996.             The features enabled or disabled by /X are numbered.  All features 
  8997.             are enabled when 4OS2 starts, and you can re-enable all features at 
  8998.             any time by using /X0.  To disable a particular feature, use /X-n, 
  8999.             where n is the feature number from the list below.  To re-enable 
  9000.             the feature, use /X+n.  To enable or disable multiple individual 
  9001.             features, list their numbers in sequence after the + or - (e.g. 
  9002.             /X-345 to disable features 3, 4, and 5). 
  9003.  
  9004.             The features are: 
  9005.  
  9006.               1          All alias expansion. 
  9007.               2          Nested alias expansion only. 
  9008.               3          All variable expansion (environment variables and 
  9009.                          batch and alias parameters). 
  9010.               4          Nested variable expansion only. 
  9011.               5          Multiple commands, conditional commands, and piping. 
  9012.               6          Redirection. 
  9013.               7          Quoting (double quotes and back quotes) and square 
  9014.                          brackets. 
  9015.               8          Escape character. 
  9016.  
  9017.             If nested alias expansion is disabled, the first alias of a command 
  9018.             is expanded but any aliases it invokes are not expanded.  If nested 
  9019.             variable expansion is disabled, each variable is expanded once, but 
  9020.             variables containing the names of other variables are not expanded 
  9021.             further. 
  9022.  
  9023.             For example, to disable all features except alias expansion while 
  9024.             you are processing a text file containing special characters: 
  9025.  
  9026.                                 setdos /x-35678
  9027.                                 ... [perform text processing here]
  9028.                                 setdos /x0
  9029.  
  9030.  
  9031.     /Y:     (debug batch file) /Y1 enables the built-in batch file debugger. 
  9032.             The debuggger allows you to "single-step" through a batch file line 
  9033.             by line, with the file displayed in a popup window as it executes. 
  9034.             For complete details on using the debugger see Debugging Batch 
  9035.             Files (this topic also covers additional debugging techniques which 
  9036.             do not require stepping through each line individually). 
  9037.  
  9038.             To start the debugger, insert a SETDOS /Y1 command at the beginning 
  9039.             of the portion of the batch file you want to debug, and a SETDOS 
  9040.             /Y0 command at the end. 
  9041.  
  9042.             You cannot use the batch debugger with REXX files or EXTPROC files. 
  9043.             It can only be used with normal 4OS2 batch files. 
  9044.  
  9045.             You can also invoke SETDOS /Y1 from the prompt, but because the 
  9046.             debugger is automatically turned off whenever the command processor 
  9047.             returns to the prompt, you must enter the SETDOS command and the 
  9048.             batch file name on the same line.  For example: 
  9049.  
  9050.                                 [c:\] setdos /y1 & mybatch.btm
  9051.  
  9052.  
  9053. ΓòÉΓòÉΓòÉ 6.72. SETLOCAL - Save the environment ΓòÉΓòÉΓòÉ
  9054.  
  9055.  Purpose:    Save a copy of the current disk drive, directory, environment, 
  9056.              alias list, and special characters. 
  9057.  
  9058.  Format:     SETLOCAL 
  9059.  
  9060.  See also:  ENDLOCAL. 
  9061.  
  9062.  Usage 
  9063.  
  9064.  SETLOCAL is used in batch files to save the default disk drive and directory, 
  9065.  the environment, the alias list, and the command separator, escape character, 
  9066.  parameter character, decimal separator, and thousands separator.  You can then 
  9067.  change their values and later restore the original values with ENDLOCAL. 
  9068.  
  9069.  For example, this batch file fragment saves everything, removes all aliases so 
  9070.  that user aliases will not affect batch file commands, changes the disk and 
  9071.  directory, changes the command separator, runs a program, and then restores 
  9072.  the original values: 
  9073.  
  9074.           setlocal
  9075.           unalias *
  9076.           cdd d:\test
  9077.           setdos /c~
  9078.           program ~ echo Done!
  9079.           endlocal
  9080.  
  9081.  SETLOCAL and ENDLOCAL are not nestable within a batch file.  However, you can 
  9082.  have multiple, separate SETLOCAL / ENDLOCAL pairs within a batch file, and 
  9083.  nested batch files can each have their own SETLOCAL / ENDLOCAL.  You cannot 
  9084.  use SETLOCAL in an alias or at the command line. 
  9085.  
  9086.  An ENDLOCAL is performed automatically at the end of a batch file if you 
  9087.  forget to do so.  If you invoke one batch file from another without using 
  9088.  CALL, the first batch file is terminated, and an automatic ENDLOCAL is 
  9089.  performed; the second batch file inherits the settings as they were prior to 
  9090.  any SETLOCAL. 
  9091.  
  9092.  
  9093. ΓòÉΓòÉΓòÉ 6.73. SHIFT - Shift batch file parameters ΓòÉΓòÉΓòÉ
  9094.  
  9095.  Purpose:    Allows the use of more than 127 parameters in a batch file. 
  9096.  
  9097.  Format:     SHIFT [n | /n ] 
  9098.  
  9099.              n :  Number of positions to shift. 
  9100.  
  9101.  Usage 
  9102.  
  9103.  SHIFT is provided for compatibility with older batch files, where it was used 
  9104.  to access more than 10 parameters.  4OS2 supports 128 parameters (%0 to %127), 
  9105.  so you may not need to use SHIFT for batch files running exclusively under JP 
  9106.  Software command processors. 
  9107.  
  9108.  SHIFT moves each of the batch file parameters n positions to the left.  The 
  9109.  default value for n is 1.  SHIFT 1 moves the parameter in %1 to position %0, 
  9110.  the parameter in %2 becomes %1, etc.  You can reverse a SHIFT by giving a 
  9111.  negative value for n (i.e., after SHIFT -1, the former %0 is restored, %0 
  9112.  becomes %1, %1 becomes %2, etc.). 
  9113.  
  9114.  SHIFT also affects the parameters %n$. (command-line tail) and %# (number of 
  9115.  command arguments). 
  9116.  
  9117.  For example, create a batch file called TEST.BAT: 
  9118.  
  9119.           echo %1 %2 %3 %4
  9120.           shift
  9121.           echo %1 %2 %3 %4
  9122.           shift 2
  9123.           echo %1 %2 %3 %4
  9124.           shift -1
  9125.           echo %1 %2 %3 %4
  9126.  
  9127.  Executing TEST.BAT produces the following results: 
  9128.  
  9129.           [c:\] test one two three four five six seven
  9130.           one two three four
  9131.           two three four five
  9132.           four five six seven
  9133.           three four five six
  9134.  
  9135.  If you add a slash before the value n, the value determines the postion at 
  9136.  which to begin the shift.  For example: 
  9137.  
  9138.           shift /2
  9139.  
  9140.  leaves parameters %0 and %1 unchanged, and moves the value of %3 to postion 
  9141.  %2, %4 to %3, etc.  The value after the slash cannot be negative, and shifts 
  9142.  performed with the slash cannot be undone later in the batch file. 
  9143.  
  9144.  
  9145. ΓòÉΓòÉΓòÉ 6.74. SHRALIAS - Load or unload SHRALIAS.EXE ΓòÉΓòÉΓòÉ
  9146.  
  9147.  Purpose:    Retains global command history, directory history, and alias lists 
  9148.              in memory when the command processor is not running. 
  9149.  
  9150.  Format:     SHRALIAS [/U] 
  9151.  
  9152.              /U(nload) 
  9153.  
  9154.  Usage 
  9155.  
  9156.  When you close all 4OS2 sessions, the memory for the global command history, 
  9157.  global directory history, and global alias list is released.  If you want the 
  9158.  lists to be retained in memory even when no command processor session is 
  9159.  running, you need to execute SHRALIAS. 
  9160.  
  9161.  The SHRALIAS command starts and initializes SHRALIAS.EXE, a small program 
  9162.  which remains active and retains global lists when 4OS2 is not running.  In 
  9163.  order to start the program, SHRALIAS must be able to find SHRALIAS.EXE either 
  9164.  in the same directory as 4OS2, or in a directory in your PATH.  You cannot run 
  9165.  SHRALIAS.EXE directly, it must be run by the SHRALIAS command. 
  9166.  
  9167.  Once SHRALIAS has been executed, the global lists will be retained in memory 
  9168.  until you use SHRALIAS /U to unload the lists, or until you shut down your 
  9169.  operating system. 
  9170.  
  9171.  SHRALIAS will not work unless you have at least one copy of 4OS2 running with 
  9172.  global alias, command history, and directory history lists enabled.  If the 
  9173.  required global lists are not found, SHRALIAS will display an error. 
  9174.  
  9175.  If you start SHRALIAS from a temporary 4OS2 session which exits after starting 
  9176.  SHRALIAS (for example, by executing SHRALIAS in your OS/2 STARTUP.CMD file), 
  9177.  the command processor session may terminate and discard the shared lists 
  9178.  before SHRALIAS can attach to them.  In this case SHRALIAS.EXE will not be 
  9179.  loaded.  If you experience this problem, add a short delay with the DELAY 
  9180.  command after SHRALIAS is loaded and before your session exits. 
  9181.  
  9182.  For more information about global history and alias lists, see Local and 
  9183.  Global Command History under Command History and Recall, Local and Global 
  9184.  Directory History, and Local and Global Aliases under the ALIAS command. 
  9185.  
  9186.  Options 
  9187.  
  9188.     /U:     (Unload) Shuts down SHRALIAS.EXE.  If SHRALIAS is not loaded again, 
  9189.             the memory used by global command history, directory history, and 
  9190.             alias lists will be released when the last copy of 4OS2 exits. 
  9191.  
  9192.  
  9193. ΓòÉΓòÉΓòÉ 6.75. START - Start a program in another session ΓòÉΓòÉΓòÉ
  9194.  
  9195.  Purpose:    Start a program in another session or window. 
  9196.  
  9197.  Format:     START ["program title "] [/B[G] /C /DOS[=optfile ] /F[G] /FS /I 
  9198.              /ICON=iconfile /INV /K /L /LA /LD /LH /MAX /MIN /N /PGM progname 
  9199.              /PM /POS=x,y,width,height /WAIT /WIN /WIN3[=optfile ] 
  9200.              /WIN3S[=optfile ]] [command ] 
  9201.  
  9202.              program title :  Title to appear on title bar. 
  9203.              optfile :  Option settings file. 
  9204.              iconfile :  Name of icon (.ICO ) file. 
  9205.              progname :  Program name (not the session name). 
  9206.              path :  Startup directory. 
  9207.              command :  Command to be executed. 
  9208.  
  9209.              /B[G] (background session)      /LH (local history list) 
  9210.              /C(lose when done)              /MAX(imized) 
  9211.              /DOS (DOS session)              /MIN(imized) 
  9212.              /F[G] (foreground session)      /N(o command processor) 
  9213.              /FS (full screen)               /PGM (program name) 
  9214.              /I(nherit environment)          /PM (PM application) 
  9215.              /ICON (.ICO file)               /POS(ition of window) 
  9216.              /INV(isible)                    /WAIT (for session to finish) 
  9217.              /K(eep when done)               /WIN(dowed session) 
  9218.              /L(ocal lists)                  /WIN3 (Windows enhanced mode) 
  9219.              /LA (local aliases)             /WIN3S (Windows standard mode) 
  9220.              /LD (local dir history) 
  9221.  
  9222.  See also:  DETACH. 
  9223.  
  9224.  Usage 
  9225.  
  9226.  START is used to begin a new OS/2 session, and optionally run a program in 
  9227.  that session.  If you use START with no parameters, it will begin a new 
  9228.  command-line session.  If you add a command, START will begin a new session or 
  9229.  window and execute that command. 
  9230.  
  9231.  The program title, if it is included, will appear on the title bar, and on the 
  9232.  Presentation Manager window list.  The program title must be enclosed in 
  9233.  quotation marks and cannot exceed 60 characters.  If the program title is 
  9234.  omitted, the program name will be used as the title. 
  9235.  
  9236.  START always assumes that the first quoted string on the command line is the 
  9237.  program title; if there is a second quoted string it is assumed to be the 
  9238.  command.  As a result, if the name of the program you are starting is a long 
  9239.  filename containing whitespace (and must therefore be quoted), you cannot 
  9240.  simply place it on the command line.  If you do, as the first quoted string it 
  9241.  will be interpreted as the program title, not the command.  To address this, 
  9242.  use the /PGM switch to indicate explicitly that the quoted string is the 
  9243.  program name, or include a title before the program name.  For example, to 
  9244.  start the program "C:\Program Files\Proc.Exe" you could use either of the 
  9245.  first two commands below, but the third command would not work: 
  9246.  
  9247.           [c:\] start /PGM "C:\Program Files\Proc.Exe"
  9248.           [c:\] start "test" "C:\Program Files\Proc.Exe"
  9249.           [c:\] start "C:\Program Files\Proc.Exe"
  9250.  
  9251.  START offers a large number of switches to control the session you start.  In 
  9252.  most cases you need only a few switches to accomplish what you want.  The list 
  9253.  below summarizes the most commonly used START options, and how you can use 
  9254.  them to control the way a session is started: 
  9255.  
  9256.         /MAX, /MIN, and /POS allow you to start a character-mode windowed 
  9257.         session in a maximized window, a minimized window, or a window with a 
  9258.         specified position and size.  The default is to let the operating 
  9259.         environment choose the position and size of the window. 
  9260.  
  9261.         /C allows you to close the session when the command is finished (the 
  9262.         default for DOS and OS/2 Presentation Manager sessions); /K allows you 
  9263.         to keep the session open and go to a prompt (the default for OS/2 
  9264.         character mode sessions). 
  9265.  
  9266.         /BG and /FG allow you to start the session in the background(does not 
  9267.         respond to keystrokes until selected) or foreground (responds to 
  9268.         keystrokes until deselected).  /FG is the default if /DOS, /FS, /WIN, 
  9269.         or /PM is used; otherwise, /BG is the default. 
  9270.  
  9271.         /FS and /WIN control whether a character-mode session is started in 
  9272.         full-screen or windowed mode.  The default is to start a session of the 
  9273.         same type as the current session, if the application can be run in such 
  9274.         a session. 
  9275.  
  9276.  START determines the application type automatically and starts the session in 
  9277.  the appropriate mode. 
  9278.  
  9279.  START gives you some flexibility in determining the session mode. For example, 
  9280.  if the command is the name of a batch file (either a .BTM or .CMD file), you 
  9281.  can use the /FS or /WIN options to run the batch file as part of a new session 
  9282.  in either full-screen or windowed mode. 
  9283.  
  9284.  However, you cannot start a session in a mode that is inappropriate for the 
  9285.  application type.  A DOS application cannot be run as part of a Presentation 
  9286.  Manager session, for example, even if you use the /PM switch.  Invalid or 
  9287.  conflicting options will be ignored. 4OS2 will always attempt to run the 
  9288.  command in the appropriate type of session. 
  9289.  
  9290.  If the program is a DOS application or .BAT file, 4OS2 will start a new DOS 
  9291.  session to run it.  The DOS session will close itself automatically as soon as 
  9292.  the program or batch file ends, unless /K is used.  If you want the session to 
  9293.  wait for a keystroke before it closes itself, you can use this syntax 
  9294.  (assuming 4DOS is your command processor for OS/2 DOS sessions: 
  9295.  
  9296.           [c:\] start /DOS command ^^ pause
  9297.  
  9298.  (Because the caret [^] is the default 4OS2 escape character, two carets must 
  9299.  be used in order to pass one on to 4DOS as a command separator.) 
  9300.  
  9301.  If you want to start a DOS command-line session in OS/2, you can use the 
  9302.  command: 
  9303.  
  9304.           [c:\] start /DOS
  9305.  
  9306.  You can specify settings for DOS and Windows sessions by using a settings 
  9307.  options file, and loading it with the /DOS=, /WIN3=, or /WIN3S= option.  This 
  9308.  allows you to start DOS and Windows sessions with specific settings without 
  9309.  creating a desktop object and modifying the settings manually.  Before using 
  9310.  this capability you should read the description of it under /DOS= (below) very 
  9311.  carefully, since errors in the settings file can occasionally hang your 
  9312.  system. 
  9313.  
  9314.  Options 
  9315.  
  9316.     /BG:        (BackGround session) The session is started as a background 
  9317.                 session.  /BG may be abbreviated to /B. 
  9318.  
  9319.     /C:         (Close) The session or window is closed when the application 
  9320.                 ends. 
  9321.  
  9322.     /DOS[=filename]:(DOS session) Start a DOS session. 
  9323.  
  9324.                 If you include the =filename, OS/2 will load DOS settings from 
  9325.                 the specified file.  When you use /DOS you can also alter the 
  9326.                 DOS settings for a session with environment variables of the 
  9327.                 form DosSetting.name=value, without using a settings file. 
  9328.  
  9329.                 Starting a session with specific DOS settings is an 
  9330.                 undocumented feature which was implemented within OS/2 with 
  9331.                 little error checking.  It is included in START because it 
  9332.                 substantially eases a complex task, but you must experiment 
  9333.                 carefully to ensure that the settings you select will work 
  9334.                 properly on the systems on which you plan to use them. 
  9335.                 Incorrect settings may be ignored, but they may also hang your 
  9336.                 session or stop the entire system.  Be sure your experiments 
  9337.                 are not conducted while critical tasks are in process. 
  9338.  
  9339.                 Each line in the file must have a name, an equal sign [=], and 
  9340.                 a value.  The names are those shown in OS/2's DOS Settings 
  9341.                 dialog box.  Do not use spaces on either side of the equal 
  9342.                 sign. 
  9343.  
  9344.                 The names in the DOS Settings dialog box will vary depending on 
  9345.                 the device drivers and other settings in your CONFIG.SYS file, 
  9346.                 though many are available on all systems.  You must ensure that 
  9347.                 the names you use are valid for the systems on which you use 
  9348.                 them.  For example, if you replace IBM's COM.SYS and VCOM.SYS 
  9349.                 with different communications drivers, the COM_ settings will 
  9350.                 probably not be valid for the new drivers.  If you have a 
  9351.                 settings file which contains settings defined by a particular 
  9352.                 driver, and use it on a system where the corresponding driver 
  9353.                 is not loaded, the results are undefined. 
  9354.  
  9355.                 The values in your settings file must be numeric for settings 
  9356.                 which show a numeric value under DOS Settings (e.g., 
  9357.                 DOS_FILES=30), and must be text strings for settings shown with 
  9358.                 a string (e.g., DOS_SHELL=C:\4DOS.COM C:\4DOS /P).  Strings 
  9359.                 should be entered without trailing blanks.  For values shown as 
  9360.                 multiple choice on the DOS Settings page you must specify a 
  9361.                 numeric value, typically 0 for Off and 1 for On (e.g., 
  9362.                 DOS_HIGH=1).  Items with choices other than Off and On may use 
  9363.                 different values, or may not work at all; experimentation is 
  9364.                 usually required to find out what works.  Attempting to use 
  9365.                 strings for choice items (e.g., DOS_HIGH=ON) will not work, and 
  9366.                 can hang your system.  This is due to the internal operation of 
  9367.                 OS/2, and is not a problem in 4OS2. 
  9368.  
  9369.                 A typical DOS settings file might look like this: 
  9370.  
  9371.                                         DOS_FILES=30
  9372.                                         DOS_HIGH=1
  9373.                                         DOS_SHELL=C:\4DOS\4DOS.COM C:\4DOS /P
  9374.                                         MOUSE_EXCLUSIVE_ACCESS=0
  9375.                                         VIDEO_FASTPASTE=1
  9376.  
  9377.                 You can include comments in a settings file by beginning any 
  9378.                 line with a colon [:]. 
  9379.  
  9380.                 When you use /DOS you can also alter the DOS settings for a 
  9381.                 session with environment variables, without using a DOS 
  9382.                 settings file.  When the =filename portion of the switch is not 
  9383.                 used, OS/2 will scan the environment looking for variables of 
  9384.                 the form DosSetting.name=value.  Each such variable entry will 
  9385.                 be used to set the DOS setting with the specified name to the 
  9386.                 specified value.  All of the cautions and restrictions given 
  9387.                 above for settings stored in a file apply equally to settings 
  9388.                 stored in environment variables. 
  9389.  
  9390.                 Settings stored in environment variables are "global" and apply 
  9391.                 to all sessions started with START /DOS, except when an 
  9392.                 explicit settings file is specified with =filename. 
  9393.  
  9394.     /FG:        (ForeGround session) Start the session as the foreground 
  9395.                 session.  /FG may be abbreviated to /F. 
  9396.  
  9397.     /FS:        (Full Screen) Start the session as a full-screen session. 
  9398.  
  9399.     /I:         (Inherit environment) Inherit the default environment specified 
  9400.                 in CONFIG.SYS, if any, rather than the current environment. 
  9401.  
  9402.     /ICON=filename :Use the specified icon file.  If you don't use /ICON, the 
  9403.                 displayed icon will be the one found or assigned by OS/2. 
  9404.  
  9405.     /INV:       (Invisible) Start the session or window as invisible.  No icon 
  9406.                 will appear and the session will only be accessible through the 
  9407.                 Task Manager or Window List. 
  9408.  
  9409.     /K:         (Keep session or window at end) The session or window continues 
  9410.                 after the application program ends.  Use the EXIT command to 
  9411.                 end the session. 
  9412.  
  9413.     /L:         (Local lists) Start 4OS2 with local alias, history, and 
  9414.                 directory history lists.  This option combines the effects of 
  9415.                 /LA, /LD, and /LH (below). 
  9416.  
  9417.     /LA:        (Local Alias list) Start 4OS2 with a local alias list.See ALIAS 
  9418.                 for information on local and global aliases. 
  9419.  
  9420.     /LD:        (Local Directory history) Start 4OS2 with a local directory 
  9421.                 history list.  See Local and Global Directory History for more 
  9422.                 information. 
  9423.  
  9424.     /LH:        (Local History list) Start 4OS2 with a local history list. See 
  9425.                 Command History and Recall for information on local and global 
  9426.                 history lists. 
  9427.  
  9428.     /MAX:       (Maximized) Start the session or window maximized. 
  9429.  
  9430.     /MIN:       (Minimized) Start the session or window minimized. 
  9431.  
  9432.     /N:         (No command processor) Start an OS/2 program directly, without 
  9433.                 a command processor.  The command cannot be an internal command 
  9434.                 or batch file.  This is the default for PM applications. 
  9435.  
  9436.     /PGM:       (Program name) The string following this option is the program 
  9437.                 name.  If you do not use /PGM, the first quoted string on the 
  9438.                 line will be used as the session and task list title, and not 
  9439.                 as the program name. 
  9440.  
  9441.     /PM:        (Presentation Manager) Start a program in the Presentation 
  9442.                 Manager session. 
  9443.  
  9444.     /POS:       (Position) Start the window at the specified screen position. 
  9445.                 The syntax is /POS=x, y, width, height where the values are 
  9446.                 specified in pixels or pels.  x and y refer to the position of 
  9447.                 the top left corner of the window relative to the bottom left 
  9448.                 corner of the screen. 
  9449.  
  9450.     /WAIT:      Wait for the new session or window to finish before continuing. 
  9451.                 Cannot be used with /WIN3 or /WIN3S. 
  9452.  
  9453.     /WIN:       (Windowed) Start the session in a window. 
  9454.  
  9455.     /WIN3[=filename]:(Windows enhanced mode) Run the program in an 
  9456.                 enhanced-mode Windows 3.x session.  The session will run 
  9457.                 seamless (on the OS/2 desktop).  To start a Windows application 
  9458.                 in full-screen mode, use /FS rather than /WIN3.  You can 
  9459.                 include an equal sign and the name of an options file to set 
  9460.                 options for the specific session and application (see /DOS= 
  9461.                 above for details). 
  9462.  
  9463.     /WIN3S[=filename]:(Windows standard mode) Equivalent to /WIN3, but runs the 
  9464.                 program in standard mode rather than enhanced mode. 
  9465.  
  9466.  
  9467. ΓòÉΓòÉΓòÉ 6.76. SWITCH - Select commands based on a value ΓòÉΓòÉΓòÉ
  9468.  
  9469.  Purpose:    Select commands to execute based on a value. 
  9470.  
  9471.  Format:     SWITCH expression 
  9472.              CASE value1 [.OR. value2 ] ... 
  9473.                 commands 
  9474.              CASE value3 
  9475.                 commands 
  9476.              DEFAULT 
  9477.                 commands ] 
  9478.              ENDSWITCH 
  9479.  
  9480.              expression :  An environment variable, internal variable, variable 
  9481.              function, text string, or a combination of these elements, that is 
  9482.              used to select a group of commands. 
  9483.              value1, value2, etc. :  A value to test, or multiple values 
  9484.              connected with .OR. 
  9485.              commands :  One or more commands to execute if the expression 
  9486.              matches the value.  If you use multiple commands, they must be 
  9487.              separated by command separators or placed on separate lines. 
  9488.  
  9489.  See also:  IF and IFF. 
  9490.  
  9491.  Usage 
  9492.  
  9493.  SWITCH can only be used in batch files.  It allows you to select a command or 
  9494.  group of commands to execute based on the possible values of a variable or a 
  9495.  combination of variables and text. 
  9496.  
  9497.  The SWITCH command is always followed by an expression created from 
  9498.  environment variables, internal variables, variable functions, and text 
  9499.  strings, and then by a sequence of CASE statements matching the possible 
  9500.  values of the expression.  If one of the values in a CASE statement matches 
  9501.  the expression, the commands following that CASE statement are executed, and 
  9502.  all subsequent CASE statements and the commands which follow them are ignored. 
  9503.  If no matches are found, the commands following the optional DEFAULT statement 
  9504.  are executed.  If there are no matches and there is no DEFAULT statement, no 
  9505.  commands are executed by SWITCH. 
  9506.  
  9507.  After all of the commands following the CASE or DEFAULT statement are 
  9508.  executed, the batch file continues with the commands that follow ENDSWITCH. 
  9509.  
  9510.  You must include a command separator or new line after the expression, before 
  9511.  each CASE or DEFAULT statement, before each command, and before ENDSWITCH. 
  9512.  You can link values in a CASE statement with .OR. (but not with .AND. or 
  9513.  .XOR.). 
  9514.  
  9515.  For example, the following batch file fragment displays one message if the 
  9516.  user presses A, another if user presses B or C, and a third if the user 
  9517.  presses any other key: 
  9518.  
  9519.           inkey Enter a keystroke: %%key
  9520.           switch %key
  9521.           case A
  9522.              echo It's an A
  9523.           case B .or. C
  9524.              echo It's either B or C
  9525.           default
  9526.              echo It's not A, B, or C
  9527.           endswitch
  9528.  
  9529.  In the example above, the value of a single environment variable was used for 
  9530.  the expression.  You will probably find that this is the best method to use in 
  9531.  most situations.  However, you can use other kinds of expressions if 
  9532.  necessary.  The first example below selects a command to execute based on the 
  9533.  length of a variable, and the second bases the action on a quoted text string 
  9534.  stored in an environment variable: 
  9535.  
  9536.           switch %@len[%var1]
  9537.           case 0
  9538.              echo Missing var1
  9539.           case 1
  9540.              echo Single character
  9541.           ...
  9542.           endswitch
  9543.  
  9544.           switch "%string1"
  9545.           case "This is a test"
  9546.              echo Test string
  9547.           case "The quick brown fox"
  9548.              echo It's the fox
  9549.           ...
  9550.           endswitch
  9551.  
  9552.  The SWITCH and ENDSWITCH commands must be on separate lines, and cannot be 
  9553.  placed within a command group, or on the same line as other commands (this is 
  9554.  the reason SWITCH cannot be used in aliases).  However, commands within the 
  9555.  SWITCH block can use command groups or the command separator in the normal 
  9556.  way. 
  9557.  
  9558.  SWITCH commands can be nested.  You can exit from all SWITCH / ENDSWITCH 
  9559.  processing by using GOTO to a line past the last ENDSWITCH. 
  9560.  
  9561.  
  9562. ΓòÉΓòÉΓòÉ 6.77. TEE - "Tee" pipe fitting ΓòÉΓòÉΓòÉ
  9563.  
  9564.  Purpose:    Copy standard input to both standard output and a file. 
  9565.  
  9566.  Format:     TEE [/A] file ... 
  9567.  
  9568.              file :  One or more files that will receive the "tee-d" output. 
  9569.  
  9570.              /A(ppend) 
  9571.  
  9572.  See also:  Y and the redirection options. 
  9573.  
  9574.  Usage 
  9575.  
  9576.  TEE is normally used to "split" the output of a program so that you can see it 
  9577.  on the display and also save it in a file.  It can also be used to capture 
  9578.  intermediate output before the data is altered by another program or command. 
  9579.  
  9580.  TEE gets its input from standard input (usually the piped output of another 
  9581.  command or program), and sends out two copies:  one goes to standard output, 
  9582.  the other to the file or files that you specify.  TEE is not likely to be 
  9583.  useful with programs which do not use standard output, because these programs 
  9584.  cannot send output through a pipe. 
  9585.  
  9586.  For example, to search the file DOC for any lines containing the string 
  9587.  "4OS2", make a copy of the matching lines in 4.DAT, sort the lines, and write 
  9588.  them to the output file 4O.DAT : 
  9589.  
  9590.           [c:\] find "4OS2" doc | tee 4.dat | sort > 4o.dat
  9591.  
  9592.  If you are typing at the keyboard to produce the input for TEE, you must enter 
  9593.  a Ctrl-Z to terminate the input. 
  9594.  
  9595.  When using TEE with a pipe under 4OS2, the programs on the two ends of the 
  9596.  pipe run simultaneously, not sequentially as in 4DOS. 
  9597.  
  9598.  See Piping for more information on pipes. 
  9599.  
  9600.  Options 
  9601.  
  9602.     /A:     (Append) Append the output to the file(s) rather than overwriting 
  9603.             them. 
  9604.  
  9605.  
  9606. ΓòÉΓòÉΓòÉ 6.78. TEXT - Display text in a batch file ΓòÉΓòÉΓòÉ
  9607.  
  9608.  Purpose:    Display a block of text in a batch file. 
  9609.  
  9610.  Format:     TEXT 
  9611.                 . 
  9612.                 . 
  9613.                 . 
  9614.              ENDTEXT 
  9615.  
  9616.  See also:  ECHO, SCREEN, SCRPUT, and VSCRPUT. 
  9617.  
  9618.  Usage 
  9619.  
  9620.  TEXT can only be used in batch files. 
  9621.  
  9622.  The TEXT command is useful for displaying menus or multi-line messages.  TEXT 
  9623.  will display all subsequent lines in the batch file until terminated by 
  9624.  ENDTEXT.  Both TEXT and ENDTEXT must be entered as the only command on the 
  9625.  line. 
  9626.  
  9627.  To redirect the entire block of text, use redirection on the TEXT command 
  9628.  itself, but not on the actual text lines or the ENDTEXT line.  No environment 
  9629.  variable expansion or other processing is performed on the lines between TEXT 
  9630.  and ENDTEXT; they are displayed exactly as they are stored in the batch file. 
  9631.  
  9632.  You can change screen colors by inserting ANSI escape sequences anywhere in 
  9633.  the text block.  You can also use a CLS or COLOR command to set the screen 
  9634.  color before executing the TEXT command. 
  9635.  
  9636.  The following batch file fragment displays a simple menu: 
  9637.  
  9638.           @echo off & cls
  9639.           screen 2 0
  9640.           text
  9641.           Enter one of the following:
  9642.              1 - Spreadsheet
  9643.              2 - Word Processing
  9644.              3 - Utilities
  9645.              4 - Exit
  9646.           endtext
  9647.           inkey /k"1243" Enter your selection:  %%key
  9648.  
  9649.  
  9650. ΓòÉΓòÉΓòÉ 6.79. TIME - Set the system time ΓòÉΓòÉΓòÉ
  9651.  
  9652.  Purpose:    Display or set the current system time. 
  9653.  
  9654.  Format:     TIME [hh [:mm [:ss ]]] [AM | PM] 
  9655.  
  9656.              hh :  The hour (0 - 23). 
  9657.              mm :  The minute (0 - 59). 
  9658.              ss :  The second (0 - 59). 
  9659.  
  9660.  See also:  DATE. 
  9661.  
  9662.  Usage 
  9663.  
  9664.  If you don't enter any parameters, TIME will display the current system time 
  9665.  and prompt you for a new time.  Press Enter if you don't wish to change the 
  9666.  time; otherwise, enter the new time: 
  9667.  
  9668.           [c:\] time
  9669.           Mon  Dec 22, 1997  9:30:06
  9670.           New time (hh:mm:ss):
  9671.  
  9672.  TIME defaults to 24-hour format, but you can optionally enter the time in 
  9673.  12-hour format by appending "a", "am", "p", or "pm" to the time you enter. 
  9674.  
  9675.  For example, to enter the time as 9:30 am: 
  9676.  
  9677.           [c:\] time 9:30 am
  9678.  
  9679.  OS/2 adds the system time and date to the directory entry for every file you 
  9680.  create or modify.  If you keep both the time and date accurate, you will have 
  9681.  a record of when you last updated each file. 
  9682.  
  9683.  
  9684. ΓòÉΓòÉΓòÉ 6.80. TIMER - Start or stop a stopwatch ΓòÉΓòÉΓòÉ
  9685.  
  9686.  Purpose:    TIMER is a system stopwatch. 
  9687.  
  9688.  Format:     TIMER [ON] [/1 /2 /3 /S] 
  9689.  
  9690.              ON :  Force the stopwatch to restart. 
  9691.  
  9692.              /1 (stopwatch #1)               /3 (stopwatch #3) 
  9693.              /2 (stopwatch #2)               /S(plit) 
  9694.  
  9695.  Usage 
  9696.  
  9697.  The TIMER command turns a system stopwatch on and off.  When you first run 
  9698.  TIMER, the stopwatch starts: 
  9699.  
  9700.           [c:\] timer
  9701.           Timer 1 on:  12:21:46
  9702.  
  9703.  When you run TIMER again, the stopwatch stops and the elapsed time is 
  9704.  displayed: 
  9705.  
  9706.           [c:\] timer
  9707.           Timer 1 off:  12:21:58   Elapsed time: 0:00:12.06
  9708.  
  9709.  There are three stopwatches available (1, 2, and 3) so you can time multiple 
  9710.  overlapping events.  By default, TIMER uses stopwatch #1. 
  9711.  
  9712.  The smallest interval TIMER can measure depends on the operating system you 
  9713.  are using, your hardware, and the interaction between the two.  However, it 
  9714.  should never be greater than .06 second.  The largest interval is 23 hours, 59 
  9715.  minutes, 59.99 seconds. 
  9716.  
  9717.  Options 
  9718.  
  9719.     /1:     Use timer #1 (the default). 
  9720.  
  9721.     /2:     Use timer #2. 
  9722.  
  9723.     /3:     Use timer #3. 
  9724.  
  9725.     /S:     (Split) Display a split time without stopping the timer.  To 
  9726.             display the current elapsed time but leave the timer running: 
  9727.  
  9728.                                 [c:\] timer /s
  9729.                                 Timer 1 elapsed: 0:06:40.63
  9730.  
  9731.     ON:     Start the timer regardless of its previous state (on or off). 
  9732.             Otherwise the TIMER command toggles the timer state (unless /S is 
  9733.             used). 
  9734.  
  9735.  
  9736. ΓòÉΓòÉΓòÉ 6.81. TITLE - Window title ΓòÉΓòÉΓòÉ
  9737.  
  9738.  Purpose:    Change the window title. 
  9739.  
  9740.  Format:     TITLE title 
  9741.  
  9742.              title :  The new window title. 
  9743.  
  9744.  See also:  ACTIVATE and WINDOW. 
  9745.  
  9746.  Usage 
  9747.  
  9748.  TITLE changes the text that appears in the caption bar at the top of the 4OS2 
  9749.  window. 
  9750.  
  9751.  The title text should not be enclosed in quotes unless you want the quotes to 
  9752.  appear as part of the actual title. 
  9753.  
  9754.  To change the title of the current window to "JP Software / 4OS2": 
  9755.  
  9756.           [c:\] title JP Software / 4OS2
  9757.  
  9758.  
  9759. ΓòÉΓòÉΓòÉ 6.82. TOUCH - Change date and time stamps ΓòÉΓòÉΓòÉ
  9760.  
  9761.  Purpose:    Change a file's date and time stamps. 
  9762.  
  9763.  Format:     TOUCH [/C /D[acw][mm-dd-yy] /E /F /Q /T[acw][hh:mm] file ... 
  9764.  
  9765.              file :  One or more files whose date and/or time stamps are to be 
  9766.              changed. 
  9767.  
  9768.              /C(reate file)                  /F(orce read-only files) 
  9769.              /D(ate)                         /Q(uiet) 
  9770.              /E (no Error messages)          /T(ime) 
  9771.  
  9772.  See also:  LIST. 
  9773.  
  9774.  File Selection 
  9775.  
  9776.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9777.  
  9778.  Usage 
  9779.  
  9780.  TOUCH is used to change the date and/or time of a file.  You can use it to be 
  9781.  sure that particular files are included or excluded from an internal command, 
  9782.  backup program, compiler MAKE utility, or other program that selects files 
  9783.  based on their time and date stamps, or to set a group of files to the same 
  9784.  date and time for consistency. 
  9785.  
  9786.  TOUCH should be used with caution, and in most cases should only be used on 
  9787.  files you create.  Many programs depend on file dates and times to perform 
  9788.  their work properly.  In addition, many software manufacturers use file dates 
  9789.  and times to signify version numbers.  Indiscriminate changes to date and time 
  9790.  stamps can lead to confusion or incorrect behavior of other software. 
  9791.  
  9792.  TOUCH normally works with existing files, and will display an error if the 
  9793.  file you specify does not exist, or has the read-only attribute set.  To 
  9794.  create the file if it does not already exist, use the /C switch.  To force a 
  9795.  date and time change for read-only files, use the /F switch. 
  9796.  
  9797.  TOUCH displays the date, time, and full name of each file whose timestamp is 
  9798.  modified.  To disable this output, use /Q. 
  9799.  
  9800.  If you don't specify a date or a time, TOUCH will default to the current date 
  9801.  and time from your system clock.  For example, to set the time stamp of all .C 
  9802.  files in the current directory to the current date and time: 
  9803.  
  9804.           [d:\source] touch *.c
  9805.            6-12-97 11:13:58  D:\SOURCE\MAIN.C
  9806.            6-12-97 11:13:58  D:\SOURCE\INIT.C
  9807.            ...
  9808.  
  9809.  If you specify a date but not a time, the time will default to the current 
  9810.  time from your system clock.  Similarly, if you specify a time but not a date, 
  9811.  the date will be obtained from the system clock. 
  9812.  
  9813.  On HPFS files, TOUCH sets the "modified" or "last write" date and time by 
  9814.  default.  By adding the appropriate character to the /D or /T switch, you can 
  9815.  set the other date and time stamps that are maintained for each file: 
  9816.  
  9817.     a       last access date and time. 
  9818.     c       creation date and time 
  9819.     w       last write date and time (default) 
  9820.  
  9821.  Options 
  9822.  
  9823.     /C:     (Create file) Create the file (as a zero-byte file) if it does not 
  9824.             already exist.  You cannot use wildcards with /C, but you can 
  9825.             create multiple files by listing them individually on the command 
  9826.             line. 
  9827.  
  9828.     /D:     (Date) Specify the date that will be set for the selected files. 
  9829.             If the date is not specified, TOUCH will use the current date.  For 
  9830.             HPFS files you can use /Da, /Dc, or /Dw, followed by the date, to 
  9831.             explicitly specify the last access, creation, or last write date 
  9832.             stamp.  The date must be entered using the proper format for your 
  9833.             current country settings. 
  9834.  
  9835.     /E:     (No error messages) Suppress all non-fatal error messages, such as 
  9836.             "File not found."  Fatal error messages, such as "Drive not ready," 
  9837.             will still be displayed.  This option is most useful in batch 
  9838.             files. 
  9839.  
  9840.     /F:     (Force read-only files) Remove the read-only attribute from each 
  9841.             file before changing the date and time, and restore it afterwards. 
  9842.             Without /F, attempting to change the date and time on a read-only 
  9843.             file will usually cause an error. 
  9844.  
  9845.     /Q:     (Quiet) Do not dislpy the new date and time and the full name for 
  9846.             each file. 
  9847.  
  9848.     /T:     (Time) Specify the time that will be set for the selected files, in 
  9849.             hh:mm format.  If the time is not specified, TOUCH will use the 
  9850.             current time.  For HPFS files you can use /Ta, /Tc, or /Tw, 
  9851.             followed by the time, to explicitly specify the last access, 
  9852.             creation, or last write time stamp. 
  9853.  
  9854.  
  9855. ΓòÉΓòÉΓòÉ 6.83. TREE - Directory tree ΓòÉΓòÉΓòÉ
  9856.  
  9857.  Purpose:    Display a graphical directory tree. 
  9858.  
  9859.  Format:     TREE [/A /B /F /H /P /S /T[:acw]] dir ... 
  9860.  
  9861.              dir :  The directory to use as the start of the tree.  If more 
  9862.              than one directory is specified, TREE will display a directory 
  9863.              tree for each. 
  9864.  
  9865.              /A:(SCII)                       /P(ause) 
  9866.              /B:(are)                        /S (file Size) 
  9867.              /F:(iles)                       /T(ime and date) 
  9868.              /H:(idden directories) 
  9869.  
  9870.  File Selection 
  9871.  
  9872.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9873.  
  9874.  Usage 
  9875.  
  9876.  The TREE command displays a graphical representation of the directory tree 
  9877.  using standard or extended ASCII characters.  For example, to display the 
  9878.  directory structure on drive C: 
  9879.  
  9880.           [c:\] tree c:\
  9881.  
  9882.  You can print the display, save it in a file, or view it with LIST by using 
  9883.  standard redirection symbols.  Be sure to review the /A option before 
  9884.  attempting to print the TREE output.  The options, discussed below, specify 
  9885.  the amount of information included in the display. 
  9886.  
  9887.  Options 
  9888.  
  9889.     /A:     (ASCII) Display the tree using standard ASCII characters.  You can 
  9890.             use this option if you want to save the directory tree in a file 
  9891.             for further processing or print the tree on a printer which does 
  9892.             not support the graphical symbols that TREE normally uses. 
  9893.  
  9894.     /B:     (Bare) Display the full pathname of each directory, without any of 
  9895.             the line-drawing characters. 
  9896.  
  9897.     /F:     (Files) Display files as well as directories.  If you use this 
  9898.             option, the name of each file is displayed beneath the name of the 
  9899.             directory in which it resides. 
  9900.  
  9901.     /H:     (Hidden) Display hidden as well as normal directories.  If you 
  9902.             combine /H and /F, hidden files are also displayed. 
  9903.  
  9904.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  9905.             continuing the display.  Your options at the prompt are explained 
  9906.             in detail under Page and File Prompts. 
  9907.  
  9908.     /S:     (Size) Display the size of each file.  This option is only useful 
  9909.             when combined with /F. 
  9910.  
  9911.     /T:     (Time and date) Display the time and date for each directory.  If 
  9912.             you combine /T and /F, the time and date for each file will also be 
  9913.             displayed.  For HPFS files, the time and date of the last write 
  9914.             will be shown by default.  You can select a specific time and date 
  9915.             stamp by using the following variations of /T: 
  9916.  
  9917.                          /T:a  last access date and time. 
  9918.                          /T:c  creation date and time. 
  9919.                          /T:w  last write date and time (default). 
  9920.  
  9921.  
  9922. ΓòÉΓòÉΓòÉ 6.84. TYPE - Display file(s) ΓòÉΓòÉΓòÉ
  9923.  
  9924.  Purpose:    Display the contents of the specified file(s). 
  9925.  
  9926.  Format:     TYPE [/A:[[-]rhsda] /L /P] file ... 
  9927.  
  9928.              file :  The file or list of files that you want to display. 
  9929.  
  9930.              /A: (Attribute select)          /P(ause) 
  9931.              /L(ine numbers) 
  9932.  
  9933.  See also:  LIST. 
  9934.  
  9935.  File Selection 
  9936.  
  9937.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9938.  
  9939.  Usage 
  9940.  
  9941.  The TYPE command displays a file.  It is normally only useful for displaying 
  9942.  ASCII text files.  Executable files (.COM and .EXE ) and many data files may 
  9943.  be unreadable when displayed with TYPE because they include non-alphanumeric 
  9944.  characters. 
  9945.  
  9946.  To display the files MEMO1 and MEMO2 : 
  9947.  
  9948.           [c:\] type /p memo1 memo2
  9949.  
  9950.  You can press Ctrl-S to pause TYPE's display and then any key to continue. 
  9951.  
  9952.  To display text from the clipboard, use CLIP: as the file name.  CLIP: will 
  9953.  not return any data unless the clipboard contains text.  See Redirection for 
  9954.  additional information on CLIP:. 
  9955.  
  9956.  You will probably find LIST to be more useful for displaying files.  However, 
  9957.  the TYPE /L command used with redirection is useful if you want to add line 
  9958.  numbers to a file, for example: 
  9959.  
  9960.           [c:\] type /l myfile > myfile.num
  9961.  
  9962.  Options 
  9963.  
  9964.     /A::    (Attribute select) Select only those files that have the specified 
  9965.             attribute(s) set.  Preceding the attribute character with a hyphen 
  9966.             [-] will select files that do not have that attribute set.  The 
  9967.             colon [:] after /A is required.  The attributes are: 
  9968.  
  9969.                            R  Read-only 
  9970.                            H  Hidden 
  9971.                            S  System 
  9972.                            D  Subdirectory 
  9973.                            A  Archive 
  9974.  
  9975.             If no attributes are listed at all (e.g., TYPE /A: ...), TYPE will 
  9976.             select all files and subdirectories including hidden and system 
  9977.             files.  If attributes are combined, all the specified attributes 
  9978.             must match for a file to be selected. For example, /A:RHS will 
  9979.             select only those files with all three attributes set. 
  9980.  
  9981.     /L:     (Line numbers) Display a line number preceding each line of text. 
  9982.  
  9983.     /P:     (Pause) Prompt after displaying each page.  Your options at the 
  9984.             prompt are explained in detail under Page and File Prompts. 
  9985.  
  9986.  
  9987. ΓòÉΓòÉΓòÉ 6.85. UNALIAS - Remove aliases ΓòÉΓòÉΓòÉ
  9988.  
  9989.  Purpose:    Remove aliases from the alias list. 
  9990.  
  9991.  Format:     UNALIAS [/Q /R file ] [alias ...] 
  9992.                 or 
  9993.              UNALIAS * 
  9994.  
  9995.              alias :  One or more aliases to remove from memory. 
  9996.              file :  One or more files to read for alias definitions. 
  9997.  
  9998.              /Q(uiet)                        /R(ead file) 
  9999.  
  10000.  See also:  ALIAS and ESET. 
  10001.  
  10002.  Usage 
  10003.  
  10004.  4OS2 maintains a list of the aliases that you have defined.  The UNALIAS 
  10005.  command will remove aliases from that list.  You can remove one or more 
  10006.  aliases by name, or you can delete the entire alias list by using the command 
  10007.  UNALIAS *. 
  10008.  
  10009.  For example, to remove the alias DDIR: 
  10010.  
  10011.           [c:\] unalias ddir
  10012.  
  10013.  To remove all the aliases: 
  10014.  
  10015.           [c:\] unalias *
  10016.  
  10017.  If you keep aliases in a file that can be loaded with the ALIAS /R command, 
  10018.  you can remove the aliases by using the UNALIAS /R command with the same file 
  10019.  name: 
  10020.  
  10021.           [c:\] unalias /r alias.lst
  10022.  
  10023.  This is much faster than removing each alias individually in a batch file, and 
  10024.  can be more selective than using UNALIAS *. 
  10025.  
  10026.  Options 
  10027.  
  10028.     /Q:     (Quiet) Prevents UNALIAS from displaying an error message if one or 
  10029.             more of the aliases does not exist.  This option is most useful in 
  10030.             batch files, for removing a group of aliases when some of the 
  10031.             aliases may not have been defined. 
  10032.  
  10033.     /R:     (Read) Read the list of aliases to remove from a file.  The file 
  10034.             format should be the same format as that used by the ALIAS /R 
  10035.             command.  You can use multiple files with one UNALIAS /R command by 
  10036.             placing the names on the command line, separated by spaces: 
  10037.  
  10038.                                 [c:\] unalias /r alias1.lst alias2.lst
  10039.  
  10040.  
  10041. ΓòÉΓòÉΓòÉ 6.86. UNSET - Remove environment variables ΓòÉΓòÉΓòÉ
  10042.  
  10043.  Purpose:    Remove variables from the environment. 
  10044.  
  10045.  Format:     UNSET  [/Q /R file ] name ... 
  10046.                 or 
  10047.              UNSET * 
  10048.  
  10049.              name :  One or more variables to remove. 
  10050.              file :  One or more files containing variables definitions. 
  10051.  
  10052.              /M(uiet)                        /R(ead from file) 
  10053.              /Q(uiet) 
  10054.  
  10055.  See also:  ESET and SET. 
  10056.  
  10057.  Usage 
  10058.  
  10059.  UNSET removes one or more variables from the environment.  For example, to 
  10060.  remove the variable CMDLINE: 
  10061.  
  10062.           [c:\] unset cmdline
  10063.  
  10064.  If you use the command UNSET *, all of the environment variables will be 
  10065.  deleted: 
  10066.  
  10067.           [c:\] unset *
  10068.  
  10069.  UNSET can be used in a batch file, in conjunction with the SETLOCAL and 
  10070.  ENDLOCAL commands, to clear the environment of variables that may cause 
  10071.  problems for applications run from that batch file. 
  10072.  
  10073.  For more information on environment variables, see the SET command and the 
  10074.  general discussion of the environment. 
  10075.  
  10076.  Use caution when removing environment variables, and especially when using 
  10077.  UNSET *.  Many programs will not work properly without certain environment 
  10078.  variables; for example, 4OS2 uses PATH and DPATH. 
  10079.  
  10080.  Options 
  10081.  
  10082.     /Q:     (Quiet) Prevents UNSET from displaying an error message if one or 
  10083.             more of the variables does not exist.  This option is most useful 
  10084.             in batch files, for removing a group of variables when some of the 
  10085.             variables may not have been defined. 
  10086.  
  10087.     /R:     (Read) Read environment variables to UNSET from a file.  This much 
  10088.             faster than using multiple UNSET commands in a batch file, and can 
  10089.             be more selective than UNSET *.  The file format should be the same 
  10090.             format as that used by the SET /R command. 
  10091.  
  10092.  
  10093. ΓòÉΓòÉΓòÉ 6.87. VER - Display the 4OS2 and OS/2 version ΓòÉΓòÉΓòÉ
  10094.  
  10095.  Purpose:    Display the current command processor and operating system 
  10096.              versions. 
  10097.  
  10098.  Format:     VER [/R] 
  10099.  
  10100.              /R(evision level) 
  10101.  
  10102.  Usage 
  10103.  
  10104.  Version numbers consist of a one-digit major version number, a period, and a 
  10105.  one- or two-digit minor version number.  Ver uses the default decimal 
  10106.  separator defined by the current country information.  The VER command 
  10107.  displays both version numbers: 
  10108.  
  10109.           [c:\] ver
  10110.  
  10111.           4OS2 3.00A   OS/2 Version is 4.00
  10112.  
  10113.  Options 
  10114.  
  10115.     /R:     (Revision level) Display the 4OS2 and OS/2 internal revision levels 
  10116.             (if any), plus your 4OS2 serial number and registered name. 
  10117.  
  10118.  
  10119. ΓòÉΓòÉΓòÉ 6.88. VERIFY - Enable or disable disk write verification ΓòÉΓòÉΓòÉ
  10120.  
  10121.  Purpose:    Enable or disable disk write verification or display the 
  10122.              verification state. 
  10123.  
  10124.  Format:     VERIFY [ON | OFF] 
  10125.  
  10126.  Usage 
  10127.  
  10128.  OS/2 maintains an internal verify flag.  When the flag is on, OS/2 attempts to 
  10129.  verify each disk write by making sure that the data written to the disk can be 
  10130.  read back successfully into the computer.  It does not compare the data in 
  10131.  memory with the data actually placed on disk to fully verify the disk write 
  10132.  process. 
  10133.  
  10134.  If used without any parameters, VERIFY will display the state of the verify 
  10135.  flag: 
  10136.  
  10137.           [c:\] verify
  10138.           VERIFY is OFF
  10139.  
  10140.  VERIFY is off when the system boots up.  Once it is turned on with the VERIFY 
  10141.  ON command, it stays on until you use the VERIFY OFF command or until you 
  10142.  reboot. 
  10143.  
  10144.  Verification will slow your disk write operations slightly (the effect is not 
  10145.  usually noticeable). 
  10146.  
  10147.  
  10148. ΓòÉΓòÉΓòÉ 6.89. VOL - Display disk volume labels ΓòÉΓòÉΓòÉ
  10149.  
  10150.  Purpose:    Display disk volume label(s). 
  10151.  
  10152.  Format:     VOL [drive: ] ... 
  10153.  
  10154.              drive :  The drive or drives to search for labels. 
  10155.  
  10156.  Usage 
  10157.  
  10158.  Each disk may have a volume label, created when the disk is formatted or with 
  10159.  the external LABEL command.  Also, every floppy disk formatted with DOS 
  10160.  version 4.0 or above, OS/2, or Windows NT has a volume serial number. 
  10161.  
  10162.  The VOL command will display the volume label and, if available, the volume 
  10163.  serial number of a disk volume.  If the disk doesn't have a volume label, VOL 
  10164.  will report that it is "unlabeled."  If you don't specify a drive, VOL 
  10165.  displays information about the current drive: 
  10166.  
  10167.           [c:\] vol
  10168.           Volume in drive C: is MYHARDDISK
  10169.  
  10170.  If available, the volume serial number will appear after the drive label or 
  10171.  name. 
  10172.  
  10173.  To display the disk labels for drives A and B: 
  10174.  
  10175.           [c:\] vol a: b:
  10176.           Volume in drive A: is unlabeled
  10177.           Volume in drive B: is BACKUP_2
  10178.  
  10179.  
  10180. ΓòÉΓòÉΓòÉ 6.90. VSCRPUT - Display text vertically and in color ΓòÉΓòÉΓòÉ
  10181.  
  10182.  Purpose:    Display text vertically in the specified color. 
  10183.  
  10184.  Format:     VSCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  10185.  
  10186.              row :  Starting row number. 
  10187.              col :  Starting column number. 
  10188.              fg :  Foreground text color. 
  10189.              bg :  Background text color. 
  10190.              text :  The text to display. 
  10191.  
  10192.  See also:  SCRPUT. 
  10193.  
  10194.  Usage 
  10195.  
  10196.  VSCRPUT writes text vertically on the screen rather than horizontally.  Like 
  10197.  the SCRPUT command, it uses the colors you specify to write the text.  VSCRPUT 
  10198.  can be used for simple graphs and charts generated by batch files.  VSCRPUT 
  10199.  always leaves the cursor at the end of the displayed text.  See Colors and 
  10200.  Color Names for details about colors and notes on the use of bright background 
  10201.  colors. 
  10202.  
  10203.  The row and column are zero-based, so on a standard 25 line by 80 column 
  10204.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  VSCRPUT checks 
  10205.  for a valid row and column, and displays a "Usage" error message if either 
  10206.  value is out of range. 
  10207.  
  10208.  You can also specify the row and column as offsets from the current cursor 
  10209.  position.  Begin the value with a plus sign [+] to move down the specified 
  10210.  number of rows or to the right the specified number of columns before 
  10211.  displaying text, or with a minus sign [-] to move up or to the left. 
  10212.  
  10213.  If you specify 999 for the row, VSCRPUT will center the text vertically on the 
  10214.  display.  If you specify 999 for the column, VSCRPUT will center the text 
  10215.  horizontally. 
  10216.  
  10217.  VSCRPUT does not move the cursor when it displays the text. 
  10218.  
  10219.  The following batch file fragment displays an X and Y axis and labels them: 
  10220.  
  10221.           cls bright white on blue
  10222.           drawhline 20 10 40 1 bright white on blue
  10223.           drawvline 2 10 19 1 bright white on blue
  10224.           scrput 21 20 bright red on blue X axis
  10225.           vscrput 8 9 bright red on blue Y axis
  10226.  
  10227.  VSCRPUT checks for a valid row and column, and displays a "Usage" error 
  10228.  message if either value is out of range. 
  10229.  
  10230.  
  10231. ΓòÉΓòÉΓòÉ 6.91. WINDOW - Change the window state or title ΓòÉΓòÉΓòÉ
  10232.  
  10233.  Purpose:    Minimize or maximize the current window, restore the default 
  10234.              window size, or change the window title. 
  10235.  
  10236.  Format:     WINDOW [MIN | MAX | RESTORE | /POS=x,y,width,height | "title "] 
  10237.  
  10238.              title :  A new title for the window. 
  10239.  
  10240.              /POS(ition) 
  10241.  
  10242.  Usage 
  10243.  
  10244.  WINDOW is used to control the appearance and title of the current window. 
  10245.  WINDOW MIN reduces the window to an icon, WINDOW MAX enlarges it to its 
  10246.  maximum size, and WINDOW RESTORE returns the window to its default size and 
  10247.  location on the desktop. 
  10248.  
  10249.  You can use the /POS option to set the location and size of the window on the 
  10250.  desktop.  The x and y values of the /POS option select the window's origin 
  10251.  while the width and height values determine its size. 
  10252.  
  10253.  If you specify a new title, the title text must be enclosed in double quotes. 
  10254.  The quotes will not appear as part of the actual title. 
  10255.  
  10256.  You can only specify one WINDOW option at a time.  The different options 
  10257.  cannot be combined in a single WINDOW command.  To perform multiple 
  10258.  operations, use multiple WINDOW commands. 
  10259.  
  10260.  Options 
  10261.  
  10262.     /POS:   (Position) Set the window position and size on the screen.  The 
  10263.             syntax is /POS=x, y, width, height where the values are specified 
  10264.             in pixels or pels.  x and y refer to the position of the top left 
  10265.             corner of the window relative to the bottom left corner of the 
  10266.             screen. 
  10267.  
  10268.  
  10269. ΓòÉΓòÉΓòÉ 6.92. Y - "Y" pipe fitting ΓòÉΓòÉΓòÉ
  10270.  
  10271.  Purpose:    Copy standard input to standard output, and then copy the 
  10272.              specified file(s) to standard output. 
  10273.  
  10274.  Format:     Y file ... 
  10275.  
  10276.              file :  The file or list of files to send to standard output. 
  10277.  
  10278.  See also:  TEE. 
  10279.  
  10280.  Usage 
  10281.  
  10282.  The Y command copies input from standard input (usually the keyboard) to 
  10283.  standard output (usually the screen).  Once the input ends, the named files 
  10284.  are appended to standard output. 
  10285.  
  10286.  For example, to get text from standard input, append the files MEMO1 and MEMO2 
  10287.  to it, and send the output to MEMOS : 
  10288.  
  10289.           [c:\] y memo1 memo2 > memos
  10290.  
  10291.  The Y command is most useful if you want to add redirected data to the 
  10292.  beginning of a file instead of appending it to the end.  For example, this 
  10293.  command copies the output of DIR, followed by the contents of  the file 
  10294.  DIREND, to the file DIRALL: 
  10295.  
  10296.           [c:\] dir | y dirend > dirall
  10297.  
  10298.  If you are typing at the keyboard to produce input text for Y, you must enter 
  10299.  a Ctrl-Z to terminate the input. 
  10300.  
  10301.  When using Y with a pipe you must take into account that the programs on the 
  10302.  two ends of the pipe run simultaneously, not sequentially. 
  10303.  
  10304.  See Piping for more information. 
  10305.  
  10306.  
  10307. ΓòÉΓòÉΓòÉ 7. Aliases ΓòÉΓòÉΓòÉ
  10308.  
  10309. Much of the power of 4OS2 comes together in aliases, which give you the ability 
  10310. to create your own commands.  An alias is a name that you select for a command 
  10311. or group of commands.  Simple aliases substitute a new name for an existing 
  10312. command.  More complex aliases can redefine the default settings of internal or 
  10313. external commands, operate as very fast in-memory batch files, and perform 
  10314. commands based on the results of other commands. 
  10315.  
  10316. This section will show you some examples of the power of aliases.  See the 
  10317. ALIAS command for complete details about writing your own aliases. 
  10318.  
  10319. The simplest type of alias gives a new name to an existing command.  For 
  10320. example, you could create a command called ROOT which uses CD to switch to the 
  10321. root directory this way: 
  10322.  
  10323.         [c:\] alias root = cd \
  10324.  
  10325. After the alias has been defined this way, every time you type the command 
  10326. ROOT, you will actually execute the command CD \. 
  10327.  
  10328. Aliases can also create customized versions of commands.  For example, the DIR 
  10329. command can sort a directory in various ways.  You can create an alias called 
  10330. DE that means "sort the directory by filename extension, and pause after each 
  10331. page while displaying it" like this: 
  10332.  
  10333.         [c:\] alias de = dir /oe /p
  10334.  
  10335. Aliases can be used to execute sequences of commands as well.  The following 
  10336. command creates an alias called W which saves the current drive and directory, 
  10337. changes to the WP directory on drive C, runs the program E:\WP60\WP.EXE, and, 
  10338. when the program terminates, returns to the original drive and directory: 
  10339.  
  10340.         [c:\] alias w = `pushd c:\wp & e:\wp60\wp.exe & popd`
  10341.  
  10342. This alias is enclosed in back-quotes because it contains multiple commands. 
  10343. You must use the back-quotes whenever an alias contains multiple commands, 
  10344. environment variables, parameters (see below), redirection, or piping.  See the 
  10345. ALIAS 
  10346.  
  10347. Aliases can be nested, that is, one alias can invoke another.  For example, the 
  10348. alias above could also be written as: 
  10349.  
  10350.         [c:\] alias wp = e:\wp60\wp.exe
  10351.         [c:\] alias w = `pushd c:\wp & wp & popd`
  10352.  
  10353. If you enter W as a command, the command processor will execute the PUSHD 
  10354. command, detect that the next command (WP) is another alias, and execute the 
  10355. program E:\WP60\WP.EXE, and - when the program exits - return to the first 
  10356. alias, execute the POPD command, and return to the prompt. 
  10357.  
  10358. You can use aliases to change the default options for both internal commands 
  10359. and external commands.  Suppose that you always want the DEL command to prompt 
  10360. before it erases a file: 
  10361.  
  10362.         [c:\] alias del = *del /p
  10363.  
  10364. An asterisk [*] is used in front of the second "del" to show that it is the 
  10365. name of an internal command, not an alias.  See ALIAS for more information 
  10366. about this use of the asterisk. 
  10367.  
  10368. You may have a program on your system that has the same name as an internal 
  10369. command.  Normally, if you type the command name, you will start the internal 
  10370. command rather than the program you desire, unless you explicitly add its full 
  10371. path on the command line.  For example, if you have a program named LIST.COM in 
  10372. the C:\UTIL directory, you could run it with the command C:\UTIL\LIST.COM. 
  10373. However, if you simply type LIST, the internal LIST command will be invoked 
  10374. instead.  Aliases give you two ways to get around this problem. 
  10375.  
  10376. First, you could define an alias that runs the program in question, but with a 
  10377. different name: 
  10378.  
  10379.         [c:\] alias l = c:\util\list.com
  10380.  
  10381. Another approach is to rename the internal command and use the original name 
  10382. for the external program.  The following example renames the LIST command as 
  10383. DISPLAY and then uses a second alias to run LIST.COM whenever you type LIST: 
  10384.  
  10385.         [c:\] alias display = *list
  10386.         [c:\] alias list = c:\util\list.com
  10387.  
  10388. You can also assign an alias to a key, so that every time you press the key, 
  10389. the command will be invoked.  You do so by naming the alias with an at sign [@] 
  10390. followed by a key name.  After you enter this next example, you will see a 
  10391. 2-column directory with paging whenever you press Shift-F5, then Enter: 
  10392.  
  10393.         [c:\] alias @Shift-F5 = *dir /2/p
  10394.  
  10395. This alias will put the DIR command on the command line when you press 
  10396. Shift-F5, then wait for you to enter file names or additional switches.  You 
  10397. must press Enter when you are ready to execute the command.  To execute the 
  10398. command immediately, without displaying it on the command line or waiting for 
  10399. you to press Enter, use two at signs at the start of the alias name: 
  10400.  
  10401.         [c:\] alias @@Shift-F5 = *dir /2/p
  10402.  
  10403. The next example clears the screen whenever you press Alt-F1: 
  10404.  
  10405.         [c:\] alias @@Alt-F1 = cls
  10406.  
  10407. Aliases have many other capabilities as well.  This example creates a simple 
  10408. command-line calculator using the @EVAL function.  Once you have entered the 
  10409. example, you can type CALC 4*19, for example, and you will see the answer: 
  10410.  
  10411.         [c:\] alias calc = `echo The answer is:  %@eval[%&]`
  10412.  
  10413. Our last example in this section creates an alias called IN.  It will 
  10414. temporarily change directories, run an internal or external command, and then 
  10415. return to the current directory when the command is finished: 
  10416.  
  10417.         [c:\] alias in = `pushd %1 & %2& & popd`
  10418.  
  10419. Now if you type 
  10420.  
  10421.         [c:\] in c:\letters wp letter.txt
  10422.  
  10423. you will change to the C:\LETTERS subdirectory, execute the command WP 
  10424. LETTER.TXT and then return to the current directory. 
  10425.  
  10426. The above example uses two parameters:  %1 means the first argument on the 
  10427. command line, and %2& means the second and all subsequent arguments. Parameters 
  10428. are explained in detail under the ALIAS command. 
  10429.  
  10430. Your copy of 4OS2 includes a sample alias file called ALIASES which contains 
  10431. several useful aliases and demonstrates many alias techniques. See the ALIAS 
  10432. and UNALIAS commands for more information and examples.  Also see Using Aliases 
  10433. in Batch Files. 
  10434.  
  10435.  
  10436. ΓòÉΓòÉΓòÉ 8. Batch Files ΓòÉΓòÉΓòÉ
  10437.  
  10438. A batch file is a file that contains a list of commands to execute.  4OS2 reads 
  10439. and interprets each line as if it had been typed at the keyboard.  Like 
  10440. aliases, batch files are handy for automating computing tasks.  Unlike aliases, 
  10441. batch files can be as long as you wish.  Batch files take up separate disk 
  10442. space for each file, and can't usually execute quite as quickly as aliases, 
  10443. since they must be read from the disk. 
  10444.  
  10445. The topics included in this section are: 
  10446.  
  10447.             .BAT, .CMD, and .BTM Files 
  10448.             Echoing in Batch Files 
  10449.             Batch File Parameters 
  10450.             Using Environment Variables 
  10451.             Batch File Commands 
  10452.             Interrupting a Batch File 
  10453.             Automatic Batch Files (4START & 4EXIT) 
  10454.             Detecting 4OS2 
  10455.             Using Aliases in Batch Files 
  10456.             Debugging Batch Files 
  10457.             Batch File String Processing 
  10458.             Batch File Line Continuation 
  10459.             Batch File Compression 
  10460.             Special Character Compatibility 
  10461.             Command Parsing 
  10462.             Argument Quoting 
  10463.             REXX Support 
  10464.             EXTPROC Support 
  10465.  
  10466.  
  10467. ΓòÉΓòÉΓòÉ 8.1. .BAT, .CMD, and .BTM Files ΓòÉΓòÉΓòÉ
  10468.  
  10469. A batch file can run in two different modes.  In the first, traditional mode, 
  10470. each line of the batch file is read and executed individually.  In the second 
  10471. mode, the entire batch file is read into memory at once.  The second mode can 
  10472. be 5 to 10 times faster, especially if most of the commands in the batch file 
  10473. are internal commands.  However, only the first mode can be used for 
  10474. self-modifying batch files (which are rare), or for batch files which install 
  10475. memory-resident utilities under DOS. 
  10476.  
  10477. The batch file's extension determines its mode.  Files with a .CMD extension 
  10478. are run in the slower, traditional mode.  Files with a .BTM extension are run 
  10479. in the faster, more efficient mode.  You can change the execution mode inside a 
  10480. batch file with the LOADBTM command. 
  10481.  
  10482.  
  10483. ΓòÉΓòÉΓòÉ 8.2. Echoing in Batch Files ΓòÉΓòÉΓòÉ
  10484.  
  10485. By default, each line in a batch file is displayed or "echoed" as it is 
  10486. executed.  You can change this behavior, if you want, in several different 
  10487. ways: 
  10488.  
  10489.         Any batch file line that begins with an [@] symbol will not be 
  10490.         displayed. 
  10491.  
  10492.         The display can be turned off and on within a batch file with the ECHO 
  10493.         OFF and ECHO ON commands. 
  10494.  
  10495.         The default setting can be changed with the SETDOS /V command, on the 
  10496.         Options 1 page of the OPTION dialogs, or the BatchEcho directive in the 
  10497.         .INI file. 
  10498.  
  10499.  For example, the following line turns off echoing inside a batch file.  The 
  10500.  [@] symbol keeps the batch file from displaying the ECHO OFF command: 
  10501.  
  10502.           @echo off
  10503.  
  10504.  4OS2 also has a command line echo that is unrelated to the batch file echo 
  10505.  setting.  See ECHO for details about both settings. 
  10506.  
  10507.  
  10508. ΓòÉΓòÉΓòÉ 8.3. Batch File Parameters ΓòÉΓòÉΓòÉ
  10509.  
  10510. Like aliases and application programs, batch files can examine the command line 
  10511. that is used to invoke them.  The command tail (everything on the command line 
  10512. after the batch file name) is separated into individual parameters (also called 
  10513. arguments or batch variables) by scanning for the spaces, tabs, and commas that 
  10514. separate the parameters.  A batch file can work with the individual parameters 
  10515. or with the command tail as a whole. 
  10516.  
  10517. These parameters are numbered from %1 to %127.  %1 refers to the first 
  10518. parameter on the command line, %2 to the second, and so on.  It is up to the 
  10519. batch file to determine the meaning of each parameter.  You can use quotation 
  10520. marks to pass spaces, tabs, commas, and other special characters in a batch 
  10521. file parameter; see Argument Quoting for details. 
  10522.  
  10523. Parameters that are referred to in a batch file, but which are missing on the 
  10524. command line, appear as empty strings inside the batch file.  For example, if 
  10525. you start a batch file and put two parameters on the command line, any 
  10526. reference in the batch file to %3, or any higher-numbered parameter, will be 
  10527. interpreted as an empty string. 
  10528.  
  10529. A batch file can also work with three special parameters:  %0 contains the name 
  10530. of the batch file as it was entered on the command line, %# contains the number 
  10531. of command line arguments, and %n$ contains the complete command-line tail 
  10532. starting with argument number "n" (for example, %3$ means the third parameter 
  10533. and all those after it).  The default value of "n" is 1, so %$ contains the 
  10534. entire command tail.  The values of these special parameters will change if you 
  10535. use the SHIFT command. 
  10536.  
  10537. By default, 4DOS uses an ampersand [&] instead of a dollar sign [$] to indicate 
  10538. the remainder of the command tail.  For example, %& means all the parameters, 
  10539. and %2& means the second parameter and all those after it.  If you want to 
  10540. share batch files or aliases between 4DOS and 4OS2, see Special Character 
  10541. Compatibility for information on selecting compatible parameter characters for 
  10542. all products. 
  10543.  
  10544. For example, if your batch file interprets the first argument as a subdirectory 
  10545. name then the following line would move to the specified directory: 
  10546.  
  10547.         cd %1
  10548.  
  10549. A friendlier batch file would check to make sure the directory exists and take 
  10550. some special action if it doesn't: 
  10551.  
  10552.         iff isdir %1 then & cd %1
  10553.         else & echo Subdirectory %1 does not exist! & quit
  10554.         endiff
  10555.  
  10556. (see the IF and IFF commands). 
  10557.  
  10558. Batch files can also use environment variables, internal variables, and 
  10559. variable functions. 
  10560.  
  10561.  
  10562. ΓòÉΓòÉΓòÉ 8.4. Using Environment Variables ΓòÉΓòÉΓòÉ
  10563.  
  10564. Batch files can also use environment variables, internal variables, and 
  10565. variable functions. You can use these variables and functions to determine 
  10566. system status (e.g., the type of CPU in the system), resource levels (e.g., the 
  10567. amount of free disk space), file information (e.g., the date and time a file 
  10568. was last modified), and other information (e.g., the current date and time). 
  10569. You can also perform arithmetic operations (including date and time 
  10570. arithmetic), manipulate strings and substrings, extract parts of a filename, 
  10571. and read and write files. 
  10572.  
  10573. To create temporary variables for use inside a batch file, just use the SET 
  10574. command to store the information you want in an environment variable.  Pick a 
  10575. variable name that isn't likely to be in use by some other program (for 
  10576. example, PATH would be a bad choice), and use the UNSET command to remove these 
  10577. variables from the environment at the end of your batch file.  You can use 
  10578. SETLOCAL and ENDLOCAL to create a "local" environment so that the original 
  10579. environment will be restored when your batch file is finished. 
  10580.  
  10581. Environment variables used in a batch file may contain either numbers or text. 
  10582. It is up to you to keep track of what's in each variable and use it 
  10583. appropriately; if you don't (for example, if you use %@EVAL to add a number to 
  10584. a text string), you'll get an error message. 
  10585.  
  10586.  
  10587. ΓòÉΓòÉΓòÉ 8.5. Batch File Commands ΓòÉΓòÉΓòÉ
  10588.  
  10589. Several 4OS2 commands are particularly suited to batch file processing. Here is 
  10590. a list of some of the commands you might find most useful: 
  10591.  
  10592.         ACTIVATE    activates another window. 
  10593.         BEEP        produces a sound of any pitch and duration through the 
  10594.                     computer's speaker. 
  10595.         CALL        executes one batch file from within another. 
  10596.         CANCEL      terminates all batch file processing. 
  10597.         CLS and COLORset the screen display colors. 
  10598.         DO          starts a loop.  The loop can be based on a counter, or on a 
  10599.                     conditional test like those used in IF and IFF. 
  10600.         DRAWBOX     draws a box on the screen. 
  10601.         DRAWHLINE DRAWVLINEdraw horizontal and vertical lines on the screen. 
  10602.         ECHO and ECHOSprint text on the screen (the text can also be redirected 
  10603.                     to a file or device).  ECHOERR and ECHOSERR print text to 
  10604.                     the standard error device. 
  10605.         GOSUB       executes a subroutine inside a batch file.  The RETURN 
  10606.                     command terminates the subroutine. 
  10607.         GOTO        branches to a different location in the batch file. 
  10608.         FOR         executes commands for each file that matches a set of 
  10609.                     wildcards, or each entry in a list. 
  10610.         IF and IFF  execute commands based on a test of string or numeric 
  10611.                     values, program exit codes, or other conditions. 
  10612.         INKEY and INPUTcollect keyboard input from the user and store it in 
  10613.                     environment variables. 
  10614.         KEYSTACK    sends keystrokes to applications. 
  10615.         LOADBTM     changes the batch file operating mode. 
  10616.         ON          initializes error handling for Ctrl-C / Ctrl-Break, or for 
  10617.                     program and command errors. 
  10618.         PAUSE       displays a message and waits for the user to press a key. 
  10619.         QUIT        ends the current batch file and optionally returns an exit 
  10620.                     code. 
  10621.         REM         places a remark in a batch file. 
  10622.         SCREEN      positions the cursor on the screen and optionally prints a 
  10623.                     message at the new location. 
  10624.         SCRPUT      displays a message in color. 
  10625.         SETLOCAL    saves the current disk drive, default directory, 
  10626.                     environment, alias list, and special character settings. 
  10627.                     ENDLOCAL restores the settings that were saved. 
  10628.         SHIFT       changes the numbering of the batch file parameters. 
  10629.         START       starts another session or window in certain multitasking 
  10630.                     environments. 
  10631.         SWITCH      selects a group of statements to execute based on the value 
  10632.                     of a variable. 
  10633.         TEXT        displays a block of text.  ENDTEXT ends the block. 
  10634.         TIMER       starts or reads a stopwatch. 
  10635.         TITLE       changes the window title. 
  10636.         VSCRPUT     displays a vertical message in color. 
  10637.  
  10638.  These commands, along with the internal variables and variable functions, make 
  10639.  the enhanced batch file language extremely powerful.  Your copy of 4OS2 
  10640.  includes a sample batch file, in the file EXAMPLES.BTM, that demonstrates some 
  10641.  of the things you can do with batch files. 
  10642.  
  10643.  
  10644. ΓòÉΓòÉΓòÉ 8.6. Interrupting a Batch File ΓòÉΓòÉΓòÉ
  10645.  
  10646. You can usually interrupt a batch file by pressing Ctrl-C or Ctrl-Break. 
  10647. Whether and when these keystrokes are recognized will depend on whether the 
  10648. command processor or an application program is running, how the application (if 
  10649. any) was written, and whether the ON BREAK command is in use. 
  10650.  
  10651. If 4OS2 detects a Ctrl-C or Ctrl-Break (and ON BREAK is not in use), it will 
  10652. display a prompt, for example: 
  10653.  
  10654.         Cancel batch job C:\CHARGE.BTM ? (Y/N/A) :
  10655.  
  10656. Enter N to continue, Y to terminate the current batch file and continue with 
  10657. any batch file which called it, or A to end all batch file processing 
  10658. regardless of the batch file nesting level.  Answering Y is similar to the QUIT 
  10659. command; answering A is similar to the CANCEL command. 
  10660.  
  10661.  
  10662. ΓòÉΓòÉΓòÉ 8.7. Automatic Batch Files ΓòÉΓòÉΓòÉ
  10663.  
  10664. 4OS2 supports "automatic" batch files, files that run without your 
  10665. intervention, as long as the command processor can find them. 
  10666.  
  10667. Each time 4OS2 starts as either a primary or a secondary shell, it looks for an 
  10668. automatic batch file called 4START.BTM or 4START.CMD.  If the 4START batch file 
  10669. is not in the same directory as 4OS2 itself, you should use the Startup page of 
  10670. the OPTION dialogs or the 4StartPath directive in your .INI file to specify its 
  10671. location.  4START is optional, so 4OS2 will not display an error message if it 
  10672. cannot find the file. 
  10673.  
  10674. 4START is a convenient place to change the color or content of the prompt for 
  10675. each shell, LOG the start of a shell, or put other special startup or 
  10676. configuration commands.  4START is also a good place to set aliases and 
  10677. environment variables. 
  10678.  
  10679. The entire startup command line passed to the command processor is available to 
  10680. 4START via batch file parameters (%1, %2, etc.).  This can be useful if you 
  10681. want to see the command line passed to a secondary shell by an application. 
  10682. For example, to pause if any parameters are passed to a secondary shell you 
  10683. could include this command in 4START (enter this on one line): 
  10684.  
  10685.         if "%1" != "" .and. "%_shell" gt 0 pause Starting shell
  10686.         %_shell with parameters [%$]
  10687.  
  10688. Whenever a 4OS2 shell ends, it runs an automatic batch file called 4EXIT.BTM, 
  10689. 4EXIT.CMD.  This file, if you use it, should be in the same directory as your 
  10690. 4START batch file.  Like 4START, 4EXIT is optional.  It is not necessary in 
  10691. most circumstances, but it is a convenient place to put commands to save 
  10692. information such as a history list before a shell ends, or LOG the end of the 
  10693. shell. 
  10694.  
  10695. Pipes, Transient Sessions, and 4START 
  10696.  
  10697. When you set up the 4START file, remember that it is executed every time 4OS2 
  10698. starts, including when running a pipe, or a transient copy of the command 
  10699. processor started with the /C startup option. 
  10700.  
  10701. For example, suppose you enter a command line like this, which uses a pipe: 
  10702.  
  10703.         [c:\data] myprog | sort > out.txt
  10704.  
  10705. Normally this command would create the output file C:\DATA\OUT.TXT.  However, 
  10706. if you have a 4START file which changes to a different directory, the output 
  10707. file will be written there -- not in C:\DATA. 
  10708.  
  10709. This is because the command processor starts a second copy of itself to run the 
  10710. commands on the right hand side of the pipe, and that new copy runs 4START 
  10711. before processing the commands from the pipe.  If 4START changes directories, 
  10712. the command from the pipe will be executed in the new directory. 
  10713.  
  10714. The same problem can occur if you use a transient session started with /C to 
  10715. run an individual command, then exit -- the session will execute in the 
  10716. directory set by 4START, not the directory in which it was originally started. 
  10717. For example, suppose you set up an OS/2 desktop object with a command line like 
  10718. this, which starts a transient session: 
  10719.  
  10720.         Command:            d:\4os2\4os2.exe /c list myfile.txt
  10721.         Working Directory:  c:\data
  10722.  
  10723. Normally this command would LIST the file C:\DATA\MYFILE.TXT.  However, if 
  10724. 4START changes to a different directory, the command processor will look for 
  10725. MYFILE.TXT there -- not in C:\DATA. 
  10726.  
  10727. Similarly, any changes to environment variables or other settings in 4START 
  10728. will affect all copies of the command processor, including those used for pipes 
  10729. and transient sessions. 
  10730.  
  10731. You can work around these potential problems with the IF or IFF command and the 
  10732. internal variables _PIPE and _TRANSIENT.  For example, to skip all 4START 
  10733. processing when running in a pipe or transient session, you could use a command 
  10734. like this at the beginning of 4START: 
  10735.  
  10736.         if %_pipe != 0 .or. %_transient != 0 quit
  10737.  
  10738.  
  10739. ΓòÉΓòÉΓòÉ 8.8. Detecting 4OS2 ΓòÉΓòÉΓòÉ
  10740.  
  10741. From a batch file, you can determine if 4OS2 or Take Command is loaded by 
  10742. testing for the variable function @EVAL, with a test like this: 
  10743.  
  10744.         if "%@eval[2+2]" == "4" echo 4OS2 is loaded!
  10745.  
  10746. This test can never succeed in CMD.EXE.  Other variable functions could be used 
  10747. for the same purpose. 
  10748.  
  10749.  
  10750. ΓòÉΓòÉΓòÉ 8.9. Using Aliases in Batch Files ΓòÉΓòÉΓòÉ
  10751.  
  10752. One way to simplify batch file programming is to use aliases to hide 
  10753. unnecessary detail inside a batch file.  For example, suppose you want a batch 
  10754. file to check for certain errors, and display a message and exit if one is 
  10755. encountered.  This example shows one way to do so: 
  10756.  
  10757.         setlocal
  10758.         unalias *
  10759.         alias error `echo. & echo ERROR: %$ & goto dispmenu`
  10760.         alias fatalerror `echo. & echo FATAL ERROR: %$ & quit`
  10761.         alias in `pushd %1 & %2$ & popd`
  10762.         if not exist setup.btm fatalerror Missing setup file!
  10763.         call setup.btm
  10764.         cls
  10765.         :dispmenu
  10766.         text
  10767.                   1. Word Processing
  10768.                   2. Spreadsheet
  10769.                   3. Communications
  10770.                   4. Exit
  10771.         endtext
  10772.         echo.
  10773.         inkey Enter your choice:  %%userchoice
  10774.         switch %userchoice
  10775.         case 1
  10776.            input Enter the file name:  %%fname
  10777.            if not exist fname error File does not exist
  10778.            in d:\letters c:\wp60\wp.exe
  10779.         case 2
  10780.            in d:\finance c:\quattro\q.exe
  10781.         case 3
  10782.            in d:\comm c:\comsw\pcplus.exe
  10783.         case 4
  10784.            goto done
  10785.         default
  10786.           error Invalid choice, try again
  10787.         endswitch
  10788.         goto dispmenu
  10789.         :done
  10790.         endlocal
  10791.  
  10792. The first alias, ERROR, simply displays an error message and jumps to the label 
  10793. DISPMENU to redisplay the menu.  The "%$" in the second ECHO command displays 
  10794. all the text passed to ERROR as the content of the message.  The similar 
  10795. FATALERROR alias displays the message, then exits the batch file. 
  10796.  
  10797. The last alias, IN, expects 2 or more command-line arguments.  It uses the 
  10798. first as a new working directory and changes to that directory with a PUSHD 
  10799. command.  The rest of the command line is interpreted as another command plus 
  10800. possible command line parameters, which the alias executes.  This alias is used 
  10801. here to switch to a directory, run an application, and switch back.  It could 
  10802. also be used from the command line. 
  10803.  
  10804. The following lines print a menu on the screen and then get a keystroke from 
  10805. the user and store the keystroke in an environment variable called userchoice. 
  10806. Then the SWITCH command is used to test the user's keystroke and decide what 
  10807. action to take. 
  10808.  
  10809. There's another side to aliases in batch files.  If you're going to distribute 
  10810. your batch files to others, you need to remember that they may have aliases 
  10811. defined for the commands you're going to use.  For example if the user has 
  10812. aliased CD to CDD and you aren't expecting this, your file may not work as you 
  10813. intended.  There are two ways to address this problem. 
  10814.  
  10815. First, you can use SETLOCAL, ENDLOCAL, and UNALIAS to clear out aliases before 
  10816. your batch file starts and restore them at the end, as we did in the previous 
  10817. example.  Remember that SETLOCAL and ENDLOCAL will save and restore not only 
  10818. the aliases but also the environment, the current drive and directory, and 
  10819. various special characters. 
  10820.  
  10821. If this method isn't appropriate or necessary for the batch file you're working 
  10822. on, you can also use an asterisk [*] before the name of any command.  The 
  10823. asterisk means the command that follows it should not be interpreted as an 
  10824. alias.  For example the following command redirects a list of file names to the 
  10825. file FILELIST: 
  10826.  
  10827.         dir /b > filelist
  10828.  
  10829. However, if the user has redefined DIR with an alias this command may not do 
  10830. what you want.  To get around this just use: 
  10831.  
  10832.         *dir /b > filelist
  10833.  
  10834. The same can be done for any command in your batch file.  If you use the 
  10835. asterisk, it will disable alias processing, and the rest of the command will be 
  10836. processed normally as an internal command, external command, or batch file. 
  10837. Using an asterisk before a command will work whether or not there is actually 
  10838. an alias defined with the same name as the command.  If there is no alias with 
  10839. that name, the asterisk will be ignored and the command will be processed as if 
  10840. the asterisk wasn't there. 
  10841.  
  10842.  
  10843. ΓòÉΓòÉΓòÉ 8.10. Debugging Batch Files ΓòÉΓòÉΓòÉ
  10844.  
  10845. 4OS2 includes a built-in batch file debugger, invoked with the SETDOS /Y1 
  10846. command.  The debugger allows you to "single-step" through a batch file line by 
  10847. line, with the file displayed in a popup window as it executes.  You can 
  10848. execute or skip the current line, continue execution with the debugger turned 
  10849. off, view the fully-expanded version of the command line, or exit the batch 
  10850. file.  The batch debugger can also pop up a separate window to view current 
  10851. environment variables or aliases so you can check their values during 
  10852. execution, and can pop up the LIST command to display the contents of any file. 
  10853.  
  10854. To start the debugger, insert a SETDOS /Y1 command at the beginning of the 
  10855. portion of the batch file you want to debug, and a SETDOS /Y0 command at the 
  10856. end.  You can also invoke SETDOS /Y1 from the prompt, but because the debugger 
  10857. is automatically turned off whenever the command processor returns to the 
  10858. prompt, you must enter the SETDOS command and the batch file name on the same 
  10859. line, for example: 
  10860.  
  10861.         [c:\] setdos /y1 & mybatch.btm
  10862.  
  10863. If you use the debugger regularly you may want to define a simple alias to 
  10864. invoke it, for example: 
  10865.  
  10866.         [c:\] alias trace `setdos /y1 & %$`
  10867.  
  10868. This alias simply enables the debugger, then runs whatever command is passed to 
  10869. it.  You can use the alias to debug a batch file with a command like this: 
  10870.  
  10871.         [c:\] trace mybatch.btm
  10872.  
  10873. When the debugger is running you can control its behavior with keystrokes. 
  10874. Debugging continues after each keystroke unless otherwise noted: 
  10875.  
  10876.         T(race), Enter, or F8Execute the current command.  If it calls a 
  10877.                        subroutine with GOSUB, or another batch file with CALL, 
  10878.                        single-step into the called subroutine or batch file. 
  10879.         S(tep) or F10  Execute the current command, but execute any subroutine 
  10880.                        or CALLed batch file without single-stepping. 
  10881.         J(ump)         Skip the current command and proceed to the next 
  10882.                        command. 
  10883.         X (Expand)     Display the next command to be executed, after expansion 
  10884.                        of aliases and environment variables. 
  10885.         L(ist)         Prompt for a file name and then view the file with the 
  10886.                        LIST command. 
  10887.         V(ariables)    Open a popup window to display the current environment, 
  10888.                        in alphabetical order. 
  10889.         A(liases)      Open a popup window to display the current aliases, in 
  10890.                        alphabetical order. 
  10891.         O(ff) or Esc   Turn off the debugger and continue with the remainder of 
  10892.                        the batch file. 
  10893.         Q(uit)         Quit the debugger and the current batch file, without 
  10894.                        executing the remainder of the file. 
  10895.  
  10896.  The debugger highlights each line of the batch file as it is executed.  It 
  10897.  executes the commands on the line one at a time, so when a line contains more 
  10898.  than one command, the highlight will not move as each command is executed.  To 
  10899.  see the individual commands, use the X key to expand each command before it is 
  10900.  executed. 
  10901.  
  10902.  If you use a "prefix" command like EXCEPT, FOR, GLOBAL, or SELECT, the prefix 
  10903.  command is considered one command, and each command it invokes is another. 
  10904.  For example, this command line executes four commands -- the FOR and three 
  10905.  ECHO commands: 
  10906.  
  10907.           for %x in (a b c) do echo %x
  10908.  
  10909.  You cannot use the batch debugger with REXX files or EXTPROC files.  It can 
  10910.  only be used with normal 4OS2 batch files. 
  10911.  
  10912.  The debugger gives you a detailed, step-by-step view of batch file execution, 
  10913.  and will help solve particularly difficult batch file problems.  However, in 
  10914.  some cases you will find it easier to diagnose these problems with techniques 
  10915.  that allow you to review what is happening at specific points in the batch 
  10916.  file without stepping through each line individually. 
  10917.  
  10918.  There are several tricks you can use for this purpose.  Probably the simplest 
  10919.  is to turn ECHO on at the beginning of the file while you're testing it, or 
  10920.  use SETDOS /V2 to force ECHO on even if an ECHO OFF command is used in the 
  10921.  batch file.  This will give you a picture of what is happening as the file is 
  10922.  executed, without stopping at each line.  It will make your output look messy 
  10923.  of course, so just turn it off once things are working.  You can also turn 
  10924.  ECHO on at the beginning of a group of commands you want to "watch", and off 
  10925.  at the end, just by adding ECHO commands at the appropriate spots in your 
  10926.  file. 
  10927.  
  10928.  If an error occurs in a batch file, the error message will display the name of 
  10929.  the file, the number of the line that contained the error, and the error 
  10930.  itself.  For example: 
  10931.  
  10932.           e:\test.bat [3] Invalid parameter "/d"
  10933.  
  10934.  tells you that the file E:\TEST.BAT contains an error on line 3.  The first 
  10935.  line of the batch file is numbered 1. 
  10936.  
  10937.  Another trick, especially useful in a fast-moving batch file or one where the 
  10938.  screen is cleared before you can read messages, is to insert PAUSE commands 
  10939.  wherever you need them in order to be able to watch what's happening.  You can 
  10940.  also use an ON ERRORMSG command to pause if an error occurs, then continue 
  10941.  with the rest of the file (the first command below), or to quit if an error 
  10942.  occurs (the second command): 
  10943.  
  10944.           on errormsg pause
  10945.           on errormsg quit
  10946.  
  10947.  If you can't figure out how your aliases and variables are expanded, try 
  10948.  turning LOG on at the start of the batch file.  LOG keeps track of all 
  10949.  commands after alias and variable expansion are completed, and gives you a 
  10950.  record in a file that you can examine after the batch file is done.  You must 
  10951.  use a standard LOG command; LOG /H (the history log) does not work in batch 
  10952.  files. 
  10953.  
  10954.  You may also want to consider using redirection to capture your batch file 
  10955.  output.  Simply type the batch file name followed by the redirection symbols, 
  10956.  for example: 
  10957.  
  10958.           [c:\] mybatch >& testout
  10959.  
  10960.  This records all batch file output, including error messages, in the file 
  10961.  TESTOUT, so you can go back and examine it.  If you have ECHO ON in the batch 
  10962.  file you'll get the batch commands intermingled with the output, which can 
  10963.  provide a very useful trace of what's happening.  Of course, output from 
  10964.  full-screen commands and programs that don't write to the standard output 
  10965.  devices can't be recorded, but you can still gain a lot of useful information 
  10966.  if your batch file produces any output. 
  10967.  
  10968.  If you're using redirection to see the output, remember that any prompts for 
  10969.  input will probably go to the output file and not to the screen, so you need 
  10970.  to know in advance the sequence of keystrokes required to get through the 
  10971.  entire batch file, and enter them by hand or with KEYSTACK.  You can also use 
  10972.  the TEE command to both view the output while the batch file is running and 
  10973.  save it in a file for later examination. 
  10974.  
  10975.  
  10976. ΓòÉΓòÉΓòÉ 8.11. Batch File String Processing ΓòÉΓòÉΓòÉ
  10977.  
  10978. As you gain experience with batch files, you're likely to find that you need to 
  10979. manipulate text strings.  You may need to prompt a user for a name or password, 
  10980. process a list of files, or find a name in a phone list.  All of these are 
  10981. examples of string processing  the manipulation of lines of readable text. 
  10982.  
  10983. 4OS2 include several features that make string processing easier.  For example, 
  10984. you can use the INKEY and INPUT commands for user input; the ECHO, SCREEN, 
  10985. SCRPUT, and VSCRPUT commands for output; and the FOR command or the @FILEREAD 
  10986. function to scan through the lines of a file.  In addition, variable functions 
  10987. offer a wide range of string handling capabilities. 
  10988.  
  10989. For example, suppose you need a batch file that will prompt a user for a name, 
  10990. break the name into a first name and a last name, and then run a hypothetical 
  10991. LOGIN program.  LOGIN expects the syntax /F:first /L:last with both the first 
  10992. and last names in upper case and neither name longer than 8 characters.  Here 
  10993. is one way to write such a program: 
  10994.  
  10995.         @echo off
  10996.         setlocal
  10997.         unalias *
  10998.         input Enter your name (no initials):  %%name
  10999.  
  11000.         set first=%@word[0,%name]
  11001.         set flen=%@len[%first]
  11002.         set last=%@word[1,%name]
  11003.         set llen=%@len[%last]
  11004.  
  11005.         iff %flen gt 8 .or. %llen gt 8 then
  11006.            echo First or last name too long
  11007.            quit
  11008.         endiff
  11009.  
  11010.         login /F:%@upper[%first] /L:%@upper[%last]
  11011.         endlocal
  11012.  
  11013. The SETLOCAL command at the beginning of this batch file saves the environment 
  11014. and aliases.  Then the UNALIAS * command removes any existing aliases so they 
  11015. won't interfere with the behavior of the commands in the remainder of the batch 
  11016. file.  The first block of lines ends with an INPUT command which asks the user 
  11017. to enter a name.  The user's input is stored in the environment variable NAME. 
  11018.  
  11019. The second block of lines extracts the user's first and last names from the 
  11020. NAME variable and calculates the length of each.  It stores the first and last 
  11021. name, along with the length of each, in additional environment variables.  Note 
  11022. that the @WORD function numbers the first word as 0, not as 1. 
  11023.  
  11024. The IFF command in the third block of lines tests the length of both the first 
  11025. and last names.  If either is longer than 8 characters, the batch file displays 
  11026. an error message and ends.  Finally, in the last block, the batch file executes 
  11027. the LOGIN program with the appropriate parameters, then uses the ENDLOCAL 
  11028. command to restore the original environment and alias list.  At the same time, 
  11029. ENDLOCAL discards the temporary variables that the batch file used (NAME, 
  11030. FIRST, FLEN, etc.). 
  11031.  
  11032. When you're processing strings, you also need to avoid some common traps.  The 
  11033. biggest one is handling special characters. 
  11034.  
  11035. Suppose you have a batch file with these two commands, which simply accept a 
  11036. string and display it: 
  11037.  
  11038.         input Enter a string:  %%str
  11039.         echo %str
  11040.  
  11041. Those lines look safe, but what happens if the user enters the string "some > 
  11042. none" (without the quotes).  After the string is placed in the variable STR, 
  11043. the second line becomes: 
  11044.  
  11045.         echo some > none
  11046.  
  11047. The ">" is a redirection symbol, so the line echoes the string "some" and 
  11048. redirects it to a file called NONE - probably not what you expected.  You could 
  11049. try using quotation marks to avoid this kind of problem (see Argument Quoting), 
  11050. but that won't quite work.  If you use back-quotes (ECHO `%STR`), the command 
  11051. will echo the four-character string %STR.  Environment variable names are not 
  11052. expanded when they are inside back-quotes. 
  11053.  
  11054. If you use double quotes (ECHO "%STR"), the string entered by the user will be 
  11055. displayed properly, and so will the quotation marks.  With double quotes, the 
  11056. output would look like this: 
  11057.  
  11058.         "some > none"
  11059.  
  11060. As you can imagine, this kind of problem becomes much more difficult if you try 
  11061. to process text from a file.  Special characters in the text can cause all 
  11062. kinds of confusion in your batch files.  Text containing back-quotes, double 
  11063. quotes, or redirection symbols can be virtually impossible to handle correctly. 
  11064.  
  11065. One way to overcome these potential problems is to use the SETDOS /X command to 
  11066. temporarily disable redirection symbols and other special characters.  The 
  11067. two-line batch file above would be a lot more likely to produce the expected 
  11068. results if it were rewritten this way: 
  11069.  
  11070.         setdos /x-15678
  11071.         input Enter a string:  %%str
  11072.         echo %str
  11073.         setdos /x0
  11074.  
  11075. The first line turns off alias processing and disables several special symbols, 
  11076. including the command separator (see Multiple Commands) and all redirection 
  11077. symbols.  Once the string has been processed, the last line re-enables the 
  11078. features that were turned off in the first line. 
  11079.  
  11080. If you need advanced string processing capabilities beyond those provided by 
  11081. 4OS2 you may want to consider using the REXX language.  Our products support 
  11082. external REXX programs for this purpose. 
  11083.  
  11084.  
  11085. ΓòÉΓòÉΓòÉ 8.12. Batch File Line Continuation ΓòÉΓòÉΓòÉ
  11086.  
  11087. 4OS2 will combine multiple lines in the batch file into a single line for 
  11088. processing when you include the escape character as the very last character of 
  11089. each line to be combined (except the last). The default escape character is the 
  11090. caret [^].  For example: 
  11091.  
  11092.         echo The quick brown fox jumped over the lazy^
  11093.         sleeping^
  11094.         dog. > alphabet
  11095.  
  11096. You cannot use this technique to extend a batch file line beyond the normal 
  11097. line length limit of 1,023 characters. 
  11098.  
  11099.  
  11100. ΓòÉΓòÉΓòÉ 8.13. Batch File Compression ΓòÉΓòÉΓòÉ
  11101.  
  11102. You can compress your batch files with a program called BATCOMP.EXE, which is 
  11103. distributed with 4OS2.  This program condenses batch files by about a third and 
  11104. makes them unreadable with the LIST command and similar utilities.  Compressed 
  11105. batch files run at approximately the same speed as regular .BTM files. 
  11106.  
  11107. You may want to consider compressing batch files if you need to distribute them 
  11108. to others and keep your original code secret or prevent your users from 
  11109. altering them.  You may also want to consider compressing batch files to save 
  11110. some disk space on the systems where the compressed files are used. 
  11111.  
  11112. The full syntax for the batch compression program is 
  11113.  
  11114.         BATCOMP [/O] input file [output file ]
  11115.  
  11116. You must specify the full name of the input file, including its extension, on 
  11117. the BATCOMP command line.  If you do not specify the output file, BATCOMP will 
  11118. use the same base name as the input file and add a .BTM extension.  BATCOMP 
  11119. will also add a .BTM extension if you specify a base name for the output file 
  11120. without an extension.  For example, to compress MYBATCH.CMD and save the result 
  11121. as MYBATCH.BTM, you can use any of these three commands: 
  11122.  
  11123.         [c:\] batcomp mybatch.cmd
  11124.         [c:\] batcomp mybatch.cmd mybatch
  11125.         [c:\] batcomp mybatch.cmd mybatch.btm
  11126.  
  11127. If the output file (MYBATCH.BTM in the examples above) already exists, BATCOMP 
  11128. will prompt you before overwriting the file.  You can disable the prompt by 
  11129. including /O on the BATCOMP command line immediately before the input file 
  11130. name.  Even if you use the /O option, BATCOMP will not compress a file into 
  11131. itself. 
  11132.  
  11133. JP Software does not provide a decompression utility to decompress batch files. 
  11134. If you use BATCOMP.EXE, make sure that you also keep a copy of the original 
  11135. batch file for future inspection or modification. 
  11136.  
  11137. BATCOMP is a DOS and OS/2 character-mode application designed to run in any 
  11138. environment where our command processors run.  Each of our command processors 
  11139. includes the same version of BATCOMP.EXE, and a batch file compressed with any 
  11140. copy of BATCOMP can be used with any current JP Software command processor. 
  11141.  
  11142. You can adopt one of two strategies for keeping track of your original source 
  11143. files and compressed batch files.  First, you may want to create the source 
  11144. files with a traditional .BAT or .CMD extension and reserve the .BTM extension 
  11145. for compressed batch files.  The advantage of this approach is that you can 
  11146. modify and test the uncompressed versions at any time, although they will run 
  11147. in the slower, traditional mode unless they begin with a LOADBTM command. 
  11148.  
  11149. If you prefer, you can use a .BTM extension for both the source and compressed 
  11150. files.  In this case you will have to use a different directory or a different 
  11151. base name for each file.  For example, you might use SOURCE\MYBATCH.BTM for the 
  11152. source file and COMP\MYBATCH.BTM for the compressed version, or use 
  11153. MYBATCHS.BTM for the source file and MYBATCH.BTM for the compressed file 
  11154. (however, the latter approach may make it more difficult to keep track of the 
  11155. correspondence between the source file and the compressed file). 
  11156.  
  11157. Each of our command processors includes its own version of BATCOMP.EXE, set up 
  11158. to run under the corresponding operating system.  However, the output produced 
  11159. by each program is the same, so a batch file compressed with any version of 
  11160. BATCOMP can be used with any JP Software command processor. 
  11161.  
  11162. If you plan to distribute batch files to users of different platforms, see 
  11163. Special Character Compatibility. 
  11164.  
  11165.  
  11166. ΓòÉΓòÉΓòÉ 8.14. Special Character Compatibility ΓòÉΓòÉΓòÉ
  11167.  
  11168. If you use two or more of our products, or if you want to share aliases and 
  11169. batch files with users of different products, you need to be aware of the 
  11170. differences in three important characters:  the Command Separator (see Multiple 
  11171. Commands), the Escape Character (see Escape Character), and the Parameter 
  11172. Character (see Batch File Parameters). 
  11173.  
  11174. The default values of each of these characters in each product is shown in the 
  11175. following chart: 
  11176.  
  11177.         Product                  Separator     Escape     Parameter
  11178.  
  11179.         4DOS, Take Command/16        ^                       &
  11180.  
  11181.         4NT, 4OS2,                   &           ^            $
  11182.         Take Command/32,
  11183.         Take Command for OS/2
  11184.  
  11185. The up-arrow [] represents the ASCII Ctrl-X character, numeric value 24.) 
  11186.  
  11187. In your batch files and aliases, and even at the command line, you can smooth 
  11188. over these differences in three ways: 
  11189.  
  11190.         *   Select a consistent set of characters from the Options 1 page of 
  11191.             the OPTION dialogs, or with .INI file configuration directives 
  11192.             command.  For example, to set the 4OS2 characters to match 4DOS, 
  11193.             use these lines in 4OS2.INI: 
  11194.  
  11195.                                 CommandSep = ^
  11196.                                 EscapeChar = 
  11197.                                 ParameterChar = &
  11198.  
  11199.         *   Use internal variables that contain the current special character, 
  11200.             rather than using the character itself (see + and =).  For example, 
  11201.             this command: 
  11202.  
  11203.                                 if "%1" == "" (echo Argument missing! ^ quit)
  11204.  
  11205.             will only work if the command separator is a caret. However, this 
  11206.             version works regardless of the current command separator: 
  11207.  
  11208.                                 if "%1" == "" (echo Argument missing! %+ quit)
  11209.  
  11210.         *   In a batch file, use the SETLOCAL command to save the command 
  11211.             separator, escape character, and parameter character when the batch 
  11212.             file starts.  Then use SETDOS as described above to select the 
  11213.             characters you want to use within the batch file.  Use an ENDLOCAL 
  11214.             command at the end of the batch file to restore the previous 
  11215.             settings. 
  11216.  
  11217.  You can also use the SETDOS command to change special characters on the 
  11218.  command line.  However, when setting new special character values on the 
  11219.  command line you must take into account the possibility that one of your new 
  11220.  values will have a current meaning that causes problems with the setting.  For 
  11221.  example, this command: 
  11222.  
  11223.           [c:\] setdos /p&
  11224.  
  11225.  would not set the parameter character to an ampersand [&] in 4OS2 if the 
  11226.  standard 4OS2 special characters were currently in effect.  The & would be 
  11227.  seen as a command separator, and would terminate the SETDOS command before the 
  11228.  parameter character was set.  To work around this, use the escape character 
  11229.  variable %= before each setting to ensure that the following character is not 
  11230.  treated with any special meaning. 
  11231.  
  11232.  For example, the following sequence of commands in a batch file will always 
  11233.  set the special characters correctly to their standard 4DOS values, no matter 
  11234.  what their current setting, and will restore them when the batch file is done: 
  11235.  
  11236.           setlocal
  11237.           setdos /c%=^ /e%= /p%=&
  11238.           .....
  11239.           endlocal
  11240.  
  11241.  A similar sequence can be used to select the standard 4OS2 and 4NT characters, 
  11242.  regardless of the current settings: 
  11243.  
  11244.           setlocal
  11245.           setdos /c%=& /e%=^ /p%=$
  11246.           .....
  11247.           endlocal
  11248.  
  11249.  
  11250. ΓòÉΓòÉΓòÉ 8.15. Command Parsing ΓòÉΓòÉΓòÉ
  11251.  
  11252. Whenever you type something at the command line and press the Enter key, or 
  11253. include a command in a batch file, you have given a command to 4OS2, which must 
  11254. figure out how to execute your command.  If you understand the general process 
  11255. that is used, you will be able to make the best use of the commands. 
  11256. Understanding these steps can be especially helpful when working with complex 
  11257. aliases or batch file commands. 
  11258.  
  11259. To decide what activity to perform, the command processor goes through several 
  11260. steps.  Before it starts, it writes the entire command line (which may contain 
  11261. multiple commands) to the history log file if history logging has been enabled 
  11262. with the LOG /H command, and the command did not come from a batch file.  Then, 
  11263. if the line contains multiple commands, the first command is isolated for 
  11264. processing. 
  11265.  
  11266. 4OS2 begins by dividing the command into a command name and a command tail. 
  11267. The command name is the first word in the command; the tail is everything that 
  11268. follows the command name.  For example, in the command line 
  11269.  
  11270.         dir *.txt /2/p/v
  11271.  
  11272. the command name is "dir", and the command tail is " *.txt /2/p/v". 
  11273.  
  11274. Next 4DOS tries to match the command name against its list of aliases.  If it 
  11275. finds a match between the command name and one of the aliases you've defined, 
  11276. it replaces the command name with the contents of the alias.  (This 
  11277. substitution is done internally and is not normally visible to you).  However, 
  11278. you can view a command line with aliases expanded by pressing Ctrl-F after 
  11279. entering the command at the prompt. 
  11280.  
  11281. If the alias included parameters (%1, %2, etc.), the parameter values are 
  11282. filled in from the text on the command line, and any parameters used in this 
  11283. process are removed from the command line.  The process of replacing a command 
  11284. name that refers to an alias with the contents of the alias, and filling in the 
  11285. alias parameters, is called alias expansion. 
  11286.  
  11287. This expansion of an alias creates a new command name:  the first word of the 
  11288. alias.  This new command name is again tested against the list of aliases, and 
  11289. if a match is found the contents of the new alias is expanded just like the 
  11290. first alias.  This process, called nested alias expansion, continues until the 
  11291. command name no longer refers to an alias. 
  11292.  
  11293. Once it has finished with the aliases, 4OS2 next tries to match the command 
  11294. name with its list of internal commands.  If it is unsuccessful, the command 
  11295. processor knows that it will have to search for a batch file or external 
  11296. program to execute your command. 
  11297.  
  11298. The next step is to locate any batch file or alias parameters, environment 
  11299. variables, internal variables, or variable functions in the command, and 
  11300. replace each one with its value.  This process is called variable expansion. 
  11301.  
  11302. The variable expansion process is modified for certain internal commands, like 
  11303. EXCEPT, IF, and GLOBAL.  These commands are always followed by another command, 
  11304. so variable expansion takes place separately for the original command and the 
  11305. command that follows it. 
  11306.  
  11307. Once all of the aliases and environment variables have been expanded, 4OS2 will 
  11308. echo the complete command to the screen (if command-line echo has been enabled) 
  11309. and write it to the log file (if command logging has been turned on). 
  11310.  
  11311. Before it can actually execute your command, the command processor must scan 
  11312. the command tail to see if it includes redirection or piping.  If so, the 
  11313. proper internal switches are set to send output to an alternate device or to a 
  11314. file, instead of to the screen.  A second process is started at this point, if 
  11315. necessary, to receive any piped output. 
  11316.  
  11317. Finally, it is time to execute the command.  If the command name matches an 
  11318. internal command, 4OS2 will perform the activities you have requested. 
  11319. Otherwise, the command processor searches for an executable (.COM or .EXE) 
  11320. file, a batch file, or a file with an executable extension that matches the 
  11321. command name. 
  11322.  
  11323. Once the internal command or external program has terminated, the command 
  11324. processor saves the result or exit code that the command generated, cleans up 
  11325. any redirection that you specified, and then returns to the original command 
  11326. line to retrieve the next command.  When all of the commands in a command line 
  11327. are finished, the next line is read from the current batch file, or if no batch 
  11328. file is active, the prompt is displayed. 
  11329.  
  11330. You can disable and re-enable several parts of command parsing (for example 
  11331. alias expansion, variable expansion, and redirection) with the SETDOS /X 
  11332. command. 
  11333.  
  11334.  
  11335. ΓòÉΓòÉΓòÉ 8.16. Argument Quoting ΓòÉΓòÉΓòÉ
  11336.  
  11337. As it parses the command line, 4OS2 looks for the ampersand [&] command 
  11338. separator, conditional commands (|| or &&), white space (spaces, tabs, and 
  11339. commas), percent signs [%] which indicate variables to be expanded, and 
  11340. redirection and piping characters (>, <, or |). 
  11341.  
  11342. Normally, these special characters cannot be passed to a command as part of an 
  11343. argument.  However, you can include any of the special characters in an 
  11344. argument by enclosing the entire argument in single back quotes [`] or double 
  11345. quotes ["].  Although both back quotes and double quotes will let you build 
  11346. arguments that include special characters, they do not work the same way. 
  11347.  
  11348. No alias or variable expansion is performed on an argument enclosed in back 
  11349. quotes.  Redirection symbols inside the back quotes are ignored.  The back 
  11350. quotes are removed from the command line before the command is executed. 
  11351.  
  11352. No alias expansion is performed on expressions enclosed in double quotes. 
  11353. Redirection symbols inside double quotes are ignored. However, variable 
  11354. expansion is performed on expressions inside double quotes.  The double quotes 
  11355. themselves will be passed to the command as part of the argument. 
  11356.  
  11357. For example, suppose you have a batch file CHKNAME.BTM which expects a name as 
  11358. its first parameter (%1).  Normally the name is a single word.  If you need to 
  11359. pass a two-word name with a space in it to this batch file you could use the 
  11360. command: 
  11361.  
  11362.         [c:\] chkname `MY NAME`
  11363.  
  11364. Inside the batch file, %1 will have the value MY NAME, including the space. 
  11365. The back quotes caused 4OS2 to pass the string to the batch file as a single 
  11366. argument.  The quotes keep characters together and reduce the number of 
  11367. arguments in the line. 
  11368.  
  11369. For a more complex example, suppose the batch file QUOTES.BAT contains the 
  11370. following commands: 
  11371.  
  11372.         @echo off
  11373.         echo Arg1 = %1
  11374.         echo Arg2 = %2
  11375.         echo Arg3 = %3
  11376.  
  11377. and that the environment variable FORVAR has been defined with this command: 
  11378.  
  11379.         [c:\] set FORVAR=for
  11380.  
  11381. Now, if you enter the command 
  11382.  
  11383.         [c:\] quotes `Now is the time %%forvar` all good
  11384.  
  11385. the output from QUOTES.BAT will look like this: 
  11386.  
  11387.         Arg1 = Now is the time %forvar
  11388.         Arg2 = all
  11389.         Arg3 = good
  11390.  
  11391. But if you enter the command 
  11392.  
  11393.         [c:\] quotes "Now is the time %%forvar" all good
  11394.  
  11395. the output from QUOTES.BAT will look like this: 
  11396.  
  11397.         Arg1 = "Now is the time for"
  11398.         Arg2 = all
  11399.         Arg3 = good
  11400.  
  11401. Notice that in both cases, the quotes keep characters together and reduce the 
  11402. number of arguments in the line. 
  11403.  
  11404. The following example has 7 command-line arguments, while the examples above 
  11405. only have 3: 
  11406.  
  11407.         [c:\] quotes Now is the time %%forvar all good
  11408.  
  11409. (The double percent signs are needed in each case because the argument is 
  11410. parsed twice, once when passed to the batch file and again in the ECHO 
  11411. command.) 
  11412.  
  11413. When an alias is defined in a batch file or from the command line, its argument 
  11414. can be enclosed in back quotes to prevent the expansion of replaceable 
  11415. parameters, variables, and multiple commands until the alias is invoked.  See 
  11416. ALIAS for details. 
  11417.  
  11418. You can disable and re-enable back quotes and double quotes with the SETDOS /X 
  11419. command. 
  11420.  
  11421.  
  11422. ΓòÉΓòÉΓòÉ 8.17. REXX Support ΓòÉΓòÉΓòÉ
  11423.  
  11424. REXX is a a powerful file and text processing language developed by IBM, and 
  11425. available on many PC and other platforms.  REXX is an ideal extension to the 
  11426. 4OS2 batch language, especially if you need advanced string processing 
  11427. capabilities. 
  11428.  
  11429. The REXX language is not built into 4OS2.  REXX language support is provided in 
  11430. OS/2 2.0 and above, and you can also purchase add-on REXX software such as 
  11431. Enterprise Alternatives' Enterprise REXX, available for Windows 3.x, Windows 
  11432. 95, and Windows NT; or Quercus's Personal REXX, available for DOS, OS/2, 
  11433. Windows 3.x, Windows 95, and Windows NT.  (If you want to learn about or 
  11434. purchase one of these REXX packages, contact JP Software's sales department for 
  11435. more information.) 
  11436.  
  11437. REXX programs are stored in .CMD files.  4OS2 checks to see if the first two 
  11438. characters on the first line of a .CMD file are [/*], the beginning of a REXX 
  11439. comment.  If so, it passes the file to OS/2's built-in REXX facility for 
  11440. processing.  If Personal REXX for OS/2 is installed, it automatically replaces 
  11441. OS/2's built-in REXX, and handles all REXX commands passed by 4OS2. 
  11442.  
  11443. Both Personal REXX and OS/2's built-in REXX extend the interface between REXX 
  11444. and 4OS2 by allowing you to invoke 4OS2 commands from within a REXX program. 
  11445.  
  11446. When you send a command from a REXX program back to the command processor to be 
  11447. executed (for example, if you execute a DIR command within a REXX script), the 
  11448. REXX software must use the correctaddre for the command processor.  In most 
  11449. cases it is best to use the default address of CMD, which is set up 
  11450. automatically by 4OS2.  If you choose to use an explicit address via the REXX 
  11451. ADDRESS command, you can use either CMD or 4OS2. 
  11452.  
  11453. For details on communication between REXX and the command processor, or for 
  11454. more information on any aspect of REXX, see your REXX documentation. 
  11455.  
  11456.  
  11457. ΓòÉΓòÉΓòÉ 8.18. EXTPROC Support ΓòÉΓòÉΓòÉ
  11458.  
  11459. For compatiblility with CMD.EXE, 4OS2 offers an external processor (EXTPROC) 
  11460. option for batch files that lets you define an external program to process a 
  11461. particular .CMD file.  To identify a .CMD file to be used with an external 
  11462. processor, place the string "EXTPROC" as the first word on the first line of 
  11463. the file, followed by the name of the external program that should be called. 
  11464. 4OS2 will start the program and pass it the name of the .CMD file and any 
  11465. command-line arguments that were entered. 
  11466.  
  11467. For example, suppose GETDATA.CMD contains the following lines: 
  11468.  
  11469.         EXTPROC D:\DATAACQ\DATALOAD.EXE
  11470.         OPEN PORT1
  11471.         READ 4000
  11472.         DISKWRITE D:\DATAACQ\PORT1\RAW
  11473.  
  11474. Then if you entered the command: 
  11475.  
  11476.         [d:\dataacq] getdata /p17
  11477.  
  11478. 4OS2 would read the GETDATA.CMD file, determine that it began with an EXTPROC 
  11479. command, read the name of the processor program, and then execute the command: 
  11480.  
  11481.         D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD /p17
  11482.  
  11483. The hypothetical DATALOAD.EXE program would then be responsible for reopening 
  11484. the GETDATA.CMD file, ignoring the EXTPROC line at the start, and interpreting 
  11485. the other instructions in the file. It would also have to respond appropriately 
  11486. to the command-line parameter entered (/p17). 
  11487.  
  11488. Do not try to use 4OS2 or Take Command as the external processor named on the 
  11489. EXTPROC line in the .CMD file.  It will interpret the EXTPROC line as a command 
  11490. to re-open themselves.  The result will be an infinite loop that will continue 
  11491. until the computer runs out of resources and locks up. 
  11492.  
  11493.  
  11494. ΓòÉΓòÉΓòÉ 9. Environment Variables and Functions ΓòÉΓòÉΓòÉ
  11495.  
  11496. The environment is a collection of information about your computer that every 
  11497. program receives.  Each entry in the environment consists of a variable name, 
  11498. followed by an equal sign and a string of text.  You can automatically 
  11499. substitute the text for the variable name in any command.  To create the 
  11500. substitution, include a percent sign [%] and a variable name on the command 
  11501. line or in an alias or batch file. 
  11502.  
  11503. The following environment variables have special meanings in 4OS2: 
  11504.  
  11505.             CDPATH 
  11506.             CMDLINE 
  11507.             COLORDIR 
  11508.             COMSPEC 
  11509.             FILECOMPLETION 
  11510.             PATH 
  11511.             PROMPT 
  11512.  
  11513.  4OS2 also supports two special types of variables.  Internal variables are 
  11514.  similar to environment variables, but are stored internally within 4OS2, and 
  11515.  are not visible in the environment.  They provide information about your 
  11516.  system for use in batch files and aliases.  Variable functions are referenced 
  11517.  like environment variables, but perform additional functions like file 
  11518.  handling, string manipulation and arithmetic calculations. 
  11519.  
  11520.  In 4OS2 the size of the environment is set automatically, and increased as 
  11521.  needed when you add variables. 
  11522.  
  11523.  The SET command is used to create environment variables. For example, you can 
  11524.  create a variable named BACKUP like this: 
  11525.  
  11526.           [c:\] set BACKUP=*.bak;*.bk!;*.bk
  11527.  
  11528.  If you then type 
  11529.  
  11530.           [c:\] del %BACKUP
  11531.  
  11532.  it is equivalent to the following command: 
  11533.  
  11534.           del *.bak;*.bk!;*.bk
  11535.  
  11536.  Environment variable names may contain any alphabetic or numeric characters, 
  11537.  the underscore character [_], and the dollar sign [$].  You can force 
  11538.  acceptance of other characters by including the full variable name in square 
  11539.  brackets, like this: %[AB##2].  You can also "nest" environment variables 
  11540.  using square brackets.  For example %[%var1] means "the contents of the 
  11541.  variable whose name is stored in VAR1".  A variable referenced with this 
  11542.  technique cannot contain more than 255 characters of information.  Nested 
  11543.  variable expansion can be disabled with the SETDOS /X command. 
  11544.  
  11545.  Environment variables may contain alias names.  The command processor will 
  11546.  substitute the variable value for the name, then check for any alias name 
  11547.  which may have been included within the variable's value.  For example, the 
  11548.  following commands would generate a 2-column directory of the .TXT files: 
  11549.  
  11550.           [c:\] alias d2 dir /2
  11551.           [c:\] set cmd=d2
  11552.           [c:\] %cmd *.txt
  11553.  
  11554.  The trailing percent sign that was traditionally required for environment 
  11555.  variable names is not usually required in 4OS2, which accept any character 
  11556.  that cannot be part of a variable name (including a space) as the terminator. 
  11557.  However, the trailing percent can be used to maintain compatibility. 
  11558.  
  11559.  The trailing percent sign is needed if you want to join two variable values. 
  11560.  The following examples show the possible interactions between variables and 
  11561.  literal strings.  First, create two environment variables called ONE and TWO 
  11562.  this way: 
  11563.  
  11564.           [c:\] set ONE=abcd
  11565.           [c:\] set TWO=efgh
  11566.  
  11567.  Now the following combinations produce the output text shown: 
  11568.  
  11569.           %ONE%TWO            abcdTWO   ("%ONE%" + "TWO")
  11570.           %ONE%TWO%           abcdTWO   ("%ONE%" + "TWO%")
  11571.           %ONE%%TWO           abcdefgh  ("%ONE%" + "%TWO")
  11572.           %ONE%%TWO%          abcdefgh  ("%ONE%" + "%TWO%")
  11573.           %ONE%[TWO]          abcd[TWO] ("%ONE%" + "[TWO]")
  11574.           %ONE%[TWO]%         abcd[TWO] ("%ONE%" + "[TWO]%")
  11575.           %[ONE]%TWO          abcdefgh  ("%[ONE]" + "%TWO")
  11576.           %[ONE]%TWO%         abcdefgh  ("%[ONE]" + "%TWO%")
  11577.  
  11578.  If you want to pass a percent sign to a command, or a string which includes a 
  11579.  percent sign, you must use two percent signs in a row. Otherwise, the single 
  11580.  percent sign will be seen as the beginning of a variable name and will not be 
  11581.  passed on to the command.  For example, to display the string "We're with you 
  11582.  100%" you would use the command: 
  11583.  
  11584.           echo We're with you 100%%
  11585.  
  11586.  You can also use back quotes around the text, rather than a double percent 
  11587.  sign.  See Argument Quoting for details. 
  11588.  
  11589.  
  11590. ΓòÉΓòÉΓòÉ 9.1. CDPATH ΓòÉΓòÉΓòÉ
  11591.  
  11592. CDPATH 
  11593.  
  11594.  
  11595. ΓòÉΓòÉΓòÉ 9.2. CMDLINE ΓòÉΓòÉΓòÉ
  11596.  
  11597. CMDLINE is the fully expanded text of the currently executing command line. 
  11598. CMDLINE is set just before invoking any .COM, .EXE, .BTM, .BAT, or .CMD file. 
  11599. If a command line is prefaced with an "@" to prevent echoing, it will not be 
  11600. put in CMDLINE, and any previous CMDLINE variable will be removed from the 
  11601. environment. 
  11602.  
  11603.  
  11604. ΓòÉΓòÉΓòÉ 9.3. COLORDIR ΓòÉΓòÉΓòÉ
  11605.  
  11606. COLORDIR controls directory display colors used by DIR and SELECT.  See the 
  11607. Color-Coded Directories topic under the DIR command for a complete description 
  11608. of the format of this variable. 
  11609.  
  11610.  
  11611. ΓòÉΓòÉΓòÉ 9.4. COMSPEC ΓòÉΓòÉΓòÉ
  11612.  
  11613. COMSPEC contains the full path and name of 4OS2.  For example, if 4OS2 is 
  11614. stored in the directory C:\4OS2, the COMSPEC variable should be set to 
  11615. C:\4OS2\4OS2.EXE.  COMSPEC is used by applications which need to find 4OS2 to 
  11616. implement a "shell to the command prompt" feature. 
  11617.  
  11618. You can set the COMSPEC variable by specifying the COMSPEC path with a SET 
  11619. COMSPEC command in CONFIG.SYS, or including the COMSPEC path on the 4OS2 
  11620. startup command line. 
  11621.  
  11622.  
  11623. ΓòÉΓòÉΓòÉ 9.5. FILECOMPLETION ΓòÉΓòÉΓòÉ
  11624.  
  11625. FILECOMPLETION sets the files made available during filename completion for 
  11626. selected commands.  See Customizing Filename Completion in the Filename 
  11627. Completion topic for a complete description of the format of this variable. 
  11628.  
  11629.  
  11630. ΓòÉΓòÉΓòÉ 9.6. PATH ΓòÉΓòÉΓòÉ
  11631.  
  11632. PATH is a list of directories that 4OS2 will search for executable files that 
  11633. aren't in the current directory.  PATH may also be used by some application 
  11634. programs to find their own files.  See the PATH command for a full description 
  11635. of this variable. 
  11636.  
  11637.  
  11638. ΓòÉΓòÉΓòÉ 9.7. PROMPT ΓòÉΓòÉΓòÉ
  11639.  
  11640. PROMPT defines the command-line prompt.  It can be set or changed with the 
  11641. PROMPT command. 
  11642.  
  11643.  
  11644. ΓòÉΓòÉΓòÉ 9.8. Internal Variables ΓòÉΓòÉΓòÉ
  11645.  
  11646. Internal variables are special environment variables built into 4OS2 to provide 
  11647. information about your system.  They are not actually stored in the 
  11648. environment, but can be used in commands, aliases, and batch files just like 
  11649. any other environment variable. 
  11650.  
  11651. The values of these variables are stored internally in 4OS2, and cannot be 
  11652. changed with the SET, UNSET, or ESET command.  However, you can override any of 
  11653. these variables by defining a new variable with the same name. 
  11654.  
  11655. The list below gives a one-line description of each variable, and a 
  11656. cross-reference which selects a full screen help topic on that variable. Most 
  11657. of the variables are simple enough that the one-line description is sufficient. 
  11658. However, for those variables marked with an asterisk [*], the cross-reference 
  11659. topic contains some additional information you may wish to review.  You can 
  11660. also obtain help on any variable with a HELP variable name command at the 
  11661. prompt (this is why each variable has its own topic, in addition to its 
  11662. appearance in the list below). 
  11663.  
  11664. See the discussion after the variable list for some additional information, and 
  11665. examples of how these variables can be used.  For additional examples, see the 
  11666. EXAMPLES.BTM file which came with 4OS2. 
  11667.  
  11668. The variables are: 
  11669.  
  11670. Hardware status 
  11671.  
  11672.         _CPU            CPU type (86, 186, 200, 386, 486, 586) 
  11673.         _MONITOR        Monitor type (mono or color) 
  11674.         _NDP            Coprocessor type (0, 87, 287, 387) 
  11675.         _VIDEO          Video board type (mono, cga, ega, vga, xga, 8514, or 
  11676.                         IA/A) 
  11677.  
  11678.  Operating system and software status 
  11679.  
  11680.         _ANSI           ANSI status (always 1 in 4OS2) 
  11681.         _APMAC          * APM AC line status 
  11682.         _APMBATT        * APM battery status 
  11683.         _APMLIFE        * APM battery life 
  11684.         _BOOT           Boot drive letter, without a colon 
  11685.         _CI             Current cursor shape in insert mode 
  11686.         _CO             Current cursor shape in overstrike mode 
  11687.         _CODEPAGE       Current code page number 
  11688.         _COUNTRY        Current country code 
  11689.         _DOS            * Operating system (DOS, OS2, etc.) 
  11690.         _DOSVER         * Operating system version (2.1, 3.0, etc.) 
  11691.         _KBHIT          Keystroke waiting in buffer (0 or 1) 
  11692.         _MOUSE          Mouse driver flag (always 1 in 4OS2) 
  11693.  
  11694.  Command processor status 
  11695.  
  11696.         _4VER           4OS2 version (2.5, 2.51, etc.) 
  11697.         _BATCH          Batch nesting level 
  11698.         _BATCHLINE      Current line number in current batch file 
  11699.         _BATCHNAME      Name of current batch file 
  11700.         _DNAME          Name of file used to store file descriptions 
  11701.         _HLOGFILE       Current history log file name 
  11702.         _LOGFILE        Current log file name 
  11703.         _PID            4OS2 process ID (numeric) 
  11704.         _PIPE           Whether running in a pipe 
  11705.         _PPID           Parent process ID (numeric) 
  11706.         _PTYPE          OS/2 session type (AVIO, DT, FS, PM) 
  11707.         _SHELL          Shell level (0, 1, 2, ...) 
  11708.         _SID            Current OS/2 session ID 
  11709.         _TRANSIENT      * Transient shell flag (0 or 1) 
  11710.         _WINTITLE       Current window title 
  11711.  
  11712.  Screen and color 
  11713.  
  11714.         _BG             Background color at cursor position 
  11715.         _COLUMN         Current cursor column 
  11716.         _COLUMNS        Screen width 
  11717.         _FG             Foreground color at cursor position 
  11718.         _ROW            Current cursor row 
  11719.         _ROWS           Screen height 
  11720.         _XPIXELS        Physical screen horizontal size 
  11721.         _YPIXELS        Physical screen vertical size 
  11722.  
  11723.  Drives and directories 
  11724.  
  11725.         _CWD            Current drive and directory (d:\path) 
  11726.         _CWDS           Current drive and directory with trailing \ (d:\path\) 
  11727.         _CWP            Current directory (\path) 
  11728.         _CWPS           Current directory with trailing \ (\path\) 
  11729.         _DISK           Current drive (C, D, etc.) 
  11730.         _LASTDISK       Last possible drive (E, F, etc.) 
  11731.  
  11732.  Dates and times 
  11733.  
  11734.         _DATE           * Current date (mm-dd-yy) 
  11735.         _DAY            Day of the month (1 - 31) 
  11736.         _DOW            Day of the week (Mon, Tue, Wed, etc.) 
  11737.         _DOWI           Integer day of the week (1 = Sunday, 2= Monday, etc.) 
  11738.         _DOY            Day of the year (1 - 366) 
  11739.         _HOUR           Hour (0 - 23) 
  11740.         _MINUTE         Minute (0 - 59) 
  11741.         _MONTH          Month of the year (1 - 12) 
  11742.         _SECOND         Second (0 - 59) 
  11743.         _TIME           * Current time (hh:mm:ss) 
  11744.         _YEAR           Year (1980 - 2099) 
  11745.  
  11746.  Error codes 
  11747.  
  11748.         ?               * Exit code, last external program 
  11749.         _?              * Exit code, last internal command 
  11750.         _SYSERR         * Last OS/2 error code 
  11751.  
  11752.  Compatibility 
  11753.  
  11754.         =               * Substitutes escape character 
  11755.         +               * Substitutes command separator 
  11756.  
  11757.  Additional Notes 
  11758.  
  11759.  These internal variables are often used in batch files and aliases to examine 
  11760.  system resources and adjust to the current computer settings.  You can examine 
  11761.  the contents of any internal variable (except %= and %+) from the command line 
  11762.  with a command like this: 
  11763.  
  11764.           [c:\] echo %variablename
  11765.  
  11766.  On disk volumes which do not support long filenames, variables which return a 
  11767.  path or file name will return their result in upper or lower case depending on 
  11768.  the value of the SETDOS /U switch or the UpperCase directive in the .INI file. 
  11769.  On volumes which do support long filenames, these variables will return names 
  11770.  as they are stored on the disk and no case shifting will be performed. 
  11771.  Returned filename values which include long filenames are not quoted 
  11772.  automatically; you must add quotes yourself if they are required for your use 
  11773.  of the variable value (see Argument Quoting). 
  11774.  
  11775.  Some variables return values based on information provided by your operating 
  11776.  system.  These variables will only return correct information if the operating 
  11777.  system provides it.  For example, _APMBATT will not return accurate results if 
  11778.  your operating system and Advanced Power Management drivers do not provide 
  11779.  correct information on battery status to the command processor. 
  11780.  
  11781.  Examples 
  11782.  
  11783.  You can use these variables in a wide variety of ways depending on your needs. 
  11784.  Here are just a few examples.  For additional examples, see the EXAMPLES.BTM 
  11785.  file which came with 4OS2. 
  11786.  
  11787.  Some of these examples rely on the IF and IFF commands to test the value of a 
  11788.  variable and perform different actions based on that value. 
  11789.  
  11790.  In a batch file, set the color based on the video card type: 
  11791.  
  11792.           iff "%_video"=="mono" then
  11793.             color bright white on black
  11794.           else
  11795.             color bright white on blue
  11796.           endiff
  11797.  
  11798.  Store the current date and time in a file, then save the output of a DIR 
  11799.  command in the same file: 
  11800.  
  11801.           echo Directory as of %_date %_time > dirsave
  11802.           dir >> dirsave
  11803.  
  11804.  Set up a prompt for the primary shell which displays the time and current 
  11805.  directory, and a different one for secondary shells which includes the shell 
  11806.  level rather than the time (see PROMPT for details about setting the prompt). 
  11807.  Also set different background colors for the two shells, without changing the 
  11808.  foreground color.  You might use a sequence like this in your 4START file (see 
  11809.  Automatic Batch Files): 
  11810.  
  11811.           iff %_shell==0 then
  11812.             prompt $t $p$g
  11813.             color %_fg on blue
  11814.           else
  11815.             prompt [$z] $p$g
  11816.             color %_fg on cyan
  11817.           endiff
  11818.  
  11819.  
  11820. ΓòÉΓòÉΓòÉ 9.8.1. ? ΓòÉΓòÉΓòÉ
  11821.  
  11822. ? contains the exit code of the last external command.  Many programs return a 
  11823. "0" to indicate success and a non-zero value to signal an error.  However, not 
  11824. all programs return an exit code.  If no explicit exit code is returned, the 
  11825. value of %? is undefined. 
  11826.  
  11827.  
  11828. ΓòÉΓòÉΓòÉ 9.8.2. _? ΓòÉΓòÉΓòÉ
  11829.  
  11830. _? contains the exit code of the last internal command.  It is set to "0" if 
  11831. the command was successful, "1" if a usage error occurred, "2" if another 
  11832. command processor error or an operating system error occurred, or "3" if the 
  11833. command was interrupted by Ctrl-C or Ctrl-Break.  You must use or save this 
  11834. value immediately, because it is set by every internal command. 
  11835.  
  11836.  
  11837. ΓòÉΓòÉΓòÉ 9.8.3. = ΓòÉΓòÉΓòÉ
  11838.  
  11839. = returns the current escape character.  Use this variable, instead of the 
  11840. actual escape character, if you want your batch files and aliases to work 
  11841. regardless of how the escape character is defined.  For example, if the escape 
  11842. character is a caret [^] (the default in 4OS2) both of the commands below will 
  11843. send a form feed to the printer.  However, if the escape character has been 
  11844. changed,  the first command will send the string "^f" to the printer, while the 
  11845. second command will continue to work as intended. 
  11846.  
  11847.         echos ^f > prn
  11848.         echos %=f > prn
  11849.  
  11850.  
  11851. ΓòÉΓòÉΓòÉ 9.8.4. + ΓòÉΓòÉΓòÉ
  11852.  
  11853. + returns the current command separator.  Use this variable, instead of the 
  11854. actual command separator, if you want your batch files and aliases to work 
  11855. regardless of how the command separator is defined.  For example, if the 
  11856. command separator is an ampersand [&] (the default in 4OS2) both of the 
  11857. commands below will display "Hello" on one line and "world" on the next. 
  11858. However, if the command separator has been changed the first command will 
  11859. display "Hello & echo world", while the second command will continue to work as 
  11860. intended. 
  11861.  
  11862.         echo Hello & echo world
  11863.         echo Hello %+ echo world
  11864.  
  11865.  
  11866. ΓòÉΓòÉΓòÉ 9.8.5. _4VER ΓòÉΓòÉΓòÉ
  11867.  
  11868. _4VER is the current 4OS2 version (for example, "3.0"). The current decimal 
  11869. character is used to separate the major and minor version numbers (see 
  11870. DecimalChar) for details. 
  11871.  
  11872.  
  11873. ΓòÉΓòÉΓòÉ 9.8.6. _ANSI ΓòÉΓòÉΓòÉ
  11874.  
  11875. _ANSI is always "1" in 4OS2.  (4OS2 enables OS/2's ANSI support, and assumes 
  11876. that it remains enabled.) 
  11877.  
  11878.  
  11879. ΓòÉΓòÉΓòÉ 9.8.7. _APMAC ΓòÉΓòÉΓòÉ
  11880.  
  11881. _APMAC is the Advanced Power Management AC line status ("on-line", "off-line", 
  11882. or "unknown").  An empty string is returned if APM is not installed on your 
  11883. system. 
  11884.  
  11885.  
  11886. ΓòÉΓòÉΓòÉ 9.8.8. _APMBATT ΓòÉΓòÉΓòÉ
  11887.  
  11888. _APMBATT is the Advanced Power Management battery status ("high", "low", 
  11889. "critical", "charging", or "unknown").  An empty string is returned if APM is 
  11890. not installed. 
  11891.  
  11892.  
  11893. ΓòÉΓòÉΓòÉ 9.8.9. _APMLIFE ΓòÉΓòÉΓòÉ
  11894.  
  11895. _APMLIFE is the Advanced Power Management remaining battery life (0 - 100 or 
  11896. "unknown").  An empty string is returned if APM is not installed. 
  11897.  
  11898.  
  11899. ΓòÉΓòÉΓòÉ 9.8.10. _BATCH ΓòÉΓòÉΓòÉ
  11900.  
  11901. _BATCH is the current batch nesting level.  It is "0" if no batch file is 
  11902. currently being processed. 
  11903.  
  11904.  
  11905. ΓòÉΓòÉΓòÉ 9.8.11. _BATCHLINE ΓòÉΓòÉΓòÉ
  11906.  
  11907. _BATCHLINE is the current line number in the current batch file.  It is "-1" if 
  11908. no batch file is currently being processed. 
  11909.  
  11910.  
  11911. ΓòÉΓòÉΓòÉ 9.8.12. _BATCHNAME ΓòÉΓòÉΓòÉ
  11912.  
  11913. _BATCHNAME is the full path and file name of the current batch file.  It is an 
  11914. empty string if no batch file is currently being processed. 
  11915.  
  11916.  
  11917. ΓòÉΓòÉΓòÉ 9.8.13. _BG ΓòÉΓòÉΓòÉ
  11918.  
  11919. _BG is a string containing the first three characters of the screen background 
  11920. color at the current cursor location (for example, "Bla"). 
  11921.  
  11922.  
  11923. ΓòÉΓòÉΓòÉ 9.8.14. _BOOT ΓòÉΓòÉΓòÉ
  11924.  
  11925. _BOOT is the boot drive letter, without a colon. 
  11926.  
  11927.  
  11928. ΓòÉΓòÉΓòÉ 9.8.15. _CI ΓòÉΓòÉΓòÉ
  11929.  
  11930. _CI is the insert-mode cursor shape, as a percentage (see SETDOS /S and the 
  11931. CursorIns directive). 
  11932.  
  11933.  
  11934. ΓòÉΓòÉΓòÉ 9.8.16. _CO ΓòÉΓòÉΓòÉ
  11935.  
  11936. _CO is the overstrike-mode cursor shape, as a percentage (see SETDOS /S and the 
  11937. CursorOver directive). 
  11938.  
  11939.  
  11940. ΓòÉΓòÉΓòÉ 9.8.17. _CODEPAGE ΓòÉΓòÉΓòÉ
  11941.  
  11942. _CODEPAGE is the current code page number (see CHCP). 
  11943.  
  11944.  
  11945. ΓòÉΓòÉΓòÉ 9.8.18. _COLUMN ΓòÉΓòÉΓòÉ
  11946.  
  11947. _COLUMN is the current cursor column (for example, "0" for the left side of the 
  11948. screen). 
  11949.  
  11950.  
  11951. ΓòÉΓòÉΓòÉ 9.8.19. _COLUMNS ΓòÉΓòÉΓòÉ
  11952.  
  11953. _COLUMNS is the current number of screen columns (for example, "80"). 
  11954.  
  11955.  
  11956. ΓòÉΓòÉΓòÉ 9.8.20. _COUNTRY ΓòÉΓòÉΓòÉ
  11957.  
  11958. _COUNTRY is the current country code. 
  11959.  
  11960.  
  11961. ΓòÉΓòÉΓòÉ 9.8.21. _CPU ΓòÉΓòÉΓòÉ
  11962.  
  11963. _CPU is the CPU type: 
  11964.  
  11965.         86      8086 and 8088 
  11966.         186     80186 and 80188 
  11967.         200     NEC V20 and V30 
  11968.         286     80286 
  11969.         386     i386 
  11970.         486     i486 
  11971.         586     Pentium 
  11972.         686     Pentium Pro 
  11973.  
  11974.  
  11975. ΓòÉΓòÉΓòÉ 9.8.22. _CWD ΓòÉΓòÉΓòÉ
  11976.  
  11977. _CWD is the current working directory in the format d:\pathname. 
  11978.  
  11979.  
  11980. ΓòÉΓòÉΓòÉ 9.8.23. _CWDS ΓòÉΓòÉΓòÉ
  11981.  
  11982. _CWDS has the same value as CWD, except it ends the pathname with a backslash 
  11983. [\]. 
  11984.  
  11985.  
  11986. ΓòÉΓòÉΓòÉ 9.8.24. _CWP ΓòÉΓòÉΓòÉ
  11987.  
  11988. _CWP is the current working directory in the format \pathname. 
  11989.  
  11990.  
  11991. ΓòÉΓòÉΓòÉ 9.8.25. _CWPS ΓòÉΓòÉΓòÉ
  11992.  
  11993. _CWPS has the same value as CWP, except it ends the pathname with a backslash 
  11994. [\]. 
  11995.  
  11996.  
  11997. ΓòÉΓòÉΓòÉ 9.8.26. _DATE ΓòÉΓòÉΓòÉ
  11998.  
  11999. _DATE contains the current system date, in the format mm-dd-yy (U.S.), dd-mm-yy 
  12000. (Europe), or yy-mm-dd (Japan). 
  12001.  
  12002.  
  12003. ΓòÉΓòÉΓòÉ 9.8.27. _DAY ΓòÉΓòÉΓòÉ
  12004.  
  12005. _DAY is the current day of the month (1 to 31). 
  12006.  
  12007.  
  12008. ΓòÉΓòÉΓòÉ 9.8.28. _DISK ΓòÉΓòÉΓòÉ
  12009.  
  12010. _DISK is the current disk drive, without a colon (for example, "C"). 
  12011.  
  12012.  
  12013. ΓòÉΓòÉΓòÉ 9.8.29. _DNAME ΓòÉΓòÉΓòÉ
  12014.  
  12015. _DNAME is the name of the file used to store file descriptions.  It can be 
  12016. changed with the DescriptionName directive in 4OS2.INI or the SETDOS /D 
  12017. command. 
  12018.  
  12019.  
  12020. ΓòÉΓòÉΓòÉ 9.8.30. _DOS ΓòÉΓòÉΓòÉ
  12021.  
  12022. _DOS is the operating system and command processor type.  Each JP Software 
  12023. command processor returns a different value, as follows: 
  12024.  
  12025.         Product                         Returns 
  12026.  
  12027.         4DOS                            "DOS" 
  12028.         4OS2                            "OS2" 
  12029.         4NT                             "NT" 
  12030.         Take Command/16                 "WIN" 
  12031.         Take Command/32                 "WIN95" (under Windows 95) 
  12032.         Take Command/32                 "WIN32" (under Windows NT) 
  12033.         Take Command for OS/2           "PM" (for OS/2 Presentation Manager) 
  12034.  
  12035.  This variable is useful if you have batch files running in more than one 
  12036.  environment, and need to take different actions depending on the underlying 
  12037.  operating environment or command processor. 
  12038.  
  12039.  
  12040. ΓòÉΓòÉΓòÉ 9.8.31. _DOSVER ΓòÉΓòÉΓòÉ
  12041.  
  12042. _DOSVER is the current operating system version (for example, "4.00"). The 
  12043. current decimal character is used to separate the major and minor version 
  12044. numbers (see DecimalChar) for details. 
  12045.  
  12046.  
  12047. ΓòÉΓòÉΓòÉ 9.8.32. _DOW ΓòÉΓòÉΓòÉ
  12048.  
  12049. _DOW is the first three characters of the current day of the week ("Mon", 
  12050. "Tue", "Wed", etc.). 
  12051.  
  12052.  
  12053. ΓòÉΓòÉΓòÉ 9.8.33. _DOWI ΓòÉΓòÉΓòÉ
  12054.  
  12055. _DOWI is the current day of the week as an integer (1 = Sunday, 2 = Monday, 
  12056. etc.). 
  12057.  
  12058.  
  12059. ΓòÉΓòÉΓòÉ 9.8.34. _DOY ΓòÉΓòÉΓòÉ
  12060.  
  12061. _DOY is the day of the year (1 to 366). 
  12062.  
  12063.  
  12064. ΓòÉΓòÉΓòÉ 9.8.35. _FG ΓòÉΓòÉΓòÉ
  12065.  
  12066. _FG is a string containing the first three letters of the screen foreground 
  12067. color at the current cursor position (for example, "Whi"). 
  12068.  
  12069.  
  12070. ΓòÉΓòÉΓòÉ 9.8.36. _HLOGFILE ΓòÉΓòÉΓòÉ
  12071.  
  12072. _HLOGFILE  returns the name of the current history log file (or an empty string 
  12073. if LOG /H is OFF).  See LOG for information on logging. 
  12074.  
  12075.  
  12076. ΓòÉΓòÉΓòÉ 9.8.37. _HOUR ΓòÉΓòÉΓòÉ
  12077.  
  12078. _HOUR is the current hour (0 - 23). 
  12079.  
  12080.  
  12081. ΓòÉΓòÉΓòÉ 9.8.38. _KBHIT ΓòÉΓòÉΓòÉ
  12082.  
  12083. _KBHIT returns 1 if one or more keystrokes are waiting in the keyboard buffer, 
  12084. or 0 if the keyboard buffer is empty. 
  12085.  
  12086.  
  12087. ΓòÉΓòÉΓòÉ 9.8.39. _LASTDISK ΓòÉΓòÉΓòÉ
  12088.  
  12089. _LASTDISK is the last valid drive letter, without a colon. 
  12090.  
  12091.  
  12092. ΓòÉΓòÉΓòÉ 9.8.40. _LOGFILE ΓòÉΓòÉΓòÉ
  12093.  
  12094. _LOGFILE  returns the name of the current log file (or an empty string if LOG 
  12095. is OFF).  See LOG for information on logging. 
  12096.  
  12097.  
  12098. ΓòÉΓòÉΓòÉ 9.8.41. _MINUTE ΓòÉΓòÉΓòÉ
  12099.  
  12100. _MINUTE is the current minute (0 - 59). 
  12101.  
  12102.  
  12103. ΓòÉΓòÉΓòÉ 9.8.42. _MONITOR ΓòÉΓòÉΓòÉ
  12104.  
  12105. _MONITOR is the monitor type ("mono" or "color"). 
  12106.  
  12107.  
  12108. ΓòÉΓòÉΓòÉ 9.8.43. _MONTH ΓòÉΓòÉΓòÉ
  12109.  
  12110. _MONTH is the current month of the year (1 to 12). 
  12111.  
  12112.  
  12113. ΓòÉΓòÉΓòÉ 9.8.44. _MOUSE ΓòÉΓòÉΓòÉ
  12114.  
  12115. _MOUSE always returns "1" in 4OS2. 
  12116.  
  12117.  
  12118. ΓòÉΓòÉΓòÉ 9.8.45. _NDP ΓòÉΓòÉΓòÉ
  12119.  
  12120. _NDP is the coprocessor type: 
  12121.  
  12122.         0       no coprocessor is installed 
  12123.         87      8087 
  12124.         287     80287 
  12125.         387     80387, 80486DX, 80487, Pentium, or Pentium Pro 
  12126.  
  12127.  
  12128. ΓòÉΓòÉΓòÉ 9.8.46. _PID ΓòÉΓòÉΓòÉ
  12129.  
  12130. _PID is the current process ID number. 
  12131.  
  12132.  
  12133. ΓòÉΓòÉΓòÉ 9.8.47. _PIPE ΓòÉΓòÉΓòÉ
  12134.  
  12135. _PIPE returns "1" if the current process is running inside a pipe or "0" 
  12136. otherwise. 
  12137.  
  12138.  
  12139. ΓòÉΓòÉΓòÉ 9.8.48. _PPID ΓòÉΓòÉΓòÉ
  12140.  
  12141. _PPID is the process ID number of the parent process. 
  12142.  
  12143.  
  12144. ΓòÉΓòÉΓòÉ 9.8.49. _PTYPE ΓòÉΓòÉΓòÉ
  12145.  
  12146. _PTYPE is the current OS/2 process type: 
  12147.  
  12148.         AVIO    Character mode, windowed 
  12149.         DT      Detached (no screen in use) 
  12150.         FS      Character mode, full-screen 
  12151.         PM      Presentation Manager 
  12152.  
  12153.  
  12154. ΓòÉΓòÉΓòÉ 9.8.50. _ROW ΓòÉΓòÉΓòÉ
  12155.  
  12156. _ROW is the current cursor row (for example, "0" for the top of the screen). 
  12157.  
  12158.  
  12159. ΓòÉΓòÉΓòÉ 9.8.51. _ROWS ΓòÉΓòÉΓòÉ
  12160.  
  12161. _ROWS is the current number of screen rows (for example, "25"). 
  12162.  
  12163.  
  12164. ΓòÉΓòÉΓòÉ 9.8.52. _SECOND ΓòÉΓòÉΓòÉ
  12165.  
  12166. _SECOND is the current second (0 - 59). 
  12167.  
  12168.  
  12169. ΓòÉΓòÉΓòÉ 9.8.53. _SHELL ΓòÉΓòÉΓòÉ
  12170.  
  12171. _SHELL is the current shell nesting level.  The primary shell is level "0", and 
  12172. each subsequent secondary shell increments the level by 1. 
  12173.  
  12174.  
  12175. ΓòÉΓòÉΓòÉ 9.8.54. _SID ΓòÉΓòÉΓòÉ
  12176.  
  12177. _SID is the session ID number. 
  12178.  
  12179.  
  12180. ΓòÉΓòÉΓòÉ 9.8.55. _SYSERR ΓòÉΓòÉΓòÉ
  12181.  
  12182. _SYSERR is the error code of the last operating system error. You will need a 
  12183. technical or programmer's manual to understand these error values. 
  12184.  
  12185.  
  12186. ΓòÉΓòÉΓòÉ 9.8.56. _TIME ΓòÉΓòÉΓòÉ
  12187.  
  12188. _TIME contains the current system time in the format hh:mm:ss.  The separator 
  12189. character may vary depending upon your country information. 
  12190.  
  12191.  
  12192. ΓòÉΓòÉΓòÉ 9.8.57. _TRANSIENT ΓòÉΓòÉΓòÉ
  12193.  
  12194. _TRANSIENT is "1" if the current shell is transient (started with a /C, see 
  12195. Starting 4OS2 for details), or "0" otherwise. 
  12196.  
  12197.  
  12198. ΓòÉΓòÉΓòÉ 9.8.58. _VIDEO ΓòÉΓòÉΓòÉ
  12199.  
  12200. _VIDEO is the video card type ("mono", "cga", "ega", "vga", "xga", "8514", or 
  12201. "IA/A" (for the PS/2 Image Adapter/A). 
  12202.  
  12203.  
  12204. ΓòÉΓòÉΓòÉ 9.8.59. _WINTITLE ΓòÉΓòÉΓòÉ
  12205.  
  12206. _WINTITLE returns the title of the current window. 
  12207.  
  12208.  
  12209. ΓòÉΓòÉΓòÉ 9.8.60. _XPIXELS ΓòÉΓòÉΓòÉ
  12210.  
  12211. _XPIXELS returns the physical screen horizontal size in pixels. 
  12212.  
  12213.  
  12214. ΓòÉΓòÉΓòÉ 9.8.61. _YEAR ΓòÉΓòÉΓòÉ
  12215.  
  12216. _YEAR is the current year (1980 to 2099). 
  12217.  
  12218.  
  12219. ΓòÉΓòÉΓòÉ 9.8.62. _YPIXELS ΓòÉΓòÉΓòÉ
  12220.  
  12221. _YPIXELS returns the physical screen vertical size in pixels. 
  12222.  
  12223.  
  12224. ΓòÉΓòÉΓòÉ 9.9. Variable Functions ΓòÉΓòÉΓòÉ
  12225.  
  12226. Variable functions are like internal variables, but they take one or more 
  12227. arguments (which can be environment variables or even other variable functions) 
  12228. and they return a value. 
  12229.  
  12230. The list below gives a one-line description of each function, and a 
  12231. cross-reference which selects a full screen help topic on that function.  A few 
  12232. of the variables are simple enough that the one-line description is sufficient, 
  12233. but in most cases you should check for any additional information in the 
  12234. cross-reference topic if you are not already familiar with a function.  You can 
  12235. also obtain help on any function with a HELP @functionname command at the 
  12236. prompt. 
  12237.  
  12238. See the discussion after the function list for some additional information, and 
  12239. examples of how the functions can be used.  For additional examples, see the 
  12240. EXAMPLES.BTM file which came with 4OS2. 
  12241.  
  12242. The variable functions are: 
  12243.  
  12244. System status 
  12245.  
  12246.         @DOSMEM[b|k|m]                      Size of largest free memory block 
  12247.         @READSCR[row,col,len]               Read characters from the screen 
  12248.  
  12249.  Drives and devices 
  12250.  
  12251.         @CDROM[d:]                          CD-ROM drive detection (0 or 1) 
  12252.         @DEVICE[name]                       Character device detection 
  12253.         @DISKFREE[d:,b|k|m]                 Free disk space 
  12254.         @DISKTOTAL[d:,b|k|m]                Total disk space 
  12255.         @DISKUSED[d:,b|k|m]                 Used disk space 
  12256.         @FSTYPE[d:]                         File system type (FAT, HPFS, CDFS, 
  12257.                                             etc.) 
  12258.         @LABEL[d:]                          Volume label 
  12259.         @READY[d:]                          Drive ready status (0 or 1) 
  12260.         @REMOTE[d:]                         Remote (network) drive detection (0 
  12261.                                             or 1) 
  12262.         @REMOVABLE[d:]                      Removable drive detection (0 or 1) 
  12263.  
  12264.  Files 
  12265.  
  12266.         @ATTRIB[filename [,-nrhsda]]        File attribute test (0 or 1) 
  12267.         @DESCRIPT[filename]                 File description 
  12268.         @EAREAD[filename,EAname]            Read extended attribute 
  12269.         @EAWRITE[filename,EAname,value]     Write extended attribute 
  12270.         @EXETYPE[filename]                  Executable file type (DOS, PM, WIN, 
  12271.                                             etc.) 
  12272.         @FILEAGE[filename]                  File age (date and time) 
  12273.         @FILECLOSE[n]                       Close a file 
  12274.         @FILEDATE[filename]                 File date 
  12275.         @FILEOPEN[filename,mode]            Open a file 
  12276.         @FILEREAD[n [,length]]              Read next line from a file 
  12277.         @FILES[filename [,-nrhsda]]         Count files matching a wildcard 
  12278.         @FILESEEK[n,offset,start]           Move a file pointer to an offset 
  12279.         @FILESEEKL[n,offset,start]          Move a file pointer to a line 
  12280.                                             number 
  12281.         @FILESIZE[filename,b|k|m]           Size of files matching a wildcard 
  12282.         @FILETIME[filename]                 File time 
  12283.         @FILEWRITE[n,text]                  Write next line to a file 
  12284.         @FILEWRITEB[n,length,string]        Write bytes from a string to a file 
  12285.         @FINDCLOSE[filename]                Close the search handle opened by 
  12286.                                             @FINDFIRST 
  12287.         @FINDFIRST[filename [,-nrhsda]]     Find first matching file 
  12288.         @FINDNEXT[filename [,-nrhsda]]      Find next matching file 
  12289.         @LINE[filename,n]                   Read a random line from a file 
  12290.         @LINES[filename]                    Count lines in a file 
  12291.         @SEARCH[filename]                   Path search 
  12292.         @UNIQUE[d:\path]                    Create file with unique name 
  12293.  
  12294.  File names 
  12295.  
  12296.         @EXPAND[filename [,-nrhsda]]        Names of all matching files and 
  12297.                                             directories 
  12298.         @EXT[filename]                      File extension 
  12299.         @FILENAME[filename]                 File name and extension 
  12300.         @FULL[filename]                     Full file name with path 
  12301.         @NAME[filename]                     File name without path or extension 
  12302.         @PATH[filename]                     File path without name 
  12303.  
  12304.  Strings and characters 
  12305.  
  12306.         @ASCII[c]                           Numeric ASCII value for a character 
  12307.         @ CHAR[n]                           Character value for numeric ASCII 
  12308.         @FORMAT[[-][x][.y],string]          Formats (justifies) a string 
  12309.         @INDEX[string1,string2]             Position of one string in another 
  12310.         @INSERT[n,string1,string2]          Insert one string into another 
  12311.         @INSTR[start,length,string]         Extract a substring 
  12312.         @LEFT[n,string]                     Leftmost characters of a string 
  12313.         @LEN[string]                        Length of a string 
  12314.         @LOWER[string]                      Convert string to lower case 
  12315.         @REPEAT[c,n]                        Repeat a character 
  12316.         @REPLACE[string1,string2,text]      Replace all occurrences of one 
  12317.                                             string with another 
  12318.         @RIGHT[n,string]                    Rightmost characters of a string 
  12319.         @STRIP[chars,string]                Remove characters from string 
  12320.         @SUBSTR[string,start,length]        Extract a substring 
  12321.         @TRIM[string]                       Remove blanks from a string 
  12322.         @UPPER[string]                      Convert string to upper case 
  12323.         @WILD[string1,string2]              Wildcard comparison 
  12324.         @WORD[["sep",] n,string]            Extract a word from a string 
  12325.         @WORDS[["sep",] string]             Counts number of words in a string 
  12326.  
  12327.  Numbers and arithmetic 
  12328.  
  12329.         @COMMA[n]                           Inserts commas in a number 
  12330.         @CONVERT[input,output,value]        Base conversion 
  12331.         @DEC[%var]                          Decremented value of a variable 
  12332.         @EVAL[expression]                   Arithmetic calculations 
  12333.         @INC[%var]                          Incremented value of a variable 
  12334.         @INT[n]                             Integer part of a number 
  12335.         @NUMERIC[string]                    Test if a string is numeric 
  12336.         @RANDOM[min,max]                    Generate a random integer 
  12337.  
  12338.  Dates and times 
  12339.  
  12340.         @DATE[mm-dd-yy]                     Convert date to number of days 
  12341.         @DAY[mm-dd-yy]                      Day of the month 
  12342.         @DOW[mm-dd-yy]                      Day of the week 
  12343.         @DOWI[mm-dd-yy]                     Numeric day of the week 
  12344.         @DOY[mm-dd-yy]                      Numeric day of the year 
  12345.         @MAKEAGE[n]                         Convert date/time to file date/time 
  12346.         @MAKEDATE[n]                        Convert number of days to date 
  12347.         @MAKETIME[n]                        Convert number of seconds to time 
  12348.         @MONTH[mm-dd-yy]                    Month of the year 
  12349.         @TIME[hh:mm:ss]                     Convert time to number of seconds 
  12350.         @TIMER[n]                           Elapsed time of specified timer 
  12351.         @YEAR[mm-dd-yy]                     Year number (2 digits) 
  12352.  
  12353.  Utility 
  12354.  
  12355.         @ALIAS[name]                        Value of an alias 
  12356.         @CLIP[n]                            Line from the clipboard 
  12357.         @IF[condition,true,false]           Evaluates a test condition 
  12358.         @EXEC[command]                      Execute a command 
  12359.         @EXECSTR[command]                   Execute, return string 
  12360.         @REXX[expr]                         Execute a REXX expression 
  12361.         @SELECT[file,t,l,b,r,title]         Menu selection 
  12362.  
  12363.  Additional Notes 
  12364.  
  12365.  Like all environment variables, these variable functions must be preceded by a 
  12366.  percent sign (%@EVAL, %@LEN, etc.).  All variable functions must have square 
  12367.  brackets enclosing their argument(s).  The argument(s) to a variable function 
  12368.  cannot exceed 255 characters in length for all arguments taken as a group. 
  12369.  
  12370.  Specific Functions and Arguments 
  12371.  
  12372.  Some variable functions, like @DISKFREE, are shown with "b|k|m" as one of 
  12373.  their arguments.  Those functions return a number of bytes, kilobytes, or 
  12374.  megabytes based on the "b|k|m" argument: 
  12375.  
  12376.         b   return the number of bytes 
  12377.         K   return the number of kilobytes (bytes / 1,024) 
  12378.         k   return the number of thousands of bytes (bytes / 1,000) 
  12379.         M   return the number of megabytes (bytes / 1,048,576) 
  12380.         m   return the number of millions of bytes (bytes / 1,000,000) 
  12381.  
  12382.  You can include commas (or the "thousands separator" character for your 
  12383.  system) in the results from a "b|k|m" function by appending a "c" to the 
  12384.  argument.  For example, to add commas to a "b" or number of bytes result, 
  12385.  enter "bc" as the argument.  To set the thousands separator see the 
  12386.  ThousandsChar directive. 
  12387.  
  12388.  Functions which accept a date as an argument use the date format and 
  12389.  separators mandated by your country code (for example dd.mm.yy in Germany, or 
  12390.  yy-mm-dd in Japan).  The year can be entered as a 4-digit or 2-digit value. 
  12391.  Two-digit years between 80 and 99 are interpreted as 1980 - 1999; values 
  12392.  between 00 and 79 are interpreted as 2000 - 2079. 
  12393.  
  12394.  Several functions return filenames or parts of filenames.  On an HPFS drive 
  12395.  the strings returned by these functions may contain whitespace or other 
  12396.  special characters.  To avoid problems which could be caused by these 
  12397.  characters, quote the returned name before you pass it to other commands, for 
  12398.  example (either of these methods would work): 
  12399.  
  12400.           set fname="%@findfirst[pro*.*]"
  12401.           echo First PRO file contains:
  12402.           type %fname
  12403.           .....
  12404.  
  12405.           set fname=%@findfirst[pro*.*]
  12406.           echo First PRO file contains:
  12407.           type "%fname"
  12408.           .....
  12409.  
  12410.  If you don't use the quotes in the SET or TYPE command in this example, TYPE 
  12411.  will not interpret any whitespace or special characters in the name properly. 
  12412.  
  12413.  In variable functions which take a drive letter as an argument, like @DISKFREE 
  12414.  or @READY, the drive letter must be followed by a colon.  The function will 
  12415.  not work properly if you use the drive letter without the colon. 
  12416.  
  12417.  The @FILEREAD, @FILEWRITE, @FILEWRITEB, @FILESEEK, @FILESEEKL, and @FILECLOSE 
  12418.  functions allow you to access files based on their file handle.  These 
  12419.  functions should only be used with file handles returned by @FILEOPEN!  If you 
  12420.  use them with any other file handle you may damage other files opened by 4OS2 
  12421.  (or, in a secondary shell, the program which started 4OS2), or hang your 
  12422.  system. 
  12423.  
  12424.  Many functions return values based on information provided by your operating 
  12425.  system.  Such functions will only return correct information if the operating 
  12426.  system provides it.  For example, @READY will not return accurate results if 
  12427.  your operating system does not provide correct disk drive status information 
  12428.  to the command processor. 
  12429.  
  12430.  Examples 
  12431.  
  12432.  You can use variable functions in a wide variety of ways depending on your 
  12433.  needs.  We've included a few examples below to give you an idea of what's 
  12434.  possible.  For additional examples, see the EXAMPLES.BTM file which came with 
  12435.  4OS2. 
  12436.  
  12437.  To set the prompt to show the amount of free memory (see PROMPT for details on 
  12438.  including variable functions in your prompt): 
  12439.  
  12440.           [c:\] prompt (%%@dosmem[K]K) $p$g
  12441.  
  12442.  Set up a simple command-line calculator.  The calculator is used with a 
  12443.  command like CALC 3 * (4 + 5): 
  12444.  
  12445.           [c:\] alias calc `echo The answer is:  %@eval[%&]`
  12446.  
  12447.  The following batch file uses variable functions to implement "once a day" 
  12448.  execution of a group of commands.  It works by constructing a 6-digit number 
  12449.  "yymmdd" from today's date, and comparing that to a number of the same type 
  12450.  stored in the file C:\ONCEADAY.DAT. If today's date is numerically larger than 
  12451.  the saved date, and the time is after 6:00 AM, then the "once a day" commands 
  12452.  are run, and today's date is saved in the file as the new date for comparison. 
  12453.  Otherwise, no action is taken.  You can make this file simpler using the 
  12454.  %@DATE and %@TIME functions instead of using %@INSTR to extract substrings of 
  12455.  the %_DATE and %_TIME variables; we used the approach shown to demonstrate the 
  12456.  use of %@INSTR. 
  12457.  
  12458.           rem  Temporary variables used to shorten example lines:
  12459.           rem    DD is _date, DY is yymmdd date, TM is _time
  12460.           set dd=%_date
  12461.           set dy=%@instr[6,2,%dd]%@instr[0,2,%dd]%@instr[3,2,%dd]
  12462.           set lastdate=0
  12463.           iff exist c:\onceaday.dat then
  12464.              set lastdate=%@line[onceaday.dat,0]
  12465.           endiff
  12466.           iff %dy gt %lastdate then
  12467.              set tm=%_time
  12468.              iff "%@instr[0,2,%tm]%@instr[3,2,%tm]" gt "0600" then
  12469.                 rem Commands to be executed once a day go here
  12470.                 echo %dy > c:\onceaday.dat
  12471.              endiff
  12472.           endiff
  12473.  
  12474.  
  12475. ΓòÉΓòÉΓòÉ 9.9.1. @ALIAS ΓòÉΓòÉΓòÉ
  12476.  
  12477. @ALIAS[name]:  Returns the contents of the specified alias as a string, or a 
  12478. null string if the alias doesn't exist.  When manipulating strings returned by 
  12479. @ALIAS you may need to disable certain special characters with the SETDOS /X 
  12480. command. Otherwise, command separators, redirection characters, and other 
  12481. similar "punctuation" in the alias may be interpreted as part of the current 
  12482. command, rather than part of a simple text string. 
  12483.  
  12484.  
  12485. ΓòÉΓòÉΓòÉ 9.9.2. @ASCII ΓòÉΓòÉΓòÉ
  12486.  
  12487. @ASCII[c]:  Returns the numeric value of the specified ASCII character as a 
  12488. string.  For example %@ASCII[A] returns 65.  You can put an escape character 
  12489. [^] before the actual character to process.  This allows quotes and other 
  12490. special characters as the argument (e.g., %@ASCII[^`]). 
  12491.  
  12492.  
  12493. ΓòÉΓòÉΓòÉ 9.9.3. @ATTRIB ΓòÉΓòÉΓòÉ
  12494.  
  12495. @ATTRIB[filename,[-nrhsda[,p]]]:  Returns a "1" if the specified file has the 
  12496. matching attribute(s); otherwise returns a "0".  The attributes are: 
  12497.  
  12498.         N   Normal (no attributes set) 
  12499.         R   Read-only 
  12500.         H   Hidden 
  12501.         S   System 
  12502.         D   Directory 
  12503.         A   Archive 
  12504.  
  12505.  The attributes (other than N) can be combined (for example 
  12506.  %@ATTRIB[MYFILE,HS]).  You can prefix an attribute with "-" to mean 
  12507.  "everything except files with this attribute." 
  12508.  
  12509.  Without the optional p as a third argument, ATTRIB will only return a 1 if all 
  12510.  of the attributes match.  With the p, ATTRIB will return a 1 if there is a 
  12511.  partial match.  For example, if MYFILE.DAT has R, H, and A attributes set: 
  12512.  
  12513.           %@attrib[myfile.dat,r]   returns 0 because there is not an exact match
  12514.  
  12515.           %@attrib[myfile.dat,r,p] returns 1 because there is a partial match
  12516.  
  12517.  If you do not specify any attributes, ATTRIB will return the attributes of the 
  12518.  specified file in the format RHSAD, rather than a "0" or "1".  Attributes 
  12519.  which are not set will be replaced with an underscore.  For example, if 
  12520.  SECURE.DAT has the read-only, hidden, and archive attributes set, 
  12521.  %@ATTRIB[SECURE.DAT ] would return RH_A_. 
  12522.  
  12523.  
  12524. ΓòÉΓòÉΓòÉ 9.9.4. @CDROM ΓòÉΓòÉΓòÉ
  12525.  
  12526. @CDROM[d:]:  Returns "1" if the drive is a CD-ROM or "0" otherwise. 
  12527.  
  12528.  
  12529. ΓòÉΓòÉΓòÉ 9.9.5. @CHAR ΓòÉΓòÉΓòÉ
  12530.  
  12531. @CHAR[n]:  Returns the character corresponding to an ASCII numeric value.  For 
  12532. example %@CHAR[65] returns A. 
  12533.  
  12534.  
  12535. ΓòÉΓòÉΓòÉ 9.9.6. @CLIP ΓòÉΓòÉΓòÉ
  12536.  
  12537. @CLIP[n]:  Returns line n from the clipboard.  The first line is numbered 0. 
  12538. "**EOC**" is returned for all line numbers beyond the end of the clipboard. 
  12539.  
  12540.  
  12541. ΓòÉΓòÉΓòÉ 9.9.7. @COMMA ΓòÉΓòÉΓòÉ
  12542.  
  12543. @COMMA[n]:  Inserts commas, or the "thousands separator" character for your 
  12544. system, into a numeric string.  To set the thousands separator see the 
  12545. ThousandsChar directive. 
  12546.  
  12547.  
  12548. ΓòÉΓòÉΓòÉ 9.9.8. @CONVERT ΓòÉΓòÉΓòÉ
  12549.  
  12550. @CONVERT[input, output, value]:  Converts a numeric string (value) from one 
  12551. number base (input) to another (output).  Valid bases range from 2 to 36.  The 
  12552. value must be a positive number between 0 and 2**32-1 (2,147,483,647).  No 
  12553. error is returned if value is outside that range.  For example, to convert 
  12554. "1010101" from binary to decimal, use this syntax: 
  12555.  
  12556.         %@convert[2,10,1010101]
  12557.  
  12558.  
  12559. ΓòÉΓòÉΓòÉ 9.9.9. @DATE ΓòÉΓòÉΓòÉ
  12560.  
  12561. @DATE[mm-dd-yy]:  Returns the number of days since January 1, 1980 for the 
  12562. specified date.  DATE uses the date format and separators mandated by your 
  12563. country code (for example dd.mm.yy in Germany, or yy-mm-dd in Japan).  The year 
  12564. can be entered as a 4-digit or 2-digit value.  Two-digit years between 80 and 
  12565. 99 are interpreted as 1980 - 1999; values between 00 and 79 are interpreted as 
  12566. 2000 - 2079. 
  12567.  
  12568.  
  12569. ΓòÉΓòÉΓòÉ 9.9.10. @DAY ΓòÉΓòÉΓòÉ
  12570.  
  12571. @DAY[mm-dd-yy]:  Returns the numeric day of the month for the specified date. 
  12572. DATE uses the date format and separators mandated by your country code (for 
  12573. example dd.mm.yy in Germany, or yy-mm-dd in Japan).  The year can be entered as 
  12574. a 4-digit or 2-digit value.  Two-digit years between 80 and 99 are interpreted 
  12575. as 1980 - 1999; values between 00 and 79 are interpreted as 2000 - 2079. 
  12576.  
  12577.  
  12578. ΓòÉΓòÉΓòÉ 9.9.11. @DEC ΓòÉΓòÉΓòÉ
  12579.  
  12580. @DEC[%var]:  Returns the same value as @EVAL[%var - 1].  That is, it retrieves 
  12581. and decrements the value of a variable.  The variable itself is not changed; to 
  12582. do so, use a command like this: 
  12583.  
  12584.         set var=%@dec[%var]
  12585.  
  12586.  
  12587. ΓòÉΓòÉΓòÉ 9.9.12. @DESCRIPT ΓòÉΓòÉΓòÉ
  12588.  
  12589. @DESCRIPT[filename]:  Returns the file description for the specified filename 
  12590. (see DESCRIBE). 
  12591.  
  12592.  
  12593. ΓòÉΓòÉΓòÉ 9.9.13. @DEVICE ΓòÉΓòÉΓòÉ
  12594.  
  12595. @DEVICE[name]:  Returns "1" if the specified name is a character device (such 
  12596. as a printer or serial port), or "0" if not. 
  12597.  
  12598.  
  12599. ΓòÉΓòÉΓòÉ 9.9.14. @DISKFREE ΓòÉΓòÉΓòÉ
  12600.  
  12601. @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on the specified 
  12602. drive. 
  12603.  
  12604.  
  12605. ΓòÉΓòÉΓòÉ 9.9.15. @DISKTOTAL ΓòÉΓòÉΓòÉ
  12606.  
  12607. @DISKTOTAL[d:,b|k|m]:  Returns the total disk space on the specified drive. 
  12608.  
  12609.  
  12610. ΓòÉΓòÉΓòÉ 9.9.16. @DISKUSED ΓòÉΓòÉΓòÉ
  12611.  
  12612. @DISKUSED[d:,b|k|m]:  Returns the amount of disk space in use by files and 
  12613. directories on the specified drive. 
  12614.  
  12615.  
  12616. ΓòÉΓòÉΓòÉ 9.9.17. @DOSMEM ΓòÉΓòÉΓòÉ
  12617.  
  12618. @DOSMEM[b|k|m]:  Returns the size of the largest free memory block (either in 
  12619. physical or virtual memory). 
  12620.  
  12621.  
  12622. ΓòÉΓòÉΓòÉ 9.9.18. @DOW ΓòÉΓòÉΓòÉ
  12623.  
  12624. @DOW[mm-dd-yy]:  Returns the first three characters of the day of the week for 
  12625. the specified date ("Mon", "Tue", "Wed", etc.). DATE uses the date format and 
  12626. separators mandated by your country code (for example dd.mm.yy in Germany, or 
  12627. yy-mm-dd in Japan).  The year can be entered as a 4-digit or 2-digit value. 
  12628. Two-digit years between 80 and 99 are interpreted as 1980 - 1999; values 
  12629. between 00 and 79 are interpreted as 2000 - 2079. 
  12630.  
  12631.  
  12632. ΓòÉΓòÉΓòÉ 9.9.19. @DOWI ΓòÉΓòÉΓòÉ
  12633.  
  12634. @DOWI[mm-dd-yy]:  Returns the day of the week for the specified date as an 
  12635. integer (1 = Sunday, 2 = Monday, etc.).  DATE uses the date format and 
  12636. separators mandated by your country code (for example dd.mm.yy in Germany, or 
  12637. yy-mm-dd in Japan).  The year can be entered as a 4-digit or 2-digit value. 
  12638. Two-digit years between 80 and 99 are interpreted as 1980 - 1999; values 
  12639. between 00 and 79 are interpreted as 2000 - 2079. 
  12640.  
  12641.  
  12642. ΓòÉΓòÉΓòÉ 9.9.20. @DOY ΓòÉΓòÉΓòÉ
  12643.  
  12644. @DOY[mm-dd-yy]:  Returns the day of year for the specified date (1-366).  DATE 
  12645. uses the date format and separators mandated by your country code (for example 
  12646. dd.mm.yy in Germany, or yy-mm-dd in Japan).  The year can be entered as a 
  12647. 4-digit or 2-digit value.  Two-digit years between 80 and 99 are interpreted as 
  12648. 1980 - 1999; values between 00 and 79 are interpreted as 2000 - 2079. 
  12649.  
  12650.  
  12651. ΓòÉΓòÉΓòÉ 9.9.21. @EAREAD ΓòÉΓòÉΓòÉ
  12652.  
  12653. @EAREAD[filename, EAname]:  Returns the specified extended attribute ( EAname) 
  12654. for a file or an empty string if the extended attribute does not exist.  This 
  12655. function can only read EAs stored as text; it cannot read binary EAs. 
  12656. Wildcards cannot be used in the file name.  For example, to read the .SUBJECT 
  12657. extended attribute for README.TXT: 
  12658.  
  12659.         set subject=%@earead[readme.txt,.subject]
  12660.  
  12661.  
  12662. ΓòÉΓòÉΓòÉ 9.9.22. @EAWRITE ΓòÉΓòÉΓòÉ
  12663.  
  12664. @EAWRITE[filename, EAname, value]:  Creates or updates the extended attribute 
  12665. named EAname for the specified file.  Returns "0" for success or "-1" for 
  12666. failure.  This function can only write EAs stored as text; it cannot write 
  12667. binary EAs.  Wildcards cannot be used in the file name.  For example, to set 
  12668. the .SUBJECT extended attribute for README.TXT (enter this on one line): 
  12669.  
  12670.         if %@eawrite[readme.txt,.subject,Installation notes for
  12671.         latest version] != 0 echo EAWRITE failed!
  12672.  
  12673.  
  12674. ΓòÉΓòÉΓòÉ 9.9.23. @EVAL ΓòÉΓòÉΓòÉ
  12675.  
  12676. @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL supports 
  12677. addition (+), subtraction (-), multiplication (*), division (/), integer 
  12678. division (\, returns the integer part of the quotient), modulo (%%), and 
  12679. integer exponentiation (**).  The expression can contain environment variables 
  12680. and other variable functions.  @EVAL also supports parentheses, commas, and 
  12681. decimals.  Parentheses can be nested.  @EVAL will strip leading and trailing 
  12682. zeros from the result. When evaluating expressions, **, *, /, and %% take 
  12683. precedence over + and -.  For example, 3 + 4 * 2 will be interpreted as 3 + 8, 
  12684. not as 7 * 2.  To change this order of evaluation, use parentheses to specify 
  12685. the order you want. Also see @DEC and @INC 
  12686.  
  12687. To ensure that your @EVAL expressions are interpreted correctly, spaces should 
  12688. be placed on both sides of an operator.  For example: 
  12689.  
  12690.         @eval[20 %% 3 + 4]
  12691.  
  12692. The maximum precision is 16 digits to the left of the decimal point and 8 
  12693. digits to the right of the decimal point.  You can alter the default precision 
  12694. to the right of the decimal point on the Options 2 page of the OPTION dialogs 
  12695. or with the EvalMax and EvalMin directives in 4OS2.INI, and with the SETDOS /F 
  12696. command.  You can alter the decimal character from the Options 1 page of the 
  12697. OPTION dialogs, with the DecimalChar directive, or the SETDOS /G command. 
  12698.  
  12699. To ensure that your @EVAL expressions are interpreted correctly, spaces should 
  12700. be placed on both sides of each operator, for example: 
  12701.  
  12702.         %@eval[(20 %% 3) + 4]
  12703.  
  12704. You can alter the precision for a single evaluation with the construct 
  12705. @EVAL[expression=x.y].  The x value specifies the minimum decimal precision 
  12706. (i.e., the minimum number of decimal places displayed); the y value sets the 
  12707. maximum decimal precision.  You can use =x,y instead of =x.y if the comma is 
  12708. your decimal separator.  If x is greater than y, it is ignored.  You can 
  12709. specify either or both arguments, for example: 
  12710.  
  12711.         @eval[3/7=2]            returns 0.42857143
  12712.         @eval[3/7=.4]           returns 0.4286
  12713.         @eval[3/6=2.4]          returns 0.50
  12714.  
  12715.  
  12716. ΓòÉΓòÉΓòÉ 9.9.24. @EXEC ΓòÉΓòÉΓòÉ
  12717.  
  12718. @EXEC[[@]command]:  Execute the command and return the numeric exit code.  The 
  12719. command can be an alias, internal command, external command, or .BTM file, 
  12720. .BAT, or .CMD file. 
  12721.  
  12722. @EXEC is primarily intended for running a program from within the PROMPT.  It 
  12723. is a "back door" entry into command processing and should be used with extreme 
  12724. caution.  Incorrect or recursive use of @EXEC may hang your system. 
  12725.  
  12726.  
  12727. ΓòÉΓòÉΓòÉ 9.9.25. @EXECSTR ΓòÉΓòÉΓòÉ
  12728.  
  12729. @EXECSTR[command]:  Runs the specified command and returns the first line 
  12730. written to STDOUT by that command. 
  12731.  
  12732. @EXEC is primarily intended for running a program from within the PROMPT.  It 
  12733. is a "back door" entry into command processing and should be used with extreme 
  12734. caution.  Incorrect or recursive use of @EXEC may hang your system. 
  12735.  
  12736. @EXECSTR is useful for retrieving a result from an external utility -- for 
  12737. example, if you have an external utility called NETTIME.EXE which retrieves the 
  12738. time of day from your network server and writes it to standard output, you 
  12739. could save it in an environment variable using a command like this: 
  12740.  
  12741.         [c:\] set server_time=%@execstr[d:\path\nettime.exe]
  12742.  
  12743. If the same utility returned a result properly formatted for the TIME command 
  12744. you could also use it to set the time on your system: 
  12745.  
  12746.         [c:\] time %@execstr[d:\path\nettime.exe]
  12747.  
  12748.  
  12749. ΓòÉΓòÉΓòÉ 9.9.26. @EXETYPE ΓòÉΓòÉΓòÉ
  12750.  
  12751. @EXETYPE[filename]:  Returns the application type as a string: 
  12752.  
  12753.         DOS           DOS .COM, .EXE, or .BAT 
  12754.         AVIO          OS/2 Character mode, windowed 
  12755.         FS            OS/2 Character mode, full-screen 
  12756.         PM            OS/2 Presentation Manager 
  12757.         WIN           Windows 3 
  12758.         UNKNOWN       Any other file 
  12759.  
  12760.  
  12761. ΓòÉΓòÉΓòÉ 9.9.27. @EXPAND ΓòÉΓòÉΓòÉ
  12762.  
  12763. @EXPAND[filename [,-nrhsda]]:  Returns, on a single line, the names of all 
  12764. files and directories that match the filename specification, which may contain 
  12765. wildcards and include lists.  Returns an empty string if no files match.  If 
  12766. the file list is longer than the allowed command line length, it will be 
  12767. truncated without an error message. 
  12768.  
  12769. The second argument, if included, defines the attributes of the files that will 
  12770. be included in the search.  The attributes are: 
  12771.  
  12772.         N   Normal (no attributes set) 
  12773.         R   Read-only 
  12774.         H   Hidden 
  12775.         S   System 
  12776.         D   Directory 
  12777.         A   Archive 
  12778.  
  12779.  The attributes (other than N) can be combined (for example 
  12780.  %@EXPAND[MYFILE,HS]).  You can prefix an attribute with "-" to mean 
  12781.  "everything except files with this attribute."  If the attribute argument is 
  12782.  not used, hidden files, system files, and directories will be excluded from 
  12783.  the returned list; all other files which match the filename will be included. 
  12784.  
  12785.  
  12786. ΓòÉΓòÉΓòÉ 9.9.28. @EXT ΓòÉΓòÉΓòÉ
  12787.  
  12788. @EXT[filename]:  Returns the extension from a filename, without a leading 
  12789. period.  On HPFS drives the extension can be up to 64 characters long.  On 
  12790. traditional FAT drives it can be up to 3 characters long. 
  12791.  
  12792.  
  12793. ΓòÉΓòÉΓòÉ 9.9.29. @FILEAGE ΓòÉΓòÉΓòÉ
  12794.  
  12795. @FILEAGE[filename]:  Returns the date and time of the file as a single numeric 
  12796. value.  The number can be used to compare the relative ages of two or more 
  12797. files, but can not be used for date and time calculations as it is not returned 
  12798. in identifiable units.  Also see @MAKEAGE. 
  12799.  
  12800.  
  12801. ΓòÉΓòÉΓòÉ 9.9.30. @FILECLOSE ΓòÉΓòÉΓòÉ
  12802.  
  12803. @FILECLOSE[n]:  Closes the file whose handle is n.  You cannot close handles 0, 
  12804. 1 or 2.  Returns "0" if the file closed OK or "-1" if an error occurred.  Be 
  12805. sure to read the cautionary note about file functions under Variable Functions. 
  12806.  
  12807.  
  12808. ΓòÉΓòÉΓòÉ 9.9.31. @FILEDATE ΓòÉΓòÉΓòÉ
  12809.  
  12810. @FILEDATE[filename[,acw]]:  Returns the date a file was last modified, in the 
  12811. default country format (mm-dd-yy for the US).  The optional second argument 
  12812. selects which date field is returned for files on an HPFS drive: a means the 
  12813. last access date, c means the creation date, and w means the last modification 
  12814. (write) date, which is the default. 
  12815.  
  12816.  
  12817. ΓòÉΓòÉΓòÉ 9.9.32. @FILENAME ΓòÉΓòÉΓòÉ
  12818.  
  12819. @FILENAME[filename]:  Returns the name and extension of a file, without a path. 
  12820.  
  12821.  
  12822. ΓòÉΓòÉΓòÉ 9.9.33. @FILEOPEN ΓòÉΓòÉΓòÉ
  12823.  
  12824. @FILEOPEN[filename, read | write | append, [b | t]]:  Opens the file in the 
  12825. specified mode and returns the file handle as an integer.  Returns "-1" if the 
  12826. file cannot be opened. 
  12827.  
  12828. The optional third parameter controls whether the file is opened in binary mode 
  12829. ("b") or text mode ("t").  Text mode (the default) should be used to read text 
  12830. using @FILEREAD without a "length" parameter, and to write text using 
  12831. @FILEWRITE.  Binary mode should be used to read binary data with @FILEREAD with 
  12832. a "length" parameter, and to write binary data with @FILEWRITEB. 
  12833.  
  12834. Be sure to read the cautionary note about file functions under Variable 
  12835. Functions. 
  12836.  
  12837. @FILEOPEN can also open named pipes.  The pipe name must begin with \pipe\. 
  12838. @FILEOPEN first tries to open an existing pipe; if that fails it tries to 
  12839. create a new pipe.  Pipes are opened in blocking mode, duplex access, byte-read 
  12840. mode, and inheritable.  For more information on named pipes see your OS/2 
  12841. documentation. 
  12842.  
  12843.  
  12844. ΓòÉΓòÉΓòÉ 9.9.34. @FILEREAD ΓòÉΓòÉΓòÉ
  12845.  
  12846. @FILEREAD[n [,length]]: Reads data from the file whose handle is n.  Returns 
  12847. "**EOF**" if you attempt to read past the end of the file.  If length is not 
  12848. specified @FILEREAD will read until the next CR or LF (end of line) character. 
  12849. If length is specified, @FILEREAD will read length bytes regardless of any end 
  12850. of line characters. 
  12851.  
  12852. If you plan to read text a line at a time, without using length, you should 
  12853. open the file in text mode.  If you plan to read binary data using length, you 
  12854. should open the file in binary mode.  See @FILEOPEN for details on opening the 
  12855. file in the proper mode. 
  12856.  
  12857. Be sure to read the cautionary note about file functions under Variable 
  12858. Functions. 
  12859.  
  12860.  
  12861. ΓòÉΓòÉΓòÉ 9.9.35. @FILES ΓòÉΓòÉΓòÉ
  12862.  
  12863. @FILES[filename [,-nrhsda]]:  Returns the number of files that match the 
  12864. filename, which may contain wildcards and include lists.  Returns "0" if no 
  12865. files match.  The filename must refer to a single directory; to check several 
  12866. directories, use @FILES once for each directory, and add the results together 
  12867. with @EVAL. 
  12868.  
  12869. The second argument is a list of file attributes.  If it is included, only 
  12870. those files matching all the specified attributes are counted.  The attributes 
  12871. are: 
  12872.  
  12873.         N   Normal (no attributes set) 
  12874.         R   Read-only 
  12875.         H   Hidden 
  12876.         S   System 
  12877.         D   Directory 
  12878.         A   Archive 
  12879.  
  12880.   The attributes (other than N) can be combined (for example 
  12881.  %@FILES[MYFILE,HS]).  You can prefix an attribute with - to mean "everything 
  12882.  except files with this attribute." 
  12883.  
  12884.  
  12885. ΓòÉΓòÉΓòÉ 9.9.36. @FILESEEK ΓòÉΓòÉΓòÉ
  12886.  
  12887. @FILESEEK[n,offset,start]:  Moves the file pointer offset bytes in the file 
  12888. whose handle is n.  Returns the new position of the pointer, in bytes from the 
  12889. start of the file.  Set start to 0 to seek relative to the beginning of the 
  12890. file, 1 to seek relative to the current file pointer, or 2 to seek relative to 
  12891. the end of the file.  The offset value may be negative (seek backward), 
  12892. positive (seek forward), or zero (return current position, but do not change 
  12893. it).  Be sure to read the cautionary note about file functions under Variable 
  12894. Functions. 
  12895.  
  12896.  
  12897. ΓòÉΓòÉΓòÉ 9.9.37. @FILESEEKL ΓòÉΓòÉΓòÉ
  12898.  
  12899. @FILESEEKL[n,line]:  Moves the file pointer to the specified line in the file 
  12900. whose handle is n.  The first line in the file is numbered 0.  Returns the new 
  12901. position of the pointer, in bytes from the start of the file.  Be sure to read 
  12902. the cautionary note about file functions under Variable Functions. 
  12903.  
  12904. @FILESEEKL must read each line of the file up to the target line in order to 
  12905. position the pointer, and will therefore cause significant delays if used in a 
  12906. long loop or on a large file. 
  12907.  
  12908.  
  12909. ΓòÉΓòÉΓòÉ 9.9.38. @FILESIZE ΓòÉΓòÉΓòÉ
  12910.  
  12911. @FILESIZE[filename,b|k|m[,a]]:  Returns the size of a file, or "-1" if the file 
  12912. does not exist.  If the filename includes wildcards or an include list, returns 
  12913. the combined size of all matching files. 
  12914.  
  12915. The optional third argument a (allocated), if used, instructs @FILESIZE to 
  12916. return the amount of space allocated for the file(s) on the disk, rather than 
  12917. the amount of data in the file.  Network drives and compressed drives may not 
  12918. always report allocated sizes accurately, depending on the way the network or 
  12919. disk compression software is implemented. 
  12920.  
  12921.  
  12922. ΓòÉΓòÉΓòÉ 9.9.39. @FILETIME ΓòÉΓòÉΓòÉ
  12923.  
  12924. @FILETIME[filename[,acw]]:  Returns the time a file was last modified, in hh:mm 
  12925. format.  The optional second argument selects which time field is returned for 
  12926. files on an HPFS drive:  a means the last access time, c means the creation 
  12927. time, and w means the last modification (write) time, which is the default. 
  12928.  
  12929.  
  12930. ΓòÉΓòÉΓòÉ 9.9.40. @FILEWRITE ΓòÉΓòÉΓòÉ
  12931.  
  12932. @FILEWRITE[n,text]:  Writes a line to the file whose handle is n.  Returns the 
  12933. number of bytes written, or "-1" if an error occurred.  n must be a handle 
  12934. returned by @FILEOPEN; or 1 (for standard output) or 2 (for standard error). 
  12935.  
  12936. Be sure to read the cautionary note about file functions under Variable 
  12937. Functions. 
  12938.  
  12939.  
  12940. ΓòÉΓòÉΓòÉ 9.9.41. @FILEWRITEB ΓòÉΓòÉΓòÉ
  12941.  
  12942. @FILEWRITEB[n,length,string]:  Writes the specified number of bytes from string 
  12943. to the file whose handle is n.  Returns the number of bytes written, or "-1" if 
  12944. an error occurred. 
  12945.  
  12946. If you plan to write binary data with @FILEWRITEB, you should open the file in 
  12947. binary mode (see @FILEOPEN).  If you want to write text a line at a time you 
  12948. should use @FILEWRITE instead, and open the file in text mode. 
  12949.  
  12950. Be sure to read the cautionary note about file functions under Variable 
  12951. Functions. 
  12952.  
  12953.  
  12954. ΓòÉΓòÉΓòÉ 9.9.42. @FINDCLOSE ΓòÉΓòÉΓòÉ
  12955.  
  12956. @FINDCLOSE[filename]:  Signals the end of a @FINDFIRST / @FINDNEXT sequence. 
  12957. You must use this function to release the directory search handle used for 
  12958. @FINDFIRST / @FINDNEXT. 
  12959.  
  12960.  
  12961. ΓòÉΓòÉΓòÉ 9.9.43. @FINDFIRST ΓòÉΓòÉΓòÉ
  12962.  
  12963. @FINDFIRST[filename [,-nrhsda]]:  Returns the name of the first file that 
  12964. matches the filename, which may contain wildcards and "include lists."  The 
  12965. second argument, if included, defines the attributes of the files that will be 
  12966. included in the search.  Returns an empty string if no files match.  The 
  12967. attributes are: 
  12968.  
  12969.         N   Normal (no attributes set) 
  12970.         R   Read-only 
  12971.         H   Hidden 
  12972.         S   System 
  12973.         D   Directory 
  12974.         A   Archive 
  12975.  
  12976.  The attributes (other than N) can be combined (for example 
  12977.  %@FINDFIRST[MYFILE,HS]).  You can prefix an attribute with - to mean 
  12978.  "everything except files with this attribute." 
  12979.  
  12980.  @FINDFIRST always skips the "." and ".." entries when processing directory 
  12981.  names. 
  12982.  
  12983.  After @FINDFIRST or the last @FINDNEXT, you must use @FINDCLOSE to avoid 
  12984.  running out of directory search handles. 
  12985.  
  12986.  See the notes under Variable Functions about quoting returned long filenames. 
  12987.  
  12988.  
  12989. ΓòÉΓòÉΓòÉ 9.9.44. @FINDNEXT ΓòÉΓòÉΓòÉ
  12990.  
  12991. @FINDNEXT[filename [,-nrhsda]]:  Returns the name of the next file that matches 
  12992. the filename passed to @FINDFIRST. @FINDNEXT should only be used after a 
  12993. successful call to @FINDFIRST.  The first argument is included for 
  12994. compatibility with previous versions, but is ignored; it can be omitted if the 
  12995. second argument is not used (e.g. %@FINDNEXT[]).  The second argument, if 
  12996. included, defines the attributes of the files that will be included in the 
  12997. search.  Returns an empty string when no more files match.  The attributes are: 
  12998.  
  12999.         N   Normal (no attributes set) 
  13000.         R   Read-only 
  13001.         H   Hidden 
  13002.         S   System 
  13003.         D   Directory 
  13004.         A   Archive 
  13005.  
  13006.  The attributes (other than N) can be combined (for example 
  13007.  %@FINDNEXT[MYFILE,HS]).  You can prefix an attribute with - to mean 
  13008.  "everything except files with this attribute." 
  13009.  
  13010.  @FINDNEXT always skips the "." and ".." entries when processing directory 
  13011.  names. 
  13012.  
  13013.  After @FINDFIRST or the last @FINDNEXT, you must use @FINDCLOSE to avoid 
  13014.  running out of directory search handles. 
  13015.  
  13016.  See the notes under Variable Functions about quoting returned long filenames. 
  13017.  
  13018.  
  13019. ΓòÉΓòÉΓòÉ 9.9.45. @FORMAT ΓòÉΓòÉΓòÉ
  13020.  
  13021. @FORMAT[[-][x][.y],string]:  Reformats a string, truncating it or padding it 
  13022. with spaces as necessary.  If you use the minus [-], the string is 
  13023. left-justified; otherwise, it is right-justified.  The x value is the minimum 
  13024. number of characters in the result.  The y value is the maximum number of 
  13025. characters in the result.  You can combine the options as necessary.  For 
  13026. example: 
  13027.  
  13028.         %@format[12,JPSoftware]         returns "  JPSoftware"
  13029.         %@format[.3,JPSoftware]         returns "JPS"
  13030.  
  13031.  
  13032. ΓòÉΓòÉΓòÉ 9.9.46. @FSTYPE ΓòÉΓòÉΓòÉ
  13033.  
  13034. @FSTYPE[d:]:  Returns the file system type for the specified drive.  @FSTYPE 
  13035. will return "FAT" for a DOS-compatible drive with a file allocation table, 
  13036. "HPFS" for a drive that uses OS/2's high performance file system, or "CDFS" for 
  13037. a CD-ROM drive.  It may return other values if additional file systems have 
  13038. been installed with the IFS= directive in CONFIG.SYS. 
  13039.  
  13040.  
  13041. ΓòÉΓòÉΓòÉ 9.9.47. @FULL ΓòÉΓòÉΓòÉ
  13042.  
  13043. @FULL[filename]:  Returns the fully qualified path and file name of a file. 
  13044.  
  13045. See the notes under Variable Functions about quoting returned long filenames. 
  13046.  
  13047.  
  13048. ΓòÉΓòÉΓòÉ 9.9.48. @IF ΓòÉΓòÉΓòÉ
  13049.  
  13050. @IF[condition,true,false]:  Evaluates the condition and returns a string based 
  13051. on the result.  The condition can include any of the tests allowed in the IF 
  13052. command.  If the condition is true, @IF returns the first result string; if it 
  13053. is false, @IF returns the second string.  For example, "echo %@IF[2 == 
  13054. 2,Correct!,Oops!]" displays "Correct!" 
  13055.  
  13056.  
  13057. ΓòÉΓòÉΓòÉ 9.9.49. @INC ΓòÉΓòÉΓòÉ
  13058.  
  13059. @INC[%var]:  Returns the same value as %@EVAL[%var + 1].  That is, it retrieves 
  13060. and increments the value of a variable.  The variable itself is not changed; to 
  13061. do so, use a command like this: 
  13062.  
  13063.         set var=%@inc[%var]
  13064.  
  13065.  
  13066. ΓòÉΓòÉΓòÉ 9.9.50. @INDEX ΓòÉΓòÉΓòÉ
  13067.  
  13068. @INDEX[string1,string2]:  Returns the position of string2 within string1, or 
  13069. "-1" if string2 is not found.  The first position in string1 is numbered 0. 
  13070.  
  13071.  
  13072. ΓòÉΓòÉΓòÉ 9.9.51. @INSERT ΓòÉΓòÉΓòÉ
  13073.  
  13074. @INSERT[n, string1, string2]:  Inserts string1 into string2 starting at 
  13075. position n.  The first position in the string is postion 0.  For example, 
  13076. %@insert[1,arm,wing] returns the string "warming". 
  13077.  
  13078.  
  13079. ΓòÉΓòÉΓòÉ 9.9.52. @INSTR ΓòÉΓòÉΓòÉ
  13080.  
  13081. @INSTR[start, length, string]:  Returns a substring, starting at the position 
  13082. start and continuing for length characters.  If the length is omitted, it will 
  13083. default to the remainder of the string.  If the length is negative, the start 
  13084. is relative to the right side of the string.  The first character in the string 
  13085. is numbered 0; if the length is negative, the last character is numbered 0. 
  13086.  
  13087. For example, %@INSTR[0,2,%_TIME] gets the current time and extracts the hour; 
  13088. %@INSTR[1,-2,%_TIME] extracts the seconds.  If the string includes commas, it 
  13089. must be quoted with double quotes ["] or back-quotes [`].  The quotes do count 
  13090. in calculating the position of the substring.  @SUBSTR is an older version of 
  13091. the same function. 
  13092.  
  13093.  
  13094. ΓòÉΓòÉΓòÉ 9.9.53. @INT ΓòÉΓòÉΓòÉ
  13095.  
  13096. @INT[n]:  Returns the integer part of the number n. 
  13097.  
  13098.  
  13099. ΓòÉΓòÉΓòÉ 9.9.54. @LABEL ΓòÉΓòÉΓòÉ
  13100.  
  13101. @LABEL[d:]:  Returns the volume label of the specified disk drive. 
  13102.  
  13103.  
  13104. ΓòÉΓòÉΓòÉ 9.9.55. @LEFT ΓòÉΓòÉΓòÉ
  13105.  
  13106. @LEFT[n, string]:  Returns the leftmost n characters from the string.  If n is 
  13107. greater than the length of the string, returns the entire string.  For example, 
  13108. %@left[2,jpsoft] returns the string "jp". 
  13109.  
  13110.  
  13111. ΓòÉΓòÉΓòÉ 9.9.56. @LEN ΓòÉΓòÉΓòÉ
  13112.  
  13113. @LEN[string]:  Returns the length of a string. 
  13114.  
  13115.  
  13116. ΓòÉΓòÉΓòÉ 9.9.57. @LINE ΓòÉΓòÉΓòÉ
  13117.  
  13118. @LINE[filename,n]:  Returns line n from the specified file.  The first line in 
  13119. the file is numbered 0.  "**EOF**" is returned for all line numbers beyond the 
  13120. end of the file. 
  13121.  
  13122. The @LINE function must read each line of the file to find the line you 
  13123. request, and will therefore cause significant delays if used in a long loop or 
  13124. on a large file.  For a more effective method of processing each line of a file 
  13125. in sequence use the FOR command, or @FILEOPEN and a sequence of @FILEREADs. 
  13126.  
  13127. You can retrieve input from standard input if you specify CON as the filename. 
  13128. If you are redirecting input to @LINE using this feature, you must use command 
  13129. grouping or the redirection will not work properly (you can pipe to @LINE 
  13130. without a command group; this restriction applies only to input redirection). 
  13131. For example: 
  13132.  
  13133.         (echo %@line[con,0]) < myfile.dat
  13134.  
  13135.  
  13136. ΓòÉΓòÉΓòÉ 9.9.58. @LINES ΓòÉΓòÉΓòÉ
  13137.  
  13138. @LINES[filename]:  Returns the line number of the last line in the file, or 
  13139. "-1" if the file is empty.  The first line in the file is numbered 0, so (for 
  13140. example) @LINES will return 0 for a file containing one line.  To get the 
  13141. actual number of lines, use %@INC[%@LINES[filename]]. 
  13142.  
  13143. @LINES must read each line of the file in order to count it, and will therefore 
  13144. cause significant delays if used in a long loop or on a large file. 
  13145.  
  13146.  
  13147. ΓòÉΓòÉΓòÉ 9.9.59. @LOWER ΓòÉΓòÉΓòÉ
  13148.  
  13149. @LOWER[string]:  Returns the string converted to lower case. 
  13150.  
  13151.  
  13152. ΓòÉΓòÉΓòÉ 9.9.60. @MAKEAGE ΓòÉΓòÉΓòÉ
  13153.  
  13154. @MAKEAGE[date[,time]]:  Returns the date and time (if included) as a single 
  13155. value in the same format as @FILEAGE.  @MAKEAGE can be used to compare the time 
  13156. stamp of a file with a specific date and time, for example: 
  13157.  
  13158.         if %@fileage[myfile] lt %@makeage[1/1/85] echo OLD!
  13159.  
  13160. The value returned by @MAKEAGE can be used for comparisons, but can not be used 
  13161. for date and time calculations because it is not in identifiable units. 
  13162.  
  13163.  
  13164. ΓòÉΓòÉΓòÉ 9.9.61. @MAKEDATE ΓòÉΓòÉΓòÉ
  13165.  
  13166. @MAKEDATE[n]:  Returns a date (formatted according to the current country 
  13167. settings).  n is the number of days since 1/1/80. This is the inverse of @DATE. 
  13168.  
  13169.  
  13170. ΓòÉΓòÉΓòÉ 9.9.62. @MAKETIME ΓòÉΓòÉΓòÉ
  13171.  
  13172. @MAKETIME[n]:  Returns a time (formatted according to the current country 
  13173. settings).  n is the number of seconds since midnight.  This is the inverse of 
  13174. @TIME. 
  13175.  
  13176.  
  13177. ΓòÉΓòÉΓòÉ 9.9.63. @MONTH ΓòÉΓòÉΓòÉ
  13178.  
  13179. @MONTH[mm-dd-yy]:  Returns the month number for the specified date (1-12). 
  13180. MONTH uses the date format and separators mandated by your country code (for 
  13181. example dd.mm.yy in Germany, or yy-mm-dd in Japan). The year can be entered as 
  13182. a 4-digit or 2-digit value.  Two-digit years between 80 and 99 are interpreted 
  13183. as 1980 - 1999; values between 00 and 79 are interpreted as 2000 - 2079. 
  13184.  
  13185.  
  13186. ΓòÉΓòÉΓòÉ 9.9.64. @NAME ΓòÉΓòÉΓòÉ
  13187.  
  13188. @NAME[filename]:  Returns the base name of a file, without the path or 
  13189. extension. 
  13190.  
  13191. See the notes under Variable Functions about quoting returned long filenames. 
  13192.  
  13193.  
  13194. ΓòÉΓòÉΓòÉ 9.9.65. @NUMERIC ΓòÉΓòÉΓòÉ
  13195.  
  13196. @NUMERIC[string]:  Returns "1" if the argument is composed entirely of digits 
  13197. (0 to 9), signs (+ or -), and the thousands and decimal separators.  Otherwise, 
  13198. returns "0".  If the string begins with a decimal separator it is not 
  13199. considered numeric unless the next character is a digit, and there are no more 
  13200. decimal separators within the string.  For example, ".07" is numeric, but ".a" 
  13201. and ".07.01" are not. 
  13202.  
  13203.  
  13204. ΓòÉΓòÉΓòÉ 9.9.66. @PATH ΓòÉΓòÉΓòÉ
  13205.  
  13206. @PATH[filename]:  Returns the path from a file name, including the drive letter 
  13207. and a trailing backslash but not including the base name or extension. 
  13208.  
  13209. See the notes under Variable Functions about quoting returned long filenames. 
  13210.  
  13211.  
  13212. ΓòÉΓòÉΓòÉ 9.9.67. @RANDOM ΓòÉΓòÉΓòÉ
  13213.  
  13214. @RANDOM[min, max]:  Returns a "pseudo-random" value between min and max, 
  13215. inclusive.  Min, max, and the returned value are all integers. 
  13216.  
  13217. The random number generator is initialized from the system clock the first time 
  13218. it is used after the command processor starts, so it will produce a different 
  13219. sequence of random numbers each time you use it. 
  13220.  
  13221.  
  13222. ΓòÉΓòÉΓòÉ 9.9.68. @READSCR ΓòÉΓòÉΓòÉ
  13223.  
  13224. @READSCR[row,col,length]:  Returns the text displayed on the screen at the 
  13225. specified location.  The upper left corner of the screen is location 0,0. 
  13226.  
  13227. The row and column can be specified as an offset from the current cursor 
  13228. location by preceding either value with a [+] or [-].  For example, 
  13229.  
  13230.         %@readscr[-2,+2,10]
  13231.  
  13232. returns 10 characters from the screen, starting 2 rows above and 2 columns to 
  13233. the right of the current cursor position. 
  13234.  
  13235. You can also specify the row and column as offsets from the current cursor 
  13236. position.  Begin the value with a plus sign [+] to read the screen the 
  13237. specified number of rows below (or columns to the right of) the current 
  13238. position, or with a minus sign [-] to read the screen above (or to the left of) 
  13239. the current position. 
  13240.  
  13241.  
  13242. ΓòÉΓòÉΓòÉ 9.9.69. @READY ΓòÉΓòÉΓòÉ
  13243.  
  13244. @READY[d:]:  Returns "1" if the specified drive is ready; otherwise returns 
  13245. "0". 
  13246.  
  13247.  
  13248. ΓòÉΓòÉΓòÉ 9.9.70. @REMOTE ΓòÉΓòÉΓòÉ
  13249.  
  13250. @REMOTE[d:]:  Returns "1" if the specified drive is a remote (network) drive; 
  13251. otherwise returns "0". 
  13252.  
  13253.  
  13254. ΓòÉΓòÉΓòÉ 9.9.71. @REMOVABLE ΓòÉΓòÉΓòÉ
  13255.  
  13256. @REMOVABLE[d:]:  Returns "1" if the specified drive is removable (e.g., a 
  13257. floppy disk or removable hard disk); otherwise returns "0". 
  13258.  
  13259.  
  13260. ΓòÉΓòÉΓòÉ 9.9.72. @REPEAT ΓòÉΓòÉΓòÉ
  13261.  
  13262. @REPEAT[c,n]:  Returns the character c repeated n times. 
  13263.  
  13264.  
  13265. ΓòÉΓòÉΓòÉ 9.9.73. @REPLACE ΓòÉΓòÉΓòÉ
  13266.  
  13267. @REPLACE[string1, string2, text]:  Replaces all occurrences of string1 in the 
  13268. text string with string2.  For example, %@replace[w,ch,warming] returns the 
  13269. string "charming".  The search is case-sensitive. 
  13270.  
  13271.  
  13272. ΓòÉΓòÉΓòÉ 9.9.74. @REXX ΓòÉΓòÉΓòÉ
  13273.  
  13274. @REXX[expr]:  Calls the REXX interpreter to execute the expression.  Returns 
  13275. the result string from REXX; if the REXX expression does not return a string, 
  13276. @REXX returns the REXX numeric result code.  See REXX Support for more 
  13277. information. 
  13278.  
  13279.  
  13280. ΓòÉΓòÉΓòÉ 9.9.75. @RIGHT ΓòÉΓòÉΓòÉ
  13281.  
  13282. @RIGHT[n,string]:  Returns the rightmost n characters from the string.  If n is 
  13283. greater than the length of the string, returns the entire string.  For example, 
  13284. %@right[4,jpsoft] returns the string "soft." 
  13285.  
  13286.  
  13287. ΓòÉΓòÉΓòÉ 9.9.76. @SEARCH ΓòÉΓòÉΓòÉ
  13288.  
  13289. @SEARCH[filename[,path]]:  Searches for the filename using the PATH environment 
  13290. variable or the specified path, appending an extension if one isn't specified. 
  13291.  
  13292. @SEARCH returns the fully-expanded name of the file including drive, path, base 
  13293. name, and extension, or an empty string if a matching file is not found.  If 
  13294. wildcards are used in the filename, @SEARCH will search for the first file that 
  13295. matches the wildcard specification, and return the drive and path for that file 
  13296. plus the wildcard filename (e.g., E:\UTIL\*.COM). 
  13297.  
  13298.  
  13299. ΓòÉΓòÉΓòÉ 9.9.77. @SELECT ΓòÉΓòÉΓòÉ
  13300.  
  13301. @SELECT[filename,top,left,bottom,right,title[,1]]:  Pops up a selection window 
  13302. with the lines from the specified file, allowing you to display menus or other 
  13303. selection lists from within a batch file.  You can move through the selection 
  13304. window with standard popup window navigation keystrokes, including character 
  13305. matching.  @SELECT returns the text of the line the scrollbar is on if you 
  13306. press Enter, or an empty string if you press Esc.  The filename must be in 
  13307. quotes if it contains whitespace or special characters.  The file size is 
  13308. limited only by available memory.  To select from lines passed through input 
  13309. redirection or a pipe, use CON as the filename.  If you use the optional 1 
  13310. argument after the window title, the list will be sorted alphabetically. 
  13311.  
  13312.  
  13313. ΓòÉΓòÉΓòÉ 9.9.78. @STRIP ΓòÉΓòÉΓòÉ
  13314.  
  13315. @STRIP[chars,string]:  Removes the characters in chars from the string and 
  13316. returns the result.  For example, %@STRIP[AaEe,All Good Men] returns "ll Good 
  13317. Mn".  The test is case sensitive.  To include a comma in the chars string, 
  13318. enclose the entire first argument in double quotes.  @STRIP will remove the 
  13319. quotes before processing the string. 
  13320.  
  13321.  
  13322. ΓòÉΓòÉΓòÉ 9.9.79. @SUBSTR ΓòÉΓòÉΓòÉ
  13323.  
  13324. @SUBSTR[string,start,length]:  This is an older version of @INSTR The string 
  13325. parameter is at the start of the @SUBSTR argument list, and therefore cannot 
  13326. contain commas (because any commas in the string would be taken as argument 
  13327. separators).  @INSTR, which has the string argument last, does not have this 
  13328. restriction. 
  13329.  
  13330.  
  13331. ΓòÉΓòÉΓòÉ 9.9.80. @TIME ΓòÉΓòÉΓòÉ
  13332.  
  13333. @TIME[hh:mm:ss]:  Returns the number of seconds since midnight for the 
  13334. specified time.  The time must be in 24-hour format; "am" and "pm" cannot be 
  13335. used. 
  13336.  
  13337.  
  13338. ΓòÉΓòÉΓòÉ 9.9.81. @TIMER ΓòÉΓòÉΓòÉ
  13339.  
  13340. @TIMER[n]:  Returns the current split time for a stopwatch started with the 
  13341. TIMER command.  The value of n specifies the timer to read and can be 1, 2, or 
  13342. 3. 
  13343.  
  13344.  
  13345. ΓòÉΓòÉΓòÉ 9.9.82. @TRIM ΓòÉΓòÉΓòÉ
  13346.  
  13347. @TRIM[string]:  Returns the string with the leading and trailing white space 
  13348. (space and tab characters) removed. 
  13349.  
  13350.  
  13351. ΓòÉΓòÉΓòÉ 9.9.83. @UNIQUE ΓòÉΓòÉΓòÉ
  13352.  
  13353. @UNIQUE[d:\path]:  Creates a zero-length file with a unique name in the 
  13354. specified directory, and returns the full name and path.  If no path is 
  13355. specified, the file will be created in the current directory.  The file name 
  13356. will be FAT-compatible (8 character name and 3-character extension) regardless 
  13357. of whether the file is created on a FAT or HPFS drive.  This function allows 
  13358. you to create a temporary file without overwriting an existing file. 
  13359.  
  13360.  
  13361. ΓòÉΓòÉΓòÉ 9.9.84. @UPPER ΓòÉΓòÉΓòÉ
  13362.  
  13363. @UPPER[string]:  Returns the string converted to upper case. 
  13364.  
  13365.  
  13366. ΓòÉΓòÉΓòÉ 9.9.85. @WILD ΓòÉΓòÉΓòÉ
  13367.  
  13368. @WILD[string1,string2]:  Performs a comparison of the two strings, and returns 
  13369. "1" if they match or "0" if they don't match.  The second argument, string2, 
  13370. may contain wildcards or extended wildcards; the first argument, string1, may 
  13371. not.  The test is not case sensitive.  The following example tests whether the 
  13372. \UTIL directory (or any directory that begins with the characters UTIL) is 
  13373. included in the PATH: 
  13374.  
  13375.         if %@wild[%path,*\UTIL*] == 1 command
  13376.  
  13377.  
  13378. ΓòÉΓòÉΓòÉ 9.9.86. @WORD ΓòÉΓòÉΓòÉ
  13379.  
  13380. @WORD[["xxx",]n,string]:  Returns the nth word in a string.  The first word is 
  13381. numbered 0.  If n is negative, words are returned from the end of the string. 
  13382. The first argument is a list of word separators you want to use; if you don't 
  13383. specify it, only spaces, tabs, and commas are considered to be word separators. 
  13384. For example: 
  13385.  
  13386.         %@WORD[2,NOW IS THE TIME]     returns "THE"
  13387.         %@WORD[-0,NOW IS THE TIME]    returns "TIME"
  13388.         %@WORD[-2,NOW IS THE TIME]    returns "IS"
  13389.         %@WORD["=",1,2 + 2=4]         returns "4"
  13390.  
  13391.  
  13392. ΓòÉΓòÉΓòÉ 9.9.87. @WORDS ΓòÉΓòÉΓòÉ
  13393.  
  13394. @WORDS[["xxx",]string]:  Returns the number of words in the string.  The 
  13395. optional list of separators follows the same format as @WORD.  If the string 
  13396. argument is enclosed in quotation marks, you must enter a list of separators as 
  13397. well. 
  13398.  
  13399.  
  13400. ΓòÉΓòÉΓòÉ 9.9.88. @YEAR ΓòÉΓòÉΓòÉ
  13401.  
  13402. @YEAR[mm-dd-yy]:  Returns the year for the specified date.  YEAR uses the date 
  13403. format and separators mandated by your country code (for example dd.mm.yy in 
  13404. Germany, or yy-mm-dd in Japan).  The year can be specified as two digits or 
  13405. four digits; @YEAR returns the same number of digits included in its argument. 
  13406. Two-digit years between 80 and 99 are interpreted as 1980 - 1999; values 
  13407. between 00 and 79 are interpreted as 2000 - 2079. 
  13408.  
  13409.  
  13410. ΓòÉΓòÉΓòÉ 10. 4OS2.INI ΓòÉΓòÉΓòÉ
  13411.  
  13412. Most of the configuration of 4OS2 is controlled through a file of 
  13413. initialization information called 4OS2.INI, which is discussed in the following 
  13414. sections: 
  13415.  
  13416.             Modifying the .INI File 
  13417.             Using the .INI File 
  13418.             .INI File Sections 
  13419.             .INI File Directives 
  13420.             .INI File Examples 
  13421.  
  13422.  We also discuss many ways of configuring 4OS2 in other sections of the help, 
  13423.  for example: 
  13424.  
  13425.         *   With aliases you can set default options for internal commands and 
  13426.             create new commands. 
  13427.         *   With executable extensions you can associate data files with the 
  13428.             applications you use to open them. 
  13429.         *   With the FILECOMPLETION environment variable and the FileCompletion 
  13430.             .INI directive you can customize filename completion to match the 
  13431.             command you are working with. 
  13432.         *   With the COLORDIR environment variable and the ColorDir .INI 
  13433.             directive you can set the colors used by the DIR and SELECT 
  13434.             commands. 
  13435.         *   With the SETDOS command, you can change some aspects of the command 
  13436.             processor's operation "on the fly." 
  13437.  
  13438.  
  13439. ΓòÉΓòÉΓòÉ 10.1. Modifying the .INI File ΓòÉΓòÉΓòÉ
  13440.  
  13441. You can create, add to, and modify the .INI file in 2 ways: with the OPTION 
  13442. command and by editing the file with any ASCII editor.  OPTION displays a set 
  13443. of dialogs which allow you to modify the settings that are used most often. 
  13444. When you exit from the dialogs, you can select the Save button to save your 
  13445. changes in the .INI file for use in the current session and all future 
  13446. sessions, select the Use or OK button to use your changes in the current 
  13447. session only, or discard the changes you have made by selecting the Cancel 
  13448. button.  See the OPTION command for additional details. 
  13449.  
  13450. Changes you make in the Startup section of the OPTION dialogs will only take 
  13451. effect when you restart the session or window in which 4OS2 is running. 
  13452.  
  13453. OPTION handles most standard .INI file settings.  A few more advanced settings, 
  13454. as well as all settings that affect the interpretation of keystrokes, cannot be 
  13455. modified with OPTION and must be inserted or modified manually.  For more 
  13456. details see the OPTION command. 
  13457.  
  13458. You can also create, add to, and edit the 4OS2.INI file "manually" with any 
  13459. ASCII text editor.  Each command processor reads its .INI file when it starts, 
  13460. and configures itself accordingly. The .INI file is not re-read when you change 
  13461. it manually.  For manual changes to take effect, you must restart the session 
  13462. or window in which 4OS2 is running.  If you edit the .INI file manually, make 
  13463. sure you save the file in ASCII format. 
  13464.  
  13465. Each item that you can include in the .INI file has a default value.  You only 
  13466. need to include entries in the file for settings that you want to change from 
  13467. their default values. 
  13468.  
  13469. Format: 
  13470.  
  13471. Most lines in the .INI file consist of a one-word directive, an equal sign [=], 
  13472. and a value.  For example, in the following line, the word "Environment" is the 
  13473. directive and "2048" is the value: 
  13474.  
  13475.         Environment = 2048
  13476.  
  13477. Any spaces before or after the equal sign are ignored. 
  13478.  
  13479. If you have a long string to enter in the .INI file (for example, for the 
  13480. ColorDir directive), you must enter it all on one line.  Strings cannot be 
  13481. "continued" to a second line.  Each line may be up to 1023 characters long. 
  13482.  
  13483. The format of the value part of a directive line depends on the individual 
  13484. directive.  It may be a numeric value, a single character, a choice (like "Yes" 
  13485. or "No"), a color setting, a key name, a path, a filename, or a text string. 
  13486. The value begins with the first non-blank character after the equal sign and 
  13487. ends at the end of the line or the beginning of a comment. 
  13488.  
  13489. Blank lines are ignored in the .INI file and can be used to separate groups of 
  13490. directives.  You can place comments in the file by beginning a line with a 
  13491. semicolon [;].  You can also place comments at the end of any line except one 
  13492. containing a text string value.  To do so, enter at least one space or tab 
  13493. after the value, a semicolon, and your comment, like this: 
  13494.  
  13495.         Environment = 2048     ;set standard environment size
  13496.  
  13497. If you try to place a comment at the end of a string value, the comment will 
  13498. become part of the string and will probably cause an error. 
  13499.  
  13500. If you use the OPTION dialogs to modify the .INI file, comments on lines 
  13501. modified from within the dialogs will not be preserved when the new lines are 
  13502. saved.  To be sure .INI file comments are preserved, put them on separate lines 
  13503. in the file 
  13504.  
  13505. If you want to include the text of one .INI file within another (for example, 
  13506. if you have a set of common directives used by several JP Software products), 
  13507. see the Include directive. 
  13508.  
  13509.  
  13510. ΓòÉΓòÉΓòÉ 10.2. Using the .INI File ΓòÉΓòÉΓòÉ
  13511.  
  13512. Some settings in the .INI file are initialized when you install 4OS2, so you 
  13513. will probably have a 4OS2.INI file even if you didn't create one yourself. 
  13514.  
  13515. 4OS2 primary shells search for the .INI file in three places: 
  13516.  
  13517.         *   If there is an "@d:\path\inifile" option on the startup command 
  13518.             line, the command processor will use the path and file name 
  13519.             specified there, and will not look elsewhere.  See Starting 4OS2 
  13520.             for details. 
  13521.         *   If there is no .INI file name on the startup command line, the 
  13522.             search proceeds to the same directory where the command processor 
  13523.             program file (4OS2.EXE) is stored.  This is the "normal" location 
  13524.             for the .INI file.  4OS2 determines this directory automatically. 
  13525.         *   If the .INI file is not found in the directory where the program 
  13526.             file is stored, a final check is made in the root directory of the 
  13527.             boot drive. 
  13528.  
  13529.  When 4OS2 is loaded as a secondary shell, it does not search for the .INI 
  13530.  file.  Instead, it retrieves the primary shell's .INI file data, processes the 
  13531.  [Secondary] section of the original .INI file if necessary (see .INI File 
  13532.  Sections), and then processes any "@d:\path\inifile" option on the secondary 
  13533.  shell command line (see Starting 4OS2).  You can override this behavior with 
  13534.  the NextINIFile directive. 
  13535.  
  13536.  Secondary shells automatically inherit the configuration settings currently in 
  13537.  effect in the previous shell.  If values have been changed by SETDOS since the 
  13538.  primary shell started, the current values will be passed to the secondary 
  13539.  shell.  If the previous shell's .INI file had a [Secondary] section, it will 
  13540.  then be read and processed (see .INI File Sections.  If not, the previous 
  13541.  shell's settings will remain in effect. 
  13542.  
  13543.  For example, you might set BatchEcho to Yes in the .INI file, to enable batch 
  13544.  file echo.  If you then use SETDOS /V0 to turn off batch file echoing in the 
  13545.  primary shell, then any secondary shells will inherit the SETDOS setting, 
  13546.  rather than the original value from the .INI file; i.e., batch files in the 
  13547.  secondary shell will default to no echo. 
  13548.  
  13549.  If you want to force secondary shells to start with a specific value for a 
  13550.  particular directive, regardless of any changes made with SETDOS in a previous 
  13551.  shell, repeat the directive in the [Secondary] section of the .INI file. 
  13552.  
  13553.  The SETDOS command can override several of the .INI file directives.  For 
  13554.  example, the cursor shape used by 4OS2 can be adjusted either with the 
  13555.  CursorIns and CursorOver directives or the SETDOS /S command.  The 
  13556.  correspondence between SETDOS options and .INI directives is noted with each 
  13557.  directive, and under each option of the SETDOS command. 
  13558.  
  13559.  When the command processor detects an error while processing the .INI file, it 
  13560.  displays an error message and prompts you to press a key to continue 
  13561.  processing the file.  This allows you to note any errors before the startup 
  13562.  process continues.  The directive in error will retain its previous or default 
  13563.  value.  Only the most catastrophic errors (like a disk read failure) will 
  13564.  terminate processing of the remainder of the .INI file.  If you don't want a 
  13565.  pause after each error, use a "PauseOnError = No" directive at the beginning 
  13566.  of the .INI file. 
  13567.  
  13568.  If you need to test different values for an .INI directive without repeatedly 
  13569.  editing the .INI file, use the OPTION command or see the INIQuery directive. 
  13570.  
  13571.  
  13572. ΓòÉΓòÉΓòÉ 10.3. .INI File Sections ΓòÉΓòÉΓòÉ
  13573.  
  13574. The .INI file has three possible sections:  the first or global section, named 
  13575. [4OS2]; the [Primary] section; and the [Secondary] section.  Each section is 
  13576. identified by the section name in square brackets on a line by itself. 
  13577.  
  13578. Directives in the global section are effective in all shells.  In most cases, 
  13579. this is the only section you will need.  Any changes you make to the .INI file 
  13580. with the OPTION command are stored in the global section. 
  13581.  
  13582. The [Primary] and [Secondary] sections include directives that are used only in 
  13583. primary and secondary shells, respectively.  You don't need to set up these 
  13584. sections unless you want different directives for primary and secondary shells. 
  13585.  
  13586. Directives in the [Primary] section are used for the first or primary shell. 
  13587. The values are passed automatically to all secondary shells, unless overridden 
  13588. by a directive with the same name in the [Secondary] section. 
  13589.  
  13590. Directives in the [Secondary] section are used in secondary shells only, and 
  13591. override any corresponding primary shell settings.  For example, these lines in 
  13592. the .INI file: 
  13593.  
  13594.         [Primary]
  13595.         ScreenRows = 25
  13596.  
  13597.         [Secondary]
  13598.         ScreenRows = 50
  13599.  
  13600. mean to assume that you have 25 rows on the screen in the primary shell and 50 
  13601. lines in all secondary shells. 
  13602.  
  13603. Sections that begin with any name other than [4OS2], [Primary], or [Secondary] 
  13604. are ignored. 
  13605.  
  13606.  
  13607. ΓòÉΓòÉΓòÉ 10.4. .INI File Directives ΓòÉΓòÉΓòÉ
  13608.  
  13609. For information on specific directives see the separate topic for each type of 
  13610. directive: 
  13611.  
  13612.             Initialization Directives 
  13613.             Configuration Directives 
  13614.             Color Directives 
  13615.             Key Mapping Directives 
  13616.             Advanced Directives 
  13617.  
  13618.  These topics list the directives, with a one-line description of each, and a 
  13619.  cross-reference which selects a full screen help topic on that directive. A 
  13620.  few of the directives are simple enough that the one-line description is 
  13621.  sufficient, but in most cases you should check for any additional information 
  13622.  in the cross-reference topic if you are not already familiar with the 
  13623.  directive. 
  13624.  
  13625.  You can also obtain help on most directives with a HELP directive command at 
  13626.  the prompt. 
  13627.  
  13628.  There are 8 types of directives in the .INI file.  The different types of 
  13629.  directives are shown in the descriptions as follows: 
  13630.  
  13631.         *   Name = nnnn (1234):  This directive takes a numeric value which 
  13632.             replaces the "nnnn."  The default value is shown in parentheses. 
  13633.         *   Name = c (X):  This directive accepts a single character as its 
  13634.             value.  The default character is shown in parentheses.  You must 
  13635.             type in the actual character; you cannot use a key name. 
  13636.         *   Name = CHOICE1 | Choice2 | ... :  This directive takes a choice 
  13637.             value.  The possible choices are listed, separated by vertical 
  13638.             bars.  The default value is shown in all upper case letters in the 
  13639.             directive description, but in your file any of the choices can be 
  13640.             entered in upper case or lower case.  For example, if the choices 
  13641.             were shown as "YES | No" then "YES" is the default. 
  13642.         *   Name = Color:  This directive takes a color specification.  See 
  13643.             Colors and Color Names. 
  13644.         *   Name = Key (Default):  This directive takes a key specification. 
  13645.             See Key Names. 
  13646.         *   Name = Path:  This directive takes a path specification, but not a 
  13647.             filename.  The value should include both a drive and path (e.g., 
  13648.             C:\4OS2) to avoid any possible ambiguities.  A trailing backslash 
  13649.             [\] at the end of the path name is acceptable but not required. 
  13650.             Any default path is described in the text. 
  13651.         *   Name = File:  This directive takes a filename.  We recommend that 
  13652.             you use a full filename including the drive letter and path to 
  13653.             avoid any possible ambiguities.  Any default filename is described 
  13654.             in the text. 
  13655.         *   Name = String:  This directive takes a string in the format shown. 
  13656.             The text describes the default value and any additional 
  13657.             requirements for formatting the string correctly.  No comments are 
  13658.             allowed. 
  13659.  
  13660.  4OS2 contains a fixed-length area for storing strings entered in the .INI 
  13661.  file, including file names, paths, and other strings.  This area is large and 
  13662.  is unlikely to overflow; if it does, you will receive an error message.  If 
  13663.  this occurs, reduce the complexity of your .INI file or contact our technical 
  13664.  support department for assistance. 
  13665.  
  13666.  
  13667. ΓòÉΓòÉΓòÉ 10.4.1. Initialization Directives ΓòÉΓòÉΓòÉ
  13668.  
  13669. The directives in this section control how 4OS2 starts and where it looks for 
  13670. its files.  The initialization directives are: 
  13671.  
  13672.         4StartPath          Path for 4START and 4EXIT 
  13673.         DirHistory          Size of directory history list 
  13674.         DuplicateBugs       Duplicate bugs in CMD.EXE 
  13675.         HelpBook            Books to load in help system 
  13676.         History             Size of history list 
  13677.         INIQuery            Query for each line in 4OS2.INI 
  13678.         LocalAliases        Local vs. global aliases 
  13679.         LocalHistory        Local vs. global directory history 
  13680.         LocalHistory        Local vs. global history 
  13681.         PauseOnError        Pause on errors in 4OS2.INI 
  13682.         SwapFilePath        Path to OS/2 swap file 
  13683.         TreePath            Path for directory database 
  13684.         WindowState         Initial state for the 4OS2 window 
  13685.         WindowX, WindowY, WindowWidth, WindowHeightInitial size and position of 
  13686.                             the 4OS2 window 
  13687.  
  13688.  
  13689. ΓòÉΓòÉΓòÉ 10.4.1.1. 4StartPath ΓòÉΓòÉΓòÉ
  13690.  
  13691. 4StartPath = Path:  Sets the drive and directory where the 4START and 4EXIT 
  13692. batch files (if any) are located. 
  13693.  
  13694.  
  13695. ΓòÉΓòÉΓòÉ 10.4.1.2. DirHistory ΓòÉΓòÉΓòÉ
  13696.  
  13697. DirHistory = nnnn (256):  Sets the amount of memory allocated to the directory 
  13698. history in bytes.  The allowable range of values is 256 to 32767 bytes.  If you 
  13699. use a global directory history list the DirHistory value will be ignored in all 
  13700. shells except the shell which first establishes the global list. 
  13701.  
  13702.  
  13703. ΓòÉΓòÉΓòÉ 10.4.1.3. DuplicateBugs ΓòÉΓòÉΓòÉ
  13704.  
  13705. DuplicateBugs = YES | No:  Tells the 4OS2 parser to duplicate certain 
  13706. well-known bugs in CMD.EXE.  The only bug currently replicated is in the IF 
  13707. command. 
  13708.  
  13709.  
  13710. ΓòÉΓòÉΓòÉ 10.4.1.4. HelpBook ΓòÉΓòÉΓòÉ
  13711.  
  13712. HelpBook = String:  Sets the names of the "books" to be loaded when 4OS2 help 
  13713. is invoked with the HELP command or the F1 key.  The default is 4OS2+CMDREF 
  13714. which loads the 4OS2 help and the OS/2 command reference. 
  13715.  
  13716.  
  13717. ΓòÉΓòÉΓòÉ 10.4.1.5. History ΓòÉΓòÉΓòÉ
  13718.  
  13719. History = nnnn (1024):  Sets the amount of memory allocated to the command 
  13720. history list in bytes.  The allowable range of values is 256 to 32767 bytes. 
  13721. If you use a global history list (see Command History and Recall), the History 
  13722. value is ignored in all shells except the shell which first establishes the 
  13723. global list. 
  13724.  
  13725.  
  13726. ΓòÉΓòÉΓòÉ 10.4.1.6. INIQuery ΓòÉΓòÉΓòÉ
  13727.  
  13728. INIQuery = Yes | NO:  If set to Yes, a prompt will be displayed before 
  13729. execution of each subsequent line in the current .INI file.  This allows you to 
  13730. modify certain directives when you start 4OS2 in order to test different 
  13731. configurations.  INIQuery can be reset to No at any point in the file. 
  13732. Normally INIQuery = Yes is only used during testing of other .INI file 
  13733. directives. 
  13734.  
  13735. The prompt generated by INIQuery = Yes is: 
  13736.  
  13737.         [contents of the line]  (Y/N/Q/R/E)  ?
  13738.  
  13739. At this prompt, you may enter: 
  13740.  
  13741.         Y = Yes:    Process this line and go on to the next. 
  13742.         N = No:     Skip this line and go on to the next. 
  13743.         Q = Quit:   Skip this line and all subsequent lines. 
  13744.         R = Rest:   Execute this and all subsequent lines. 
  13745.         E = Edit:   Edit the value for this entry. 
  13746.  
  13747.  If you choose E for Edit, you can enter a new value for the directive, but not 
  13748.  a new directive name. 
  13749.  
  13750.  For example, if you have found a compatibility problem you think may be 
  13751.  related to 4OS2's character (as opposed to line) input mode, you might change 
  13752.  your 4OS2.INI file so a part of it read as follows: 
  13753.  
  13754.           INIQuery = Yes
  13755.           LineInput = Yes
  13756.           INIQuery = No
  13757.  
  13758.  You could then choose to process, ignore, or edit the LineInput directive each 
  13759.  time 4OS2 started.  This would allow you to check whether changing the line 
  13760.  input mode would resolve the compatibility problem. 
  13761.  
  13762.  
  13763. ΓòÉΓòÉΓòÉ 10.4.1.7. LocalAliases ΓòÉΓòÉΓòÉ
  13764.  
  13765. LocalAliases = Yes | NO:  No forces all copies of 4OS2 to share the same alias 
  13766. list.  Yes keeps the lists for each shell separate.  See ALIAS for more details 
  13767. on local and global alias lists. 
  13768.  
  13769.  
  13770. ΓòÉΓòÉΓòÉ 10.4.1.8. LocalDirHistory ΓòÉΓòÉΓòÉ
  13771.  
  13772. LocalDirHistory = Yes | NO:  No forces all copies of command processor to share 
  13773. the same directory history.  Yes keeps the directory histories for each shell 
  13774. separate.  See Local and Global Directory History for more details. 
  13775.  
  13776.  
  13777. ΓòÉΓòÉΓòÉ 10.4.1.9. LocalHistory ΓòÉΓòÉΓòÉ
  13778.  
  13779. LocalHistory = Yes | NO:  No forces all copies of 4OS2 to share the same 
  13780. history list.  Yes keeps the lists for each shell separate.  See Command 
  13781. History and Recall for more details on local and global history lists. 
  13782.  
  13783.  
  13784. ΓòÉΓòÉΓòÉ 10.4.1.10. PauseOnError ΓòÉΓòÉΓòÉ
  13785.  
  13786. PauseOnError = YES | No:  Yes forces a pause with the message "Error in 
  13787. filename, press any key to continue processing" after displaying any error 
  13788. message related to a specific line in the .INI file.  No continues processing 
  13789. with no pause after an error message is displayed. 
  13790.  
  13791.  
  13792. ΓòÉΓòÉΓòÉ 10.4.1.11. SwapFilePath ΓòÉΓòÉΓòÉ
  13793.  
  13794. SwapFilePath = Path | File:  Specifies the path to the OS/2 swap file so that 
  13795. the MEMORY command can find it.  You can either specify a full path and 
  13796. filename for the swap file or just the path.  If you specify a path only, 4OS2 
  13797. assumes that the file is called SWAPPER.DAT.  If SwapFilePath is not used, 4OS2 
  13798. assumes that the file is named SWAPPER.DAT and stored in the \OS2\SYSTEM 
  13799. directory of the boot drive. 
  13800.  
  13801.  
  13802. ΓòÉΓòÉΓòÉ 10.4.1.12. TreePath ΓòÉΓòÉΓòÉ
  13803.  
  13804. TreePath = Path:  Sets the location of JPSTREE.IDX, the file used for extended 
  13805. directory searches By default, the file is placed in the root directory of 
  13806. drive C:\. 
  13807.  
  13808.  
  13809. ΓòÉΓòÉΓòÉ 10.4.1.13. WindowState ΓòÉΓòÉΓòÉ
  13810.  
  13811. WindowState = STANDARD | Maximize | Minimize:  Sets the initial state of the 
  13812. 4OS2 window.  Standard puts the window in the default position on the OS/2 
  13813. desktop, and is the default setting. Maximize maximizes the window; Minimize 
  13814. minimizes it.  If you use Maximize or Minimize, you may see the 4OS2 window 
  13815. appear briefly in the Standard position as it is created by OS/2, then switch 
  13816. to the new state. 
  13817.  
  13818.  
  13819. ΓòÉΓòÉΓòÉ 10.4.1.14. WindowX, WindowY, WindowWidth, WindowHeight ΓòÉΓòÉΓòÉ
  13820.  
  13821. WindowX = nnnn, WindowY = nnnn, WindowWidth = nnnn, WindowHeight = nnnn:  These 
  13822. 4 directives set the initial size and position of the 4OS2 window.  The 
  13823. measurements are in pixels or pels.  WindowX and WindowY refer to the position 
  13824. of the bottom left corner of the window relative to the bottom left corner of 
  13825. the screen. 
  13826.  
  13827.  
  13828. ΓòÉΓòÉΓòÉ 10.4.2. Configuration Directives ΓòÉΓòÉΓòÉ
  13829.  
  13830. These directives control the way that 4OS2 operate.  Some can be changed with 
  13831. the SETDOS command while 4OS2 is running. Any corresponding SETDOS command is 
  13832. listed in the description of each directive.  The configuration directives are: 
  13833.  
  13834.         AmPm                Time display format 
  13835.         AppendToDir         "\" on directory names in filename completion 
  13836.         BatchEcho           Default batch file echo state 
  13837.         BeepFreq            Default beep frequency 
  13838.         BeepLength          Default beep length 
  13839.         CDDWinLeft, CDDWinTop, CDDWinWidth, CDDWinHeightInitial position and 
  13840.                             size of the directory change window 
  13841.         CommandSep          Multiple command separator character 
  13842.         CursorIns           Cursor shape in insert mode 
  13843.         CursorOver          Cursor shape in overstrike mode 
  13844.         DecimalChar         DecimalChar 
  13845.         DescriptionMax      Maximum length of file descriptions 
  13846.         DescriptionName     Name of file to hold file descriptions 
  13847.         Descriptions        Enable / disable description processing 
  13848.         EditMode            Editing mode (insert / overstrike) 
  13849.         EscapeChar          4OS2 escape character 
  13850.         EvalMax             Max digits after decimal point in @EVAL 
  13851.         EvalMin             Min digits after decimal point in @EVAL 
  13852.         ExecWait            Wait for external programs at command line 
  13853.         FileCompletion      Filename completion by extension 
  13854.         FuzzyCD             Selects Extended Directory Search mode 
  13855.         HistCopy            History copy mode 
  13856.         HistLogName         History log file name 
  13857.         HistMin             Minimum command length to save 
  13858.         HistMove            History move mode 
  13859.         HistWrap            History wrap mode 
  13860.         LineInput           Enable / disable line input mode 
  13861.         LogName             Log file name 
  13862.         NoClobber           Overwrite protection for output redirection 
  13863.         ParameterChar       Alias / batch file parameter character 
  13864.         PopupWinLeft, PopupWinTop, PopupWinWidth, PopupWinHeightInitial 
  13865.                             position and size of popup windows 
  13866.         Printer             LIST print device 
  13867.         ScreenRows          Screen height 
  13868.         TabStops            Tab width in LIST 
  13869.         ThousandsChar       Thousands separator 
  13870.         UpperCase           Force file names to upper case 
  13871.  
  13872.  
  13873. ΓòÉΓòÉΓòÉ 10.4.2.1. AmPm ΓòÉΓòÉΓòÉ
  13874.  
  13875. AmPm = Yes | NO | Auto:  Yes displays times in 12-hour format with a trailing 
  13876. "a" for AM or "p" for PM.  The default of No forces a display in 24-hour time 
  13877. format.  Auto formats the time according to the country code set for your 
  13878. system.  AmPm controls the time displays used by DIR and SELECT, in LOG files, 
  13879. and the output of the TIMER, DATE, and TIME commands.  It has no effect on 
  13880. %_TIME, %@MAKETIME, the $t and $T options of PROMPT, or date and time ranges. 
  13881.  
  13882.  
  13883. ΓòÉΓòÉΓòÉ 10.4.2.2. AppendToDir ΓòÉΓòÉΓòÉ
  13884.  
  13885. AppendToDir = Yes | NO:  Yes appends a trailing "\" to directory names when 
  13886. doing filename completion.  The default is No.  (Regardless of the setting of 
  13887. this directive, a trailing backslash is always appended to a directory name at 
  13888. the beginning of the command line to enable automatic directory changes.) 
  13889.  
  13890.  
  13891. ΓòÉΓòÉΓòÉ 10.4.2.3. BatchEcho ΓòÉΓòÉΓòÉ
  13892.  
  13893. BatchEcho = YES | No:  Sets the default batch echo mode. Yes enables echoing of 
  13894. all batch file commands unless ECHO is explicitly set off in the batch file. 
  13895. No disables batch file echoing unless ECHO is explicitly set on.  Also see 
  13896. SETDOS /V. 
  13897.  
  13898.  
  13899. ΓòÉΓòÉΓòÉ 10.4.2.4. BeepFreq ΓòÉΓòÉΓòÉ
  13900.  
  13901. BeepFreq = nnnn (440):  Sets the default BEEP command frequency in Hz.  This is 
  13902. also the frequency for "error" beeps (for example, if you press an illegal 
  13903. key).  To disable all error beeps set this or BeepLength to 0.  If you do, the 
  13904. BEEP command will still be operable, but will not produce sound unless you 
  13905. explicitly specify the frequency and duration. 
  13906.  
  13907.  
  13908. ΓòÉΓòÉΓòÉ 10.4.2.5. BeepLength ΓòÉΓòÉΓòÉ
  13909.  
  13910. BeepLength = nnnn (2):  Sets the default BEEP length in system clock ticks 
  13911. (approximately 1/18 of a second per tick). BeepLength is also the default 
  13912. length for "error" beeps (for example, if you press an illegal key). 
  13913.  
  13914.  
  13915. ΓòÉΓòÉΓòÉ 10.4.2.6. CDDWinLeft, CDDWinTop, CDDWinWidth, CDDWinHeight ΓòÉΓòÉΓòÉ
  13916.  
  13917. CDDWinLeft = nnnn, CDDWinTop = nnnn, CDDWinWidth = nnnn, CDDWinHeight = nnnn: 
  13918. These values set the position and size of the popup window used by extended 
  13919. directory searches, in characters, including the border.  The defaults are 3, 
  13920. 3, 72, and 16, respectively (i.e., a window beginning in column 3, row 3, 72 
  13921. columns wide and 16 rows high).  The position is relative to the top left 
  13922. corner of the screen.  The width and height values include the space required 
  13923. for the window border. 
  13924.  
  13925. The window cannot be smaller than than 10 columns wide by 5 rows high 
  13926. (including the border).  The values you enter will be adjusted if necessary to 
  13927. keep a minimum-size window visible on the screen. 
  13928.  
  13929. The window is normally displayed with a shadow, but if you specify a window 
  13930. starting at column 0 and extending to the right margin, the shadow is 
  13931. eliminated; this may be useful to prevent speech software from reading text in 
  13932. the shadow area while viewing the window. 
  13933.  
  13934.  
  13935. ΓòÉΓòÉΓòÉ 10.4.2.7. CommandSep ΓòÉΓòÉΓòÉ
  13936.  
  13937. CommandSep = c:  This is the character used to separate multiple commands on 
  13938. the same line.  The default is the ampersand [&]. You cannot use any of the 
  13939. redirection characters (| > < ) or any of the whitespace characters (space, 
  13940. tab, comma, or equal sign).  The command separator is saved by SETLOCAL and 
  13941. restored by ENDLOCAL. 
  13942.  
  13943. Also see SETDOS /C, the %+ internal variable, and Special Character 
  13944. Compatibility for information on using compatible command separators for two or 
  13945. more products. 
  13946.  
  13947.  
  13948. ΓòÉΓòÉΓòÉ 10.4.2.8. CursorIns ΓòÉΓòÉΓòÉ
  13949.  
  13950. CursorIns = nnnn (100):  This is the shape of the cursor for insert mode during 
  13951. command-line editing and all commands which accept line input (DESCRIBE, ESET, 
  13952. etc.).  The size is a percentage of the total character cell size, between 0% 
  13953. and 100%.  Because of the way video drivers map the cursor shape, you may not 
  13954. get a smooth progression in cursor shapes as CursorIns and CursorOver change. 
  13955. If CursorIns or CursorOver is set to -1, 4OS2 will not attempt to modify the 
  13956. cursor shape at all; you can use this feature to give another program full 
  13957. control of the cursor shape. 
  13958.  
  13959. Also see CursorOver and SETDOS /S. 
  13960.  
  13961.  
  13962. ΓòÉΓòÉΓòÉ 10.4.2.9. CursorOver ΓòÉΓòÉΓòÉ
  13963.  
  13964. CursorOver = nnnn (15):  This is the shape of the cursor for overtype mode 
  13965. during command-line editing and all commands which accept line input.  The size 
  13966. is a percentage of the total character cell size, between 0% and 100%.  For 
  13967. details see CursorIns; also see SETDOS /S. 
  13968.  
  13969.  
  13970. ΓòÉΓòÉΓòÉ 10.4.2.10. DecimalChar ΓòÉΓòÉΓòÉ
  13971.  
  13972.  DecimalChar = . | , | AUTO:  Sets the character used as the decimal separator 
  13973. for @EVAL, numeric IF and IFF tests, version numbers, and other similar uses. 
  13974. The only valid settings are period [.], comma [,], and Auto (the default).  A 
  13975. setting of Auto tells the command processor to use the decimal separator 
  13976. associated with your current country code.  If you change the decimal character 
  13977. you must also adjust the thousands character (with ThousandsChar) so that the 
  13978. two characters are different. 
  13979.  
  13980. Also see SETDOS /G. 
  13981.  
  13982.  
  13983. ΓòÉΓòÉΓòÉ 10.4.2.11. DescriptionMax ΓòÉΓòÉΓòÉ
  13984.  
  13985. DescriptionMax = nnnn (40):  Controls the description length limit for 
  13986. DESCRIBE.  The allowable range is 20 to 511 characters. 
  13987.  
  13988.  
  13989. ΓòÉΓòÉΓòÉ 10.4.2.12. DescriptionName ΓòÉΓòÉΓòÉ
  13990.  
  13991. DescriptionName = [File | EA]:  Sets the file name in which to store file 
  13992. descriptions.  The default file name is DESCRIPT.ION.  Use this directive with 
  13993. caution because changing the name from the default will make it difficult to 
  13994. transfer file descriptions to another system. 
  13995.  
  13996. If you set DescriptionName = EA, 4OS2 will use the ".SUBJECT" extended 
  13997. attribute (EA) for file descriptions instead of a separate file.  Note that 
  13998. using EAs will slow the DIR and SELECT commands noticeably.  On a FAT volume, 
  13999. performance may be substantially slower, depending on whether the system has 
  14000. cached the extended attributes. 
  14001.  
  14002. Also see SETDOS /D. 
  14003.  
  14004.  
  14005. ΓòÉΓòÉΓòÉ 10.4.2.13. Descriptions ΓòÉΓòÉΓòÉ
  14006.  
  14007. Descriptions = YES | No:  Turns description handling on or off during the file 
  14008. processing commands COPY, DEL, MOVE, and REN.  If set to No, 4OS2 will not 
  14009. update the description file when files are moved, copied, deleted or renamed. 
  14010.  
  14011. Also see SETDOS /D. 
  14012.  
  14013.  
  14014. ΓòÉΓòÉΓòÉ 10.4.2.14. EditMode ΓòÉΓòÉΓòÉ
  14015.  
  14016. EditMode = Insert | OVERSTRIKE:  This directive lets you start the command-line 
  14017. editor in either insert or overstrike mode.  Also see SETDOS /M. 
  14018.  
  14019.  
  14020. ΓòÉΓòÉΓòÉ 10.4.2.15. EscapeChar ΓòÉΓòÉΓòÉ
  14021.  
  14022. EscapeChar = c :  Sets the character used to suppress the normal meaning of the 
  14023. following character.  The default is a caret [^]. See Escape Character for a 
  14024. description of special escape sequences.  You cannot use any of the redirection 
  14025. characters (|, >, or < ) or the whitespace characters (space, tab, comma, or 
  14026. equal sign) as the escape character.  The escape character is saved by SETLOCAL 
  14027. and restored by ENDLOCAL. 
  14028.  
  14029. Also see SETDOS /E, the %= internal variable, and Special Character 
  14030. Compatibility for information on using compatible escape characters for two or 
  14031. more products. 
  14032.  
  14033.  
  14034. ΓòÉΓòÉΓòÉ 10.4.2.16. EvalMax ΓòÉΓòÉΓòÉ
  14035.  
  14036. EvalMax = nnnn (8):  Controls the maximum number of digits after the decimal 
  14037. point in values returned by @EVAL. This setting can be overridden with the 
  14038. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  Also see 
  14039. EvalMin and SETDOS /F. 
  14040.  
  14041.  
  14042. ΓòÉΓòÉΓòÉ 10.4.2.17. EvalMin ΓòÉΓòÉΓòÉ
  14043.  
  14044. EvalMin = nnnn (8):  Controls the minimum number of digits after the decimal 
  14045. point in values returned by @EVAL.  This setting can be overridden with the 
  14046. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  The EvalMin 
  14047. value will be ignored if it is larger than EvalMax.  Also see SETDOS /F. 
  14048.  
  14049.  
  14050. ΓòÉΓòÉΓòÉ 10.4.2.18. ExecWait ΓòÉΓòÉΓòÉ
  14051.  
  14052. ExecWait = Yes | NO:  Controls whether 4OS2 waits for an external program to 
  14053. complete before redisplaying the prompt.  See Waiting for Applications to 
  14054. Finish for details on the effects of this directive. 
  14055.  
  14056.  
  14057. ΓòÉΓòÉΓòÉ 10.4.2.19. FileCompletion ΓòÉΓòÉΓòÉ
  14058.  
  14059. FileCompletion = cmd1: ext1 ext2 ...; cmd2: ext3 ext4 ...  Sets the files made 
  14060. available during filename completion for selected commands.  The format is the 
  14061. same as that used for the FILECOMPLETION environment variable.  See Filename 
  14062. Completion for a detailed explanation of selective filename completion. 
  14063.  
  14064.  
  14065. ΓòÉΓòÉΓòÉ 10.4.2.20. FuzzyCD ΓòÉΓòÉΓòÉ
  14066.  
  14067. FuzzyCD = 0 | 1 | 2 | 3;  Enables or disables extended directory searches, and 
  14068. controls their behavior.  A setting of 0 (the default) disables extended 
  14069. searches.  For complete details on the meaning of the other settings see 
  14070. Extended Directory Searches. 
  14071.  
  14072.  
  14073. ΓòÉΓòÉΓòÉ 10.4.2.21. HistCopy ΓòÉΓòÉΓòÉ
  14074.  
  14075. HistCopy = Yes | NO:  Controls what happens when you re-execute a line from the 
  14076. command history.  If this option is set to Yes, the line is appended to the end 
  14077. of the history list.  By default, or if this option is set to No, the command 
  14078. is not copied.  The original copy of the command is retained at its original 
  14079. position in the list, regardless of the setting of HistCopy. 
  14080.  
  14081. Set this option to No if you want to use HistMove = Yes; otherwise, the 
  14082. HistCopy setting will override HistMove. 
  14083.  
  14084.  
  14085. ΓòÉΓòÉΓòÉ 10.4.2.22. HistLogName ΓòÉΓòÉΓòÉ
  14086.  
  14087. HistLogName = File:  Sets the history log file name and path.  Using 
  14088. HistLogName does not turn history logging on; you must use a LOG /H ON command 
  14089. to do so. 
  14090.  
  14091.  
  14092. ΓòÉΓòÉΓòÉ 10.4.2.23. HistMin ΓòÉΓòÉΓòÉ
  14093.  
  14094. HistMin = nnnn (0):  Sets the minimum command-line size to save in the command 
  14095. history list.  Any command line whose length is less than this value will not 
  14096. be saved.  Legal values range from 0, which saves everything, to 1024, which 
  14097. disables all command history saves. 
  14098.  
  14099.  
  14100. ΓòÉΓòÉΓòÉ 10.4.2.24. HistMove ΓòÉΓòÉΓòÉ
  14101.  
  14102. HistMove = Yes | NO:  If set to Yes, a recalled line is moved to the end of the 
  14103. command history.  The difference between this directive and HistCopy, is that 
  14104. HistCopy = Yes copies each recalled line to the end of the history but leaves 
  14105. the original in place.  HistMove = Yes places the line at the end of history 
  14106. and removes the original line. 
  14107.  
  14108. This directive has no effect if HistCopy = Yes. 
  14109.  
  14110.  
  14111. ΓòÉΓòÉΓòÉ 10.4.2.25. HistWrap ΓòÉΓòÉΓòÉ
  14112.  
  14113. HistWrap = YES | No:  Controls whether the command history recall "wraps" when 
  14114. you reach the top or bottom of the list.  The default setting enables wrapping, 
  14115. so the list appears "circular".  If HistWrap is set to No, history recall will 
  14116. stop at the beginning and end of the list rather than wrapping.  This setting 
  14117. affects history recall at the prompt only; the command history window never 
  14118. wraps. 
  14119.  
  14120.  
  14121. ΓòÉΓòÉΓòÉ 10.4.2.26. LineInput ΓòÉΓòÉΓòÉ
  14122.  
  14123. LineInput = Yes | NO:  This directive controls how 4OS2 gets its input from the 
  14124. command line.  Yes forces 4OS2 to perform line-by-line input, just as CMD.EXE 
  14125. does, instead of character-by-character input.  This will disable command-line 
  14126. editing, history recall, the directory history window, and filename completion, 
  14127. and will reduce the 4OS2 input length limit from 1023 characters to 299 
  14128. characters.  It is normally used only for applications which do not work 
  14129. properly unless 4OS2 uses line input. 
  14130.  
  14131. If you have a particular program that requires line input, you can use SETDOS 
  14132. /L to temporarily change modes. 
  14133.  
  14134.  
  14135. ΓòÉΓòÉΓòÉ 10.4.2.27. LogName ΓòÉΓòÉΓòÉ
  14136.  
  14137. LogName = File:  Sets the log file name and path.  Using LogName does not turn 
  14138. logging on; you must use a LOG ON command to do so. 
  14139.  
  14140.  
  14141. ΓòÉΓòÉΓòÉ 10.4.2.28. NoClobber ΓòÉΓòÉΓòÉ
  14142.  
  14143. NoClobber = Yes | NO:  If set to Yes, will prevent standard output redirection 
  14144. from overwriting an existing file, and will require that the output file 
  14145. already exist for append redirection.  Also see SETDOS /N. 
  14146.  
  14147.  
  14148. ΓòÉΓòÉΓòÉ 10.4.2.29. ParameterChar ΓòÉΓòÉΓòÉ
  14149.  
  14150. ParameterChar = c:  Sets the character used after a percent sign to specify all 
  14151. or all remaining command-line arguments in a batch file or alias (e.g., %& or 
  14152. %n&; see Batch Files and ALIAS).  The default is the ampersand [&].  The 
  14153. parameter character is saved by SETLOCAL and restored by ENDLOCAL. 
  14154.  
  14155. Also see SETDOS /P.  See Special Character Compatibility for information on 
  14156. using compatible parameter characters for two or more products. 
  14157.  
  14158.  
  14159. ΓòÉΓòÉΓòÉ 10.4.2.30. PopupWinLeft, PopupWinTop, PopupWinWidth, PopupWinHeight ΓòÉΓòÉΓòÉ
  14160.  
  14161. PopupWinLeft = nnnn, PopupWinTop = nnnn, PopupWinWidth = nnnn, PopupWinHeight = 
  14162. nnnn:  These values set the position and size of the command-line, directory 
  14163. history, and filename completion windows, and most other popup windows (see 
  14164. CDDWinLeft etc. for the extended directory search window).  The values are in 
  14165. characters, and include the border.  The defaults are 40, 1, 36, and 12, 
  14166. respectively (i.e., a window beginning in column 40, row 1, 36 columns wide and 
  14167. 12 rows high).  The position is relative to the top left corner of the screen. 
  14168. The width and height values include the space required for the window border. 
  14169.  
  14170. The window cannot be smaller than than 10 columns wide by 5 rows high 
  14171. (including the border).  The values you enter will be adjusted if necessary to 
  14172. keep a minimum-size window visible on the screen. 
  14173.  
  14174. The window is normally displayed with a shadow, but if you specify a window 
  14175. starting at column 0 and extending to the right margin, the shadow is 
  14176. eliminated; this may be useful to prevent speech software from reading text in 
  14177. the shadow area while viewing the window. 
  14178.  
  14179.  
  14180. ΓòÉΓòÉΓòÉ 10.4.2.31. Printer ΓòÉΓòÉΓòÉ
  14181.  
  14182. Printer = devicename:  Sets the output device that the LIST command will print 
  14183. to.  By default, LPT1 is used. The device can be PRN, LPT1 to 3, COM1 to 4, NUL 
  14184. (which will disable printed output) or any other installed character device. 
  14185.  
  14186.  
  14187. ΓòÉΓòÉΓòÉ 10.4.2.32. ScreenRows ΓòÉΓòÉΓòÉ
  14188.  
  14189. ScreenRows = nnnn:  Sets the number of screen rows used by the video display. 
  14190. Normally the screen size is determined automatically, but if you have a 
  14191. non-standard display you may need to set it explicitly.  This value does not 
  14192. affect screen scrolling, which is controlled by OS/2 and your video driver. 
  14193.  
  14194. ScreenRows is used only by the LIST and SELECT commands, the paged output 
  14195. options of other commands (e.g., TYPE /P), and error checking in the screen 
  14196. output commands. 
  14197.  
  14198. Also see SETDOS /R. 
  14199.  
  14200.  
  14201. ΓòÉΓòÉΓòÉ 10.4.2.33. TabStops ΓòÉΓòÉΓòÉ
  14202.  
  14203. TabStops = nnnn (8):  Sets the tab stops for files displayed with the LIST 
  14204. command.  Setting TabStops=3, for example, will place a tab stop in every third 
  14205. column.  The allowable range is 1 to 32. 
  14206.  
  14207.  
  14208. ΓòÉΓòÉΓòÉ 10.4.2.34. ThousandsChar ΓòÉΓòÉΓòÉ
  14209.  
  14210. ThousandsChar = . | , | AUTO:  Sets the character used as the thousands 
  14211. separator for numeric output.  The only valid settings are period [.], comma 
  14212. [,], and Auto (the default).  A setting of Auto tells the command processor to 
  14213. use the thousands separator associated with your current country code.  If you 
  14214. change the thousands character you must also adjust the decimal character (with 
  14215. DecimalChar) so that the two characters are different. 
  14216.  
  14217. Also see SETDOS /G. 
  14218.  
  14219.  
  14220. ΓòÉΓòÉΓòÉ 10.4.2.35. UpperCase ΓòÉΓòÉΓòÉ
  14221.  
  14222. UpperCase = Yes | NO:  Yes specifies that file and directory names should be 
  14223. displayed in the traditional upper-case by internal commands like COPY and DIR. 
  14224. No allows the normal 4OS2 lower-case style. This directive does not affect the 
  14225. display of filenames on HPFS drives. 
  14226.  
  14227. Also see SETDOS /U. 
  14228.  
  14229.  
  14230. ΓòÉΓòÉΓòÉ 10.4.3. Color Directives ΓòÉΓòÉΓòÉ
  14231.  
  14232. These directives control the colors that 4OS2 use for its displays. Screen 
  14233. border colors can only be set in StdColors.  "BORder" color specifications 
  14234. included in other directives will be ignored.  For complete details on color 
  14235. names see Colors and Color Names.  The color directives are: 
  14236.  
  14237.         BrightBG                Bright background colors 
  14238.         CDDWinColors            Directory change window colors 
  14239.         ColorDir                Directory colors 
  14240.         InputColors             Input colors 
  14241.         ListboxBarColors        Light bar color in list boxes 
  14242.         ListColors              LIST display colors 
  14243.         ListStatBarColors       LIST status bar colors 
  14244.         PopupWinColors          Popup window colors 
  14245.         SelectColors            SELECT display colors 
  14246.         SelectStatBarColors     SELECT status bar colors 
  14247.         StdColors               Standard display colors 
  14248.  
  14249.  
  14250. ΓòÉΓòÉΓòÉ 10.4.3.1. BrightBG ΓòÉΓòÉΓòÉ
  14251.  
  14252. BrightBG = Yes | No.  If set to Yes, 4OS2 will enable bright background colors 
  14253. in full-screen sessions.  If set to No, bright backgrounds will be disabled, 
  14254. but blinking foreground characters will be enabled.  If BrightBG is not used, 
  14255. 4OS2 will not adjust the bright background / blinking foreground switch at all. 
  14256. Most color video boards default to a blinking foreground with bright background 
  14257. colors disabled. 
  14258.  
  14259. See also SETDOS /B. 
  14260.  
  14261. Using BrightBG requires careful attention to interactions of display type, 
  14262. mode, and color.  For a detailed explanation, see Colors and Color Names. 
  14263.  
  14264.  
  14265. ΓòÉΓòÉΓòÉ 10.4.3.2. CDDWinColors ΓòÉΓòÉΓòÉ
  14266.  
  14267. CDDWinColors = Color:  Sets the default colors for the popup window used by 
  14268. extended directory searches.  If this directive is not used, the colors will be 
  14269. reversed from the current colors on the screen. 
  14270.  
  14271.  
  14272. ΓòÉΓòÉΓòÉ 10.4.3.3. ColorDir ΓòÉΓòÉΓòÉ
  14273.  
  14274. ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb; ...:  Sets the directory 
  14275. colors used by DIR and SELECT.  The format is the same as that used for the 
  14276. COLORDIR environment variable.  See the Color-Coded Directories topic under the 
  14277. DIR command for a complete description of the format of this variable. 
  14278.  
  14279.  
  14280. ΓòÉΓòÉΓòÉ 10.4.3.4. InputColors ΓòÉΓòÉΓòÉ
  14281.  
  14282. InputColors = Color:  Sets the colors used for command-line input.  This 
  14283. setting is useful for making your input stand out from the normal output. 
  14284.  
  14285.  
  14286. ΓòÉΓòÉΓòÉ 10.4.3.5. ListboxBarColors ΓòÉΓòÉΓòÉ
  14287.  
  14288. ListboxBarColors = Color:  Sets the color for the highlight bar in the popup 
  14289. list boxes (i.e., command history window, filename completion window, @SELECT 
  14290. window, etc.). 
  14291.  
  14292.  
  14293. ΓòÉΓòÉΓòÉ 10.4.3.6. ListColors ΓòÉΓòÉΓòÉ
  14294.  
  14295. ListColors = Color:  Sets the colors used by the LIST command.  If this 
  14296. directive is not used, LIST will use the current default colors set by the CLS 
  14297. or COLOR command or by the StdColors directive. 
  14298.  
  14299.  
  14300. ΓòÉΓòÉΓòÉ 10.4.3.7. ListStatBarColors ΓòÉΓòÉΓòÉ
  14301.  
  14302. ListStatBarColors = Color:  Sets the colors used on the LIST status bar.  If 
  14303. this directive is not used, LIST will set the status bar to the reverse of the 
  14304. screen color (the screen color is controlled by ListColors). 
  14305.  
  14306.  
  14307. ΓòÉΓòÉΓòÉ 10.4.3.8. PopupWinColors ΓòÉΓòÉΓòÉ
  14308.  
  14309. PopupWinColors = Color:  Sets the default colors for the command-line, 
  14310. directory history, and filename completion windows, and most other popup 
  14311. windows (see CDDWinColors for the extended directory search window).  If this 
  14312. directive is not used, the colors will be reversed from the current colors on 
  14313. the screen. 
  14314.  
  14315.  
  14316. ΓòÉΓòÉΓòÉ 10.4.3.9. SelectColors ΓòÉΓòÉΓòÉ
  14317.  
  14318. SelectColors = Color:  Sets the color used by the SELECT command.  If this 
  14319. directive is not used, SELECT will use the current default colors set by the 
  14320. CLS or COLOR command or by the StdColors directive. 
  14321.  
  14322.  
  14323. ΓòÉΓòÉΓòÉ 10.4.3.10. SelectStatBarColors ΓòÉΓòÉΓòÉ
  14324.  
  14325. SelectStatBarColors = Color:  Sets the color used on the SELECT status bar.  If 
  14326. this directive is not used, SELECT will set the status bar to the reverse of 
  14327. the screen color (the screen color is controlled by SelectColors). 
  14328.  
  14329.  
  14330. ΓòÉΓòÉΓòÉ 10.4.3.11. StdColors ΓòÉΓòÉΓòÉ
  14331.  
  14332. StdColors = Color:  Sets the standard colors to be used when CLS is used 
  14333. without a color specification, and for LIST and SELECT if ListColors and 
  14334. SelectColors are not used.  Using this directive is similar to placing a COLOR 
  14335. command in 4START. 
  14336.  
  14337. StdColors takes effect the first time CLS, LIST, or SELECT is used after 4OS2 
  14338. starts, but will not affect the color of error or other messages displayed 
  14339. during the loading and initialization process. 
  14340.  
  14341.  
  14342. ΓòÉΓòÉΓòÉ 10.4.4. Key Mapping Directives ΓòÉΓòÉΓòÉ
  14343.  
  14344. These directives allow you to change the keys used for command-line editing and 
  14345. other internal functions.  They are divided into four types, depending on the 
  14346. context in which the keys are used.  For a discussion and list of directives 
  14347. for each type see: 
  14348.  
  14349.             General Input Keys 
  14350.             Command-Line Editing Keys 
  14351.             Popup Window Keys 
  14352.             LIST Keys 
  14353.  
  14354.  Using a key mapping directive allows you to assign a different or additional 
  14355.  key to perform the function described.  For example, to use function key F3 to 
  14356.  invoke the HELP facility (normally invoked with F1): 
  14357.  
  14358.           Help = F3
  14359.  
  14360.  Any directive can be used multiple times to assign multiple keys to the same 
  14361.  function.  For example: 
  14362.  
  14363.           ListFind = F            ;F does a find in LIST
  14364.           ListFind = F5           ;F5 also does a find in LIST
  14365.  
  14366.  Use some care when you reassign keystrokes.  If you assign a default key to a 
  14367.  different function, it will no longer be available for its original use.  For 
  14368.  example, if you assign F1 to the AddFile directive (a part of filename 
  14369.  completion), the F1 key will no longer invoke the help system, so you will 
  14370.  probably want to assign a different key to Help. 
  14371.  
  14372.  See Keys and Key Names before using the key mapping directives. 
  14373.  
  14374.  Key assignments are processed before looking for keystroke aliases.  For 
  14375.  example, if you assign Shift-F1 to HELP and also assign Shift-F1 to a key 
  14376.  alias, the key alias will be ignored. 
  14377.  
  14378.  Assigning a new keystroke for a function does not deassign the default 
  14379.  keystroke for the same function.  If you want to deassign one of the default 
  14380.  keys, use the NormalKey directive described below or the corresponding 
  14381.  directive for keys in the other key groups (NormalEditKey, NormalPopupKey, or 
  14382.  NormalListKey). 
  14383.  
  14384.  
  14385. ΓòÉΓòÉΓòÉ 10.4.4.1. General Input Keys ΓòÉΓòÉΓòÉ
  14386.  
  14387. These directives apply to all input.  They are in effect whenever 4OS2 requests 
  14388. input from the keyboard, including during command-line editing and the 
  14389. DESCRIBE, ESET, INPUT, LIST, and SELECT commands.  The general input keys are: 
  14390.  
  14391.         Backspace           Deletes the character to the left of the cursor 
  14392.         BeginLine           Moves the cursor to the start of the line 
  14393.         Del                 Deletes the character at the cursor 
  14394.         DelToBeginning      Deletes from the cursor to the start of the line 
  14395.         DelToEnd            Deletes from the cursor to the end of the line 
  14396.         DelWordLeft         Deletes the word to the left of the cursor 
  14397.         DelWordRight        Deletes the word to the right of the cursor 
  14398.         Down                * Moves the cursor or scrolls the display down 
  14399.         EndLine             Moves the cursor to the end of the line 
  14400.         EraseLine           Deletes the entire line 
  14401.         ExecLine            Executes or accepts a line 
  14402.         Ins                 Toggles insert / overstrike mode 
  14403.         Left                * Moves the cursor or scrolls the display left 
  14404.         NormalKey           * Deassigns a key 
  14405.         Right               * Moves the cursor or scrolls the display right 
  14406.         Up                  * Moves the cursor or scrolls the display up 
  14407.         WordLeft            Moves the cursor left one word 
  14408.         WordRight           Moves the cursor right one word 
  14409.  
  14410.  
  14411. ΓòÉΓòÉΓòÉ 10.4.4.1.1. Backspace ΓòÉΓòÉΓòÉ
  14412.  
  14413. Backspace = Key (Bksp):  Deletes the character to the left of the cursor. 
  14414.  
  14415.  
  14416. ΓòÉΓòÉΓòÉ 10.4.4.1.2. BeginLine ΓòÉΓòÉΓòÉ
  14417.  
  14418. BeginLine = Key (Home):  Moves the cursor to the beginning of the line. 
  14419.  
  14420.  
  14421. ΓòÉΓòÉΓòÉ 10.4.4.1.3. Del ΓòÉΓòÉΓòÉ
  14422.  
  14423. Del = Key (Del):  Deletes the character at the cursor. 
  14424.  
  14425.  
  14426. ΓòÉΓòÉΓòÉ 10.4.4.1.4. DelToBeginning ΓòÉΓòÉΓòÉ
  14427.  
  14428. DelToBeginning = Key (Ctrl-Home):  Deletes from the cursor to the start of the 
  14429. line. 
  14430.  
  14431.  
  14432. ΓòÉΓòÉΓòÉ 10.4.4.1.5. DelToEnd ΓòÉΓòÉΓòÉ
  14433.  
  14434. DelToEnd = Key (Ctrl-End):  Deletes from the cursor to the end of the line. 
  14435.  
  14436.  
  14437. ΓòÉΓòÉΓòÉ 10.4.4.1.6. DelWordLeft ΓòÉΓòÉΓòÉ
  14438.  
  14439. DelWordLeft = Key (Ctrl-L):  Deletes the word to the left of the cursor. 
  14440.  
  14441.  
  14442. ΓòÉΓòÉΓòÉ 10.4.4.1.7. DelWordRight ΓòÉΓòÉΓòÉ
  14443.  
  14444. DelWordRight = Key (Ctrl-R, Ctrl-Bksp):  Deletes the word to the right of the 
  14445. cursor.  See ClearKeyMap if you need to remove the default mapping of Ctrl-Bksp 
  14446. to this function. 
  14447.  
  14448.  
  14449. ΓòÉΓòÉΓòÉ 10.4.4.1.8. Down ΓòÉΓòÉΓòÉ
  14450.  
  14451. Down = Key (Down):  Scrolls the display down one line in LIST; moves the cursor 
  14452. down one line in SELECT and in the command-line history, directory history, or 
  14453. %@SELECT window.  (Scrolling down through the command history at the prompt is 
  14454. controlled by NextHistory, not by this directive.) 
  14455.  
  14456.  
  14457. ΓòÉΓòÉΓòÉ 10.4.4.1.9. EndLine ΓòÉΓòÉΓòÉ
  14458.  
  14459. EndLine = Key (End):  Moves the cursor to the end of the line. 
  14460.  
  14461.  
  14462. ΓòÉΓòÉΓòÉ 10.4.4.1.10. EraseLine ΓòÉΓòÉΓòÉ
  14463.  
  14464. EraseLine = Key (Esc):  Deletes the entire line. 
  14465.  
  14466.  
  14467. ΓòÉΓòÉΓòÉ 10.4.4.1.11. ExecLine ΓòÉΓòÉΓòÉ
  14468.  
  14469. ExecLine = Key (Enter):  Executes or accepts a line. 
  14470.  
  14471.  
  14472. ΓòÉΓòÉΓòÉ 10.4.4.1.12. Ins ΓòÉΓòÉΓòÉ
  14473.  
  14474. Ins = Key (Ins):  Toggles insert / overstrike mode during line editing. 
  14475.  
  14476.  
  14477. ΓòÉΓòÉΓòÉ 10.4.4.1.13. Left ΓòÉΓòÉΓòÉ
  14478.  
  14479. Left = Key (Left):  Moves the cursor left one character on the input line; 
  14480. scrolls the display left 8 columns in LIST; scrolls the display left 4 columns 
  14481. in the command-line, directory history, or %@SELECT window. 
  14482.  
  14483.  
  14484. ΓòÉΓòÉΓòÉ 10.4.4.1.14. NormalKey ΓòÉΓòÉΓòÉ
  14485.  
  14486. NormalKey = Key:  Deassigns a general input key in order to disable the usual 
  14487. meaning of the key within 4OS2 and/or make it available for keystroke aliases. 
  14488. This will make the keystroke operate as a "normal" key with no special 
  14489. function.  For example: 
  14490.  
  14491.         NormalKey = Ctrl-End
  14492.  
  14493. will disable Ctrl-End, which is the standard "delete to end of line" key. 
  14494. Ctrl-End could then be assigned to a keystroke alias. Another key could be 
  14495. assigned the "delete to end of line" function with the DelToEnd directive. 
  14496.  
  14497.  
  14498. ΓòÉΓòÉΓòÉ 10.4.4.1.15. Right ΓòÉΓòÉΓòÉ
  14499.  
  14500. Right = Key (Right):  Moves the cursor right one character on the input line; 
  14501. scrolls the display right 8 columns in LIST; scrolls the display right 4 
  14502. columns in the command-line history, directory history, or %@SELECT window. 
  14503.  
  14504.  
  14505. ΓòÉΓòÉΓòÉ 10.4.4.1.16. Up ΓòÉΓòÉΓòÉ
  14506.  
  14507. Up = Key (Up):  Scrolls the display up one line in LIST; moves the cursor up 
  14508. one line in SELECT and in the command-line history, directory history, or 
  14509. %@SELECT window.  (Scrolling up through the command history at the prompt is 
  14510. controlled by PrevHistory, not by this directive.) 
  14511.  
  14512.  
  14513. ΓòÉΓòÉΓòÉ 10.4.4.1.17. WordLeft ΓòÉΓòÉΓòÉ
  14514.  
  14515. WordLeft = Key (Ctrl-Left):  Moves the cursor left one word; scrolls the 
  14516. display left 40 columns in LIST. 
  14517.  
  14518.  
  14519. ΓòÉΓòÉΓòÉ 10.4.4.1.18. WordRight ΓòÉΓòÉΓòÉ
  14520.  
  14521. WordRight = Key (Ctrl-Right):  Moves the cursor right one word; scrolls the 
  14522. display right 40 columns in LIST. 
  14523.  
  14524.  
  14525. ΓòÉΓòÉΓòÉ 10.4.4.2. Command-Line Editing Keys ΓòÉΓòÉΓòÉ
  14526.  
  14527. These directives apply only to command-line editing.  They are only effective 
  14528. at the 4OS2 prompt.  The command-line editing keys are: 
  14529.  
  14530.         AddFile             Keeps filename completion entry and adds another 
  14531.         AliasExpand         Expands aliases without executing them 
  14532.         CommandEscape       Allows direct entry of a keystroke 
  14533.         DelHistory          Deletes a history list entry 
  14534.         EndHistory          Displays the last entry in the history list 
  14535.         Help                Invokes this help system 
  14536.         LineToEnd           Copies the current line to the end of the history 
  14537.         NextFile            Gets the next matching filename 
  14538.         NextHistory         Recalls the next command from the history 
  14539.         NormalEditKey       Deassigns a command-line editing key 
  14540.         PopFile             Opens the filename completion window 
  14541.         PrevFile            Gets the previous matching filename 
  14542.         PrevHistory         Recalls the previous command from the history 
  14543.         SaveHistory         Saves the command line without executing it 
  14544.  
  14545.  
  14546. ΓòÉΓòÉΓòÉ 10.4.4.2.1. AddFile ΓòÉΓòÉΓòÉ
  14547.  
  14548. AddFile = Key (F10):  Keeps the current filename completion entry and inserts 
  14549. the next matching name. 
  14550.  
  14551.  
  14552. ΓòÉΓòÉΓòÉ 10.4.4.2.2. AliasExpand ΓòÉΓòÉΓòÉ
  14553.  
  14554. AliasExpand = Key (Ctrl-F):  Expands all aliases in the current command line 
  14555. without executing them. 
  14556.  
  14557.  
  14558. ΓòÉΓòÉΓòÉ 10.4.4.2.3. CommandEscape ΓòÉΓòÉΓòÉ
  14559.  
  14560. CommandEscape = Key (Alt-255):  Allows direct entry of a keystroke that would 
  14561. normally be handled by the command line editor (e.g. Tab or Ctrl-D). 
  14562.  
  14563.  
  14564. ΓòÉΓòÉΓòÉ 10.4.4.2.4. DelHistory ΓòÉΓòÉΓòÉ
  14565.  
  14566. DelHistory = Key (Ctrl-D):  Deletes the displayed history list entry and 
  14567. displays the previous entry. 
  14568.  
  14569.  
  14570. ΓòÉΓòÉΓòÉ 10.4.4.2.5. EndHistory ΓòÉΓòÉΓòÉ
  14571.  
  14572. EndHistory = Key (Ctrl-E):  Displays the last entry in the history list. 
  14573.  
  14574.  
  14575. ΓòÉΓòÉΓòÉ 10.4.4.2.6. Help ΓòÉΓòÉΓòÉ
  14576.  
  14577. Help = Key (F1):  Invokes the HELP facility. 
  14578.  
  14579.  
  14580. ΓòÉΓòÉΓòÉ 10.4.4.2.7. LineToEnd ΓòÉΓòÉΓòÉ
  14581.  
  14582. LineToEnd = Key (Ctrl-Enter):  Copies the current command line to the end of 
  14583. the history list, then executes it. 
  14584.  
  14585.  
  14586. ΓòÉΓòÉΓòÉ 10.4.4.2.8. NextFile ΓòÉΓòÉΓòÉ
  14587.  
  14588. NextFile = Key (F9, Tab):  Gets the next matching filename. See ClearKeyMap if 
  14589. you need to remove the default mapping of Tab to this function. 
  14590.  
  14591.  
  14592. ΓòÉΓòÉΓòÉ 10.4.4.2.9. NextHistory ΓòÉΓòÉΓòÉ
  14593.  
  14594. NextHistory = Key (Down):  Recalls the next command from the command history. 
  14595.  
  14596.  
  14597. ΓòÉΓòÉΓòÉ 10.4.4.2.10. NormalEditKey ΓòÉΓòÉΓòÉ
  14598.  
  14599. NormalEditKey = Key:  Deassigns a command-line editing key in order to disable 
  14600. the usual meaning of the key while editing a command line, and/or make it 
  14601. available for keystroke aliases.  For additional details see NormalKey. 
  14602.  
  14603.  
  14604. ΓòÉΓòÉΓòÉ 10.4.4.2.11. PopFile ΓòÉΓòÉΓòÉ
  14605.  
  14606. PopFile = Key (F7, Ctrl-Tab):  Opens the filename completion window.  You may 
  14607. not be able to use Ctrl-Tab, because not all systems recognize it as a 
  14608. keystroke.  See ClearKeyMap if you need to remove the default mapping of 
  14609. Ctrl-Tab to this function. 
  14610.  
  14611.  
  14612. ΓòÉΓòÉΓòÉ 10.4.4.2.12. PrevFile ΓòÉΓòÉΓòÉ
  14613.  
  14614. PrevFile = Key (F8, Shift-Tab):  Gets the previous matching filename.  See 
  14615. ClearKeyMap if you need to remove the default mapping of Shift-Tab to this 
  14616. function. 
  14617.  
  14618.  
  14619. ΓòÉΓòÉΓòÉ 10.4.4.2.13. PrevHistory ΓòÉΓòÉΓòÉ
  14620.  
  14621. PrevHistory = Key (Up):  Recalls the previous command from the command history. 
  14622.  
  14623.  
  14624. ΓòÉΓòÉΓòÉ 10.4.4.2.14. SaveHistory ΓòÉΓòÉΓòÉ
  14625.  
  14626. SaveHistory = Key (Ctrl-K):  Saves the command line in the command history list 
  14627. without executing it. 
  14628.  
  14629.  
  14630. ΓòÉΓòÉΓòÉ 10.4.4.3. Popup Window Keys ΓòÉΓòÉΓòÉ
  14631.  
  14632. These directives apply to popup windows, including the command history window, 
  14633. the directory history window, the filename completion window, the extended 
  14634. directory search window, and the %@SELECT window.  The popup window keys are: 
  14635.  
  14636.         DirWinOpen          Opens the directory history window 
  14637.         HistWinOpen         Opens the command history window 
  14638.         NormalPopupKey      Deassigns a popup window key 
  14639.         PopupWinBegin       Moves to the first line of the popup window 
  14640.         PopupWinDel         Deletes a line from within the popup window 
  14641.         PopupWinEdit        Moves a line from the popup window to the prompt 
  14642.         PopupWinEnd         Moves to the last line of the popup window 
  14643.         PopupWinExec        Executes the selected line in the popup window 
  14644.  
  14645.  
  14646. ΓòÉΓòÉΓòÉ 10.4.4.3.1. DirWinOpen ΓòÉΓòÉΓòÉ
  14647.  
  14648. DirWinOpen = Key (Ctrl-PgUp):  Opens the directory history window while at the 
  14649. command line. 
  14650.  
  14651.  
  14652. ΓòÉΓòÉΓòÉ 10.4.4.3.2. HistWinOpen ΓòÉΓòÉΓòÉ
  14653.  
  14654. HistWinOpen = Key (PgUp):  Brings up the history window while at the command 
  14655. line. 
  14656.  
  14657.  
  14658. ΓòÉΓòÉΓòÉ 10.4.4.3.3. NormalPopupKey ΓòÉΓòÉΓòÉ
  14659.  
  14660. NormalPopupKey = Key:  Deassigns a popup window key in order to disable the 
  14661. usual meaning of the key within the popup window. 
  14662.  
  14663. For additional details see NormalKey. 
  14664.  
  14665.  
  14666. ΓòÉΓòÉΓòÉ 10.4.4.3.4. PopupWinBegin ΓòÉΓòÉΓòÉ
  14667.  
  14668. PopupWinBegin = Key (Ctrl-PgUp):  Moves to the first item in the list when in 
  14669. the popup window 
  14670.  
  14671.  
  14672. ΓòÉΓòÉΓòÉ 10.4.4.3.5. PopupWinDel ΓòÉΓòÉΓòÉ
  14673.  
  14674. PopupWinDel = Key (Ctrl-D):  Deletes a line from within the command history or 
  14675. directory history window. 
  14676.  
  14677.  
  14678. ΓòÉΓòÉΓòÉ 10.4.4.3.6. PopupWinEdit ΓòÉΓòÉΓòÉ
  14679.  
  14680. PopupWinEdit = Key (Ctrl-Enter):  Moves a line from the command history or 
  14681. directory history window to the prompt for editing. 
  14682.  
  14683.  
  14684. ΓòÉΓòÉΓòÉ 10.4.4.3.7. PopupWinEnd ΓòÉΓòÉΓòÉ
  14685.  
  14686. PopupWinEnd = Key (Ctrl-PgDn):  Moves to the last item when in the popup 
  14687. window. 
  14688.  
  14689.  
  14690. ΓòÉΓòÉΓòÉ 10.4.4.3.8. PopupWinExec ΓòÉΓòÉΓòÉ
  14691.  
  14692. PopupWinExec = Key (Enter):  Selects the current item and closes the window. 
  14693.  
  14694.  
  14695. ΓòÉΓòÉΓòÉ 10.4.4.4. LIST Keys ΓòÉΓòÉΓòÉ
  14696.  
  14697. These directives are effective only inside the LIST command.  The LIST keys 
  14698. are: 
  14699.  
  14700.         ListExit            Exits the current file. 
  14701.         ListFind            Prompts and searches for a string 
  14702.         ListFindReverse     Prompts and searches backward for a string 
  14703.         ListHex             Toggles hexadecimal display mode 
  14704.         ListHighBit         Toggles LIST's "strip high bit" option 
  14705.         ListInfo            Displays information about the current file 
  14706.         ListNext            Finds the next matching string 
  14707.         ListPrevious        Finds the previous matching string 
  14708.         ListPrint           Prints the file on LPT1 
  14709.         ListWrap            Toggles LIST's wrap option 
  14710.         NormalListKey       Deassigns a LIST key 
  14711.  
  14712.  
  14713. ΓòÉΓòÉΓòÉ 10.4.4.4.1. ListExit ΓòÉΓòÉΓòÉ
  14714.  
  14715. ListExit = Key (Esc):  Exits from the LIST command. 
  14716.  
  14717.  
  14718. ΓòÉΓòÉΓòÉ 10.4.4.4.2. ListFind ΓòÉΓòÉΓòÉ
  14719.  
  14720. ListFind = Key (F):  Prompts and searches for a string. 
  14721.  
  14722.  
  14723. ΓòÉΓòÉΓòÉ 10.4.4.4.3. ListFindReverse ΓòÉΓòÉΓòÉ
  14724.  
  14725. ListFindReverse = Key (Ctrl-F):  Prompts and searches backward for a string. 
  14726.  
  14727.  
  14728. ΓòÉΓòÉΓòÉ 10.4.4.4.4. ListHex ΓòÉΓòÉΓòÉ
  14729.  
  14730. ListHex = Key (X):  Toggles hexadecimal display mode. 
  14731.  
  14732.  
  14733. ΓòÉΓòÉΓòÉ 10.4.4.4.5. ListHighBit ΓòÉΓòÉΓòÉ
  14734.  
  14735. ListHighBit = Key (H):  Toggles LIST's "strip high bit" option, which can aid 
  14736. in displaying files from certain word processors. 
  14737.  
  14738.  
  14739. ΓòÉΓòÉΓòÉ 10.4.4.4.6. ListInfo ΓòÉΓòÉΓòÉ
  14740.  
  14741. ListInfo = Key (I):  Displays information about the current file. 
  14742.  
  14743.  
  14744. ΓòÉΓòÉΓòÉ 10.4.4.4.7. ListNext ΓòÉΓòÉΓòÉ
  14745.  
  14746. ListNext = Key (N):  Finds the next matching string. 
  14747.  
  14748.  
  14749. ΓòÉΓòÉΓòÉ 10.4.4.4.8. ListPrevious ΓòÉΓòÉΓòÉ
  14750.  
  14751. ListPrevious = Key (Ctrl-N):  Finds the previous matching string. 
  14752.  
  14753.  
  14754. ΓòÉΓòÉΓòÉ 10.4.4.4.9. ListPrint ΓòÉΓòÉΓòÉ
  14755.  
  14756. ListPrint = Key (P):  Prints the file on LPT1. 
  14757.  
  14758.  
  14759. ΓòÉΓòÉΓòÉ 10.4.4.4.10. ListWrap ΓòÉΓòÉΓòÉ
  14760.  
  14761. ListWrap = Key (W):  Toggles LIST's wrap option on and off. The wrap option 
  14762. wraps text at the right margin. 
  14763.  
  14764.  
  14765. ΓòÉΓòÉΓòÉ 10.4.4.4.11. NormalListKey ΓòÉΓòÉΓòÉ
  14766.  
  14767. NormalListKey = Key:  Deassigns a LIST key in order to disable the usual 
  14768. meaning of the key within LIST.  For additional details see NormalKey. 
  14769.  
  14770.  
  14771. ΓòÉΓòÉΓòÉ 10.4.5. Advanced Directives ΓòÉΓòÉΓòÉ
  14772.  
  14773. These directives are generally used for unusual circumstances, or for 
  14774. diagnosing problems.  Most often they are not needed in normal use.  The 
  14775. advanced directives are: 
  14776.  
  14777.         ClearKeyMap         Clear default key mappings 
  14778.         Debug               Set debugging options 
  14779.         Include             Include a file containing .INI directives 
  14780.         NextINIFile         Set secondary shell .INI file name 
  14781.  
  14782.  
  14783. ΓòÉΓòÉΓòÉ 10.4.5.1. ClearKeyMap ΓòÉΓòÉΓòÉ
  14784.  
  14785. ClearKeyMap:  Clears all current key mappings. ClearKeyMap is a special 
  14786. directive which has no value or "=" after it.  Use ClearKeyMap to make one of 
  14787. the keys in the default map (Tab, Shift-Tab, Ctrl-Tab, or Ctrl-Bksp) available 
  14788. for a keystroke alias, or in the [Secondary] section of the .INI file to clear 
  14789. key mappings inherited from the primary shell.  ClearKeyMap should appear 
  14790. before any key mapping directives.  If you want to clear some but not all of 
  14791. the default mappings, use ClearKeyMap, then recreate the mappings you want to 
  14792. retain (e.g., with "NextFile=Tab", etc.). 
  14793.  
  14794. If you set DescriptionName = EA, 4OS2 will use the ".SUBJECT" extended 
  14795. attribute (EA) for file descriptions instead of a separate file.  Note that 
  14796. using EAs will slow the DIR and SELECT commands noticeably.  On a FAT volume, 
  14797. performance may be 10% to 200% slower, depending on whether the system has 
  14798. cached the extended attributes. 
  14799.  
  14800.  
  14801. ΓòÉΓòÉΓòÉ 10.4.5.2. Debug ΓòÉΓòÉΓòÉ
  14802.  
  14803. Debug = nnnn (0):  Controls certain debugging options which can assist you in 
  14804. tracking down unusual problems.  Use the following values for Debug; to select 
  14805. more than one option, add the values together: 
  14806.  
  14807.     1   During the startup process, display the complete command tail passed to 
  14808.         4OS2, then wait for a keystroke. 
  14809.  
  14810.     2   Include the product name with each error message displayed by 4OS2. 
  14811.         This may be useful if you are unsure of the origin of a particular 
  14812.         error message. 
  14813.  
  14814.  Also see the batch file debugger, a separate and unrelated facility for 
  14815.  stepping through batch files. 
  14816.  
  14817.  
  14818. ΓòÉΓòÉΓòÉ 10.4.5.3. Include ΓòÉΓòÉΓòÉ
  14819.  
  14820. Include = File:  Include the text from the named file at this point in the 
  14821. processing of the current .INI file.  Use this option to share a file of 
  14822. directives between several products.  The text in the named file is processed 
  14823. just as if it were part of the original .INI file.  When the include file is 
  14824. finished, processing resumes at the point where it left off in the original 
  14825. file.  The included file may contain any valid directive for the current 
  14826. section, but may not contain a section name.  Includes may be nested up to 
  14827. three levels deep (counting the original file as level 1). 
  14828.  
  14829. You must maintain include files manually -- the OPTION command modifies the 
  14830. original .INI file only, and does not update included files. 
  14831.  
  14832.  
  14833. ΓòÉΓòÉΓòÉ 10.4.5.4. NextINIFile ΓòÉΓòÉΓòÉ
  14834.  
  14835. NextINIFile = File.  The full path and name of the file must be specified.  All 
  14836. subsequent shells will read the specified .INI file, and ignore any [Secondary] 
  14837. section in the original .INI file. 
  14838.  
  14839.  
  14840. ΓòÉΓòÉΓòÉ 10.5. .INI File Examples ΓòÉΓòÉΓòÉ
  14841.  
  14842. This example configures certain special characters to match 4DOS, and changes 
  14843. other default settings to suit the user's preferences.  Note that the comments 
  14844. for the HelpBook and ColorDir directives are on separate lines before the 
  14845. directives themselves, as no comments are allowed in string directives: 
  14846.  
  14847.         [4OS2]
  14848.         InstallPath = c:\4OS2300      ;installation directory
  14849.         PauseOnError = No             ;don't stop on INI errors
  14850.         CommandSep = ^                ;4DOS command separator
  14851.         ParameterChar = &             ;4DOS parameter character
  14852.         BatchEcho = No                ;default to ECHO OFF
  14853.                                       ;show only 4OS2 help for F1 / HELP
  14854.         HelpBook = 4OS2
  14855.         History = 2048                ;expand history to 2K bytes
  14856.         BeepFreq = 880                ;make beep higher pitch
  14857.         EditMode = Insert             ;insert mode for cmd edit
  14858.         CursorOver = 100              ;overstrike cursor 100%
  14859.         CursorIns = 10                ;insert cursor 10%
  14860.         ListFind = F5                 ;F5 does a find in LIST
  14861.         ListNext = F6                 ;and F6 does a find next
  14862.         StdColors = bri cya on blu    ;default colors
  14863.         ListColors = bri whi on blu   ;colors for LIST
  14864.         SelectColors = bri whi on blu ;same colors for SELECT
  14865.                                       ;set directory display colors
  14866.         colordir = DIRS:bri yel;com exe bat btm cmd:bri whi
  14867.  
  14868.  
  14869. ΓòÉΓòÉΓòÉ 11. Setup and Troubleshooting ΓòÉΓòÉΓòÉ
  14870.  
  14871.             Starting 4OS2 
  14872.             The 4OS2 Help System 
  14873.             Error Messages 
  14874.             Troubleshooting, Service, and Support 
  14875.  
  14876.  
  14877. ΓòÉΓòÉΓòÉ 11.1. Starting 4OS2 ΓòÉΓòÉΓòÉ
  14878.  
  14879. Each 4OS2 object on your OS/2 desktop represents a different 4OS2 session.  You 
  14880. can configure any of these sessions to run in windowed or full-screen mode, and 
  14881. you can set any necessary command line parameters for 4OS2, by adjusting the 
  14882. properties of the desktop objects. 
  14883.  
  14884. To adjust the properties of an object you need to be familiar with how object 
  14885. properties are set in your version of OS/2.  For details see your OS/2 
  14886. documentation, or the 4OS2 Introduction and Installation Guide. 
  14887.  
  14888. When you configure a 4OS2 object, place an asterisk [*] in the Program Name 
  14889. field, and put any startup options that you want passed to 4OS2 (e.g., 
  14890. @inifile) in the Parameters field.  For example: 
  14891.  
  14892.      Path and file name:  *
  14893.      Parameters:          @D:\START\4OS2.INI
  14894.      Working directory:   C:\
  14895.  
  14896. (If 4OS2 is not set up as your default OS/2 shell in CONFIG.SYS, use the full 
  14897. path and name for 4OS2.EXE as the program name, rather than the asterisk.) 
  14898.  
  14899. To run a startup batch file for a particular 4OS2 session, include its name 
  14900. (with a path, if the batch file is not in the session's startup directory) as 
  14901. the last item in the Parameters field when you configure the desktop object. 
  14902. That batch file will be executed after any 4START file, but before the first 
  14903. prompt is displayed.  You can use the batch file to set environment variables 
  14904. and execute any other 4OS2 commands. 
  14905.  
  14906. You can also execute any internal 4OS2 command, external command, or alias by 
  14907. placing its name in the Parameters field.  For example: 
  14908.  
  14909.      Path and file name:  *
  14910.      Parameters:          D:\STARTOS2.CMD
  14911.      Working directory:   C:\
  14912.  
  14913. To execute an internal or external command, an alias, or a batch file and then 
  14914. exit (return to the desktop) when it is done, place /C command (rather than 
  14915. just command) as the last item in the Parameters field.  For example: 
  14916.  
  14917.      Path and file name:  *
  14918.      Parameters:          /C COMFILES.BTM
  14919.      Working directory:   C:\
  14920.  
  14921. The 4OS2 command line does not need to contain any information.  When invoked 
  14922. with an empty command line, 4OS2 will configure itself from the 4OS2.INI file, 
  14923. run 4START, and then display a prompt and wait for you to type a command. 
  14924. However, you may add options on the 4OS2 command line to change the way 4OS2 
  14925. operates. 
  14926.  
  14927. 4OS2 recognizes several optional fields on the command line. All of the options 
  14928. go on one line.  If you use more than one of these fields, their order is 
  14929. important.  The syntax for the command line is: 
  14930.  
  14931.         [d:\path] [@d:\path\inifile] [//iniline]... [/L] [/LA] [/LD] [/LH] [/S] 
  14932.         [/C | /K] [command] 
  14933.  
  14934.  The options are: 
  14935.  
  14936.         d:\path:  4OS2 will use this directory and path to set the COMSPEC 
  14937.         environment variable for this session.  If this option is not used, 
  14938.         COMSPEC is set from the location of 4OS2.EXE.  4OS2 always knows what 
  14939.         drive and directory it was started from and can set COMSPEC 
  14940.         accordingly.  It is included only for compatibility with CMD.EXE.  This 
  14941.         option cannot be used for secondary shells. 
  14942.  
  14943.         @d:\path\inifile:  This option sets the path and name of the 4OS2.INI 
  14944.         file.  You do not need this option if you aren't using a 4OS2.INI file, 
  14945.         or if the file is named 4OS2.INI and is stored in the same subdirectory 
  14946.         as 4OS2.EXE or in the root directory of the boot drive.  This option is 
  14947.         most useful if you want to start a 4OS2 session with a specific and 
  14948.         unique .INI file. 
  14949.  
  14950.         //iniline:  This option tells 4OS2 to treat the text appearing between 
  14951.         the // and the next space or tab as a 4OS2.INI directive.  The 
  14952.         directive should be in the same format as a line in 4OS2.INI, but it 
  14953.         may not contain spaces, tabs, or comments.  This option overrides any 
  14954.         corresponding directive in your 4OS2.INI file.  It is a convenient way 
  14955.         to send 4OS2 one or two simple directives without modifying or creating 
  14956.         a new 4OS2.INI file. 
  14957.  
  14958.         /L, /LA, /LD, and /LH:  These options force 4OS2 to to use a local 
  14959.         alias, directory history, and / or command history list.  They can be 
  14960.         used to override any LocalAliases=No, LocalDirHistory=No, or 
  14961.         LocalHistory=No settings in 4OS2.INI.  This allows you to use global 
  14962.         lists as the default, but start a specific 4OS2 session with local 
  14963.         lists.  /LA forces local aliases, /LD forces local directory history, 
  14964.         /LH forces local history, and /L forces all three. 
  14965.  
  14966.         See Command History for details on local and global history, Directory 
  14967.         History Window for details on local and global directory history, and 
  14968.         ALIAS for details on local and global aliases. 
  14969.  
  14970.         /S:  This option tells 4OS2 that you do not want it to set up a Ctrl-C 
  14971.         / Ctrl-Break handler.  It is included for compatibility with CMD.EXE, 
  14972.         but it may cause the system to operate incorrectly if you use this 
  14973.         option without other software to handle Ctrl-C and Ctrl-Break. 
  14974.  
  14975.         [/C | /K] command:  This option tells 4OS2 to run a command when it 
  14976.         starts.  The command will be run after 4START has been executed and 
  14977.         before any command prompt is displayed.  It can be any valid internal 
  14978.         or external command, batch file, or alias; you may include multiple 
  14979.         commands by using the command separator.  All other startup options 
  14980.         must be placed before the command, because 4OS2 will treat characters 
  14981.         after the command as part of the command and not as additional startup 
  14982.         options. 
  14983.  
  14984.         When the command is preceded by a /C, 4OS2 will execute the command and 
  14985.         then exit and return to the parent program or the OS/2 desktop without 
  14986.         displaying a prompt. 
  14987.  
  14988.         The /K switch has no effect; using it is the same as placing the 
  14989.         command (without a /C or /K) at the end of the startup command line. 
  14990.         It is included only for compatibility with CMD.EXE. 
  14991.  
  14992.  
  14993. ΓòÉΓòÉΓòÉ 11.2. The 4OS2 Help System ΓòÉΓòÉΓòÉ
  14994.  
  14995. This online help system for 4OS2 covers all 4OS2 features and internal 
  14996. commands.  It includes reference information to assist you in using 4OS2 and 
  14997. developing batch files; however it does not include all of the details which 
  14998. are included in the printed 4OS2 manuals. 
  14999.  
  15000. If you type part or all of a command on the line and then press F1, the help 
  15001. system will provide "context-sensitive" help by using the first word on the 
  15002. line as a help topic.  If it's a valid topic, you will see help for that topic 
  15003. automatically; if not, you will see the list of all help topics and you can 
  15004. pick the one you want. 
  15005.  
  15006. You can use this feature to obtain help on any topic -- not just on commands. 
  15007. For example, if you enter the command HELP _DISK you will see help for the 
  15008. _DISK internal variable.  See the HELP command for more information. 
  15009.  
  15010. If you type the name of any internal command at the prompt, followed by a slash 
  15011. and a question mark [/?] like this: 
  15012.  
  15013.         copy /?
  15014.  
  15015. then you will see help for the command in a "quick-reference" style.  Output 
  15016. from a /? display may be redirected with > or >>. 
  15017.  
  15018. The /? option may not work correctly if you have used an alias to redefine how 
  15019. an internal command operates.  To view the /? help for such a command you must 
  15020. add an asterisk to the beginning of the command to disable alias processing. 
  15021. For example, if you have defined this alias: 
  15022.  
  15023.         alias copy *copy /r
  15024.  
  15025. then the command COPY /? will be translated to COPY /R /?, which will not work 
  15026. properly.  However, if you use *COPY /?, the alias will be ignored and the /? 
  15027. will work as you intended. 
  15028.  
  15029. The 4OS2 help system uses OS/2's VIEW.EXE to display this help text.  Once 
  15030. you've started the help system with HELP or F1, you can use VIEW's standard 
  15031. keystrokes to navigate.  For more information, click on the Help menu at the 
  15032. top of the VIEW window. 
  15033.  
  15034. Configuring the Help System 
  15035.  
  15036. You can select which help "books" are displayed when you press the F1 key or 
  15037. enter the HELP command.  A help book is a single .INF file.  This help text is 
  15038. in the file 4OS2.INF. 
  15039.  
  15040. By default, 4OS2 opens this book and the OS/2 command reference file, 
  15041. CMDREF.INF.  You can change the default books opened for the 4OS2 help system 
  15042. with the HelpBook directive in 4OS2.INI.  The default setting is 4OS2+CMDREF. 
  15043. For example, to load only the 4OS2 help when you press F1 or enter the HELP 
  15044. command: 
  15045.  
  15046.         HelpBook = 4OS2
  15047.  
  15048.  
  15049. ΓòÉΓòÉΓòÉ 11.3. Error Messages ΓòÉΓòÉΓòÉ
  15050.  
  15051. This section lists error messages generated by 4OS2, and includes a recommended 
  15052. course of action where appropriate.  If you are unable to resolve the problem, 
  15053. look through your Introduction and Installation Guide for any additional 
  15054. troubleshooting recommendations, then contact JP Software for technical 
  15055. support. 
  15056.  
  15057. Error messages relating to files are generally reports of errors returned by 
  15058. OS/2.  You may find some of these messages (for example, "Access denied") vague 
  15059. enough that they are not always helpful.  4OS2 includes the file name in file 
  15060. error messages, but is often unable to determine a more accurate explanation of 
  15061. these errors.  The message shown is the best information available based on the 
  15062. error codes returned by OS/2. 
  15063.  
  15064. The following list includes all error messages, in alphabetical order: 
  15065.  
  15066. Access denied:  You tried to write to or erase a read-only file, rename a file 
  15067. or directory to an existing name, create a directory that already exists, 
  15068. remove a read-only directory or a directory with files or subdirectories still 
  15069. in it, or access a file in use by another program in a multitasking system. 
  15070.  
  15071. Alias loop:  An alias refers back to itself either directly or indirectly 
  15072. (i.e., a = b = a), or aliases are nested more than 16 levels deep.  Correct 
  15073. your alias list. 
  15074.  
  15075. Already excluded files:  You used more than one exclude range in a command. 
  15076. Combine the exclusions into a single range. 
  15077.  
  15078. Bad disk unit:  Generally caused by a disk drive hardware failure. 
  15079.  
  15080. Batch file missing:  4OS2 can't find the batch (.BTM or .CMD ) file it was 
  15081. running.  It was either deleted, renamed, moved, or the disk was changed. 
  15082. Correct the problem and rerun the file. 
  15083.  
  15084. Can't copy file to itself:  You cannot COPY or MOVE a file to itself.  4OS2 
  15085. attempts to perform full path and filename expansion before copying to help 
  15086. ensure that files aren't inadvertently destroyed. 
  15087.  
  15088. Can't create:  4OS2 can't create the specified file.  The disk may be full or 
  15089. write protected, or the file already exists and is read-only, or the root 
  15090. directory is full. 
  15091.  
  15092. Can't delete:  4OS2 can't delete the specified file or directory.  The disk is 
  15093. probably write protected. 
  15094.  
  15095. Can't get directory:  4OS2 can't read the directory.  The disk drive is 
  15096. probably not ready. 
  15097.  
  15098. Can't install hook:  4OS2 cannot install the operating system hooks required to 
  15099. support the KEYSTACK command.  The operating system may have been damaged or 
  15100. improperly installed, or there may be too few resources to support KEYSTACK. 
  15101.  
  15102. Can't make directory entry:  4OS2 can't create the filename in the directory. 
  15103. This is usually caused by a full root directory. Create a subdirectory and move 
  15104. some of the files to it. 
  15105.  
  15106. Can't open:  4OS2 can't open the specified file.  Either the file doesn't exist 
  15107. or the disk directory or File Allocation Table is damaged. 
  15108.  
  15109. Can't remove current directory:  You attempted to remove the current directory, 
  15110. which OS/2 does not allow.  Change to the parent directory and try again. 
  15111.  
  15112. CD-ROM door open or CD-ROM not ready:  The CD-ROM drive door is open, the power 
  15113. is off, or the drive is disconnected.  Correct the problem and try again. 
  15114.  
  15115. CD-ROM not High Sierra or ISO-9660:  The CD-ROM is not recognized as a data CD 
  15116. (it may be a music CD).  Put the correct CD in the drive and try again. 
  15117.  
  15118. Clipboard is empty or not text format:  You tried to retrieve some text from 
  15119. the OS/2 clipboard, but there is no text available.  Correct the contents of 
  15120. the clipboard and try again. 
  15121.  
  15122. Clipboard is in use by another program:  4OS2 could not access the OS/2 
  15123. clipboard because another program was using it.  Wait until the clipboard is 
  15124. available, or complete any pending action in the other program, then try again. 
  15125.  
  15126. Command line too long:  A single command exceeded 1023 characters, or the 
  15127. entire command line exceeded 2047 characters, during alias and variable 
  15128. expansion.  Reduce the complexity of the command or use a batch file.  Also 
  15129. check for an alias which refers back to itself either directly or indirectly. 
  15130.  
  15131. Command only valid in batch file:  You have tried to use a batch file command, 
  15132. like DO or GOSUB, from the command line or in an alias.  A few commands can 
  15133. only be used in batch files (see the individual commands for details). 
  15134.  
  15135. Contents lost before copy:  COPY was appending files, and found one of the 
  15136. source files is the same as the destination.  That source file is skipped, and 
  15137. appending continues with the next file. 
  15138.  
  15139. Data error:  OS/2 can't read or write properly to the device.  On a floppy 
  15140. drive, this error is usually caused by a defective floppy disk, dirty disk 
  15141. drive heads, or a misalignment between the heads on your drive and the drive on 
  15142. which the disk was created.  On a hard drive, this error may indicate a drive 
  15143. that is too hot or too cold, or a hardware problem.  Retry the operation; if it 
  15144. fails again, correct the hardware or diskette problem. 
  15145.  
  15146. Directory stack empty:  POPD or DIRS can't find any entries in the directory 
  15147. stack. 
  15148.  
  15149. Disk is write protected:  The disk cannot be written to.  Check the disk and 
  15150. remove the write-protect tab or close the write- protect window if necessary. 
  15151.  
  15152. Drive not ready -- close door:  The removable disk drive door is open.  Close 
  15153. the door and try again. 
  15154.  
  15155. Duplicate redirection:  You tried to redirect standard input, standard output, 
  15156. or stand error more than once in the same command. 
  15157.  
  15158. Environment already saved:  You have already saved the environment with a 
  15159. previous SETLOCAL command.  You cannot nest SETLOCAL / ENDLOCAL pairs. 
  15160.  
  15161. Error in command-line directive:  You used the //iniline option to place an 
  15162. 4OS2.INI directive on the startup command line, but the directive is in error. 
  15163. Usually a more specific error message follows, and can be looked up in this 
  15164. list. 
  15165.  
  15166. Error on line [nnnn] of [filename]:  There is an error in your 4OS2.INI file. 
  15167. The following message explains the error in more detail.  Correct the line in 
  15168. error and restart 4OS2 for your change to take effect. 
  15169.  
  15170. Error reading:  OS/2 experienced an I/O error when reading from a device.  This 
  15171. is usually caused by a bad disk, a device not ready, or a hardware error. 
  15172.  
  15173. Error writing:  OS/2 experienced an I/O error when writing to a device.  This 
  15174. is usually caused by a full disk, a bad disk, a device not ready, or a hardware 
  15175. error. 
  15176.  
  15177. Exceeded batch nesting limit:  You have attempted to nest batch files more than 
  15178. 10 levels deep. 
  15179.  
  15180. File Allocation Table bad:  OS/2  can't access the FAT on the specified disk. 
  15181. This can be caused by a bad disk, a hardware error, or an unusual software 
  15182. interaction. 
  15183.  
  15184. File exists:  The requested output file already exists, and 4OS2 won't 
  15185. overwrite it. 
  15186.  
  15187. File is empty:  You attempted to use an empty file in @SELECT.  Correct the 
  15188. file name or contents and try again. 
  15189.  
  15190. File not found:  4OS2 couldn't find the specified file.  Check the spelling and 
  15191. path name. 
  15192.  
  15193. General failure:  This is usually a hardware problem, particularly a disk drive 
  15194. failure or a device not properly connected to a serial or parallel port.  Try 
  15195. to correct the problem, or reboot and try again.  Also see Data error above. 
  15196.  
  15197. Include file not found:  You used the Include directive in the 4OS2.INI file, 
  15198. but the file you specified was not found or could not be opened. 
  15199.  
  15200. Include files nested too deep:  You used the Include directive in the 4OS2.INI 
  15201. file, and attempted to nest include files more than three levels deep. 
  15202.  
  15203. Infinite COPY or MOVE loop:  You tried to COPY or MOVE a directory to one of 
  15204. its own subdirectories and used the /S switch, so the command would run 
  15205. forever.  Correct the command and try again. 
  15206.  
  15207. Insufficient disk space:  COPY or MOVE ran out of room on the destination 
  15208. drive.  Remove some files and retry the operation. 
  15209.  
  15210. Invalid character value:  You gave an invalid value for a character directive 
  15211. in the 4OS2.INI file. 
  15212.  
  15213. Invalid choice value:  You gave an invalid value for a "choice" directive (one 
  15214. that accepts a choice from a list, like "Yes" or "No") in the 4OS2.INI file. 
  15215.  
  15216. Invalid color:  You gave an invalid value for a color directive in the 4OS2.INI 
  15217. file. 
  15218.  
  15219. Invalid count:  The character repeat count for KEYSTACK is incorrect. 
  15220.  
  15221. Invalid date:  An invalid date was entered.  Check the syntax and reenter. 
  15222.  
  15223. Invalid directive name:  4OS2 can't recognize the name of a directive in your 
  15224. 4OS2.INI file. 
  15225.  
  15226. Invalid drive:  A bad or non-existent disk drive was specified. 
  15227.  
  15228. Invalid key name:  You tried to make an invalid key substitution in the 
  15229. 4OS2.INI file, or you used an invalid key name in a keystroke alias or command. 
  15230. Correct the error and retry the operation. 
  15231.  
  15232. Invalid numeric value:  You gave an invalid value for a numeric directive in 
  15233. the 4OS2.INI file. 
  15234.  
  15235. Invalid parameter:  4OS2 didn't recognize a parameter.  Check the syntax and 
  15236. spelling of the command you entered. 
  15237.  
  15238. Invalid path:  The specified path does not exist.  Check the disk specification 
  15239. and/or spelling. 
  15240.  
  15241. Invalid path or file name:  You used an invalid path or filename in a directive 
  15242. in the 4OS2.INI file. 
  15243.  
  15244. Invalid time:  An invalid time was entered.  Check the syntax and reenter. 
  15245.  
  15246. Keystroke substitution table full:  4OS2 ran out of room to store keystroke 
  15247. substitutions entered in the 4OS2.INI file.  Reduce the number of key 
  15248. substitutions or contact JP Software or your dealer for assistance. 
  15249.  
  15250. Label not found:  A GOTO or GOSUB referred to a non-existent label. Check your 
  15251. batch file. 
  15252.  
  15253. Missing ENDTEXT:  A TEXT command is missing a matching ENDTEXT.  Check the 
  15254. batch file. 
  15255.  
  15256. Missing GOSUB:  4OS2 cannot perform the RETURN command in a batch file.  You 
  15257. tried to do a RETURN without a GOSUB, or your batch file has been corrupted. 
  15258.  
  15259. Missing SETLOCAL:  An ENDLOCAL was used without a matching SETLOCAL. 
  15260.  
  15261. No aliases defined:  You tried to display aliases but no aliases have been 
  15262. defined. 
  15263.  
  15264. No closing quote:  4OS2 couldn't find a second matching back quote [`] or 
  15265. double-quote ["] on the command line. 
  15266.  
  15267. No expression:  The expression passed to the @EVAL variable function is empty. 
  15268. Correct the expression and retry the operation. 
  15269.  
  15270. No room for INI file name:  4OS2 does not have enough space to pass the name of 
  15271. your 4OS2.INI file to secondary shells; see String area overflow for more 
  15272. details.  Any [Secondary] section in 4OS2.INI will be ignored in secondary 
  15273. shells until the problem is corrected and the system or session is restarted. 
  15274.  
  15275. No shared memory found:  The SHRALIAS command could not find any global alias 
  15276. list, history list, or directory history list to retain, because you executed 
  15277. the command from a session with local lists.  Start 4OS2 with at least one 
  15278. global list, then invoke SHRALIAS. 
  15279.  
  15280. Not a windowed session:  You tried to use the WINDOW command in a full-screen 
  15281. session.  WINDOW is valid only in windowed sessions. 
  15282.  
  15283. Not an alias:  The specified alias is not in the alias list. 
  15284.  
  15285. Not in environment:  The specified variable is not in the environment. 
  15286.  
  15287. Not ready:  The specified device can't be accessed. 
  15288.  
  15289. Not same device:  This error usually appears in RENAME.  You cannot rename a 
  15290. file to a different disk drive. 
  15291.  
  15292. Out of memory:  4OS2 or OS/2 had insufficient memory to execute the last 
  15293. command.  Try to free some memory by closing other sessions.  If the error 
  15294. persists, contact JP Software for assistance. 
  15295.  
  15296. Out of paper:  OS/2 detected an out-of-paper condition on one of the printers. 
  15297. Check your printer and add paper if necessary. 
  15298.  
  15299. Overflow:  An arithmetic overflow occurred in the @EVAL variable function. 
  15300. Check the values being passed to @EVAL.  @EVAL can handle 16 digits to the left 
  15301. of the decimal point and 8 to the right. 
  15302.  
  15303. Read error:  OS/2 encountered a disk read error; usually caused by a bad or 
  15304. unformatted disk.  Also see Data error above. 
  15305.  
  15306. Sector not found:  Disk error, usually caused by a bad or unformatted disk. 
  15307. Also see Data error above. 
  15308.  
  15309. Seek error:  OS/2 can't seek to the proper location on the disk.  This is 
  15310. generally caused by a bad disk or drive.  Also see Data error above. 
  15311.  
  15312. Sharing violation:  You tried to access a file in use by another program in a 
  15313. multitasking system or on a network.  Wait for the file to become available, or 
  15314. change your method of operation so that another program does not have the file 
  15315. open while you are trying to use it. 
  15316.  
  15317. SHRALIAS already loaded:  You used the SHRALIAS command to load SHRALIAS.EXE, 
  15318. but it was already loaded.  This message is informational and generally does 
  15319. not indicate an error condition. 
  15320.  
  15321. SHRALIAS not loaded:  You used the SHRALIAS /U command to unload SHRALIAS.EXE, 
  15322. but it was never loaded.  This message is informational and may not indicate an 
  15323. error condition. 
  15324.  
  15325. String area overflow:  4OS2 ran out of room to store the text from string 
  15326. directives in the 4OS2.INI file.  Reduce the complexity of the 4OS2.INI file or 
  15327. contact JP Software for assistance. 
  15328.  
  15329. Syntax error:  A command or variable function was entered in an improper 
  15330. format.  Check the syntax and correct the error. 
  15331.  
  15332. Too many open files:  OS/2 has run out of file handles. Try increasing the 
  15333. FILES setting in CONFIG.SYS. 
  15334.  
  15335. Unbalanced parentheses:  The number of left and right parentheses did not match 
  15336. in an expression passed to the @EVAL variable function.  Correct the expression 
  15337. and retry the operation. 
  15338.  
  15339. Unknown command:  A command was entered that 4OS2 didn't recognize and couldn't 
  15340. find in the current search path.  Check the spelling or PATH specification. 
  15341. You can handle unknown commands with the UNKNOWN_CMD alias (see ALIAS). 
  15342.  
  15343. UNKNOWN_CMD loop:  The UNKNOWN_CMD alias (see ALIAS) called itself more than 
  15344. ten times.  The alias probably contains an unknown command itself, and is stuck 
  15345. in an infinite loop.  Correct the alias. 
  15346.  
  15347. Variable loop:  A nested environment variable refers to itself, or variables 
  15348. are nested more than 16 deep.  Correct the error and retry the command. 
  15349.  
  15350. Warning:  Can't load 4OS2DLL:  4OS2 cannot find 4OS2DLL.DLL, a library used to 
  15351. support the BEGINLIBPATH and ENDLIBPATH "environment variables" under OS/2 
  15352. Warp.  4OS2DLL.DLL must be in the 4OS2 directory, or on a directory listed in 
  15353. the LIBPATH setting in CONFIG.SYS.  If it is not, BEGINLIBPATH and ENDLIBPATH 
  15354. will not be available, but all other 4OS2 functions will operate normally. 
  15355.  
  15356. Write error:  OS/2 encountered a disk write error; usually caused by a bad or 
  15357. unformatted disk.  Also see Data error above. 
  15358.  
  15359.  
  15360. ΓòÉΓòÉΓòÉ 11.4. Troubleshooting, Service, and Support ΓòÉΓòÉΓòÉ
  15361.  
  15362. If you need help with 4OS2, we encourage you to review our documentation and 
  15363. then contact us for assistance if required. 
  15364.  
  15365. If you need help with sales, ordering, or shipments (including defective disks 
  15366. or other materials which were shipped to you), or with brand codes, please 
  15367. contact our Sales and Customer Service department.  See Contacting JP Software 
  15368. for our email address, mail address, and telephone numbers.  (The sales and 
  15369. customer service staff cannot assist you with technical problems.  However, if 
  15370. you have multiple questions or are unsure of the nature of the problem, feel 
  15371. free to contact us for customer service; the staff will have a support 
  15372. technician contact you if your question turns out to require technical 
  15373. expertise.) 
  15374.  
  15375. If you need technical support for 4OS2, review the Technical Support 
  15376. information section, which tells you what we need to know to provide you with 
  15377. accurate and timely support.  Then contact us via one of the methods described 
  15378. there.  (The technical support staff cannot assist you with sales, ordering, 
  15379. replacement brand cards, or other administrative matters.) 
  15380.  
  15381.  
  15382. ΓòÉΓòÉΓòÉ 11.4.1. Technical Support ΓòÉΓòÉΓòÉ
  15383.  
  15384. Before You Contact Us 
  15385.  
  15386. Before contacting us for support, please check this help file, the Reference 
  15387. Manual and other documentation for answers to your question.  If you can't find 
  15388. what you need, try searching this help file.  If you're having trouble getting 
  15389. 4OS2 to run properly, review the information on Error Messages, and look 
  15390. through the README.DOC file for any last-minute information. 
  15391.  
  15392. If you do need to contact us for support, we can do a much better job of 
  15393. assisting you if you can give us some basic information, separate from your 
  15394. interpretations of or conclusions about the problem.  The first four items 
  15395. listed below are essential for us to be able to understand and assist you with 
  15396. your problem: 
  15397.  
  15398.     ╨┐   What environment are you working in?  This includes the operating 
  15399.         system version are you using, the version of the JP Software product 
  15400.         involved, and related information such as network connections and the 
  15401.         name and version number of any other software which appears to be 
  15402.         involved in the problem.  Use the VER /R command to determine the 4OS2 
  15403.         version and operating system version. 
  15404.  
  15405.     ╨┐   What exactly did you do?  A concise description of what steps you must 
  15406.         take to make the problem appear is much more useful than a long 
  15407.         analysis of what might be happening. 
  15408.  
  15409.     ╨┐   What did you expect to happen?  Tell us the result you expected from 
  15410.         the command or operation in question, so that we understand what you 
  15411.         are trying to do. 
  15412.  
  15413.     ╨┐   What actually happened?  At what point did the failure occur?  If you 
  15414.         saw an error message or other important or unusual information on the 
  15415.         screen, what exactly did it say? 
  15416.  
  15417.     ╨┐   Briefly, what techniques did you use to try to resolve the problem? 
  15418.         What results did you get? 
  15419.  
  15420.     ╨┐   If the problem seems related to startup and configuration issues, what 
  15421.         are the contents of any startup files you use (such as 4START and 
  15422.         4EXIT, and 4OS2.INI), any batch files they call, and any alias or 
  15423.         environment variable files they load? 
  15424.  
  15425.     ╨┐   Can you repeat the problem or does it occur randomly?  If it's random, 
  15426.         does it seem related to the programs you're using when the problem 
  15427.         occurs? 
  15428.  
  15429.  Electronic Support 
  15430.  
  15431.  Usually the best way to contact us for support is via CompuServe or the 
  15432.  Internet.  The most efficient method is to use our CompuServe support 
  15433.  conference; if you do not have CompuServe access, contact us via Internet 
  15434.  email.  See Contacting JP Software or see our web site at 
  15435.  http://www.jpsoft.com/ for our addresses. 
  15436.  
  15437.  Whenever possible, we also read messages posted on the Usenet 
  15438.  comp.os.msdos.4dos newsgroup, and in 4DOS conferences on the RIME, Ilink, and 
  15439.  FidoNet BBS networks (these conferences are named for 4DOS, but carry messages 
  15440.  related to all JP Software products).  These areas offer valuable information 
  15441.  and discussions with other users, but are not managed by JP Software, and are 
  15442.  not official support channels.  To be certain of a direct answer from our 
  15443.  support staff use our CompuServe forum or Internet email, or contact us by 
  15444.  telephone, fax, or mail. 
  15445.  
  15446.  A number of support resources are available from our web site listed above, 
  15447.  including error message listings, documentation files, product histories, 
  15448.  technical tips and discussions, other technical information, and links to 
  15449.  other companies' sites.  We update this information regularly, and we 
  15450.  encourage you to check the Technical Support area of the web site to see if 
  15451.  the information there will address any questions you have. 
  15452.  
  15453.  Technical support messages should be sent as standard ASCII text. Please do 
  15454.  not transmit attached files, binary files, screen images, or any file over 10K 
  15455.  bytes in size to any of our electronic technical support addresses unless 
  15456.  asked to do so by our support staff. 
  15457.  
  15458.  Telephone Support 
  15459.  
  15460.  Technical support by telephone within the US and Canada is handled on a 
  15461.  callback basis.  To contact our support staff, call the US / Canada Support 
  15462.  Line at any time and leave a short voice mail message describing your 
  15463.  technical problem (this line can not be used for sales / customer service 
  15464.  issues such as pricing, ordering, upgrades, or shipping problems).  We check 
  15465.  these messages regularly throughout the day and will return your call as 
  15466.  quickly as possible.  See Contacting JP Software for our phone numbers. 
  15467.  
  15468.  We generally return all technical support calls within 24 hours (weekends and 
  15469.  holidays excluded), and most are returned much more quickly, usually on the 
  15470.  same business day.  If your problem is urgent and requires a faster response, 
  15471.  please let us know and we will try to accommodate you.  If you contact us by 
  15472.  telephone and don't receive a reply within 24 hours, please try again.  We 
  15473.  probably tried to return your call and were unable to reach you. 
  15474.  
  15475.  If you are calling from outside the US and Canada, are not sure if your 
  15476.  question requires technical support, need other assistance in addition to your 
  15477.  technical questions, or find yourself playing "telephone tag" with our support 
  15478.  staff, please call our main number listed above.  Our office staff will assist 
  15479.  you with all of your concerns, and have a technical support representative 
  15480.  call you back if necessary. 
  15481.  
  15482.  If you have a problem with a batch file or complex alias, please contact us 
  15483.  electronically if possible.  Include a copy of the batch file or alias in 
  15484.  question, preferably as part of the text of your message (not as an 
  15485.  attachment).  If you do not have electronic access, contact us by fax if 
  15486.  possible.  Problems of this type are usually very difficult to diagnose over 
  15487.  the telephone because we cannot see the material you are working with.  For 
  15488.  longer batch files (over about 25 lines), do your best to reproduce the 
  15489.  problem in a smaller test file. 
  15490.  
  15491.  If you need more in-depth assistance with the development of complex batch 
  15492.  files or other procedures, please contact us for information on consulting 
  15493.  services. 
  15494.  
  15495.  
  15496. ΓòÉΓòÉΓòÉ 11.4.2. Contacting JP Software ΓòÉΓòÉΓòÉ
  15497.  
  15498. You can contact JP Software at the following addresses and numbers.  Our normal 
  15499. business hours are 8:30 AM to 5:00 PM weekdays, eastern US time (except 
  15500. holidays). 
  15501.  
  15502.     Address:          JP Software Inc. 
  15503.                       P.O. Box 1470 
  15504.                       East Arlington, MA 02174 
  15505.                       USA 
  15506.  
  15507.     Main number:      (617) 646-3975 ** 
  15508.  
  15509.     Fax:              (617) 646-0904 ** 
  15510.  
  15511.     Order Line:       (800) 368-8777  (US / Canada, orders only) 
  15512.  
  15513.     Support Line:     (617) 646-0798 ** (US / Canada only) 
  15514.                       [see the Telephone Support topic under Technical Support 
  15515.                       before using this number] 
  15516.  
  15517.                       ** Please Note:  Our (617) area code will change to (781) 
  15518.                       effective September 1, 1997 
  15519.  
  15520.     Internet:         Sales / Customer Service:  sales@jpsoft.com 
  15521.  
  15522.                       Technical Support:  support@jpsoft.com 
  15523.  
  15524.                       World Wide Web:  http://www.jpsoft.com/ 
  15525.  
  15526.                       File downloads via FTP:  For the simplest access to JP 
  15527.                       Software files use our web site.  For direct FTP access 
  15528.                       connect to ftp.std.com and look in the /vendors/jpsoft 
  15529.                       directory. 
  15530.  
  15531.     CompuServe:       Sales / Customer Service:  75020,244 
  15532.  
  15533.                       Technical Support and File Downloads:  GO JPSOFT or GO 
  15534.                       PCVENB, section / library 10, User ID 75300,1215. 
  15535.  
  15536.     BBS Downloads:    Channel 1 BBS, Boston, 617-349-1300 at 2,400 - 28,800 
  15537.                       baud, no parity, 8 data bits, 1 stop bit. 
  15538.  
  15539.  
  15540. ΓòÉΓòÉΓòÉ 12. What's New? ΓòÉΓòÉΓòÉ
  15541.  
  15542. There are dozens of new features in this latest release of 4OS2!  Check through 
  15543. this section for a comprehensive list of what's changed since our previous 
  15544. release, version 2.52. 
  15545.  
  15546. This topic does not explain how to use each new feature.  Instead, where 
  15547. appropriate we have provided links below to the detailed help topics containing 
  15548. additional usage information or other documentation. 
  15549.  
  15550. Some of the descriptions here may be more detailed than you need; if you aren't 
  15551. using a feature, feel free to skip to the next item.  If you are new to 4OS2 
  15552. with version 3.0, you can skip this topic entirely. 
  15553.  
  15554. This topic is divided into the following subtopics: 
  15555.  
  15556.             General Features and Enhancements 
  15557.             Line Editing and History 
  15558.             Command Changes 
  15559.             Variables and Variable Functions 
  15560.             Startup and Configuration 
  15561.             Technical and Compatibility Enhancements 
  15562.             Bugs Fixed 
  15563.  
  15564.  The major new features in this release include: 
  15565.  
  15566.     ╨┐   Extended Directory Searches:  allow you to change to a directory 
  15567.         anywhere on your system by entering only part of its name.  They must 
  15568.         be explicitly enabled before you can use them.  See Directory 
  15569.         Navigation for complete details. 
  15570.  
  15571.     ╨┐   New File Exclusion Ranges: provide a convenient way to exclude files 
  15572.         from any internal command -- faster and more flexible than using 
  15573.         EXCEPT. 
  15574.  
  15575.     ╨┐   The new Batch File Debugger can execute each line step by step, process 
  15576.         or trace into additional batch files, and display variables, aliases, 
  15577.         and expanded commands at each step. 
  15578.  
  15579.     ╨┐   New commands include: 
  15580.  
  15581.                  OPTION:  Offers complete configuration adjustment, either 
  15582.                  through interactive dialogs or on the command line. 
  15583.  
  15584.                  SWITCH:  Provides for "case" statements in batch files. 
  15585.  
  15586.                  TOUCH:  Adjusts file dates and times. 
  15587.  
  15588.                  TREE:  Displays the directory tree, with or without file 
  15589.                  names, in a variety of formats. 
  15590.  
  15591.  
  15592. ΓòÉΓòÉΓòÉ 12.1. General Features and Enhancements ΓòÉΓòÉΓòÉ
  15593.  
  15594. What's New - General Features and Enhancements 
  15595.  
  15596.     ╨┐   Added a complete batch file debugger.  The debugger displays the batch 
  15597.         file in a window and allows you to execute each line step by step, 
  15598.         process or trace into additional batch files and subroutines, and 
  15599.         display variables and aliases at each step.  See Batch File Debugging 
  15600.         for complete details. 
  15601.  
  15602.     ╨┐   Popup windows (for filename completion, command history recall, etc.) 
  15603.         now allow you to search for a line within the window contents by typing 
  15604.         the first few characters of the line.  The search string is displayed 
  15605.         in the lower right corner of the window. 
  15606.  
  15607.     ╨┐   You can now redirect to and from the clipboard by using the 
  15608.         pseudo-device name CLIP:.  For example, to redirect DIR to the 
  15609.         clipboard: 
  15610.  
  15611.                         dir *.doc > clip:
  15612.  
  15613.     ╨┐   The online help has been reorganized to make it easier to navigate 
  15614.         through the main topics, and includes additional reference information, 
  15615.         reference tables, and a glossary. 
  15616.  
  15617.     ╨┐   The default maximum file description length is now 511 bytes in all 
  15618.         products. 
  15619.  
  15620.     ╨┐   Two new characters can now follow the escape character:  An escape 
  15621.         followed by a 'q' will substitute a double quote; an escape followed by 
  15622.         a 'k' will substitute a back quote. 
  15623.  
  15624.     ╨┐   The decimal and thousands characters used in @EVAL and in displayed 
  15625.         version numbers and other similar locations are now controllable with 
  15626.         the DecimalChar and ThousandsChar directives in the .INI file, the 
  15627.         corresponding options in the configuration or OPTION dialogs, and the 
  15628.         SETDOS /G command.  These characters are saved by SETLOCAL and restored 
  15629.         by ENDLOCAL.  This is intended as an aid to those writing batch files 
  15630.         which perform arithmetic operations and which may be used in countries 
  15631.         with differing separator characters. 
  15632.  
  15633.     ╨┐   The directory stack size used by PUSHD and POPD has been increased from 
  15634.         255 to 511 bytes to leave adequate room for long directory names. 
  15635.  
  15636.     ╨┐   .BTM files can now be longer than 64K bytes, though compressed .BTMs 
  15637.         still have to be less than 64K. 
  15638.  
  15639.  
  15640. ΓòÉΓòÉΓòÉ 12.2. Command Line Editing ΓòÉΓòÉΓòÉ
  15641.  
  15642. What's New - Command Line Editing 
  15643.  
  15644.     ╨┐   Extended directory searches can be used directly from the command line 
  15645.         for quick directory navigation; see Automatic Directory Changes or 
  15646.         Directory Navigation for details. 
  15647.  
  15648.     ╨┐   Made several ehancements to filename completion, including: 
  15649.  
  15650.         *        The Ctrl-A key, which toggles between long and short filenames 
  15651.                  for filename completion, can now be hit at any point during 
  15652.                  command line entry -- not just during filename completion. 
  15653.                  For example, if you hit Ctrl-A at the beginning of the command 
  15654.                  line, all filenames subsequently returned for that line will 
  15655.                  be short names (until you hit Ctrl-A again). 
  15656.  
  15657.         *        Filename completion can now be customized for individual 
  15658.                  commands via the new FileCompletion .INI directive (or 
  15659.                  environment variable).  For example, you can configure 4OS2 to 
  15660.                  complete only the names of .TXT files when the command line 
  15661.                  starts with the name of your text editor, or to display only 
  15662.                  directory names when you are entering a CD command. 
  15663.  
  15664.         *        The F7 filename completion popup window now sorts the filename 
  15665.                  list alphabetically. 
  15666.  
  15667.     ╨┐   You can now expand aliases immediately while still on the command line 
  15668.         with the Ctrl-F key. 
  15669.  
  15670.     ╨┐   Command line history recall will now stop at the beginning and end of 
  15671.         the history list rather than wrapping around, if you set HistWrap to No 
  15672.         in the .INI file or through the configuration dialogs. 
  15673.  
  15674.  
  15675. ΓòÉΓòÉΓòÉ 12.3. Command Changes ΓòÉΓòÉΓòÉ
  15676.  
  15677. What's New - Command Changes 
  15678.  
  15679.     ╨┐   ACTIVATE:  This new command switches to another window. 
  15680.  
  15681.     ╨┐   ATTRIB:  Added the /E switch to disable display of non-fatal errors. 
  15682.         Also, ATTRIB now allows underscores in the attribute string, so that 
  15683.         you can get a result from the %@ATTRIB variable function and feed it 
  15684.         directly to the ATTRIB command. 
  15685.  
  15686.     ╨┐   CD and CDD:  Now support extended directory searches, which allow you 
  15687.         to change to a directory anywhere on your system by entering only part 
  15688.         of its name.  The CDD /S switch builds the extended directory search 
  15689.         database.  Extended directory searches mmust be explicitly enabled 
  15690.         before you can use them.  See Directory Navigation for complete 
  15691.         details. 
  15692.  
  15693.     ╨┐   CDD:  Added the /A switch to display the current directory for all 
  15694.         existing and ready drives from C: to Z:. 
  15695.  
  15696.     ╨┐   CHCP:  Changed to only affect the current process and its children, as 
  15697.         in CMD.EXE. 
  15698.  
  15699.     ╨┐   COPY:  Added several switches: 
  15700.  
  15701.           /E         Disable display of non-fatal errors. 
  15702.           /K         Preserve read-only attributes during a COPY. 
  15703.           /X         Clear the archive bit from the source file after a 
  15704.                      successful copy. 
  15705.           /Z         Overwrite read-only target files. 
  15706.  
  15707.     ╨┐   COPY:  When copying from a FAT drive to an HPFS drive, COPY will now 
  15708.         use the .LONGNAME extended attribute of the source file (if available) 
  15709.         to determine the long name.  When copying from HPFS to FAT, COPY sets 
  15710.         the .LONGNAME attribute if possible, to preserve the long name. 
  15711.  
  15712.     ╨┐   DEL:  Added two switches: 
  15713.  
  15714.           /E         Disable display of non-fatal errors. 
  15715.           /W         Clear the file to 0's before deleting it. 
  15716.  
  15717.     ╨┐   DIR:  Added or modified several of the DIR switches: 
  15718.  
  15719.           /2         Now forces the use of truncated names on HPFS drives. 
  15720.           /4         Now forces the use of truncated names on HPFS drives, and 
  15721.                      displays files between 1 and 9.9 Mb in tenths (i.e., 
  15722.                      "2.4M"). 
  15723.           /G         (New) Displays the allocated size instead of the file 
  15724.                      size. 
  15725.           /W         Now forces the use of truncated names on HPFS drives. 
  15726.  
  15727.     ╨┐   DIRHISTORY:  This new command has the same syntax as HISTORY, but it 
  15728.         modifies the directory history. 
  15729.  
  15730.     ╨┐   DO:  Added two new DO loop types: 
  15731.  
  15732.         *        "DO x IN filename" retrieves each matching filename from a 
  15733.                  wildcard spec and inserts the value into the variable. 
  15734.         *        "DO x IN @filename" retrieves each line in the file and 
  15735.                  inserts it into the variable. 
  15736.  
  15737.     ╨┐   ECHOERR and ECHOSERR:  These new commands are like ECHO and ECHOS, but 
  15738.         output goes to the standard error device instead of standard output. 
  15739.  
  15740.     ╨┐   ENDLOCAL:  To aid in making batch files portable, SETLOCAL and ENDLOCAL 
  15741.         now save and restore the command separator, escape character, parameter 
  15742.         character, and decimal and thousands separators. 
  15743.  
  15744.     ╨┐   FFIND:  Added two new switches: 
  15745.  
  15746.           /I         Do a literal match even if the text search string contains 
  15747.                      wildcard characters. 
  15748.           /R         Start searching for text from the end backwards. 
  15749.  
  15750.         Also, the /X switch will now display the offset in both hex and 
  15751.         decimal. 
  15752.  
  15753.     ╨┐   FOR:  Added several new switches for compatibility with Windows NT 
  15754.         4.0's CMD.EXE; see the command reference information for complete 
  15755.         details. 
  15756.  
  15757.     ╨┐   GOTO:  Added support for Windows NT 4.0's "GOTO :EOF" -- If there is no 
  15758.         ":EOF" label, GOTO ends the current batch file (equivalent to a QUIT). 
  15759.  
  15760.     ╨┐   IF / IFF:  These commands now support nested conditional tests, with 
  15761.         parentheses, e.g.: 
  15762.  
  15763.                         if  (%a == 1 .or. %b == 2) .and. %c == 3 echo something
  15764.  
  15765.         See the command reference information for complete syntax rules. 
  15766.  
  15767.     ╨┐   Added a new "IF DEFINED varname" test, which succeeds if the specified 
  15768.         variable exists in the environment.  This is included for compatibility 
  15769.         with Windows NT 4.0's CMD.EXE, and is the same as a test like: 
  15770.  
  15771.                         if  "%varname" ne "" ...
  15772.  
  15773.     ╨┐   Changed the comparison tests to accept a leading decimal separator as a 
  15774.         numeric character, provided the remainder of the string is numeric and 
  15775.         does not contain additional decimal characters. 
  15776.  
  15777.     ╨┐   KEYSTACK:  This new command allows you to pass keystrokes to PM and VIO 
  15778.         windowed applications (but not to DOS apps or VIO full-screen 
  15779.         sessions). 
  15780.  
  15781.     ╨┐   LIST:  Add a range of enhancements, including: 
  15782.  
  15783.         *        Ctrl-PgUp and Ctrl-PgDn will go to the previous and next file 
  15784.                  in the current group, respectively. 
  15785.  
  15786.         *        Ctrl-F searches backwards for a text string; Ctrl-N repeats 
  15787.                  the last search, searching backwards. 
  15788.  
  15789.         *        Matching strings on the first page are now highlighted after a 
  15790.                  search. 
  15791.  
  15792.         *        When piping output to LIST in most cases you no longer need 
  15793.                  the /S switch; for example, to view DIR's output in LIST you 
  15794.                  can now use: 
  15795.  
  15796.                                           dir  | list
  15797.  
  15798.                  Also, added three new switches: 
  15799.  
  15800.                    /I         Ignore case in a /T search. 
  15801.                    /R         The search initiated by /T goes backwards from 
  15802.                               the end of the file. 
  15803.                    /T         Search for text when LIST starts. 
  15804.  
  15805.     ╨┐   MD:  Added the /N switch to create a directory without updating the 
  15806.         extended directory search database (useful for temporary directories). 
  15807.  
  15808.     ╨┐   MOVE:  Added the /E switch to disable display of non-fatal errors. 
  15809.  
  15810.     ╨┐   MOVE:  When moving files from a FAT drive to an HPFS drive, MOVE will 
  15811.         now use the .LONGNAME extended attribute of the source file (if 
  15812.         available) to determine the long name.  When moving files from HPFS to 
  15813.         FAT, MOVE sets the .LONGNAME attribute if possible, to preserve the 
  15814.         long name. 
  15815.  
  15816.     ╨┐   OPTION:  This new command can be used for two purposes.  When invoked 
  15817.         without parameters, it loads configuration dialogs which adjust most 
  15818.         commonly-used settings in the .INI file.  The dialogs provide a 
  15819.         convenient method of adjusting configuration without manually editing 
  15820.         the .INI file.  OPTION can also be used to change specific settings on 
  15821.         an individual basis with the OPTION Name=value ... syntax; see the 
  15822.         command for complete details. 
  15823.  
  15824.     ╨┐   PROMPT:  Added the $+ metacharacter, which displays one + for each 
  15825.         PUSHD level. 
  15826.  
  15827.     ╨┐   REN / RENAME:  Added the /E switch to disable display of non-fatal 
  15828.         errors. 
  15829.  
  15830.     ╨┐   RETURN:  Now accepts an optional argument for the errorlevel to return. 
  15831.         The errorlevel can be tested with %? or IF ERRORLEVEL. 
  15832.  
  15833.     ╨┐   SCREEN, SCRPUT, and VSCRPUT:  If you specify 999 for the row, the text 
  15834.         will be centered vertically; if you specify 999 for the column, the 
  15835.         text will be centered horizontally. 
  15836.  
  15837.     ╨┐   SELECT:  You can now type characters from the start of a filename and 
  15838.         the selection bar will jump to the first matching name.  Due to this 
  15839.         change, the key to popup LIST on the currently selected file has been 
  15840.         changed from L to ^L.  Also, added the /T:acw switch to select the date 
  15841.         and time to use for display and sorting on HPFS drives. 
  15842.  
  15843.     ╨┐   SETLOCAL:  To aid in making batch files portable, SETLOCAL now saves 
  15844.         the command separator, escape character, parameter character, and 
  15845.         decimal and thousands separators; ENDLOCAL restores them. 
  15846.  
  15847.     ╨┐   SHIFT:  The new "/n" argument will start the shift at the specified 
  15848.         argument -- i.e., "shift /2" moves %3 to %2, %4 to %3, etc. 
  15849.  
  15850.     ╨┐   START:  Added /LD for a local directory history list. 
  15851.  
  15852.     ╨┐   START:  Added support for the (undocumented) Warp 4 CMD.EXE 
  15853.         "DosSetting.xxx=yyy" environment variables to specify settings for DOS 
  15854.         sessions. 
  15855.  
  15856.     ╨┐   SWITCH:  This new command provides a C-like switch construct for batch 
  15857.         files.  SWITCH scans each CASE statement looking for a matching value; 
  15858.         if it finds one it executes the block of code inside that CASE 
  15859.         statement, and then jumps to the end of the switch block (ENDSWITCH). 
  15860.         If no CASE statement matches, SWITCH will execute the code in the 
  15861.         (optional) DEFAULT block. 
  15862.  
  15863.     ╨┐   TITLE:  This new command changes the 4OS2 window title for windowed 
  15864.         sessions (it is not effective in full-screen sessions). 
  15865.  
  15866.     ╨┐   TOUCH:  This new command changes the date and/or time for a file or 
  15867.         files.  You can set a specified date and time or use the current system 
  15868.         clock, and you can optionally change the last access / creation date 
  15869.         and time fields on HPFS drives. 
  15870.  
  15871.     ╨┐   TREE:  This new command displays a graphical directory tree using 
  15872.         either line-drawing or ASCII characters.  It can also optionally 
  15873.         display file names, dates, times, and sizes. 
  15874.  
  15875.     ╨┐   UNALIAS:  Added the /R switch to read a file of aliases to remove. 
  15876.  
  15877.     ╨┐   UNSET:  Added the /R switch to read a file of variables to remove. 
  15878.  
  15879.  
  15880. ΓòÉΓòÉΓòÉ 12.4. Variables and Functions ΓòÉΓòÉΓòÉ
  15881.  
  15882. What's New - Variables and Functions Added or updated the following internal 
  15883. variables (all variables listed are new unless otherwise noted): 
  15884.  
  15885.     ╨┐   _APMAC:  Advanced Power Management AC line status. 
  15886.  
  15887.     ╨┐   _APMBATT:  Advanced Power Management battery status. 
  15888.  
  15889.     ╨┐   _APMLIFE:  Advanced Power Management remaining battery life. 
  15890.  
  15891.     ╨┐   _CPU:  Now returns "686" for Pentium Pro. 
  15892.  
  15893.     ╨┐   _DOWI:  Returns the current day of week as an integer (Sun = 1, Mon = 
  15894.         2, etc.). 
  15895.  
  15896.     ╨┐   _XPIXELS:  Returns the physical screen horizontal size in pixels. 
  15897.  
  15898.     ╨┐   _YPIXELS:  Returns the physical screen vertical size in pixels. 
  15899.  
  15900.  Added or updated the following variable functions (all functions listed are 
  15901.  new unless otherwise noted): 
  15902.  
  15903.     ╨┐   @CLIP[n]:  Returns line n from the clipboard (base 0). 
  15904.  
  15905.     ╨┐   @CONVERT[input,output,value]:  Converts a number from one base to 
  15906.         another. 
  15907.  
  15908.     ╨┐   @DAY[date]:  Returns the day for the specified date. 
  15909.  
  15910.     ╨┐   @DOW[date]:  Returns the day of week for the specified date, as a 
  15911.         string (Sun, Mon, etc.) 
  15912.  
  15913.     ╨┐   @DOWI[date]:  Returns the day of week for the specified date, as an 
  15914.         integer (Sun = 1, Mon = 2, etc.). 
  15915.  
  15916.     ╨┐   @DOY[date]:  Returns the day of year for the specified date (136). 
  15917.  
  15918.     ╨┐   @EAREAD[filename,EAname]:  Returns the specified text extended 
  15919.         attribute for the file. 
  15920.  
  15921.     ╨┐   @EAWRITE[filename,EAname,value]:  Writes the specified text extended 
  15922.         attribute for the file. 
  15923.  
  15924.     ╨┐   @EVAL[expression]:  Now supports user-definable decimal and thousands 
  15925.         characters; see DecimalChar and ThousandsChar, or SETDOS /G for 
  15926.         details. 
  15927.  
  15928.     ╨┐   @EXEC[command]:  This function has been modified; if you preface the 
  15929.         command with an '@', @EXEC will return an empty string rather than the 
  15930.         result code of the command. 
  15931.  
  15932.     ╨┐   @EXECSTR[command]:  Returns the first line written to STDOUT by the 
  15933.         specified command.  (This is intended to provide functionality similar 
  15934.         to UNIX back-quoting.) 
  15935.  
  15936.     ╨┐   @EXPAND[filename[,attributes]]:  Expands a wildcard filename and 
  15937.         returns all of the matching filenames / directories on a single line. 
  15938.  
  15939.     ╨┐   @FILEDATE[filename[,acw]] / @FILETIME[filename[,acw]]:  Added the 
  15940.         optional second argument determines which date / time field to return 
  15941.         on HPFS drives. 
  15942.  
  15943.     ╨┐   @FILESIZE[filename[,bkm[,a]]:  Added the optional third argument 
  15944.         a(llocated); if specified, the function returns the size actually used 
  15945.         on disk, not the amount of data in the file. 
  15946.  
  15947.     ╨┐   @INSERT[n,string1,string2]:  Inserts string1 into string2 starting at 
  15948.         offset n. 
  15949.  
  15950.     ╨┐   @LEFT[n,string]:  Returns the leftmost n characters of string. 
  15951.  
  15952.     ╨┐   @MONTH[date]:  Return the month for the specified date. 
  15953.  
  15954.     ╨┐   @NUMERIC[string]:  Now considers a leading decimal separator as a 
  15955.         numeric character, provided the remainder of the string is numeric and 
  15956.         does not contain additional decimal characters. 
  15957.  
  15958.     ╨┐   @REPLACE[string1,string2,text]:  Replaces all occurrences of string1 in 
  15959.         text with string2. 
  15960.  
  15961.     ╨┐   @RIGHT[n,string]:  Returns the rightmost n characters of string. 
  15962.  
  15963.     ╨┐   @SEARCH[filename[,path]]:  Now accepts an optional second argument for 
  15964.         the path to search. 
  15965.  
  15966.     ╨┐   @SELECT[filename,top,left,bottom,right,title[,1]]:  Has a new optional 
  15967.         argument following the title.  If it's set to 1, @SELECT will sort the 
  15968.         list alphabetically. 
  15969.  
  15970.     ╨┐   @STRIP[chars,string]:  Return string with the characters in chars 
  15971.         removed. 
  15972.  
  15973.     ╨┐   @WILD[string1,string2]:  Does a wildcard comparison on the two strings 
  15974.         and returns 1 if they match; 0 if they don't. 
  15975.  
  15976.     ╨┐   @YEAR[date]:  Return the year for the specified date. 
  15977.  
  15978.  
  15979. ΓòÉΓòÉΓòÉ 12.5. Startup and Configuration ΓòÉΓòÉΓòÉ
  15980.  
  15981. What's New - Startup and Configuration 
  15982.  
  15983.     ╨┐   In previous versions the "global" portion of the .INI file (the part 
  15984.         prior to any [Primary] or [Secondary] section) did not have a section 
  15985.         name.  This has been changed; a section name matching the product name 
  15986.         is now required, for example: 
  15987.  
  15988.                         [4OS2]
  15989.                         EditMode  = Insert
  15990.                         .....
  15991.  
  15992.         [Primary] and [Secondary] section names are still supported as well. 
  15993.  
  15994.     Added or modified the following .INI directives (all are new unless 
  15995.     otherwise noted): 
  15996.  
  15997.     ╨┐   CDDWinLeft, CDDWinTop, CDDWinWidth, CDDWinHeight, and CDDWinColors: 
  15998.         These directives set the position, size, and color of the popup window 
  15999.         used for extended directory searches. 
  16000.  
  16001.     ╨┐   DescriptionName:  This directive has a new capability:  If set to "EA", 
  16002.         4OS2 will use extended attributes (specifically, the ".SUBJECT" EA) for 
  16003.         file descriptions, rather than DESCRIPT.ION or another file.  Depending 
  16004.         on operating system configuration and cache behavior, this setting can 
  16005.         cause a significant reduction in performance, but may be useful when 
  16006.         working with other programs that manipulate Extended Attributes. 
  16007.  
  16008.     ╨┐   DuplicateBugs = Yes | NO:  Tells the parser to duplicate certain 
  16009.         CMD.EXE errors which may be important in solving rare compatibility 
  16010.         problems.  The only bug currently replicated by this command is the IF 
  16011.         command. 
  16012.  
  16013.     ╨┐   FileCompletion = cmd1:ext1 ext2;cmd2 ...:  Sets up command-specific 
  16014.         filename completion. 
  16015.  
  16016.     ╨┐   FuzzyCD =  0 | 1 | 2 | 3:  Enables or disables extended directory 
  16017.         searches, and controls their behavior. 
  16018.  
  16019.     ╨┐   HistMove = Yes | NO:  If set to Yes, a recalled line from the command 
  16020.         history is moved to the end of the history list, and removed from its 
  16021.         original location. 
  16022.  
  16023.     ╨┐   Include = filename:  Includes the contents of the named file as if they 
  16024.         had appeared at the location of the Include= directive in the current 
  16025.         .INI file. 
  16026.  
  16027.     ╨┐   ListboxBarColors = Color:  Sets the color for the highlight bar in the 
  16028.         popup listboxes (command history, filename completion, @SELECT, etc.). 
  16029.  
  16030.     ╨┐   TabStops = nnnn (8):  This new .INI directive specifies the tab 
  16031.         expansion size when displaying a file in LIST. 
  16032.  
  16033.     ╨┐   TreePath = Path:  Specifies the location of JPSTREE.IDX (the extended 
  16034.         directory search database; defaults to C:\). 
  16035.  
  16036.  
  16037. ΓòÉΓòÉΓòÉ 12.6. Technical and Compatibility Enhancements ΓòÉΓòÉΓòÉ
  16038.  
  16039. What's New - Technical and Compatibility Enhancements 
  16040.  
  16041.     ╨┐   Removed the 16-bit version of 4OS2. 
  16042.  
  16043.     ╨┐   Replaced the old 4OS2DLL.DLL / TCOS2DLL.DLL with a single file for both 
  16044.         4OS2 and TCOS2, named JPOS2DLL.DLL.  Also, JPOS2DLL is now loaded 
  16045.         dynamically, so you can start the product without it if necessary (e.g. 
  16046.         from a floppy boot). 
  16047.  
  16048.     ╨┐   Worked around an OS/2 problem that prevented %_CPU from detecting 
  16049.         anything higher than a 486. 
  16050.  
  16051.     ╨┐   Updated 4OS2 to remove explicit references to the Presentation Manager 
  16052.         DLLs (this should make it easier to use 4OS2 from a floppy disk boot). 
  16053.  
  16054.     ╨┐   TYPE NUL now "works" (i.e. it generates no output), for compatibility 
  16055.         with batch files which use TYPE NUL > file to generate a 0-byte file. 
  16056.  
  16057.     ╨┐   Added debugging options which allow you to view the command "tail" 
  16058.         passed to 4OS2, and to "tag" error messages with the product name.  See 
  16059.         the Debug directive in 4OS2.INI for additional details. 
  16060.  
  16061.  
  16062. ΓòÉΓòÉΓòÉ 12.7. Bugs Fixed ΓòÉΓòÉΓòÉ
  16063.  
  16064. What's New - Bugs Fixed 
  16065.  
  16066.     ╨┐   Piping the output of a batch file which also contains a pipe will no 
  16067.         longer cause problems. 
  16068.  
  16069.     ╨┐   ACTIVATE:  The CLOSE option now works properly. 
  16070.  
  16071.     ╨┐   DESCRIBE:  Fixed a problem with quoted long filenames with paths. 
  16072.  
  16073.     ╨┐   RENAME:  Now works properly when renaming quoted long filenames with 
  16074.         embedded wildcards. 
  16075.  
  16076.     ╨┐   Fixed a problem with invalid drive change requests -- commands like 
  16077.         "1:" would crash 4OS2. 
  16078.  
  16079.     ╨┐   Quoted long filenames can now be used in the .INI file. 
  16080.  
  16081.     ╨┐   @FILESEEKL[] now always returns to the start of the file before 
  16082.         seeking. 
  16083.  
  16084.  
  16085. ΓòÉΓòÉΓòÉ 13. Reference Information ΓòÉΓòÉΓòÉ
  16086.  
  16087.             File Systems and File Name Conventions 
  16088.             Colors and Color Names 
  16089.             Keys and Key Names 
  16090.             Popup Windows 
  16091.             Executable Files and File Searches 
  16092.             Reference Tables 
  16093.             Glossary 
  16094.  
  16095.  
  16096. ΓòÉΓòÉΓòÉ 13.1. File Systems and File Name Conventions ΓòÉΓòÉΓòÉ
  16097.  
  16098. You may have dozens, hundreds, or thousands of files stored on your computer's 
  16099. disks.  Your operating system is responsible for managing all of these files. 
  16100. In order to do so, it uses a unique name to locate each file in much the same 
  16101. way that the post office assigns a unique address to every residence. 
  16102.  
  16103. The unique name of any file is composed of a drive letter, a directory path, 
  16104. and a filename.  Each of these parts of the file's name is case insensitive; 
  16105. you can mix upper and lower case letters in any way you wish. 
  16106.  
  16107. The topics below are roughly divided according to the different parts of a file 
  16108. name, and cover the file system structure and naming conventions: 
  16109.  
  16110.             Drives and Volumes 
  16111.             File Systems 
  16112.             Directories and Subdirectories 
  16113.             File Names 
  16114.             File Attributes and Time Stamps 
  16115.  
  16116.  
  16117. ΓòÉΓòÉΓòÉ 13.1.1. Drives and Volumes ΓòÉΓòÉΓòÉ
  16118.  
  16119. A drive letter designates which drive contains the file.  In a file's full 
  16120. name, the drive letter is followed by a colon.  Drive letters A: and B: are 
  16121. normally reserved for the floppy disk drives. 
  16122.  
  16123. Normally, drive C: is the first (or only) hard disk drive.  Most current 
  16124. operating systems can divide a large hard disk into multiple logical drives or 
  16125. volumes that are usually called C:, D:, E:, etc.  Network systems (LANs) give 
  16126. additional drive letters to sections of the network file server drives. 
  16127.  
  16128. Most recent systems also include a CD-ROM drive.  The CD-ROM is also assigned a 
  16129. drive letter (or several letters, for CD-ROM changers), typically using letters 
  16130. beyond that used by the last hard disk in the system, but before any network 
  16131. drives.  Some systems may have "RAM disks" (sometimes called "virtual disks"), 
  16132. which are areas of memory set aside by software (a "RAM disk driver") for use 
  16133. as fast but temporary storage.  Like CD-ROM drives, RAM disks are usually 
  16134. assigned drive letters beyond the last hard disk in the system, but before 
  16135. network drives. 
  16136.  
  16137. For example, on a system with a large hard disk you might have A: and B: as 
  16138. floppy drives, C:, D:, and E: as parts of the hard disk, F: as a CD-ROM drive, 
  16139. G: as a RAM disk, and H: and I: as network drives. 
  16140.  
  16141. Each volume is formatted under a particular file system; see File Systems for 
  16142. details.  Additional information about disk files and directories is available 
  16143. under Directories and Subdirectories, File Names, and File Attributes and Time 
  16144. Stamps. 
  16145.  
  16146.  
  16147. ΓòÉΓòÉΓòÉ 13.1.2. File Systems ΓòÉΓòÉΓòÉ
  16148.  
  16149. Each disk volume is organized according to a file system.  The file system 
  16150. determines how files are named and how they are organized on the disk. 
  16151.  
  16152. As hard disk technology and operating systems have evolved, new file systems 
  16153. have been invented to support longer file names, larger drives, and higher disk 
  16154. performance.  Several different and incompatible schemes have evolved.  Which 
  16155. file systems you can use depends on which operating system you are using, and 
  16156. how the operating system and your hard disk are configured. 
  16157.  
  16158. The operating systems under which 4OS2 runs can support two standard file 
  16159. systems:  FAT and HPFS.  See File Names for details on the rules for naming 
  16160. files under each file system. 
  16161.  
  16162.     *   The FAT File System is the traditional file system used by all versions 
  16163.         of DOS.  Its name comes from the File Allocation Table DOS uses to keep 
  16164.         track of the space allocated to each file.  Windows 95, Windows NT, and 
  16165.         OS/2 also support the FAT file system. 
  16166.  
  16167.     *   The High Performance File System or HPFS is a file system provided with 
  16168.         all versions of OS/2, and is also supported in Windows NT version 3.51 
  16169.         and below.  It supports long file names, and offers higher performance 
  16170.         and better support for large drives than the FAT system.  It also 
  16171.         supports "extended attributes" to retain additional information about 
  16172.         your files. 
  16173.  
  16174.         DOS sessions running under OS/2 can access files on HPFS drives if the 
  16175.         files have short, FAT-compatible names.  Other operating systems (DOS, 
  16176.         Windows 95, and Windows NT 4.0 and above) can not access files on HPFS 
  16177.         drives. 
  16178.  
  16179.  Additional file systems may be installed under some operating systems to 
  16180.  support CD-ROM or network drives.  The file system type (FAT or HPFS) is 
  16181.  determined when a hard disk volume is formatted and applies to the entire 
  16182.  volume.  For example, under OS/2 you might have a 2 GB hard disk divided into 
  16183.  four 500 MB volumes, with the first three volumes (C:, D:, and E:) formatted 
  16184.  for the FAT file system, and the fourth formatted for HPFS. 
  16185.  
  16186.  4OS2 supports any standard file system installed under your operating system. 
  16187.  If your operating system can access files on a particular drive, then 4OS2 
  16188.  will be able to access those files as well. 
  16189.  
  16190.  Additional information about disk files and directories is available under 
  16191.  Drives and Volumes, Directories and Subdirectories, File Names, and File 
  16192.  Attributes and Time Stamps. 
  16193.  
  16194.  Network File Systems 
  16195.  
  16196.  A network file system allows you to access files stored on another computer on 
  16197.  a network, rather than on your own system.  4OS2 supports all network file 
  16198.  systems which are compatible with the underlying operating system. 
  16199.  
  16200.  File and directory names for network file systems depend on both the "server" 
  16201.  software running on the system that has the files on it, and the "client" 
  16202.  software running on your computer to connect it to the network.  However, they 
  16203.  usually follow the rules described under File Names. 
  16204.  
  16205.  Most network software "maps" unused drive letters on your system to specific 
  16206.  locations on the network, and you can then treat the drive as if it were 
  16207.  physically part of your local computer. 
  16208.  
  16209.  Some networks also support the Universal Naming Convention, which provides a 
  16210.  common method for accessing files on a network drive without using a "mapped" 
  16211.  drive letter.  Names specified this way are called UNC names.  They typically 
  16212.  appear as \\server\volume\path\filename, where server is the name of the 
  16213.  network server where the files reside, volume is the name of a disk volume on 
  16214.  that server, and the path\filename portion is a directory name and file name 
  16215.  which follow the conventions described in Directories and Subdirectories. 
  16216.  4OS2 supports UNC filenames, and also allows you to use UNC directory names 
  16217.  when changing directories (see Directory Navigation for more details). 
  16218.  
  16219.  When you use a network file system, remember that the naming conventions for 
  16220.  files on the network may not match those on your local system.  For example, 
  16221.  your local system may support long filenames while the network server or 
  16222.  client software does not, or vice versa.  4OS2 will usually handle whatever 
  16223.  naming conventions are supported by your network software, as long as the 
  16224.  network software accurately reports the types of names it can handle. 
  16225.  
  16226.  In rare cases, 4OS2 may not be able to report correct statistics on network 
  16227.  drives (such as the number of bytes free on a drive).  This is usually because 
  16228.  the network file system does not provide complete or accurate information. 
  16229.  
  16230.  
  16231. ΓòÉΓòÉΓòÉ 13.1.3. Directories and Subdirectories ΓòÉΓòÉΓòÉ
  16232.  
  16233. A file system is a method of organizing all of the files on an entire disk or 
  16234. hard disk volume.  Directories are used to divide the files on a disk into 
  16235. logical groups that are easy to work with.  Their purpose is similar to the use 
  16236. of file drawers to contain groups of hanging folders, hanging folders to 
  16237. contain smaller manila folders, and so on.  Directories are also sometimes 
  16238. referred to as folders. 
  16239.  
  16240. Every drive has a root or base directory, and many have one or more 
  16241. subdirectories.  Subdirectories can also have subdirectories, extending in a 
  16242. branching tree structure from the root directory.  The collection of all 
  16243. directories on a drive is often called the directory tree, and a portion of the 
  16244. tree is sometimes called a subtree.  The terms directory and subdirectory are 
  16245. typically used interchangeably to mean a single subdirectory within this tree 
  16246. structure. 
  16247.  
  16248. Subdirectory names follow the same rules as file names (see File Names). 
  16249.  
  16250. The drive and subdirectory portion of a file's name are collectively called the 
  16251. file's path.  For example, the file name C:\DIR1\DIR2\MYFILE.DAT says to look 
  16252. for the file MYFILE.DAT in the subdirectory DIR2 which is part of the 
  16253. subdirectory DIR1 which is on drive C.  The path for MYFILE.DAT is 
  16254. C:\DIR1\DIR2.  The backslashes between subdirectory names are required.  On 
  16255. HPFS volumes the path and file name must each be 255 characters or less in 
  16256. length, and in addition the total length of the path and file name together 
  16257. cannot exceed 260 characters. 
  16258.  
  16259. The operating system and command processor remember both a current or default 
  16260. drive for your system as a whole, and a current or default directory for every 
  16261. drive in your system.  Whenever a program tries to create or access a file 
  16262. without specifying the file's path, the operating system uses the current drive 
  16263. (if no other drive is specified) and the current directory (if no other 
  16264. directory path is specified). 
  16265.  
  16266. The root directory is named using the drive letter and a single backslash.  For 
  16267. example, D:\ refers to the root directory of drive D:.  Using a drive letter 
  16268. with no directory name at all refers to the current directory on the specified 
  16269. drive.  For example, E:README.DOC refers to the file README.DOC in the current 
  16270. directory on drive E:, whereas E:\README.DOC refers to the file README.DOC in 
  16271. the root directory on drive E:. 
  16272.  
  16273. There are also two special subdirectory names that are useful in many 
  16274. situations:  a single period by itself [.] means "the current default 
  16275. directory."  Two periods together [..] means "the directory which contains the 
  16276. current default directory" (often referred to as the parent directory).  These 
  16277. special names can be used wherever a full directory name can be used.  4OS2 
  16278. allows you to use additional periods to specify directories further "up" the 
  16279. tree (see Extended Parent Directory Names). 
  16280.  
  16281. Additional information about disk files and file systems is available under 
  16282. Drives and Volumes, File Systems, File Names, and File Attributes and Time 
  16283. Stamps. 
  16284.  
  16285.  
  16286. ΓòÉΓòÉΓòÉ 13.1.4. File Names ΓòÉΓòÉΓòÉ
  16287.  
  16288. Under the FAT file system, the filename consists of a base name of 1 to 8 
  16289. characters plus an optional extension composed of a period plus 1 to 3 more 
  16290. characters. 
  16291.  
  16292. You can use alphabetic and numeric characters plus the punctuation marks ! # $ 
  16293. % & ' ( ) - @ ^ _ ` { } and ~ in both the base name and the extension of a FAT 
  16294. filename.  Because the exclamation point [!], percent sign [%], caret [^], at 
  16295. sign [@], parentheses [()], and back-quote [`] also have other meanings to 
  16296. 4OS2, it is best to avoid using them in filenames. 
  16297.  
  16298. The HPFS file system allows file names with a maximum of 255 characters, 
  16299. including spaces and other characters that are not allowed in a FAT system file 
  16300. name, but excluding some punctuation characters which are allowed in FAT file 
  16301. names.  See your operating system documentation for details on the characters 
  16302. allowed.  If you use file names which contain semicolons [;], see Wildcards for 
  16303. details on avoiding problems with interpretation of those file names under 
  16304. 4OS2. 
  16305.  
  16306. HPFS file names are stored and displayed exactly as you entered them, and are 
  16307. not automatically shifted to upper or lower case.  For example, you could 
  16308. create a file called MYFILE, myfile, or MyFile, and each name would be stored 
  16309. in the directory just as you entered it.  However, case is ignored when looking 
  16310. for filenames, so you cannot have two files whose names differ only in case 
  16311. (i.e., the three names given above would all refer to the same file).  This 
  16312. behavior is sometimes described as "case-retentive but not case-sensitive" 
  16313. because the case information is retained, but does not affect access to the 
  16314. files. 
  16315.  
  16316. Files stored on HPFS volumes often have "FAT-compatible" names:  names which 
  16317. contain only those characters legal on a FAT volume, and which meet the 
  16318. 8-character name / 3-character extension limits.  Programs which cannot handle 
  16319. long names generally can access files by using FAT-compatible names. 
  16320.  
  16321. If an HPFS-compatible file name includes spaces or other characters that would 
  16322. not be allowed in a FAT name, you must place double quotes around the name. 
  16323. For example, suppose you have a file named LET3 on a FAT volume, and you want 
  16324. to copy it to the LETTERS directory on drive F:, an HPFS partition, and give it 
  16325. the name Letter To Sara.  To do so, use either of these commands: 
  16326.  
  16327.         [c:\wp] copy let3 f:\LETTERS\"Letter To Sara"
  16328.  
  16329.         [c:\wp] copy let3 "f:\LETTERS\Letter To Sara"
  16330.  
  16331. The HPFS file systems do not explicitly define an "extension" for file names 
  16332. which are not FAT-compatible.  However, by convention, all characters after the 
  16333. last period in the file name are treated as the extension.  For example, the 
  16334. file name "Letter to Sara" has no extension, whereas the name "Letter.to.Sara" 
  16335. has the extension Sara. 
  16336.  
  16337. Additional information about disk files and file systems is available under 
  16338. Drives and Volumes, File Systems, Directories and Subdirectories, and File 
  16339. Attributes and Time Stamps. 
  16340.  
  16341.  
  16342. ΓòÉΓòÉΓòÉ 13.1.5. File Attributes and Time Stamps ΓòÉΓòÉΓòÉ
  16343.  
  16344. Each file also has attributes, and one or more time stamps.  Attributes define 
  16345. characteristics of the file which may be useful to the operating system, to 
  16346. you, or to an application program.  Time stamps can record when the file was 
  16347. created, last modified, or last accessed.  Most 4OS2 file processing commands 
  16348. allow you to select files for processing based on their attributes and/or time 
  16349. stamp(s). 
  16350.  
  16351. Each file on your system has four standard attributes.  Every time a program 
  16352. modifies a file, the operating system sets the Archive attribute, which signals 
  16353. that the file has been modified since it was last backed up.  This attribute 
  16354. can be used by 4OS2 to determine which files to COPY, and by backup programs to 
  16355. determine which files to back up.  When the Read-only attribute is set, the 
  16356. file can't be changed or erased accidentally; this can be used to help protect 
  16357. important files from damage.  The Hidden and System attributes prevent the file 
  16358. from appearing in normal directory listings.  (Two additional attributes, 
  16359. Directory and Volume label, are also available.  These attributes are 
  16360. controlled by the operating system, and are not modified directly by 4OS2.) 
  16361.  
  16362. Attributes can be set and viewed with the ATTRIB command.  The DIR command also 
  16363. has options to select filenames to view based on their attributes, to view the 
  16364. attributes themselves, and to view information about normally "invisible" 
  16365. hidden and system files. 
  16366.  
  16367. When a file is created, and every time it is modified, the operating system 
  16368. records the system time and date in a time stamp in the file's directory entry. 
  16369. Several 4OS2 commands and variable functions, and many backup and utility 
  16370. programs, use this time stamp to determine the relative ages of files. 
  16371.  
  16372. On FAT volumes, only the single time stamp described above is available.  Files 
  16373. on HPFS volumes have three sets of time and date stamps.  The operating system 
  16374. records when each file was created, when it was last written or modified, and 
  16375. when it was last accessed.  The "last write" time stamp matches the single time 
  16376. stamp used on traditional FAT volumes. 
  16377.  
  16378. Several 4OS2 commands and variable functions let you specify which set of time 
  16379. and date stamps you want to view or work with on HPFS volumes.  These commands 
  16380. and functions use the letter c to refer to the creation time stamp, w for the 
  16381. last write time stamp, and a for the last access time stamp. 
  16382.  
  16383. Additional information about disk files and file systems is available under 
  16384. Drives and Volumes, File Systems, Directories and Subdirectories, and File 
  16385. Names. 
  16386.  
  16387.  
  16388. ΓòÉΓòÉΓòÉ 13.2. Miscellaneous Reference Information ΓòÉΓòÉΓòÉ
  16389.  
  16390.             Colors and Color Names 
  16391.             Keys and Key Names 
  16392.             Popup Windows 
  16393.             Executable Files and File Searches 
  16394.  
  16395.  
  16396. ΓòÉΓòÉΓòÉ 13.2.1. Colors and Color Names ΓòÉΓòÉΓòÉ
  16397.  
  16398. You can use color names in several of the directives in the .INI file and in 
  16399. many commands.  The general form of a color name is: 
  16400.  
  16401.     [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  16402.  
  16403. where fg is the foreground or text color, bg is the background color, and bc is 
  16404. the border color. 
  16405.  
  16406. The available colors are: 
  16407.  
  16408.         Black           Blue            Green           Red
  16409.         Magenta         Cyan            Yellow          White
  16410.  
  16411. Color names and the words BRIght, BLInk, and BORder may be shortened to the 
  16412. first 3 letters. 
  16413.  
  16414. You can also specify colors by number instead of by name.  The numbers are most 
  16415. useful in potentially long .INI file directives like ColorDir, where using 
  16416. color names may take too much space.  The following numbers are recognized: 
  16417.  
  16418.         0 - Black       8 - Gray (bright black)
  16419.         1 - Blue        9 - Bright blue
  16420.         2 - Green      10 - Bright green
  16421.         3 - Cyan       11 - Bright cyan
  16422.         4 - Red        12 - Bright red
  16423.         5 - Magenta    13 - Bright magenta
  16424.         6 - Yellow     14 - Bright yellow
  16425.         7 - White      15 - Bright white
  16426.  
  16427. Use one number to substitute for the [BRIght] fg portion of the color name, and 
  16428. a second to substitute for the [BRIght] bg portion.  For example, instead of 
  16429. bright cyan on blue you could use 11 on 1 to save space in a ColorDir 
  16430. specification. 
  16431.  
  16432. There are several subtleties that complicate the use of colors and color names. 
  16433. In order to understand them, you will need to read through the restrictions 
  16434. described below.  These restrictions are due to the design of your PC video 
  16435. hardware and video drivers, and are not inherent in 4OS2.  Some of the 
  16436. restrictions are complex, so feel free to skip over those that do not apply to 
  16437. color combinations you use. 
  16438.  
  16439. Some restrictions depend on the display "mode."  4OS2 can run in either 
  16440. full-screen display mode, where it uses the entire screen and has more direct 
  16441. control over the video hardware; or in windowed display mode, where it appears 
  16442. in a window on the OS/2 desktop. 
  16443.  
  16444. Color Errors 
  16445.  
  16446. A standard color specification allows sixteen foreground and eight background 
  16447. colors (sixteen if bright backgrounds are enabled, see below).  However, most 
  16448. video adapters and monitors do not provide true renditions of certain colors. 
  16449. For example, most users see normal "yellow" as brown, and bright yellow as 
  16450. yellow; many also see normal red as red, and "bright red" as pink.  Color 
  16451. errors are often much worse when running in windowed mode (see above), because 
  16452. the graphical environment that created the window may not map the text-mode 
  16453. colors the way you expect.  These problems are inherent in the monitor, video 
  16454. adapter, and driver software.  They cannot be corrected using 4OS2 color 
  16455. specifications. 
  16456.  
  16457. Border Colors 
  16458.  
  16459. In order to use border colors, you must have a color video adapter (monochrome 
  16460. adapters do not support border colors). 
  16461.  
  16462. 4OS2 can only accept border colors in the CLS and COLOR commands, and in the 
  16463. StdColors directive in the .INI file.  Border colors will be ignored, or will 
  16464. cause an error, if they are used elsewhere. 
  16465.  
  16466. Border colors do not work in windowed mode, and will be ignored if used in a 
  16467. windowed session under OS/2. 
  16468.  
  16469. Blinking Text and Bright Background Colors 
  16470.  
  16471. The interactions between blinking characters, bright backgrounds, and your 
  16472. display mode can be complex.  You will need to understand them if you use 
  16473. either attribute in your color specifications. 
  16474.  
  16475. The effects of blinking and bright background color specifications depend 
  16476. partly on whether you are in full-screen or windowed display mode. 
  16477.  
  16478. Full-Screen Display Mode 
  16479.  
  16480. Full-screen display mode uses the entire screen for your command processor or 
  16481. application.  This mode is available as an option for text-mode sessions in 
  16482. OS/2. 
  16483.  
  16484. In full-screen display mode your video hardware can be configured via software 
  16485. commands to display either blinking text, or text with a bright background, but 
  16486. not both.  This is due to the design of PC video hardware, and is not a 
  16487. software restriction. 
  16488.  
  16489. The memory on your video adapter includes a "flag" for each character on the 
  16490. screen.  The flag controls blinking text and bright background colors.  If the 
  16491. flag is off, the character is displayed with a normal background and does not 
  16492. blink.  If the flag is "on," the character either blinks or is displayed with a 
  16493. bright background, depending on which way your video adapter is currently 
  16494. configured. 
  16495.  
  16496. In full-screen display mode, the configuration of your video adapter can be 
  16497. controlled by 4OS2 with the BrightBG directive in the 4OS2.INI file or the 
  16498. SETDOS /B command.  If you set BrightBG = No or use the SETDOS /B0 command, 
  16499. 4OS2 will configure the video adapter for blinking text, and all characters on 
  16500. the screen with the blink / bright background flag set will blink.  If you set 
  16501. BrightBG = Yes or use SETDOS /B1, 4OS2 will configure the video adapter for 
  16502. bright background colors, and the characters will be displayed with a bright 
  16503. background instead of blinking. 
  16504.  
  16505. Because there is only one flag for each character to specify both blinking text 
  16506. and bright background color, it doesn't matter which attribute you use when you 
  16507. specify the color.  Whether you specify blinking text or a bright background, 
  16508. you will see the same thing on your screen.  For example, these two COLOR 
  16509. commands will always produce the same results: 
  16510.  
  16511.         color blink white on blue
  16512.         color white on bright blue
  16513.  
  16514. If bright backgrounds are enabled, both commands will produce white text on a 
  16515. bright blue background.  If blinking text is enabled, both commands will 
  16516. produce blinking white text on a blue background. 
  16517.  
  16518. If you don't use BrightBG or SETDOS /B, or if you use SETDOS /B2, 4OS2 will not 
  16519. attempt to configure your video hardware.  Most video adapters default to 
  16520. blinking text in full-screen mode, but this can be changed by application 
  16521. programs.  If you use BrightBG or SETDOS /B, 4OS2 will configure the hardware 
  16522. each time it displays the prompt. 
  16523.  
  16524. Windowed Display Mode 
  16525.  
  16526. Windowed display mode uses a window on the screen for your command processor or 
  16527. text-mode application.  It is available for command processor sessions and most 
  16528. applications running under OS/2. 
  16529.  
  16530. In windowed mode, 4OS2 cannot control your hardware to select blinking or 
  16531. bright backgrounds.  Instead, OS/2 displays bright background colors, 
  16532. regardless of the BrightBG or SETDOS /B setting.  It does not provide a way to 
  16533. display blinking characters in windowed mode.  As an example, the two commands 
  16534. given above would both display white text on a bright blue background when run 
  16535. in windowed mode. 
  16536.  
  16537. Switching Modes 
  16538.  
  16539. OS/2 allows you to switch any DOS or other text-mode session between 
  16540. full-screen and windowed mode.  You cannot switch modes for OS/2 sessions, so 
  16541. 4OS2 is not directly affected by mode switching.  However, if you write batch 
  16542. files or aliases which run in both modes, you may need to take into account 
  16543. that OS/2 defaults to displaying blinking text in full-screen mode and bright 
  16544. backgrounds in windowed mode. 
  16545.  
  16546.  
  16547. ΓòÉΓòÉΓòÉ 13.2.2. Keys and Key Names ΓòÉΓòÉΓòÉ
  16548.  
  16549. Key names are used to define keystroke aliases, and in several 4OS2.INI 
  16550. directives, and with the KEYSTACK command.  The format of a key name is the 
  16551. same in all three uses: 
  16552.  
  16553.         [Prefix-]Keyname
  16554.  
  16555. The key prefix can be left out, or it can be any one of the following: 
  16556.  
  16557.         Alt         followed by A - Z, 0 - 9, F1 - F12, or Bksp
  16558.         Ctrl        followed by A - Z, F1 - F12, Tab, Bksp, Enter,
  16559.                       Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  16560.         Shift       followed by F1 - F12 or Tab.
  16561.  
  16562. The possible key names are: 
  16563.  
  16564.         A - Z           Enter           PgDn
  16565.         0 - 9           Up              Home
  16566.         F1 - F          Down            End
  16567.         Esc             Left            Ins
  16568.         Bksp            Right           Del
  16569.         Tab             PgUp
  16570.  
  16571. All key names must be spelled as shown.  Alphabetic keys can be specified in 
  16572. upper or lower case.  You cannot specify a punctuation key. 
  16573.  
  16574. The prefix and key name must be separated by a dash [-].  For example: 
  16575.  
  16576.         Alt-F10        This is okay
  16577.         Alt F10        The space will cause an error
  16578.  
  16579. If you prefer, you can use a numeric value instead of a key name. Use the ASCII 
  16580. code for an ASCII, extended ASCII, or control character.  Use the scan code 
  16581. preceded by an at sign [@] for extended key codes like F1 or the cursor keys. 
  16582. For example, use 13 for Enter, or @59 for F1.  In general, you will find it 
  16583. easier to use the names described above rather than key numbers. See the 
  16584. Reference Tables for an explanation and list of ASCII and key codes. 
  16585.  
  16586. Some keys are intercepted by OS/2 and are not passed on to 4OS2.  For example, 
  16587. Ctrl-S pauses screen output temporarily, and Ctrl-Esc pops up the OS/2 window 
  16588. list.  Keys which are intercepted by OS/2 generally cannot be assigned to 
  16589. aliases or with key mapping directives, because 4OS2 never receives these 
  16590. keystrokes and therefore cannot act on them. 
  16591.  
  16592. You also may not be able to use certain keys if your keyboard is not 100% 
  16593. IBM-compatible or your keyboard driver does not support them.  For example, on 
  16594. some systems the F11 and F12 keys are not recognized; others may not support 
  16595. unusual combinations like Ctrl-Tab.  These problems are rare; when they do 
  16596. occur, they are usually due to OS/2. 
  16597.  
  16598.  
  16599. ΓòÉΓòÉΓòÉ 13.2.3. Popup Windows ΓòÉΓòÉΓòÉ
  16600.  
  16601. Several features of 4OS2 display popup windows.  A popup window may be used to 
  16602. display filenames, recently-executed commands, recently-used directories, the 
  16603. results of an extended directory search, or a list created by the SELECT 
  16604. command or the @SELECT internal function. 
  16605.  
  16606. Popup windows always display a list of choices and a cursor bar.  You can move 
  16607. the cursor bar inside the window until you find the choice that you wish to 
  16608. make, then press the Enter key to select that item. 
  16609.  
  16610. Navigation inside any popup window follows the conventions described below. 
  16611. Additional information on each specific type of popup window is provided when 
  16612. that window is introduced in the online help. 
  16613.  
  16614. You can control the color, position and size of most popup windows from the 
  16615. Command Line 2 page of the OPTION dialogs.  You can also control these features 
  16616. with directives in the .INI file, including PopupWinLeft, PopupWinTop, 
  16617. PopupWinWidth, and PopupWinHeight, and PopupWinColors.  A few popup windows 
  16618. (e.g., the extended directory search window) have their own specific .INI 
  16619. directives, and corresponding separate choices in the OPTION command.  You can 
  16620. also change the keys used in most popup windows with key mapping directives in 
  16621. 4OS2.INI. 
  16622.  
  16623. Once a window is open, you can use these navigation keys to find the selection 
  16624. you wish to make: 
  16625.  
  16626.                        Move the selection bar up one line. 
  16627.                        Move the selection bar down one line. 
  16628.                        Scroll the display left 4 columns. 
  16629.                        Scroll the display right 4 columns. 
  16630.         PgUp            Scroll the display up one page. 
  16631.         PgDn            Scroll the display down one page. 
  16632.         Ctrl-PgUp       Go to the beginning of the list. 
  16633.          or Home 
  16634.         Ctrl-PgDn       Go to the end of the list. 
  16635.          or End 
  16636.         Esc             Close the window without making a selection. 
  16637.         Enter           Select the current item and close the window. 
  16638.  
  16639.  In addition to scrolling through a popup window, you can search the list using 
  16640.  character matching.  If you press a character, the cursor bar will move to the 
  16641.  next entry that begins with that character.  If you type multiple characters, 
  16642.  the cursor will move to the entry that begins with the search string entered 
  16643.  to that point (you can enter a search string up to 32 characters long).  If no 
  16644.  entry matches the character or string that you have typed, the command 
  16645.  processor beeps and does not move the cursor bar.  To reset the search string, 
  16646.  press Backspace. 
  16647.  
  16648.  You can change the keys used in popup windows with key mapping directives in 
  16649.  4OS2.INI file. 
  16650.  
  16651.  
  16652. ΓòÉΓòÉΓòÉ 13.2.4. Executable Files and File Searches ΓòÉΓòÉΓòÉ
  16653.  
  16654. Once 4OS2 knows that it is supposed to run an external command, it tries to 
  16655. find an executable file (one with a .COM or .EXE extension) whose name matches 
  16656. the command name.  It runs the executable file if it finds one. 
  16657.  
  16658. If 4OS2 cannot find an executable program to run, it next looks for a batch 
  16659. file (a file with one or more commands in it) whose name matches the command 
  16660. name.  4OS2 looks first for a .BTM file, then for a .CMD file, then for a .BAT 
  16661. file, and finally for a .REX file.  See .BAT, .CMD, and .BTM Files for more 
  16662. information on these different types of batch files.  If 4OS2 finds such a 
  16663. file, it then reads each line in the file as a new command. 
  16664.  
  16665. If the search for a batch file fails, 4OS2 checks to see if the command name 
  16666. matches the name of a file with an extension that is associated with a specific 
  16667. application (for example, if you have associated .DOC with your editor or word 
  16668. processor, and you type the name of a .DOC file).  If a match is found, 4OS2 
  16669. runs the program you specified when the association was defined. 
  16670.  
  16671. In searching for the application associated with a file, 4OS2 will first 
  16672. examine any executable extensions you have defined to associate a file 
  16673. extension with a specific program to process that type of file. 
  16674.  
  16675. 4OS2 first searches for an executable program, a batch file, and a file with an 
  16676. executable extension in the current directory.  If the command name doesn't 
  16677. match a .COM, .EXE, .BTM, .BAT or .CMD file or an executable extension in the 
  16678. current directory, 4OS2 repeats its search in every directory in your search 
  16679. path. 
  16680.  
  16681. The search path is a list of directories that 4OS2 (and some applications) 
  16682. search for executable files.  For example, if you wanted 4OS2 to search the 
  16683. root directory of the C: drive, the \OS2 subdirectory on the C: drive, and the 
  16684. \UTIL directory on the D: drive for executable files, your search path would 
  16685. look like this: 
  16686.  
  16687.         PATH=C:\;C:\OS2;D:\UTIL
  16688.  
  16689. Notice that the directory names in the search path are separated by semicolons. 
  16690.  
  16691. You can create or view the search path with the PATH command.  You can use the 
  16692. ESET command to edit the path.  Many programs also use the search path to find 
  16693. their own files.  The search path is stored in the environment with the name 
  16694. PATH. 
  16695.  
  16696. Remember, 4OS2 always looks for an executable file or a file with an executable 
  16697. extension in the current subdirectory, then in each directory in the search 
  16698. path.  (You can change the search order so the current directory is not 
  16699. searched first; see the PATH command for details.) 
  16700.  
  16701. If you include an extension as part of the command name, 4OS2 only searches for 
  16702. a file with that extension.  Similarly, if you include a path as part of the 
  16703. command name, the command processor will look only in the directory you 
  16704. specified, and ignore the usual search of the current directory and the PATH. 
  16705.  
  16706. The following table sums up the possible search options (the term "standard 
  16707. search" refers to the search of the current directory and each directory in the 
  16708. search path): 
  16709.  
  16710.         Command                 4OS2 Search Sequence 
  16711.  
  16712.         WP                      Standard search for any executable file whose 
  16713.                                 base name is WP. 
  16714.  
  16715.         WP.EXE                  Standard search for WP.EXE; will not find files 
  16716.                                 with other extensions. 
  16717.  
  16718.         C:\WP7\WP               Looks in the C:\WP7 directory for any 
  16719.                                 executable file whose base name is WP.  Does 
  16720.                                 not check the standard search directories. 
  16721.  
  16722.         C:\WP7\WP.EXE           Looks only for the file C:\WP7\WP.EXE. 
  16723.  
  16724.         LAB.DOC                 Standard search for LAB.DOC, if .DOC is defined 
  16725.                                 as an executable extension.  Runs the 
  16726.                                 associated application if the file is found. 
  16727.  
  16728.         C:\LI\LAB.DOC           Looks only for the file C:\LI\LAB.DOC, and only 
  16729.                                 if .DOC is defined as an executable extension. 
  16730.                                 Runs the associated application if the file is 
  16731.                                 found. 
  16732.  
  16733.  If 4OS2 cannot find an executable file, batch program, or a file with an 
  16734.  executable extension in the current directory or any directory in the search 
  16735.  path, it looks for an alias called UNKNOWN_CMD (see the ALIAS command for 
  16736.  details).  If you have defined an alias with that name, it is executed (this 
  16737.  allows you to control error handling for unknown commands).  Otherwise, 4OS2 
  16738.  displays an "Unknown command" error message and waits for your next 
  16739.  instruction. 
  16740.  
  16741.  
  16742. ΓòÉΓòÉΓòÉ 13.3. Reference Tables ΓòÉΓòÉΓòÉ
  16743.  
  16744. The reference tables in this section are based on U.S. English conventions. 
  16745. Your system may differ if it is configured for a different country or language, 
  16746. or a character set or display font which does not include the characters shown 
  16747. here.  See your operating system documentation for more information about 
  16748. country and language support. 
  16749.  
  16750. To represent the text you type, computers must translate each letter to and 
  16751. from a number.  The code used by all PC-compatible computers for this 
  16752. translation is called ASCII (American Standard Code for Information 
  16753. Interchange).  Function keys, cursor keys, and Alt keys generate scan codes 
  16754. indicating which key was pressed, but not ASCII codes.  The tables in this 
  16755. section cover both kinds of codes. 
  16756.  
  16757. For more information, see: 
  16758.  
  16759.             ASCII Table 
  16760.             Key Codes and Scan Codes Table 
  16761.             Key Codes and Scan Codes Explanation 
  16762.             ANSI Commands 
  16763.  
  16764.  
  16765. ΓòÉΓòÉΓòÉ 13.3.1. ASCII Table ΓòÉΓòÉΓòÉ
  16766.  
  16767. The ASCII tables below include a Char column showing the visual representation 
  16768. of the character, a Dec column showing the decimal numeric value of the 
  16769. character in the ASCII set, and a Hex column showing the hexadecimal (base-16) 
  16770. value. 
  16771.  
  16772.                   Control Characters
  16773.  
  16774.     Dec  Hex  Chr  Nam  Ctl   Γöé   Dec  Hex  Chr  Nam  Ctl
  16775.     ---  ---  ---  ---  ---   Γöé   ---  ---  ---  ---  ---
  16776.     000   00       NUL   ^@   Γöé   016   10      DLE   ^P
  16777.     001   01      SOH   ^A   Γöé   017   11      DC1   ^Q
  16778.     002   02      STX   ^B   Γöé   018   12      DC2   ^R
  16779.     003   03      ETX   ^C   Γöé   019   13      DC3   ^S
  16780.     004   04      EOT   ^D   Γöé   020   14      DC4   ^T
  16781.     005   05      ENQ   ^E   Γöé   021   15      NAK   ^U
  16782.     006   06      ACK   ^F   Γöé   022   16      SYN   ^V
  16783.     007   07       BEL   ^G   Γöé   023   17      ETB   ^W
  16784.     008   08      BS    ^H   Γöé   024   18      CAN   ^X
  16785.     009   09       HT    ^I   Γöé   025   19      EM    ^Y
  16786.     010   0A       LF    ^J   Γöé   026   1A      SUB   ^Z
  16787.     011   0B       VT    ^K   Γöé   027   1B      ESC   ^[
  16788.     012   0C       FF    ^L   Γöé   028   1C      FS    ^\
  16789.     013   0D       CR    ^M   Γöé   029   1D      GS    ^]
  16790.     014   0E      SO    ^N   Γöé   030   1E      RS    ^^
  16791.     015   0F      SI    ^O   Γöé   031   1F      US    ^_
  16792.  
  16793.               Punctuation, Digits, Upper Case
  16794.  
  16795.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  16796.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  16797.   032   20      Γöé  048   30   0  Γöé  064   40   @  Γöé  080   50   P
  16798.   033   21   !  Γöé  049   31   1  Γöé  065   41   A  Γöé  081   51   Q
  16799.   034   22   "  Γöé  050   32   2  Γöé  066   42   B  Γöé  082   52   R
  16800.   035   23   #  Γöé  051   33   3  Γöé  067   43   C  Γöé  083   53   S
  16801.   036   24   $  Γöé  052   34   4  Γöé  068   44   D  Γöé  084   54   T
  16802.   037   25   %  Γöé  053   35   5  Γöé  069   45   E  Γöé  085   55   U
  16803.   038   26   &  Γöé  054   36   6  Γöé  070   46   F  Γöé  086   56   V
  16804.   039   27   '  Γöé  055   37   7  Γöé  071   47   G  Γöé  087   57   W
  16805.   040   28   (  Γöé  056   38   8  Γöé  072   48   H  Γöé  088   58   X
  16806.   041   29   )  Γöé  057   39   9  Γöé  073   49   I  Γöé  089   59   Y
  16807.   042   2A   *  Γöé  058   3A   :  Γöé  074   4A   J  Γöé  090   5A   Z
  16808.   043   2B   +  Γöé  059   3B   ;  Γöé  075   4B   K  Γöé  091   5B   [
  16809.   044   2C   ,  Γöé  060   3C   <  Γöé  076   4C   L  Γöé  092   5C   \
  16810.   045   2D   -  Γöé  061   3D   =  Γöé  077   4D   M  Γöé  093   5D   ]
  16811.   046   2E   .  Γöé  062   3E   >  Γöé  078   4E   N  Γöé  094   5E   ^
  16812.   047   2F   /  Γöé  063   3F   ?  Γöé  079   4F   O  Γöé  095   5F   _
  16813.  
  16814.                 Lower Case, Miscellaneous
  16815.  
  16816.                  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  16817.                  ---  ---  --- Γöé  ---  ---  ---
  16818.                  096   60   `  Γöé  112   70   p
  16819.                  097   61   a  Γöé  113   71   q
  16820.                  098   62   b  Γöé  114   72   r
  16821.                  099   63   c  Γöé  115   73   s
  16822.                  100   64   d  Γöé  116   74   t
  16823.                  101   65   e  Γöé  117   75   u
  16824.                  102   66   f  Γöé  118   76   v
  16825.                  103   67   g  Γöé  119   77   w
  16826.                  104   68   h  Γöé  120   78   x
  16827.                  105   69   i  Γöé  121   79   y
  16828.                  106   6A   j  Γöé  122   7A   z
  16829.                  107   6B   k  Γöé  123   7B   {
  16830.                  108   6C   l  Γöé  124   7C   |
  16831.                  109   6D   m  Γöé  125   7D   }
  16832.                  110   6E   n  Γöé  126   7E   ~
  16833.                  111   6F   o  Γöé  127   7F   
  16834.  
  16835.             International; Graphics Characters 1
  16836.  
  16837.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  16838.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  16839.   128   80   ╨É  Γöé  144   90   ╨á  Γöé  160   A0   ╨░  Γöé  176   B0   Γûæ
  16840.   129   81   ╨æ  Γöé  145   91   ╨í  Γöé  161   A1   ╨▒  Γöé  177   B1   ΓûÆ
  16841.   130   82   ╨Æ  Γöé  146   92   ╨ó  Γöé  162   A2   ╨▓  Γöé  178   B2   Γûô
  16842.   131   83   ╨ô  Γöé  147   93   ╨ú  Γöé  163   A3   ╨│  Γöé  179   B3   Γöé
  16843.   132   84   ╨ö  Γöé  148   94   ╨ñ  Γöé  164   A4   ╨┤  Γöé  180   B4   Γöñ
  16844.   133   85   ╨ò  Γöé  149   95   ╨Ñ  Γöé  165   A5   ╨╡  Γöé  181   B5   Γòí
  16845.   134   86   ╨û  Γöé  150   96   ╨ª  Γöé  166   A6   ╨╢  Γöé  182   B6   Γòó
  16846.   135   87   ╨ù  Γöé  151   97   ╨º  Γöé  167   A7   ╨╖  Γöé  183   B7   Γòû
  16847.   136   88   ╨ÿ  Γöé  152   98   ╨¿  Γöé  168   A8   ╨╕  Γöé  184   B8   Γòò
  16848.   137   89   ╨Ö  Γöé  153   99   ╨⌐  Γöé  169   A9   ╨╣  Γöé  185   B9   Γòú
  16849.   138   8A   ╨Ü  Γöé  154   9A   ╨¬  Γöé  170   AA   ╨║  Γöé  186   BA   Γòæ
  16850.   139   8B   ╨¢  Γöé  155   9B   ╨½  Γöé  171   AB   ╨╗  Γöé  187   BB   Γòù
  16851.   140   8C   ╨£  Γöé  156   9C   ╨¼  Γöé  172   AC   ╨╝  Γöé  188   BC   Γò¥
  16852.   141   8D   ╨¥  Γöé  157   9D   ╨¡  Γöé  173   AD   ╨╜  Γöé  189   BD   Γò£
  16853.   142   8E   ╨₧  Γöé  158   9E   ╨«  Γöé  174   AE   ╨╛  Γöé  190   BE   Γò¢
  16854.   143   8F   ╨ƒ  Γöé  159   9F   ╨»  Γöé  175   AF   ╨┐  Γöé  191   BF   ΓöÉ
  16855.  
  16856.                Graphics Characters 2; Symbols
  16857.  
  16858.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  16859.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  16860.   192   C0   Γöö  Γöé  208   D0   Γò¿  Γöé  224   E0   ╤Ç  Γöé  240   F0   ╨ü
  16861.   193   C1   Γö┤  Γöé  209   D1   Γòñ  Γöé  225   E1   ╤ü  Γöé  241   F1   ╤æ
  16862.   194   C2   Γö¼  Γöé  210   D2   ΓòÑ  Γöé  226   E2   ╤é  Γöé  242   F2   ╨ä
  16863.   195   C3   Γö£  Γöé  211   D3   ΓòÖ  Γöé  227   E3   ╤â  Γöé  243   F3   ╤ö
  16864.   196   C4   ΓöÇ  Γöé  212   D4   Γòÿ  Γöé  228   E4   ╤ä  Γöé  244   F4   ╨ç
  16865.   197   C5   Γö╝  Γöé  213   D5   ΓòÆ  Γöé  229   E5   ╤à  Γöé  245   F5   ╤ù
  16866.   198   C6   Γò₧  Γöé  214   D6   Γòô  Γöé  230   E6   ╤å  Γöé  246   F6   ╨Ä
  16867.   199   C7   Γòƒ  Γöé  215   D7   Γò½  Γöé  231   E7   ╤ç  Γöé  247   F7   ╤₧
  16868.   200   C8   ΓòÜ  Γöé  216   D8   Γò¬  Γöé  232   E8   ╤ê  Γöé  248   F8   ┬░
  16869.   201   C9   Γòö  Γöé  217   D9   Γöÿ  Γöé  233   E9   ╤ë  Γöé  249   F9   ΓêÖ
  16870.   202   CA   Γò⌐  Γöé  218   DA   Γöî  Γöé  234   EA   ╤è  Γöé  250   FA   ┬╖
  16871.   203   CB   Γòª  Γöé  219   DB   Γûê  Γöé  235   EB   ╤ï  Γöé  251   FB   ΓêÜ
  16872.   204   CC   Γòá  Γöé  220   DC   Γûä  Γöé  236   EC   ╤î  Γöé  252   FC   Γäû
  16873.   205   CD   ΓòÉ  Γöé  221   DD   Γûî  Γöé  237   ED   ╤ì  Γöé  253   FD   ┬ñ
  16874.   206   CE   Γò¼  Γöé  222   DE   ΓûÉ  Γöé  238   EE   ╤Ä  Γöé  254   FE   Γûá
  16875.   207   CF   Γòº  Γöé  223   DF   ΓûÇ  Γöé  239   EF   ╤Å  Γöé  255   FF
  16876.  
  16877.  
  16878. ΓòÉΓòÉΓòÉ 13.3.2. Key Codes and Scan Codes Table ΓòÉΓòÉΓòÉ
  16879.  
  16880. (For more details on key codes and scan codes, see the Key Codes and Scan Codes 
  16881. Explanation.) 
  16882.  
  16883. The following table lists all of the keys on the 101-key "enhanced" U.S. 
  16884. keyboard.  Many non-U.S. keyboards are similar, but will not be exactly the 
  16885. same.  The keys are arranged roughly in scan code order, which is generally 
  16886. left to right, moving from the top of the keyboard to the bottom. 
  16887.  
  16888. Column 1 shows the key's keycap symbol or name.  Columns 2 and 3 show the scan 
  16889. code, and the ASCII code if the key is unshifted.  Columns 4 and 5 contain the 
  16890. codes for the shifted key.  Columns 6 and 7 show the codes for Ctrl plus the 
  16891. key.  The last column contains the scan code for Alt plus the key (Alt 
  16892. keystrokes have no ASCII code and always generate an ASCII code of 0, which is 
  16893. not shown). 
  16894.  
  16895. Key names prefaced by np are on the numeric keypad.  Those prefaced by cp are 
  16896. on the cursor keypad between the main typing keys and the number keypad.  The 
  16897. numeric keypad values are valid if Num Lock is turned off.  If you need to 
  16898. specify a number key from the numeric keypad when Num Lock is on, use the scan 
  16899. code shown for the keypad and the ASCII code shown for the corresponding 
  16900. typewriter key.  For example, the keypad "7" has a scan code of 71 (the np Home 
  16901. scan code) and an ASCII code of 54 (the ASCII code for "7"). 
  16902.  
  16903. The chart is blank for key combinations that do not have scan codes or ASCII 
  16904. codes, like Ctrl-1 or Alt-PgUp. 
  16905.  
  16906.  
  16907.                    Top Two Keyboard Rows
  16908.  
  16909.                              Shift  Shift  Ctrl   Ctrl   Alt
  16910.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  16911.      Key       Code   Code   Code   Code   Code   Code   Code
  16912.  
  16913.      Esc       1      27     1      27     1      27     1
  16914.      1  !      2      49     2      33                   120
  16915.      2  @      3      50     3      64     3      0      121
  16916.      3  #      4      51     4      35                   122
  16917.      4  $      5      52     5      36                   123
  16918.      5  %      6      53     6      37                   124
  16919.      6  ^      7      54     7      94     7      30     125
  16920.      7  &      8      55     8      38                   126
  16921.      8  *      9      56     9      42                   127
  16922.      9  (      10     57     10     40                   128
  16923.      0  )      11     48     11     41                   129
  16924.      -  _      12     45     12     95     12     31     130
  16925.      =  +      13     61     13     43                   131
  16926.      Backspace 14     8      14     8      14     127    14
  16927.      Tab       15     9      15     0      148    0      165
  16928.      Q         16     113    16     81     16     17     16
  16929.      W         17     119    17     87     17     23     17
  16930.      E         18     101    18     69     18     5      18
  16931.      R         19     114    19     82     19     18     19
  16932.      T         20     116    20     84     20     20     20
  16933.      Y         21     121    21     89     21     25     21
  16934.      U         22     117    22     85     22     21     22
  16935.      I         23     105    23     73     23     9      23
  16936.      O         24     111    24     79     24     15     24
  16937.      P         25     112    25     80     25     16     25
  16938.      [  {      26     91     26     123    26     27     26
  16939.      ]  }      27     93     27     125    27     29     27
  16940.      Enter     28     13     28     13     28     10     28
  16941.  
  16942.  
  16943.                   Bottom Two Keyboard Rows
  16944.  
  16945.                              Shift  Shift  Ctrl   Ctrl   Alt
  16946.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  16947.      Key       Code   Code   Code   Code   Code   Code   Code
  16948.  
  16949.     A          30     97     30     65     30     1      30
  16950.     S          31     115    31     83     31     19     31
  16951.     D          32     100    32     68     32     4      32
  16952.     F          33     102    33     70     33     6      33
  16953.     G          34     103    34     71     34     7      34
  16954.     H          35     104    35     72     35     8      35
  16955.     J          36     106    36     74     36     10     36
  16956.     K          37     107    37     75     37     11     37
  16957.     L          38     108    38     76     38     12     38
  16958.     ; :        39     59     39     58                   39
  16959.     '  "       40     39     40     34                   40
  16960.     `  ~       41     96     41     126                  41
  16961.     \  |       43     92     43     124    43     28     43
  16962.     Z          44     122    44     90     44     26     44
  16963.     X          45     120    45     88     45     24     45
  16964.     C          46     99     46     67     46     3      46
  16965.     V          47     118    47     86     47     22     47
  16966.     B          48     98     48     66     48     2      48
  16967.     N          49     110    49     78     49     14     49
  16968.     M          50     109    50     77     50     13     50
  16969.     ,  <       51     44     51     60                   51
  16970.     .  >       52     46     52     62                   52
  16971.     /  ?       53     47     53     63                   53
  16972.     Space      57     32     57     32     57     32     57
  16973.  
  16974.  
  16975.                  Key Pads and Function Keys
  16976.  
  16977.                              Shift  Shift  Ctrl   Ctrl   Alt
  16978.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  16979.      Key       Code   Code   Code   Code   Code   Code   Code
  16980.  
  16981.  
  16982.      F1        59     0      84     0      94     0      104
  16983.      F2        60     0      85     0      95     0      105
  16984.      F3        61     0      86     0      96     0      106
  16985.      F4        62     0      87     0      97     0      107
  16986.      F5        63     0      88     0      98     0      108
  16987.      F6        64     0      89     0      99     0      109
  16988.      F7        65     0      90     0      100    0      110
  16989.      F8        66     0      91     0      101    0      111
  16990.      F9        67     0      92     0      102    0      112
  16991.      F10       68     0      93     0      103    0      113
  16992.      F11       133    0      135    0      137    0      139
  16993.      F12       134    0      136    0      138    0      140
  16994.      np *      55     42     55     42     150    0      55
  16995.      np Home   71     0      71     55     119    0
  16996.      cp Home   71     224    71     224    119    224    151
  16997.      np Up     72     0      72     56     141    0
  16998.      cp Up     72     224    72     224    141    224    152
  16999.      np PgUp   73     0      73     57     132    0
  17000.      cp PgUp   73     224    73     224    132    224    153
  17001.      np Minus  74     45     74     45     142    0      74
  17002.      np Left   75     0      75     52     115    0
  17003.      cp Left   75     224    75     224    115    224    155
  17004.      np 5      76     0      76     53     143    0
  17005.      np Right  77     0      77     54     116    0
  17006.      cp Right  77     224    77     224    116    224    157
  17007.      np Plus   78     43     78     43     144    0      78
  17008.      np End    79     0      79     49     117    0
  17009.      cp End    79     224    79     224    117    224    159
  17010.      np Down   80     0      80     50     145    0
  17011.      cp Down   80     224    80     224    145    224    160
  17012.      np PgDn   81     0      81     51     118    0
  17013.      cp PgDn   81     224    81     224    118    224    161
  17014.      np Ins    82     0      82     48     146    0
  17015.      cp Ins    82     224    82     224    146    224    162
  17016.      np Del    83     0      83     46     147    0
  17017.      cp Del    83     224    83     224    147    224    163
  17018.      np /      224    47     224    47     149    0      164
  17019.      np Enter  224    13     224    13     224    10     166
  17020.  
  17021.  
  17022. ΓòÉΓòÉΓòÉ 13.3.3. Key Codes and Scan Codes Explanation ΓòÉΓòÉΓòÉ
  17023.  
  17024. (This section explains how key codes and scan codes work.  For a reference 
  17025. chart, see the Key Codes and Scan Codes Table.) 
  17026.  
  17027. When you press a single key or a key combination, OS/2 translates your 
  17028. keystroke into two numbers:  a scan code, representing the actual key that was 
  17029. pressed, and an ASCII code, representing the ASCII value for that key.  OS/2 
  17030. returns these numbers the next time a program requests keyboard input.  This 
  17031. section explains how key codes work; for information on using them with 4OS2 
  17032. see the 4OS2.INI file key mapping directives, keystroke aliases, and INKEY. 
  17033.  
  17034. Most 4OS2 commands that use the numeric key codes listed here also use key 
  17035. names, which are usually more convenient to use than the numeric codes.  See 
  17036. Keys and Key Names for more information. 
  17037.  
  17038. As PCs have evolved, the structure of keyboard codes has evolved somewhat 
  17039. haphazardly with them, resulting in a bewildering array of possible key codes. 
  17040. We'll give you a basic explanation of how key codes work.  For a more in-depth 
  17041. discussion, refer to a BIOS or PC hardware reference manual. 
  17042.  
  17043. The nuances of how your keyboard behaves depends on the keyboard manufacturer, 
  17044. the computer manufacturer who provides the built-in BIOS, and your operating 
  17045. system.  As a result, we can't guarantee the accuracy of the information in the 
  17046. tables for every system, but the discussion and reference table should be 
  17047. accurate for most systems.  Our discussion is based on the 101-key "enhanced" 
  17048. keyboard commonly used on 286, 386, 486, and Pentium computers, but virtually 
  17049. all of it is applicable to the 84-key keyboards on older systems.  The primary 
  17050. difference is that older keyboards lack a separate cursor pad and only have 10 
  17051. function keys. 
  17052.  
  17053. All keys have a scan code, but not all have an ASCII code.  For example, 
  17054. function keys and cursor keys are not part of the ASCII character set and have 
  17055. no ASCII value, but they do have a scan code.  Some keys have more than one 
  17056. ASCII code.  The A, for example, has ASCII code 97 (lower case "a") if you 
  17057. press it by itself.  If you press it along with Shift, the ASCII code changes 
  17058. to 65 (upper case "A").  If you press Ctrl and A the ASCII code changes to 1. 
  17059. In all these cases, the scan code (30) is unchanged because you are pressing 
  17060. the same physical key. 
  17061.  
  17062. Things are different if you press Alt-A.  Alt keystrokes have no ASCII code, so 
  17063. OS/2 returns an ASCII code of 0, along with the A key's scan code of 30.  This 
  17064. allows a program to detect all the possible variations of A, based on the 
  17065. combination of ASCII code and scan code. 
  17066.  
  17067. Some keys generate more than one scan code depending on whether Shift, Ctrl, or 
  17068. Alt is pressed.  This allows a program to differentiate between two different 
  17069. keystrokes on the same key, neither of which has a corresponding ASCII value. 
  17070. For example, F1 has no ASCII value so it returns an ASCII code of 0, and the F1 
  17071. scan code of 59.  Shift-F1 also returns an ASCII code 0; if it also returned a 
  17072. scan code of 59, a program couldn't distinguish it from F1.  The operating 
  17073. system translates scan codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so 
  17074. that each variation returns a different scan code along with an ASCII code of 
  17075. 0. 
  17076.  
  17077. On the 101-key keyboard there's one more variation:  non-ASCII keys on the 
  17078. cursor keypad (such as up-arrow) return the same scan code as the corresponding 
  17079. key on the numeric keypad, for compatibility reasons.  If they also returned an 
  17080. ASCII code of 0, a program couldn't tell which key was pressed.  Therefore, 
  17081. these cursor pad keys return an ASCII code of 224 rather than 0.  This means 
  17082. that older programs, which only look for an ASCII 0 to indicate a non-ASCII 
  17083. keystroke like up-arrow, may not detect these cursor pad keys properly. 
  17084.  
  17085. The number of different codes returned by any given key varies from one (for 
  17086. the spacebar) to four, depending on the key, the design of your keyboard, and 
  17087. the operating system.  Some keys, like Alt, Ctrl, and Shift by themselves or in 
  17088. combination with each other, plus Print Screen, SysReq, Scroll Lock, Pause, 
  17089. Break, Num Lock, and Caps Lock keys, do not have any code representations at 
  17090. all.  The same is true of keystrokes with more than one modifying key, like 
  17091. Ctrl-Shift-A.  The operating system may perform special actions automatically 
  17092. when you press these keys (for example, it switches into Caps Lock mode when 
  17093. you press Caps Lock), but it does not report the keystrokes to whatever program 
  17094. is running.  Programs which detect such keystrokes access the keyboard hardware 
  17095. directly, a subject which is beyond the scope of this manual. 
  17096.  
  17097.  
  17098. ΓòÉΓòÉΓòÉ 13.3.4. ANSI ΓòÉΓòÉΓòÉ
  17099.  
  17100. This section is a quick-reference to commonly-used ANSI commands. 
  17101.  
  17102. An ANSI command string consists of three parts: 
  17103.  
  17104.         ESC[                The ASCII character ESC, followed by a left 
  17105.                             bracket.  These two characters must be present in 
  17106.                             all ANSI strings. 
  17107.         parameters          Optional parameters for the command.  If there are 
  17108.                             multiple parameters they are separated by 
  17109.                             semicolons. 
  17110.         cmd                 A single-letter command.  The case of the letter IS 
  17111.                             meaningful. 
  17112.  
  17113.  For example, to position the cursor to row 7, column 12 the ANSI command is: 
  17114.  
  17115.           ESC[7;12H
  17116.  
  17117.  To transmit ANSI commands to the screen with 4OS2, you should use the ECHO 
  17118.  command.  The ESC character can be generated by inserting it into the string 
  17119.  directly (if you are putting the string in a batch file and your editor will 
  17120.  insert such a character), or by using 4OS2's internal "escape" character 
  17121.  (caret, [^]) followed by a lower-case "e".  For example, the sequence shown 
  17122.  above could be transmitted from a batch file with either of these commands 
  17123.  (the first uses an ESC character directly; the second uses ^e): 
  17124.  
  17125.           echo 2H
  17126.           echo ^e[7;12H
  17127.  
  17128.  You can also include ANSI commands in your prompt, using $e to transmit the 
  17129.  ESC character.  You can NOT use PROMPT to transmit ANSI commands to the screen 
  17130.  from a batch file (see PROMPT). 
  17131.  
  17132.  Commands 
  17133.  
  17134.         ESC[rowsA               Cursor up 
  17135.         ESC[rowsB               Cursor down 
  17136.         ESC[colsC               Cursor right 
  17137.         ESC[colsD               Cursor left 
  17138.         ESC[row;colH            Set cursor position (top left is row 1, column 
  17139.                                 1) 
  17140.         ESC[2J                  Clear screen 
  17141.         ESC[K                   Clear from cursor to end of line 
  17142.         ESC[row;colf            Set cursor position, same as "H" command 
  17143.         ESC[attr;attr;...m      Set display attributes; see table of attribute 
  17144.                                 values below 
  17145.         ESC[s                   Save cursor position (may not be nested) 
  17146.         ESC[u                   Restore cursor position after a save 
  17147.  
  17148.  Display Attributes 
  17149.  
  17150.         0           All attributes off (normal white on black) 
  17151.         1           High intensity (bold) 
  17152.         2           Normal intensity 
  17153.         4           Underline (usually effective only on monochrome displays) 
  17154.         5           Blinking 
  17155.         7           Reverse Video 
  17156.         8           Invisible 
  17157.         30-37       Set the foreground color: 
  17158.                       30=Black  31=Red    32=Green  33=Yellow 
  17159.                       34=Blue   35=Magenta  36=Cyan   37=White 
  17160.         40-47       Set the background color, same values as above but 
  17161.                     substitute 40 for 30 etc. 
  17162.  
  17163.  Settings are cumulative, so (for example) to set bright red foreground set all 
  17164.  attributes off, then set red, then bold, use: 
  17165.  
  17166.           echo ^e[0;31;1m
  17167.  
  17168.  Examples 
  17169.  
  17170.  Clear the display attributes, then set the display to bright cyan on blue, and 
  17171.  clear the screen: 
  17172.  
  17173.           echo ^e[0;44;36;1m^e[2J
  17174.  
  17175.  Set up a prompt which saves the cursor position, displays the 4OS2 shell 
  17176.  level, date, and time on the top line in bright white on magenta, and then 
  17177.  restores the cursor position and sets the color to bright cyan on blue, and 
  17178.  displays the standard prompt: 
  17179.  
  17180.           prompt $e[s$e[1;1f$e[0;45;37;1m$e[K($z) $d $t$e[u$e[0;44;36;1m$p$g
  17181.  
  17182.  
  17183. ΓòÉΓòÉΓòÉ 13.4. Glossary ΓòÉΓòÉΓòÉ
  17184.  
  17185. The glossary contains over 200 terms, and is divided into sections by the first 
  17186. letter of each term.  Select the section you want to review: 
  17187.  
  17188. 4 A B C D E F G H I K L M N O P R S T U V W X 
  17189.  
  17190.  
  17191. ΓòÉΓòÉΓòÉ 13.4.1. Glossary - 4 ΓòÉΓòÉΓòÉ
  17192.  
  17193. A B C D E F G H I K L M N O P R S T U V W X 
  17194.  
  17195. 4EXIT:  A batch file which is executed whenever 4OS2 exits. 
  17196.  
  17197. 4START:  A batch file which is executed whenever 4OS2 starts. 
  17198.  
  17199.  
  17200. ΓòÉΓòÉΓòÉ 13.4.2. Glossary - A ΓòÉΓòÉΓòÉ
  17201.  
  17202. 4 B C D E F G H I K L M N O P R S T U V W X 
  17203.  
  17204. Alias Parameter:  A numbered variable (e.g. %2) included in an alias 
  17205. definition, allowing a different value to be used in the alias each time it is 
  17206. executed. 
  17207.  
  17208. Alias:  A shorthand name for a command or series of commands. 
  17209.  
  17210. AND:  A logical combination of two true or false conditions.  If both 
  17211. conditions are true, the result is true; if either condition is false, the 
  17212. result is false. 
  17213.  
  17214. ANSI:  Usually a reference to ANSI control sequences, standardized sequences of 
  17215. text characters which control colors on the screen, manipulate the cursor, and 
  17216. redefine keys.  OS2 includes support for ANSI screen and cursor control 
  17217. sequences.  The abbreviation ANSI is for American National Standards Institute, 
  17218. an organization whch sets standards for computer-related systems, including 
  17219. "ANSI" screen control sequences. 
  17220.  
  17221. Append:  Concatenation of one file or string onto the end of another (this use 
  17222. is not related to the DOS and OS/2 external command named APPEND). 
  17223.  
  17224. Application:  A program run from the command prompt or a batch file.  Used 
  17225. broadly to mean any program other than the command processor; and more narrowly 
  17226. to mean a program with a specific purpose such as a spreadsheet or word 
  17227. processing program, as opposed to a utility. 
  17228.  
  17229. Archive:  A file attribute indicating that the file has been modified since the 
  17230. last backup (most backup programs clear this attribute).  Also sometimes refers 
  17231. to a single file (such as a .ZIP file) which contains a number of other files 
  17232. in compressed form. 
  17233.  
  17234. Argument:  See Parameter. 
  17235.  
  17236. ASCII File:  A file containing ASCII text, as opposed to a binary file which 
  17237. may contain numbers, or other information that cannot be sensibly interpreted 
  17238. as text. 
  17239.  
  17240. ASCII:  The American Standard Code for Information Interchange, which defines 
  17241. numeric values for 128 different characters comprising the English alphabet, 
  17242. numbers, punctuation, and some control characters. 
  17243.  
  17244. Attribute:  A characteristic of a file which can be set or cleared.  The 
  17245. standard attributes are Read-Only, Hidden, System, and Archive; other 
  17246. attributes include Directory and Volume Label. 
  17247.  
  17248. Automatic Batch Files:  See 4START and 4EXIT. 
  17249.  
  17250. Automatic Directory Change:  A 4OS2 feature which allows you to change 
  17251. directories by typing the directory name and a backslash [\] at the prompt. 
  17252.  
  17253.  
  17254. ΓòÉΓòÉΓòÉ 13.4.3. Glossary - B ΓòÉΓòÉΓòÉ
  17255.  
  17256. 4 A C D E F G H I K L M N O P R S T U V W X 
  17257.  
  17258. Base Name:  The file name without a drive, path, or extension.  For example, in 
  17259. the file name C:\DIR1\LETTER.DAT the base name is LETTER. 
  17260.  
  17261. BAT File:  See Batch File. 
  17262.  
  17263. Batch File:  A text file containing a sequence of commands for the command 
  17264. processor to execute.  Batch files are used to save command sequences so that 
  17265. they can be re-executed at any time, transferred to another system, etc.  The 
  17266. extension of a batch file may be .BAT, .CMD, or .BTM, depending on the 
  17267. operating system and command processor you are using. 
  17268.  
  17269. Batch File Parameter:  A numbered variable (e.g. %2) used within a batch file, 
  17270. allowing a different value to be used at that spot in the file each time it is 
  17271. executed. 
  17272.  
  17273. Binary File:  A file containing information which does not represent or cannot 
  17274. sensibly be interpreted as text.  See also ASCII File. 
  17275.  
  17276. BIOS or Basic Input Output System:  The software (or "firmware") stored on 
  17277. chips inside PC systems.  The BIOS provides basic low-level control of devices 
  17278. required to operate the system, such as the keyboard, floppy disk, and screen; 
  17279. it also handles system self-tests at startup, and intiates loading of the 
  17280. operating system. 
  17281.  
  17282. Block Device:  A physical device for input or output which can transmit or 
  17283. receive large blocks of data while the computer is engaged in other activities. 
  17284. Examples include disk, tape, and CD-ROM drives.  See also Character Device. 
  17285.  
  17286. Boot Directory:  The current directory at the time the system is booted, 
  17287. usually the root directory of the boot drive. 
  17288.  
  17289. Boot Drive:  The disk drive that the system is booted from, usually A: (the 
  17290. floppy disk) or C: (the hard disk). 
  17291.  
  17292. Boot:  The process of starting the computer and loading the operating system 
  17293. into memory.  See also Reboot, Cold Reboot, and Warm Reboot. 
  17294.  
  17295. Break:  A signal sent to a program to tell it to halt what it is doing.  The 
  17296. Ctrl-C key  or Ctrl-Break key is used to send this signal.  Some external 
  17297. commands abort when they receive a break signal; others return to a previous 
  17298. screen or menu, or abort the current operation. 
  17299.  
  17300. BTM File:  A special type of 4OS2 batch file which is loaded into memory to 
  17301. speed up execution. 
  17302.  
  17303. Buffer:  An area of memory set aside for storage.  For example, disk buffers 
  17304. are used to save information as it is transferred between your program and the 
  17305. disk, and the keyboard buffer holds keystrokes until a program can use them. 
  17306.  
  17307.  
  17308. ΓòÉΓòÉΓòÉ 13.4.4. Glossary - C ΓòÉΓòÉΓòÉ
  17309.  
  17310. 4 A B D E F G H I K L M N O P R S T U V W X 
  17311.  
  17312. CDFS or CD-ROM File System:  The file system which supports CD-ROM drives. 
  17313. This is typically implemented as a distinct file system in 32-bit operating 
  17314. systems like OS/2 and Windows NT.  On other platforms it is implemented as a 
  17315. component of or addition to the underlying general file system for disk drives. 
  17316.  
  17317. Character Device:  A physical device for input or output which must communicate 
  17318. with your computer one character at a time.  Examples include the console, 
  17319. communications ports, and printers.  See also Block Device. 
  17320.  
  17321. Character Mode:  A display mode in which output is displayed in a fixed font, 
  17322. typically with 80 columns in a line and 25 lines on the screen (some systems 
  17323. allow you to increase the number of rows and columns to other fixed sizes), and 
  17324. which cannot display graphics or pictures.  See also Graphics Mode. 
  17325.  
  17326. CMD File:  See Batch File. 
  17327.  
  17328. CMDLINE:  An environment variable used to extend the command line passed to 
  17329. another program beyond its normal length limits. 
  17330.  
  17331. Cold Reboot:  The process of restarting the computer in a way that physically 
  17332. resets most hardware devices, typically by pressing a reset button, or by 
  17333. turning the power off and back on.  See also Warm Reboot. 
  17334.  
  17335. Command Completion:  A 4OS2 feature which allows you to recall a previous 
  17336. command by typing the first few letters of the command, then an up-arrow or 
  17337. down-arrow. 
  17338.  
  17339. Command Echoing:  A feature which displays commands as they are executed. 
  17340. Echoing can be turned on and off. 
  17341.  
  17342. Command Grouping:  A 4OS2 feature which allows you to group several commands 
  17343. with parentheses, and have them treated as a single command for most purposes. 
  17344.  
  17345. Command History Window:  A pop-up window used by 4OS2 to display the command 
  17346. history, allowing you to choose a previous command to modify and/or execute. 
  17347.  
  17348. Command History:  A 4OS2 feature which retains commands you have executed, so 
  17349. that they can be modified and re-executed later. 
  17350.  
  17351. Command Processor:  A program which interprets commands and executes other 
  17352. programs.  Sometimes also called a Command Interpreter. 
  17353.  
  17354. Command Recall:  See Command History. 
  17355.  
  17356. Command Separator:  A character used to separate multiple commands on the same 
  17357. command line. 
  17358.  
  17359. Command Tail:  The portion of a command consisting of all the arguments, i.e., 
  17360. everything but the command name itself. 
  17361.  
  17362. Compound Command:  See Multiple Commands. 
  17363.  
  17364. Compression:  An operating system feature which compresses data as it is stored 
  17365. in a disk file, and decompresses it as it is read back, resulting in more 
  17366. efficient use of disk space (at a slight cost in processor time to perform the 
  17367. compression and decompression).  More generally, an approach to data storage 
  17368. which reduces repeated or redundant information to a smaller number of bytes in 
  17369. the compressed version than in the original, in order to minimize the space 
  17370. required to store the information. 
  17371.  
  17372. COMSPEC:  An environment variable which defines where to find the 
  17373. character-mode command processor to start a secondary shell. 
  17374.  
  17375. Conditional Commands:  A 4OS2 feature allowing commands to be executed or 
  17376. skipped depending on the results of a previous command.  See also Exit Code. 
  17377.  
  17378. Console:  The PC keyboard and display. 
  17379.  
  17380. Console Mode:  See Character Mode. 
  17381.  
  17382. Control Character:  A character which is part of the ASCII code, but does not 
  17383. have a normal text representation, and which can usually be generated by 
  17384. pressing the Ctrl key along with another key. 
  17385.  
  17386. Coprocessor:  See Numeric Coprocessor. 
  17387.  
  17388. Country Settings:  The internal settings which tell the operating system how to 
  17389. interpret keyboard characters which vary from country to country, which 
  17390. character set to use, and how to retrieve and display date, time, and other 
  17391. information in the format appropriate to a particular country.  See also Code 
  17392. Page. 
  17393.  
  17394. CPU:  The Central Processing Unit which performs all logic and most 
  17395. calculations in a computer.  In PC-compatible systems, the CPU is on a single 
  17396. microprocessor chip. 
  17397.  
  17398. CR or Carriage Return:  The ASCII character "carriage return" (decimal value 
  17399. 13), generated by pressing the Enter key on the keyboard, and stored in most 
  17400. ASCII files at the end of each line. 
  17401.  
  17402. Critical Error:  An error, usually related to a physical or hardware problem 
  17403. with input, output, or network access, which prevents a program from 
  17404. continuing. 
  17405.  
  17406. Current Directory:  The directory in which all file operations will take place 
  17407. unless otherwise specified.  The current directory is typically displayed as 
  17408. part of the command prompt.  Also called the Current Working Directory. 
  17409.  
  17410. Current Drive:  The disk drive on which all file operations will take place 
  17411. unless otherwise specified.  The current drive is typically displayed as part 
  17412. of the command prompt. 
  17413.  
  17414. Cursor:  A movable marker on the screen to show where text will be entered when 
  17415. you type at the keyboard, or which object on the screen will be affected when a 
  17416. mouse button is clicked.  In character mode only the text cursor is available; 
  17417. graphical systems typically show both a mouse cursor and, when text can be 
  17418. entered, a separate text cursor. 
  17419.  
  17420.  
  17421. ΓòÉΓòÉΓòÉ 13.4.5. Glossary - D ΓòÉΓòÉΓòÉ
  17422.  
  17423. 4 A B C E F G H I K L M N O P R S T U V W X 
  17424.  
  17425. Date Range:  A 4OS2 feature which allows you to select files based on the date 
  17426. and time they were last modified. 
  17427.  
  17428. Date Stamp:  Information stored in a file's directory entry to show the dates 
  17429. on which the file was created, last modified, and last accessed.  Creation and 
  17430. last access dates are not available in the FAT file system.  See also Time 
  17431. Stamp. 
  17432.  
  17433. Default Directory:  See Current Directory 
  17434.  
  17435. Default Drive:  See Current Drive. 
  17436.  
  17437. Delete Tracking:  An operating system or utility software feature which is 
  17438. designed to allow you to "undelete" or recover files which have recently been 
  17439. deleted.  Delete tracking typically works by temporarily retaining the deleted 
  17440. files and/or information about the deleted files in a special area of the disk. 
  17441.  
  17442. Description:  A string of characters assigned to describe a file with the 4OS2 
  17443. DESCRIBE command. 
  17444.  
  17445. Destination:  In file processing commands (e.g. COPY or MOVE), the name or 
  17446. directory files should have after any copying or modification has taken place, 
  17447. generally the last specification on the command line.  See also Source. 
  17448.  
  17449. Detached Process:  A program which is "detached" from the normal means of user 
  17450. input and output, and cannot use the keyboard, mouse, or video display. 
  17451.  
  17452. Device Driver:  A program which allows the operating system to communicate with 
  17453. a device, and which is loaded into memory when the system boots.  Device 
  17454. drivers are also used to manage memory or for other similar internal functions. 
  17455.  
  17456. Device:  A physical device for input or output such as the console, a 
  17457. communications port, or a printer.  Sometimes "device" is used to refer to 
  17458. character devices, and excludes block devices. 
  17459.  
  17460. Directive:  An individual item in the 4OS2.INI file, used to control the 
  17461. configuration of 4OS2. 
  17462.  
  17463. Directory:  A portion of any disk, identified by a name and a relationship to 
  17464. other directories in a "tree" structure, with the tree starting at the root 
  17465. directory.  A directory separates files on the disk into logical groups, but 
  17466. does not represent a physical division of the data on the disk. 
  17467.  
  17468. Directory History:  A 4OS2 feature which allows you to recall recently-used 
  17469. directory names in a popup window, and choose one to switch to. 
  17470.  
  17471. Directory History Window:  See Directory History. 
  17472.  
  17473. Directory Stack:  A 4OS2 feature, implemented through the PUSHD and POPD 
  17474. commands, which allows you to save the current directory and return to it 
  17475. later.  See also Stack. 
  17476.  
  17477. Directory Tree:  The branching structure of directories on a hard disk, 
  17478. starting at the root directory.  The root of the tree is usually considered as 
  17479. the "top" of the structure, so the actual structure can be visualized as an 
  17480. upside-down tree with the root at the top and branches going "down".  A portion 
  17481. or branch of the directory tree is sometimes called a "subtree". 
  17482.  
  17483. DOS Memory:  See Base Memory. 
  17484.  
  17485. DOS Session:  See Session. 
  17486.  
  17487. DPMI or DOS Protected Mode Interface:  A specification which allows DOS 
  17488. programs to access memory beyond 1 MB in order to manage larger programs or 
  17489. larger amounts of information than will fit in base memory.  DPMI support for 
  17490. DOS programs is provided by some DOS memory managers, and by OS/2, Windows 3.1 
  17491. and above, Windows 95, and Windows NT. 
  17492.  
  17493. Drive Letter:  A letter used to designate a specific local disk volume, or part 
  17494. or all of a network server drive.  In most cases drive letters range from A - 
  17495. Z, but some network operating systems allow the use of certain punctuation 
  17496. characters as drive letters in order to support more than 26 volumes. 
  17497.  
  17498.  
  17499. ΓòÉΓòÉΓòÉ 13.4.6. Glossary - E ΓòÉΓòÉΓòÉ
  17500.  
  17501. 4 A B C D F G H I K L M N O P R S T U V W X 
  17502.  
  17503. Echo:  See Command Echoing. 
  17504.  
  17505. Environment:  An area of memory which contains multiple entries in the form 
  17506. "NAME=value".  See also Master Environment and Passed Environment. 
  17507.  
  17508. Environment Variable:  The name of a single entry in the environment. 
  17509.  
  17510. Error Level:  A numeric value between 0 and 255 returned from an external 
  17511. command to indicate its result (e.g., success, failure, response to a 
  17512. question).  See also Exit Code. 
  17513.  
  17514. Escape Character:  In some contexts, the 4OS2 escape character, which is used 
  17515. to suppress the normal meaning of or give special meaning to the following 
  17516. character.  In other cases, the specific ASCII character ESC.  The meaning must 
  17517. be determined from the context. 
  17518.  
  17519. Escape Sequence:  A sequence of text characters which has a special meaning and 
  17520. is not treated as normal text.  For example, the character sequence <ESC>]K 
  17521. (where <ESC> is the ASCII "escape" character, decimal value 27) will cause an 
  17522. ANSI driver to clear the screen from the cursor to the end of the current line, 
  17523. rather than simply displaying the string "ESC]K" on the screen.  Similarly, in 
  17524. 4OS2, the escape sequence ^f on the command line is translated to a form feed, 
  17525. and is not treated as the literal characters "^f". 
  17526.  
  17527. Executable Extensions:  A 4OS2 feature which allows you to specify the 
  17528. application to be executed when a file with a particular extension is named at 
  17529. the command prompt. 
  17530.  
  17531. Executable File:  A file, usually with the extension .COM or .EXE, which can be 
  17532. loaded into memory and run as a program. 
  17533.  
  17534. Exit Code:  The result code returned by an external command or an internal 
  17535. command.  4OS2 internal commands return an exit code of 0 if successful, or 
  17536. non-zero if unsuccessful.  See also Errorlevel. 
  17537.  
  17538. Expansion:  The process 4OS2 goes through when it scans a command line and 
  17539. substitutes the appropriate actual values for aliases, alias parameters, batch 
  17540. file parameters, and environment variables.  See also Parsing. 
  17541.  
  17542. Extended ASCII Character:  A character which is not part of the standard set of 
  17543. 128 ASCII characters, but is used on the PC as part of an extended set of 256 
  17544. characters.  These characters include international language symbols, and box 
  17545. and line drawing characters. 
  17546.  
  17547. Extended Attributes:  An OS/2 High Performance File System (HPFS) feature which 
  17548. allows storage of additional information about a file, separate from the file 
  17549. itself.  Extended attributes are typically used to store icons for executable 
  17550. files, property or settings information, and other information added by the 
  17551. user. 
  17552.  
  17553. Extended Directory Search:  A 4OS2 feature which maintains a directory search 
  17554. "database" or list, typically including all directories in your system, and 
  17555. allows you to change quickly to any directory in the list. 
  17556.  
  17557. Extended Key Code:  The code for a key on the PC keyboard which has no 
  17558. representation in the standard ASCII character set, such as a function key, 
  17559. cursor key, or Alt plus another key.  The extended key code for a key is often 
  17560. the same as the scan code for that key. 
  17561.  
  17562. Extended Memory:  Any memory on a computer system with a 286, 386, 486, or 
  17563. Pentium processor which is above the first 1 MB (one megabyte, or 1024*1024 
  17564. bytes) of memory.  See also XMS. 
  17565.  
  17566. Extended Parent Directory Names:  A 4OS2 feature which allows you to use 
  17567. additional periods in a directory name to represent directories which are 
  17568. successively higher in the directory tree. 
  17569.  
  17570. Extended Wildcard:  A 4OS2 feature which extends the traditional wildcard 
  17571. syntax and allows you to use multiple wildcard characters, and character ranges 
  17572. (e.g. [a-f] for the letters A through F).  See also Wildcard. 
  17573.  
  17574. Extension:  The final portion of a file name, preceded by a period.  For 
  17575. example, in the file name C:\DIR1\LETTER.DAT the extension is .DAT.  In a long 
  17576. filename which contains multiple periods, the extension is usually considered 
  17577. to be the portion of the name after the final period. 
  17578.  
  17579. External Command:  A program which resides in an executable file, as opposed to 
  17580. an internal command which is part of the command processor. 
  17581.  
  17582. EXTPROC:  A command processor feature which allows you to designate a specific 
  17583. external program to run a particular batch file. 
  17584.  
  17585.  
  17586. ΓòÉΓòÉΓòÉ 13.4.7. Glossary - F ΓòÉΓòÉΓòÉ
  17587.  
  17588. 4 A B C D E G H I K L M N O P R S T U V W X 
  17589.  
  17590. FAT File System:  The traditional file system used by DOS to store files on 
  17591. diskettes and hard disks; also supported by OS/2 and Windows NT.  Uses a File 
  17592. Allocation Table to keep track of allocated and unallocated space on the disk. 
  17593.  
  17594. FAT-Compatible File Name:  See SFN. 
  17595.  
  17596. FF or Form Feed:  The ASCII character "form feed" (decimal value 12), which 
  17597. typically causes a printer to skip to a new page.  The FF character is not 
  17598. normally entered from the keyboard, but in many cases it can be generated, if 
  17599. necessary, by holding the Alt key, pressing 0-1-2, and releasing the Alt key. 
  17600.  
  17601. File Attribute:  See Attribute. 
  17602.  
  17603. File Description:  See Description. 
  17604.  
  17605. File Exclusion Range:  A 4OS2 feature which allows you to exclude files from 
  17606. processing by internal commands based on their names. 
  17607.  
  17608. Filename Completion:  A 4OS2 feature which allows you to type part of a 
  17609. filename on the command line, and have the command processor fill in the rest 
  17610. for you. 
  17611.  
  17612. Free Memory:  Usually, the amount of total memory which is unoccupied and 
  17613. available for applications. 
  17614.  
  17615.  
  17616. ΓòÉΓòÉΓòÉ 13.4.8. Glossary - G ΓòÉΓòÉΓòÉ
  17617.  
  17618. 4 A B C D E F H I K L M N O P R S T U V W X 
  17619.  
  17620. Global Aliases:  A 4OS2 option which allows you to store aliases in a global 
  17621. area accessible to all copies of 4OS2, so that any change made by one copy is 
  17622. immediately available to all other copies.  See also Local Aliases. 
  17623.  
  17624. Global Directory History:  An option which allows you to store the directory 
  17625. history in a global area accessible to all copies of 4OS2, so that any change 
  17626. made by one copy is immediately available to all other copies.  See also Local 
  17627. Directory History. 
  17628.  
  17629. Global History:  A 4OS2 option which allows you to store the command history in 
  17630. a global area accessible to all copies of 4OS2, so that any change made by one 
  17631. copy is immediately available to all other copies.  See also Local History. 
  17632.  
  17633. Graphics Mode:  A display mode in which output is displayed in any one of a 
  17634. range of fonts, typically in resizable windows with a variable number of text 
  17635. rows and columns, and which supports the display of graphics and pictures along 
  17636. with text.  See also Character Mode. 
  17637.  
  17638.  
  17639. ΓòÉΓòÉΓòÉ 13.4.9. Glossary - H ΓòÉΓòÉΓòÉ
  17640.  
  17641. 4 A B C D E F H I K L M N O P R S T U V W X 
  17642.  
  17643. Hidden:  A file attribute indicating that the file should not be displayed with 
  17644. a normal DIR command, and should not be made available to programs unless they 
  17645. specifically request access to hidden files. 
  17646.  
  17647. History Window:  See Command History Window and Directory History. 
  17648.  
  17649. History:  See Command History. 
  17650.  
  17651. HMA or High Memory Area:  The area of PC memory located in the first 64K bytes 
  17652. above the 1 megabyte that DOS can address directly.  The HMA can be made 
  17653. addressable from DOS programs using special hardware facilities, or an XMS 
  17654. driver. 
  17655.  
  17656. HPFS or High Performance File System:  A file system distributed with OS/2 and 
  17657. Windows NT 3.51 and below which allows longer file names, supports larger 
  17658. drives, and provides better performance than the traditional FAT file system. 
  17659.  
  17660.  
  17661. ΓòÉΓòÉΓòÉ 13.4.10. Glossary - I ΓòÉΓòÉΓòÉ
  17662.  
  17663. 4 A B C D E F G H K L M N O P R S T U V W X 
  17664.  
  17665. IFS or Installable File System:  A file system which can be loaded when 
  17666. required to support devices such as CD-ROM or network drives, or non-default 
  17667. disk formats like HPFS (in OS/2) or NTFS (in Windows NT).  Installable file 
  17668. systems are primarily supported 32-bit operating systems like OS/2 and Windows 
  17669. NT.  Depending on operating system design they may be loaded at boot time, or 
  17670. loaded and unloaded dynamically while the system is running. 
  17671.  
  17672. Include List:  A concise method of specifying several files or groups of files 
  17673. in the same directory, for use with all 4OS2 commands which take file names as 
  17674. arguments. 
  17675.  
  17676. Inheritance:  A feature which allows one copy of 4OS2 to "inherit" the .INI 
  17677. file data, aliases, command history, and directory history from a previous 
  17678. copy.  More generally, a system which allows one program to pass information or 
  17679. settings on to another, often to a second copy of the same program. 
  17680.  
  17681. .INI File:  The 4OS2 initialization file containing directives which set the 
  17682. initial configuration of the command processor. 
  17683.  
  17684. Insert Mode:  When editing text, a mode in which newly typed characters are 
  17685. inserted into the line at the cursor position, rather than overwriting existing 
  17686. characters on the line.  See also Overstrike Mode. 
  17687.  
  17688. Internal Command:  A command which is part of the command processor, as opposed 
  17689. to an external command. 
  17690.  
  17691. Internal Variables:  Environment variables created by 4OS2 to provide 
  17692. information about your system.  Internal variables are evaluated each time they 
  17693. are used, and are not actually stored in the environment. 
  17694.  
  17695.  
  17696. ΓòÉΓòÉΓòÉ 13.4.11. Glossary - K ΓòÉΓòÉΓòÉ
  17697.  
  17698. 4 A B C D E F G H I L M N O P R S T U V W X 
  17699.  
  17700. Key Code:  The code passed to a program when a key is pressed on the keyboard. 
  17701. Depending on the key that is pressed, and the software handling the keyboard, 
  17702. the code can be an ASCII code, a scan code, or an extended key code. 
  17703.  
  17704. Key Mapping:  A 4OS2 feature which allows you to assign new keystrokes for 
  17705. command line functions such as manipulating the command history or completing 
  17706. file names. 
  17707.  
  17708. Keyboard Buffer:  A buffer which holds keystrokes you have typed that have not 
  17709. yet been used by the currently executing program. 
  17710.  
  17711. Keystroke Alias:  An alias assigned to a key, so that it can be invoked or 
  17712. recalled with a single keystroke. 
  17713.  
  17714.  
  17715. ΓòÉΓòÉΓòÉ 13.4.12. Glossary - L ΓòÉΓòÉΓòÉ
  17716.  
  17717. 4 A B C D E F G H I K M N O P R S T U V W X 
  17718.  
  17719. Label:  A marker in a batch file, with the format :name, allowing GOTO and 
  17720. GOSUB commands to "jump" to that point in the file.  See also Volume Label. 
  17721.  
  17722. LF or Line Feed:  The ASCII character "line feed" (decimal value 10), stored in 
  17723. most ASCII files at the end of each line, after the CR character.  The LF 
  17724. character is not normally entered from the keyboard, but in many cases it can 
  17725. be generated, if necessary, by pressing Ctrl-Enter. 
  17726.  
  17727. Local Aliases:  A 4OS2 option which allows you to store aliases in a local area 
  17728. only accessible to the current copy of 4OS2, so that a change made in the 
  17729. current copy of 4OS2 does not affect other copies, and vice versa.  See also 
  17730. Global Aliases. 
  17731.  
  17732. Local Directory History:  A 4OS2 option which allows you to store the directory 
  17733. history in a local area only accessible to the current copy of 4OS2, so that a 
  17734. change made in the current copy of 4OS2 does not affect other copies, and vice 
  17735. versa.  See also Global Directory History. 
  17736.  
  17737. Local History:  A 4OS2 option which allows you to store the command history in 
  17738. a local area only accessible to the current copy of 4OS2, so that a change made 
  17739. in the current copy of 4OS2 does not affect other copies, and vice versa.  See 
  17740. also  Global History. 
  17741.  
  17742. Logging:  A 4OS2 feature, implemented via the LOG command, which allows you to 
  17743. save a record of the commands you execute. 
  17744.  
  17745.  
  17746. ΓòÉΓòÉΓòÉ 13.4.13. Glossary - M ΓòÉΓòÉΓòÉ
  17747.  
  17748. 4 A B C D E F G H I K L N O P R S T U V W X 
  17749.  
  17750. Master Environment:  The master copy of the environment maintained by the 
  17751. command processor. 
  17752.  
  17753. Modulo:  The remainder after an integer division.  For example 11 modulo 3 is 
  17754. 2, because when 11 is divided by 3 the remainder is 2. 
  17755.  
  17756. Multiple Commands:  A 4OS2 feature which allows multiple commands to be placed 
  17757. on a line, separated by an ampersand [&], or another, user-defined character. 
  17758.  
  17759. Multitasking:  A capability of some software (and the related hardware) which 
  17760. allows two or more programs to run apparently simultaneously on the same 
  17761. computer.  Multitasking software for PC compatible systems includes operating 
  17762. environments like Windows 3, and complete operating systems like OS/2, Windows 
  17763. 95, and Windows NT. 
  17764.  
  17765.  
  17766. ΓòÉΓòÉΓòÉ 13.4.14. Glossary - N ΓòÉΓòÉΓòÉ
  17767.  
  17768. 4 A B C D E F G H I K L M O P R S T U V W X 
  17769.  
  17770. Network:  A system which allows several computers to be connected together to 
  17771. share files, printers, modems, or other resources, and to pass electronic mail 
  17772. or other information between the systems on the network. 
  17773.  
  17774. Network File System:  Software which runs over a network to allow access to 
  17775. files on the server.  A network file system may support the same options as the 
  17776. file system used on local drives, or it may be more or less restrictive than 
  17777. the local file system about file names, disk volume capacity, and other similar 
  17778. features. 
  17779.  
  17780. NTFS or New Technology File System:  A file system distributed with Windows NT 
  17781. which allows longer file names, supports larger drives, and provides better 
  17782. performance than the traditional FAT file system. 
  17783.  
  17784. Numeric Coprocessor:  A chip which works in conjunction with an Intel 8086, 
  17785. 80286, 80386, 80486, or Pentium CPU to perform decimal arithmetic ("floating 
  17786. point") calculations.  Some 80486s and the Pentium CPU have the numeric 
  17787. coprocessor built in to the CPU chip; in all other cases it is on a physically 
  17788. separate chip, and is optional (when the coprocessor is not avilable, the CPU 
  17789. performs decimal arithmetic through other, much slower methods). 
  17790.  
  17791.  
  17792. ΓòÉΓòÉΓòÉ 13.4.15. Glossary - O ΓòÉΓòÉΓòÉ
  17793.  
  17794. 4 A B C D E F G H I K L M N P R S T U V W X 
  17795.  
  17796. Operating System:  A collection of software which loads when the computer is 
  17797. started, provides services to other software, and ensures that programs don't 
  17798. interfere with each other while they are running. 
  17799.  
  17800. Option:  See Switch. 
  17801.  
  17802. OR:  A logical combination of two true or false conditions.  If both conditions 
  17803. are false the result is false; if either condition is true the result is true. 
  17804.  
  17805. Overstrike Mode:  When editing text, a mode in which newly typed characters 
  17806. overwrite existing characters on the line, rather than being inserted into the 
  17807. line at the cursor position.  See also Insert Mode. 
  17808.  
  17809.  
  17810. ΓòÉΓòÉΓòÉ 13.4.16. Glossary - P ΓòÉΓòÉΓòÉ
  17811.  
  17812. 4 A B C D E F G H I K L M N O R S T U V W X 
  17813.  
  17814. Parameter:  A piece of additional information placed after a command or 
  17815. function name.  For example, in the command DIR XYZ, XYZ is a parameter.  Also 
  17816. used to refer to an alias parameter or batch file parameter. 
  17817.  
  17818. Parent Directory:  The directory in which a particular subdirectory resides, 
  17819. often seen as the directory "above" a subdirectory. 
  17820.  
  17821. Parsing:  The process 4OS2 performs to analyze the command line, perform alias 
  17822. and environment variable expansion, and find the appropriate internal command 
  17823. or external command to execute.  More generally, the process of breaking down a 
  17824. string or message into its individual components in order to process them 
  17825. properly. 
  17826.  
  17827. Passed Environment:  A copy of the master environment created before running an 
  17828. application, so that any changes made by the application will not affect the 
  17829. master environment. 
  17830.  
  17831. Path:  A specification of all the directories a file resides in.  For example, 
  17832. the path for C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Also used to 
  17833. refer to the environment variable PATH, which contains a series of path 
  17834. specifications used when searching for external commands and batch files. 
  17835.  
  17836. Pipe:  A method for collecting the standard output of one program and passing 
  17837. it on as the standard input of the next program to be executed, signified by a 
  17838. vertical bar "|" on the command line.  See also Redirection. 
  17839.  
  17840. Previous Working Directory:  The working directory used most recently, just 
  17841. prior to the current working directory.  For example, if C:\DATA is the current 
  17842. working directory and you switch to D:\UTIL, C:\DATA then becomes the previous 
  17843. working directory. 
  17844.  
  17845. Primary Shell:  The copy of the character-mode command processor which is 
  17846. loaded by the operating system when the system boots or a session opens. 
  17847.  
  17848.  
  17849. ΓòÉΓòÉΓòÉ 13.4.17. Glossary - R ΓòÉΓòÉΓòÉ
  17850.  
  17851. 4 A B C D E F G H I K L M N O P S T U V W X 
  17852.  
  17853. RAM or Random Access Memory:  The physical memory used to store data while a 
  17854. computer is operating.  The information in most types of RAM is lost when power 
  17855. is turned off. 
  17856.  
  17857. RAM Disk:  A pseudo "disk drive", created by software, which appears like a 
  17858. normal physical disk drive to programs.  Sometimes also called a Virtual Disk. 
  17859.  
  17860. Range:  See Date Range, Size Range, Time Range, and File Exclusion Range. 
  17861.  
  17862. Read-Only:  A file attribute indicating that the file can be read, but not 
  17863. written or deleted by the operating system or the command processor unless 
  17864. special commands are used. 
  17865.  
  17866. Reboot:  The process of restarting the computer with software, with the 
  17867. keyboard (e.g. by pressing Ctrl-Alt-Del), by pressing a reset button, or by 
  17868. turning the power off and back on.  See also Cold Reboot and Warm Reboot. 
  17869.  
  17870. Redirection:  A method for collecting output from a program in a file, and/or 
  17871. of providing the input for a program from a file.  See also Pipe. 
  17872.  
  17873. REXX:  A file and text processing language developed by IBM, and available on 
  17874. many PC and other platforms. 
  17875.  
  17876. ROM or Read Only Memory:  A physical memory device used to store information 
  17877. which cannot be readily modified, such as the BIOS built into each PC system. 
  17878. The information in ROM is typically retained when power is turned off. 
  17879.  
  17880. Root Directory:  The first directory on any disk, from which all other 
  17881. directories are "descended."  The root directory is referenced with a single 
  17882. backslash [\]. 
  17883.  
  17884.  
  17885. ΓòÉΓòÉΓòÉ 13.4.18. Glossary - S ΓòÉΓòÉΓòÉ
  17886.  
  17887. 4 A B C D E F G H I K L M N O P R T U V W X 
  17888.  
  17889. Scan Code:  The physical code for a key on the PC keyboard.  For the original 
  17890. U.S. English keyboard layout the scan code represents the physical position of 
  17891. the key, starting with 1 for the key in the upper left corner (Esc), and 
  17892. increasing from left to right and top to bottom.  This order will vary for more 
  17893. recent keyboards or those designed for other countries or languages. 
  17894.  
  17895. Search Path:  See PATH. 
  17896.  
  17897. Secondary Shell:  A copy of the command processor which is started by another 
  17898. program, rather than by the operating system. 
  17899.  
  17900. Session:  A general term for the individual windows or tasks started by a 
  17901. multitasking system.  For example, under OS/2 you might run a DOS application 
  17902. in one session, and 4OS2 in another. 
  17903.  
  17904. Shell:  See Command Processor.  Also used to refer to a program which gives 
  17905. access to operating system functions and commands through a menu- or 
  17906. mouse-driven system, or which replaces the primary user interface of the 
  17907. operating system. 
  17908.  
  17909. Size Range:  A 4OS2 feature which allows you to select files based on their 
  17910. size. 
  17911.  
  17912. Source:  In file processing commands (e.g. COPY or MOVE), the original files 
  17913. before any copying or modification has taken place, i.e., those specified 
  17914. earlier on the command line.  See also Destination. 
  17915.  
  17916. Stack:  An area of memory used by any program to store temporary data while the 
  17917. program is running; more generally, any such storage area where the last item 
  17918. stored is normally the first one removed. 
  17919.  
  17920. Standard Error, Standard Input, and Standard Output:  The file(s) or character 
  17921. device(s) where a program respectively displays error messages, obtains its 
  17922. normal input, and displays its normal output.  Standard error, standard input, 
  17923. and standard output normally refer to the console, unless redirection is used. 
  17924.  
  17925. Subdirectory:  Any directory other than the root directory. 
  17926.  
  17927. Subtree:  See Directory Tree. 
  17928.  
  17929. Swap File:  A disk file created by an operating system or a program to store 
  17930. unused information on disk, and thereby free up memory for other purposes. 
  17931.  
  17932. Switch:  A parameter for an internal command or application which specifies a 
  17933. particular behavior or setting.  For example, the command "DIR /P" might be 
  17934. referred to as "having the /P switch set". 
  17935.  
  17936. System:  A file attribute indicating that the file belongs to the operating 
  17937. system or command processor, and should not be accessed by other programs. 
  17938.  
  17939.  
  17940. ΓòÉΓòÉΓòÉ 13.4.19. Glossary - T ΓòÉΓòÉΓòÉ
  17941.  
  17942. 4 A B C D E F G H I K L M N O P R S U V W X 
  17943.  
  17944. Target:  See Destination. 
  17945.  
  17946. Time Range:  A 4OS2 feature which allows you to select files based on the time 
  17947. they were last modified. 
  17948.  
  17949. Time Stamp:  Information stored in a file's directory entry to show the times 
  17950. at which the file was created, last modified, and last accessed.  Creation time 
  17951. is not available in the FAT file system; last access time is only available in 
  17952. the HPFS and NTFS file systems.  See also Date Stamp. 
  17953.  
  17954. Tree:  See Directory Tree. 
  17955.  
  17956.  
  17957. ΓòÉΓòÉΓòÉ 13.4.20. Glossary - U ΓòÉΓòÉΓòÉ
  17958.  
  17959. 4 A B C D E F G H I K L M N O P R S T V W X 
  17960.  
  17961. UMB or Upper Memory Block:  An XMS Upper Memory Block, whose address is above 
  17962. the end of base memory (normally, above 640K), but within the 1 megabyte of 
  17963. memory that DOS can address directly. 
  17964.  
  17965. UNC or Universal Naming Convention:  A common method for accessing files on a 
  17966. network drive without using a "mapped" drive letter.  Names specified this way 
  17967. are called UNC names, and typically appear as \\server\volume\path\filename, 
  17968. where server is the name of the network server where the files reside, volume 
  17969. is the name of a disk volume on that server, and the path\filename portion is a 
  17970. directory name and file name. 
  17971.  
  17972.  
  17973. ΓòÉΓòÉΓòÉ 13.4.21. Glossary - V ΓòÉΓòÉΓòÉ
  17974.  
  17975. 4 A B C D E F G H I K L M N O P R S T U W X 
  17976.  
  17977. Variable Expansion:  The process of scanning a command line and replacing each 
  17978. environment variable name, alias parameter, or batch file parameter with its 
  17979. value. 
  17980.  
  17981. Variable Functions:  Functions provided by 4OS2 to manipulate strings, dates, 
  17982. and filenames; perform arithmetic; read and write files; and perform other 
  17983. similar functions.  Variable functions are similar to static environment 
  17984. variables or internal variables, but have parameters and can perform actions 
  17985. rather than just returning static information. 
  17986.  
  17987. Variable:  See Alias Parameter, Batch File Parameter, and Environment Variable. 
  17988.  
  17989. Virtual Disk:  See RAM Disk. 
  17990.  
  17991. Volume Label:  A special, hidden file placed on any disk, whose name 
  17992. constitutes a "label" for the entire disk. 
  17993.  
  17994. Volume:  See Disk Drive. 
  17995.  
  17996.  
  17997. ΓòÉΓòÉΓòÉ 13.4.22. Glossary - W ΓòÉΓòÉΓòÉ
  17998.  
  17999. 4 A B C D E F G H I K L M N O P R S T U V X 
  18000.  
  18001. Warm Reboot:  The process of restarting the computer with software, or with the 
  18002. keyboard (e.g. by pressing Ctrl-Alt-Del), typically without physically 
  18003. resetting any hardware devices.  See also Cold Reboot. 
  18004.  
  18005. White Space Character:  A character used to separate arguments on the command 
  18006. line.  The white space characters recognized by 4OS2 are the space, tab, and 
  18007. comma. 
  18008.  
  18009. Wildcard:  A character ("*" or "?") used in a filename to specify the 
  18010. possibility that any single character ("?") or sequence of characters ("*") can 
  18011. occur at that point in the actual name.  See also Extended Wildcard. 
  18012.  
  18013. Windows NT File System:  See NTFS. 
  18014.  
  18015.  
  18016. ΓòÉΓòÉΓòÉ 13.4.23. Glossary - X ΓòÉΓòÉΓòÉ
  18017.  
  18018. 4 A B C D E F G H I K L M N O P R S T U V W 
  18019.  
  18020. XOR (exclusive OR):  A logical combination of two true or false conditions.  If 
  18021. both conditions are false or both conditions are true the result is false; if 
  18022. either condition is true and the other is false the result is true.