home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / os2 / 4os210.arj / 4OS2.INF (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1992-06-08  |  135.1 KB  |  4,851 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About 4OS2 Help ΓòÉΓòÉΓòÉ
  3.  
  4. 4OS2 On-line Documentation (Version 1.0, 5/29/92) 
  5.  
  6. Text by Rex Conn and Tom Rawson, converted to OS/2 format by Matthew J. Palcic. 
  7.  
  8. Copyright 1992, Rex Conn and JP Software Inc., All Rights Reserved. 4OS2 is a 
  9. trademark and 4DOS is a registered trademark of JP Software Inc.  OS/2 is a 
  10. registered trademark of IBM Corporation.  Other product and company names are 
  11. trademarks of their respective owners. 
  12.  
  13. This online help system for 4OS2 covers all 4OS2 features and internal 
  14. commands.  It includes reference information to assist you in using 4OS2 and 
  15. developing batch files; however it does not include all of the details which 
  16. are included in the printed 4OS2 and 4DOS manuals. 
  17.  
  18. The help system is fully indexed and cross-indexed.  It is also 
  19. context-sensitive; if you press F1 with a command already on the 4OS2 command 
  20. line, the help system will display help for that command.  If the line is blank 
  21. when you press F1, the help topic index is displayed. 
  22.  
  23. You can obtain "quick help" for any 4OS2 command directly on your 4OS2 screen 
  24. or window (without starting VIEW or switching back to the desktop) by entering 
  25. the command at the prompt followed by a /?. The quick help displays the syntax, 
  26. purpose, and switches for the command. 
  27.  
  28. 05/92-1.0A 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ 2. Using 4OS2 ΓòÉΓòÉΓòÉ
  32.  
  33. This section includes information on: 
  34.  
  35.         Differences between 4DOS and 4OS2 
  36.         Command line editing keys 
  37.         Internal variables 
  38.         Variable functions 
  39.         Redirection 
  40.         Command grouping 
  41.         Wildcards 
  42.  
  43.  See the individual topics for details. 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ 2.1. 4OS2 and 4DOS ΓòÉΓòÉΓòÉ
  47.  
  48. Most 4DOS commands and features work the same way in 4OS2.  However if you're 
  49. an experienced 4DOS user or want to use the same batch files and aliases in 
  50. both 4OS2 and 4DOS, there are some differences between 4DOS and 4OS2 you should 
  51. be aware of.  Those differences are listed here. 
  52.  
  53. (Several items below list elements of 4DOS which are not available under 4OS2. 
  54. In all cases these items have been removed from 4OS2 because they are specific 
  55. to DOS or for other similar reasons are not relevant or cannot be implemented 
  56. under OS/2.) 
  57.  
  58.     *   The default command separator is ^ in 4DOS; in 4OS2 it is & (for 
  59.         compatibility with CMD.EXE).  You can change it in 4OS2.INI or with the 
  60.         SETDOS /C command. 
  61.  
  62.     *   The default escape separator is  (Control-X) in 4DOS; in 4OS2 it is ^ 
  63.         (for compatibility with CMD.EXE).  You can change it in 4OS2.INI or 
  64.         with the SETDOS /E command. 
  65.  
  66.     *   The alias and variable parameter syntax is %n& in 4DOS; in 4OS2 it is 
  67.         %n$ (because & is normally used in 4OS2 as the command separator).  You 
  68.         can change it with the ParameterChar directive in 4OS2.INI or with the 
  69.         SETDOS /P command. 
  70.  
  71.     *   The following 4DOS commands do not exist in 4OS2: 
  72.  
  73.                BREAK            KEYSTACK         SWAPPING
  74.                CTTY             LOADHIGH / LH    TRUENAME
  75.  
  76.     *   The following 4DOS internal variables and variable functions do not 
  77.         exist in 4OS2: 
  78.  
  79.                %_ALIAS          %@EMS[]          %@REMOVABLE[]
  80.                %_DV             %@EXTENDED[]     %@TRUENAME[]
  81.                %_ENV            %@LPT[]          %@XMS[]
  82.                %_WIN
  83.  
  84.     *   New internal variables and variable functions available only in 4OS2 
  85.         include: 
  86.  
  87.                %_PID            %_SID            %@EXETYPE[]
  88.                %_PPID           %_PTYPE          %@FSTYPE[]
  89.  
  90.         Also the %_VIDEO internal variable returns some additional values in 
  91.         4OS2.  See 4OS2 Internal Variables and 4OS2 Variable Functions for more 
  92.         information. 
  93.  
  94.     *   The following 4DOS.INI directives cannot be used in 4OS2.INI: 
  95.  
  96.                Alias            Environment      ReserveTPA
  97.                ANSI             FineSwap         StackSize
  98.                AutoExecPath     FullINT2E        Swapping
  99.                ChangeTitle      HelpOptions      SwapReopen
  100.                CopyEA           HelpPath         UMBEnvironment
  101.                DiskReset        LineInput        UMBLoad
  102.                DRSets           MessageServer    UniqueSwapName
  103.                DVCleanup        NetwareNames
  104.                EnvFree          Reduce
  105.  
  106.         (The alias list size and environment size are set automatically by 
  107.         4OS2; other directives refer to features which are not relevant under 
  108.         OS/2.) 
  109.  
  110.     *   New directives available in 4OS2.INI which are not available in 
  111.         4DOS.INI include: 
  112.  
  113.                LocalAliases     LocalHistory     WindowState
  114.  
  115.         See 4OS2.INI for more information. 
  116.  
  117.  
  118. ΓòÉΓòÉΓòÉ 2.2. Editing the Command Line ΓòÉΓòÉΓòÉ
  119.  
  120. The 4OS2 command line offers full editing, and can also display the command 
  121. history in a window (see below).  The command line accepts up to 511 
  122. characters. 
  123.  
  124. The following keys have special meaning when entered at the command line (the 
  125. caret ^ means press the Ctrl key together with the specified key): 
  126.  
  127.                   Move the cursor left one character. 
  128.                   Move the cursor right one character. 
  129.                   Recall the previous command from the history list, or match 
  130.                    a partial command entry with a history list entry. 
  131.                   Recall the next command from the history list, or match a 
  132.                    partial command entry with a history list entry. 
  133.     ^             Move the cursor left one word. 
  134.     ^             Move the cursor right one word. 
  135.     Home           Move the cursor to the beginning of the line. 
  136.     ^Home          Delete from the beginning of the line to the character 
  137.                    preceding the cursor. 
  138.     End            Move the cursor to the end of the line. 
  139.     ^End           Delete from the cursor to the end of the line. 
  140.     Ins            Toggle between insert and overstrike mode. 
  141.     Del            Delete the character at the cursor. 
  142.     Backspace      Delete the character to the left of the cursor. 
  143.     Enter          Execute the command. 
  144.     Esc            Erase the entire line. 
  145.     ^L             Delete the word to the left of the cursor. 
  146.     ^R             or ^Backspace  Delete the word to the right of the cursor. 
  147.     ^C             Abort the command. 
  148.     ^D             Delete the history list entry, and erase the line. 
  149.     ^E             Go to the last entry in the history list. 
  150.     ^K             Save the command to the history list without executing it, 
  151.                    and erase the line. 
  152.     F1             Call the on-line help. 
  153.     F3             Fill in the rest of the line (beyond any characters that 
  154.                    have already been typed) from the last line in the history. 
  155.     Tab            (or F9), Shift-Tab (or F8), F10  A Tab will scan the 
  156.                    filename (which may include the wildcard characters at or 
  157.                    immediately to the left of the cursor position, and replaces 
  158.                    it with the first matching filename.  Pressing Tab again 
  159.                    replaces it with the next matching filename; pressing F10 
  160.                    appends the next matching filename at the current cursor 
  161.                    position.  Pressing Shift-Tab will retrieve the previous 
  162.                    matching filename.  If you don't enter a filename, Tab 
  163.                    defaults to *.*.  If you don't enter an extension, Tab 
  164.                    appends a .*. 
  165.     PgUp           Popup a history window, showing those commands that match 
  166.                    characters already entered on the command line. 
  167.     Alt-255        (Hold down the Alt key and enter 255 on the numeric keypad.) 
  168.                    Accept the next character "as-is" from the keyboard and 
  169.                    enter it on the command line.  This allows you to enter 
  170.                    characters normally interpreted as editing keys (for 
  171.                    example, Esc). To enter the Alt-255 character itself into 
  172.                    the line, you must type it twice. 
  173.     ^ (caret)      "Escape" the next character (the default escape character 
  174.                    for 4OS2 and CMD.EXE is the caret ^; it can be changed in 
  175.                    4OS2 with the SETDOS command or in the 4OS2.INI file).  The 
  176.                    escape character forces the parser to ignore any special 
  177.                    meaning of the next character (for example, redirection 
  178.                    characters).  Note that 4OS2 will not recognize the escape 
  179.                    character inside double quotes (for compatibility with 
  180.                    CMD.EXE). 
  181.  
  182.                    Escaping the following characters will insert the specified 
  183.                    control code: 
  184.  
  185.                      b  bell (ASCII 7) 
  186.                      e  escape (ASCII 27) 
  187.                      f  form feed (ASCII 12) 
  188.                      n  line feed (ASCII 10) 
  189.                      r  carriage return (ASCII 13) 
  190.                      t  tab (ASCII 9) 
  191.  
  192.  The following keys have special meaning when entered from inside the popup 
  193.  history and directory windows.  The history list in a window is not circular 
  194.  as it is at the command line; scrolling and paging stop at the beginning or 
  195.  end of the history list. 
  196.  
  197.                  Move the highlight up one line. 
  198.                  Move the highlight down one line. 
  199.     PgUp          Move up one page. 
  200.     PgDn          Move down one page. 
  201.     Home          Move to the first line in the list. 
  202.     End           Move to the last line in the list. 
  203.     Enter         Execute the highlighted command (history window) or change to 
  204.                   the highlighted directory (directory window). 
  205.     ^Enter        Close the window and move the highlighted command to the 
  206.                   prompt for editing (history window only). 
  207.     Esc           Close the window and return to the previous command line at 
  208.                   the prompt. 
  209.     ^C            Close the window, abort any partially entered command line, 
  210.                   and redisplay the prompt. 
  211.  
  212.  Most of the command line and popup window keys, as well as the popup window 
  213.  location and size, can be redefined in the 4OS2.INI initialization file. 
  214.  
  215.  
  216. ΓòÉΓòÉΓòÉ 2.3. 4OS2 Internal Variables ΓòÉΓòÉΓòÉ
  217.  
  218. Environment variables are referenced in a command by starting the variable name 
  219. with a percent sign (%).  (If you want to enter a percent sign without 
  220. referring to a variable, use two percent signs (%%).)  An environment variable 
  221. name is terminated by either another percent sign, or by an invalid character 
  222. (see below).  To pass a variable name (instead of the value) to a command (for 
  223. example, in INKEY or INPUT), you must precede it with two percent signs. 
  224.  
  225. Environment variable names may be composed of any alphanumeric character, plus 
  226. the underscore (_), and $ characters.  In addition to the standard variable 
  227. name characters, you can force 4OS2 to accept any sequence of characters as a 
  228. valid variable name by enclosing them in square brackets. For example, %[AB##1] 
  229. refers to an environment variable named AB##1. 
  230.  
  231. Batch file variables are only active inside a batch file.  They are referenced 
  232. as %0 to %127, and expand to the matching argument on the command line that 
  233. started the batch file.  The parameter %n$ is a special case, and expands to 
  234. all arguments in the command line tail, starting at argument number n.  If n is 
  235. not specified, it defaults to 1 (so %$ will expand to all arguments in the 
  236. command line tail). 
  237.  
  238. There are some variable names that have special meanings in 4OS2.  Only CDPATH, 
  239. CMDLINE, and PATH are actually stored in the environment; the remainder are 
  240. internal to 4OS2, and cannot be viewed or modified with SET or ESET.  (The 
  241. internal variable names are checked after variable expansion, so they can be 
  242. overridden by creating an environment variable of the same name.) 
  243.  
  244. The 4OS2 internal variables are: 
  245.  
  246.     %#  returns the number of command line arguments in a batch file. 
  247.     %?  returns the exit code of the previous external command. 
  248.     %_? returns the exit code of the previous internal command.  (Save this 
  249.         value immediately; it is overwritten by the next internal command.) 
  250.     %CDPATH tells 4OS2 where to search for directories names specified by a CD 
  251.         or CDD command.  4OS2 will append the specified directory name to each 
  252.         directory in CDPATH and attempt to change to that directory. If you 
  253.         have already have a CDPATH environment variable, you can use %_CDPATH 
  254.         instead for the directory search. 
  255.     %CMDLINE is the fully expanded 511-character command line for the external 
  256.         command.  You can access it from an external program by searching the 
  257.         environment. 
  258.     %COLORDIR is the "directory colorization" variable.  See DIR for details on 
  259.         the COLORDIR format. 
  260.     %PATH tells 4OS2 where to search for executable files: .COM, .EXE, .BTM, 
  261.         and .CMD (and .BAT in OS/2 2.0), in that order, not found in the 
  262.         current directory.  Some applications also use the PATH variable to 
  263.         find their files. 
  264.     %_4VER returns the 4OS2 version number (for example, 1.0). 
  265.     %_ANSI is 1 if ANSI is active (4OS2 always enables ANSI). 
  266.     %_BATCH is the current batch nesting level (0 if not in a batch file). 
  267.     %_BG is a string containing the screen background color at the current 
  268.         cursor position. 
  269.     %_BOOT returns the boot disk (for example, C). 
  270.     %_CODEPAGE is the current code page number. 
  271.     %_COLUMN is the current cursor column. 
  272.     %_COLUMNS is the current number of screen columns. 
  273.     %_CPU is the cpu type (286, 386, or 486). 
  274.     %_CWD is the current directory in the format d:\pathname. 
  275.     %_CWDS has the same value as CWD, except it ensures the pathname ends  in a 
  276.         backslash (\). 
  277.     %_CWP is the current directory in the format \pathname. 
  278.     %_CWPS has the same value as CWP, except it ensures the pathname ends in a 
  279.         backslash (\). 
  280.     %_DATE contains the current system date, in the format mm-dd-yy (U.S.), 
  281.         dd-mm-yy (Europe), or yy-mm-dd (Japan). 
  282.     %_DISK is the current disk (for example, C). 
  283.     %_DOS is the operating system type (DOS or OS2).  This is useful if you 
  284.         have .BTM files running in both modes. 
  285.     %_DOSVER is the current OS/2 version (for example, 2.0). 
  286.     %_DOW is the current day (Mon, Tue, Wed, etc.). 
  287.     %_FG is a string containing the screen foreground color at the current 
  288.         cursor position. 
  289.     %_LASTDISK returns the last disk on the system (A: - Z:). 
  290.     %_MONITOR is the monitor type (MONO or COLOR). 
  291.     %_MOUSE returns 1 if a mouse is installed. 
  292.     %_NDP is the coprocessor type (0 - no coprocessor; 287 - 80287; 387 - 80387 
  293.         or 80486). 
  294.     %_PID is the process ID for 4OS2. 
  295.     %_PPID is the parent process ID (for the process that started 4OS2). 
  296.     %_PTYPE is the process type (FS - full screen; AVIO - Windowed; PM - 
  297.         Presentation manager; DT - detached). 
  298.     %_ROW is the current cursor row. 
  299.     %_ROWS is the current number of screen rows. 
  300.     %_SHELL is the current shell nesting level for that session.  The first 
  301.         copy of 4OS2 started in a session is shell 0. 
  302.     %_SID is the session ID. 
  303.     %_TIME contains the current system time in the format hh:mm:ss.  The 
  304.         separator character may vary depending upon your country information. 
  305.     %_TRANSIENT returns a 1 if the current shell is transient (started with a 
  306.         /C). 
  307.     %_VIDEO is the video card type (MONO, CGA, EGA, VGA, XGA, 8514, or IA/A). 
  308.  
  309.  
  310. ΓòÉΓòÉΓòÉ 2.4. 4OS2 Variable Functions ΓòÉΓòÉΓòÉ
  311.  
  312. Variable Functions are pseudo-variables that take one or more arguments (which 
  313. can themselves be environment variables or variable functions), and return a 
  314. value.  The variable function name must be preceded by an %@ (%@eval, %@len, 
  315. etc.).  All variable functions must have square brackets enclosing their 
  316. argument(s). 
  317.  
  318. Some functions return the number of bytes, kilobytes, or megabytes based on a 
  319. "b|k|m" argument: 
  320.  
  321.     b   bytes 
  322.     k   bytes / 1000 
  323.     K   kilobytes (bytes / 1024) 
  324.     m   bytes / 1,000,000 
  325.     M   megabytes (bytes / 1,048,576) 
  326.  
  327.  The 4OS2 variable functions are: 
  328.  
  329.     %@ALIAS[name] returns the alias argument for the specified name. 
  330.     %@ASCII[c] returns the ASCII value of the specified character. 
  331.     %@ATTRIB[filename,attrib] returns a 1 if the specified file has the 
  332.         matching attribute(s).  The attributes (other than N) can be combined; 
  333.         ATTRIB will only return a 1 if _all_ the attributes match.  The 
  334.         attributes are: 
  335.           N  Normal (no attribute bits set) 
  336.           R  Read-only 
  337.           H  Hidden 
  338.           S  System 
  339.           D  Directory 
  340.           A  Archive 
  341.     %@CHAR[n] returns the character for the specified ASCII value. 
  342.     %@DATE[mm/dd/yy] returns the number of days since 1/1/80 for the specified 
  343.         date.  DATE will use the date format mandated by your country code 
  344.         (dd/mm/yy in Europe; yy/mm/dd in Japan). 
  345.     %@DESCRIPT[filename] returns the file's description. 
  346.     %@DEVICE[name] returns a 1 if the specified name is a character device. 
  347.     %@DISKFREE[d:,b|k|m] returns the free disk space for the specified drive, 
  348.         in bytes, kilobytes, or megabytes. 
  349.     %@DISKTOTAL[d:,b|k|m] returns the total disk space for the specified drive, 
  350.         in bytes, kilobytes, or megabytes. 
  351.     %@DISKUSED[d:,b|k|m] returns the disk space used on the specified drive, in 
  352.         bytes, kilobytes, or megabytes. 
  353.     %@DOSMEM[b|k|m] returns the size of the largest free OS/2 memory block in 
  354.         bytes, kilobytes, or megabytes.  Due to OS/2's virtual memory system, 
  355.         this value is only a general reflection of available memory and not a 
  356.         precise statement of the RAM available for applications. 
  357.     %@EVAL[expression] evaluates an arithmetic expression.  It supports 
  358.         addition (+), subtraction (-), multiplication (*), division (/), and 
  359.         modulo (%%).  The expression can contain environment variables, 
  360.         including other variable functions.  EVAL supports commas and decimal 
  361.         places; the maximum size is 16.8 (16 integer and 8 decimal places). 
  362.         EVAL strips leading and trailing zeros from the result. 
  363.     %@EXEC[command] executes the command and returns its exit code.  The 
  364.         command can be an alias, an internal 4OS2 command, or an external 
  365.         program or batch file.  This is a back door entry to 4OS2 command 
  366.         processing -- use with caution! 
  367.     %@EXETYPE[filename] returns the file's program type: 
  368.         UNKNOWN  Unknown type 
  369.         FS  Full-screen OS/2 
  370.         AVIO  Windowable OS/2 
  371.         PM  Presentation manager OS/2 
  372.         DOS  MS-DOS (OS/2 2.0 only) 
  373.         WIN  Windows 3 (OS/2 2.0 only) 
  374.     %@EXT[filename] returns the file extension (without a leading period). 
  375.     %@FILEDATE[filename] returns the last modification date for the file, in 
  376.         the default country format (mm-dd-yy for US). 
  377.     %@FILESIZE[filename,b|k|m] returns the size of the file in bytes, 
  378.         kilobytes, or megabytes, or -1 if the file doesn't exist. 
  379.     %@FILETIME[filename] returns the last modification time for the file, in 
  380.         hh:mm format. 
  381.     %@FULL[filename] returns the fully qualified path name. 
  382.     %@FSTYPE[d:] returns the drive's file system type (for example, FAT or 
  383.         HPFS). 
  384.     %@INDEX[string1,string2] returns the position of string2 within string1, or 
  385.         -1 if string2 is not found.  The first position in string1 is 0. 
  386.     %@INT[n] returns the integer part of "n".  See %@EVAL. 
  387.     %@LABEL[d:] returns the volume label of the specified disk. 
  388.     %@LEN[string] returns the length of the string. 
  389.     %@LINE[filename,n] returns line "n" from the specified file.  If you 
  390.         specify "CON" for the filename, it will read from standard input. 
  391.     %@LINES[filename] returns the number of lines in the specified file, base 
  392.         0.  If there are no lines, it returns -1. 
  393.     %@LOWER[string] returns the string converted to lower case. 
  394.     %@MAKEDATE[n] returns the date given the number of days since 1/1/80. 
  395.     %@MAKETIME[n] returns the time given the number of seconds since midnight. 
  396.     %@NAME[filename] returns the filename only (no path or extension). 
  397.     %@PATH[filename] returns the path only (including the trailing backslash). 
  398.     %@READSCR[row,column,length] returns the text on the screen at the 
  399.         specified row and column, for the specified length. 
  400.     %@READY[d:] returns a 1 if the specified drive is ready. 
  401.     %@REMOTE[d:] returns a 1 if the specified drive is remote (LAN). 
  402.     %@SEARCH[filename] searches for an executable file using the PATH 
  403.         environment variable, appending the extension if one wasn't specified. 
  404.     %@SELECT[filename,top,left,bottom,right,title] displays the file as a popup 
  405.         selection list.  If you press Enter, it returns the string highlighted 
  406.         by the selection bar; if you press Esc it returns an empty string.  If 
  407.         you specify "CON" for the filename, it will read from standard input. 
  408.     %@SUBSTR[string,start,length] returns a substring, starting at the position 
  409.         "start" and continuing for "length" characters.  If the length is 
  410.         negative, the start is relative to the right side.  If the length isn't 
  411.         specified, SUBSTR will return the remainder of the string.  For 
  412.         example, %@SUBSTR[%_time,0,2] gets the current time and extracts the 
  413.         hour.  If the string includes commas it must be quoted with double 
  414.         quotes or single back-quotes (" or `). 
  415.     %@TIME[hh:mm:ss] returns the number of seconds since midnight for the 
  416.         specified time.  The time must be in 24-hour format. 
  417.     %@UNIQUE[d:\path] returns a unique filename in the specified drive and 
  418.         path. 
  419.     %@UPPER[string] returns the string converted to upper case. 
  420.     %@WORD[n,string] returns the "nth" word in the string (base 0).  If "n" is 
  421.         negative, WORD starts from the end and counts backwards. 
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 2.5. Redirection and Piping ΓòÉΓòÉΓòÉ
  425.  
  426. Redirection 
  427.  
  428. OS/2 assumes input comes from the keyboard and output goes to the display. The 
  429. keyboard is referred to as standard input, and the display is referred to as 
  430. standard output.  You can change the default standard input and standard output 
  431. by using the < and > symbols on the command line.  4OS2 also allows you to 
  432. redirect the standard error by appending an & character. 
  433.  
  434. To get standard input from a file instead of the keyboard: 
  435.  
  436.     < filename
  437.  
  438. To redirect standard output to a file: 
  439.  
  440.     > filename
  441.  
  442. To redirect standard output and standard error to a file: 
  443.  
  444.     >& filename
  445.  
  446. To redirect standard error only to a file: 
  447.  
  448.     >&> filename
  449.  
  450. To append standard output or standard error to a file, use >> in place of the 
  451. first >.  If NOCLOBBER is set, the file must exist before it can be appended to 
  452. (unless overridden by a !). Otherwise, 4OS2 will create the file. 
  453.  
  454. 4OS2 also supports the OS/2 CMD.EXE syntax: 
  455.  
  456.     n>file
  457.  
  458. and 
  459.  
  460.     n>&m
  461.  
  462. where n and m are digits from 0 to 9.  You may not put any spaces between the n 
  463. and the >, or between the & and the m in the second form.  The digits represent 
  464. file handles:  0, 1, and 2 are predefined by OS/2 as standard input, standard 
  465. output, and standard error respectively; 3 through 9 can be defined by 
  466. applications. 
  467.  
  468. The n>file syntax redirects output from handle n to a file.  The n>&m syntax 
  469. redirects handle n to the same location as the previously assigned handle m. 
  470. In many cases you can perform the same operations by using 4OS2's enhanced 
  471. redirection features.  See the 4OS2 manual for more information on these 
  472. options. 
  473.  
  474. Piping 
  475.  
  476. Piping makes the standard output of one command the standard input for a second 
  477. command.  To send the standard output of "cmd1" to the standard input of 
  478. "cmd2": 
  479.  
  480.     cmd1 | cmd2
  481.  
  482. To send the standard output and standard error of "cmd1" to the standard input 
  483. of "cmd2": 
  484.  
  485.     cmd1 |& cmd2
  486.  
  487. Unlike 4DOS, which creates a temporary file for pipes, 4OS2 connects a pipe 
  488. directly to a secondary process; both processes execute simultaneously. 
  489.  
  490.  
  491. ΓòÉΓòÉΓòÉ 2.6. Command Grouping ΓòÉΓòÉΓòÉ
  492.  
  493. Command grouping allows you to logically group a set of commands together by 
  494. enclosing them with parentheses.  For example, this grouping: 
  495.  
  496.     (global /iq echo %_cwd) > dirlist
  497.  
  498. allows you to redirect all output from GLOBAL to the specified file.  The 
  499. following command will take the output of DIR and TYPE, sort the whole mess, 
  500. and save it in the file AZ: 
  501.  
  502.     (dir *.com & type autoexec.bat) | sort > AZ
  503.  
  504. To group commands, the first character of the command must begin with a (  Note 
  505. that if you have a closing parenthesis ) in a filename, you'll need to escape 
  506. it with the 4OS2 escape character (^) to keep 4OS2 from assuming it's the end 
  507. of the command group. 
  508.  
  509. You can also use command grouping to split commands over several lines. For 
  510. example: 
  511.  
  512.     for %x in (*.c) do (
  513.         echo %x
  514.         dir *.c
  515.     )
  516.  
  517. If you enter a command group on the command line without a closing parenthesis, 
  518. 4OS2 will prompt you with More? for the remainder of the line. 
  519.  
  520.  
  521. ΓòÉΓòÉΓòÉ 2.7. Wildcards ΓòÉΓòÉΓòÉ
  522.  
  523. Wildcards let you specify a file or group of files by typing a partial 
  524. filename.  Most internal commands accept filenames with wildcards anywhere a 
  525. full filename can be used.  4OS2 recognizes 3 wildcard types: asterisk *, 
  526. question mark ?, and square brackets [ ].  You can combine various wildcard 
  527. types in a single filename. Note that the 4OS2 wildcard extensions may not be 
  528. interpreted properly by external programs, so when passing file names to 
  529. external programs you should use the traditional wildcard syntax. 
  530.  
  531. A * in a filename means "any zero or more characters in this position."  You 
  532. can use both leading and trailing asterisks. For example, to get a directory of 
  533. all files beginning with "ab": 
  534.  
  535.     dir ab*.*
  536.  
  537. To get a directory of all files with an "ab" anywhere in the filename: 
  538.  
  539.     dir *ab*.*
  540.  
  541. A ? matches any single filename character.  A ? doesn't require that a 
  542. character exist if it's at the end of the filename or extension. 
  543.  
  544. A set of characters in brackets [ ] acts like a ? (match any single character), 
  545. but allows you to specify or exclude specific characters.  If you specify one 
  546. or more characters in the brackets (e.g. [abc]), the specification will only 
  547. match files whose names have one of the listed characters in the corresponding 
  548. position.  For example, to get a directory of all files whose names have either 
  549. a "p" or "q" as the first letter: 
  550.  
  551.     dir [pq]*.*
  552.  
  553. Two characters with a dash (-) between them represent a range of characters, 
  554. and will match any character within the range (including the beginning and end 
  555. characters).  For example, to get a directory of all files with names beginning 
  556. with a number from 1 to 6, or the letters "a" or "b", and ending with a "9": 
  557.  
  558.     dir [1-6ab]*9.*
  559.  
  560. If you enter a ! as the first character following the left bracket, the test is 
  561. reversed (only match names that do not have the listed characters in the 
  562. corresponding position).  For example, to get a directory of all files with 
  563. names of two characters or more that begin with an "a" and do not have a digit 
  564. as the second character: 
  565.  
  566.     dir a[!0-9]*.*
  567.  
  568. The special wildcard construct [?] will match any character (like ?) but will 
  569. require that the character exist, even at the end of a filename or extension. 
  570. For example, if you have the files XYZ.DAT and XY.DAT in the current directory, 
  571. then: 
  572.  
  573.     dir xy?.dat         will display both file names
  574.     dir xy[?].dat       will display only XYZ.DAT
  575.  
  576.  
  577. ΓòÉΓòÉΓòÉ 2.8. 4OS2 Initialization File (4OS2.INI) ΓòÉΓòÉΓòÉ
  578.  
  579. The 4OS2.INI file is an ASCII file containing directives to control the 
  580. configuration of 4OS2 in primary and secondary shells.  Blank lines are ignored 
  581. and can be used to separate groups of directives.  You can place comments in 
  582. the file by beginning a line with a semicolon (;). You can also place comments 
  583. at the end of any line except one containing a text string value by entering at 
  584. least one space or tab after the value, a semicolon, and your comment. 
  585.  
  586. The file has two sections, identified by a name in square brackets on a line by 
  587. itself.  The section names are: 
  588.  
  589.     [Primary]           Directives in this section will be used when 4OS2 is 
  590.                         running as the primary shell (i.e., when a session is 
  591.                         started). 
  592.  
  593.     [Secondary]         Directives in this section are used in secondary shells 
  594.                         only (i.e., a second invocation of 4OS2 within the same 
  595.                         session), and override any corresponding primary shell 
  596.                         settings. 
  597.  
  598.  Lines before a section name are used in both primary and secondary shells. 
  599.  
  600.  When 4OS2 is loaded, whether as the primary or secondary shell, it first 
  601.  checks for an "@d:\path\inifile" option on the command line (you can set this 
  602.  option in the Parameters field of the Settings notebook for any icon that 
  603.  starts a 4OS2 session).  If this option is found 4OS2 looks for the specified 
  604.  file, and skips the search for the default 4OS2.INI file. 
  605.  
  606.  If no INI file name is specified on the command line, 4OS2 looks for 4OS2.INI 
  607.  in the same directory as 4OS2 itself, then in the root directory of the system 
  608.  boot drive. 
  609.  
  610.  Directives in 4OS2.INI are divided into four types: 
  611.  
  612.         Initialization directives 
  613.         Configuration directives 
  614.         Color directives 
  615.         Key mapping directives 
  616.  
  617.  See the individual topics for details. 
  618.  
  619.  
  620. ΓòÉΓòÉΓòÉ 2.8.1. Initialization Directives ΓòÉΓòÉΓòÉ
  621.  
  622. These directives control how 4OS2 starts and where it looks for its files. 
  623.  
  624.  4StartPath= Path:  Sets the drive and directory where 4OS2 will look for the 
  625.      4START and 4EXIT batch files. 
  626.  History= nnnn (1024):  Sets the history list size (in bytes).  The range is 
  627.      512 to 8192 bytes. 
  628.  LocalAliases= Yes | NO:  "Yes" tells 4OS2 to create a local alias list for 
  629.      this session.  "No" causes 4OS2 to use the global alias list shared by all 
  630.      sessions. 
  631.  LocalHistory= Yes | NO: "Yes" tells 4OS2 to create a local history list for 
  632.      this session.  "No" causes 4OS2 to use the global history list shared by 
  633.      all sessions. 
  634.  LogName= File (none):  Sets the log file name and/or path.  If only a path is 
  635.      given, 4OS2 will use the default log file name (4OS2LOG).  Using LogName 
  636.      does not turn logging on, you must still use LOG ON to do so. 
  637.  NextINIFile= File (none):  Full path and name must be specified.  All 
  638.      subsequent shells will read the specified INI file, and ignore any 
  639.      [Secondary] section in the original 4OS2.INI.  Allows workstation users to 
  640.      shift 4OS2.INI to a network drive for secondary shells. 
  641.  PauseOnError= YES | No:  "Yes" tells 4OS2 to pause with the message "Error in 
  642.      4OS2.INI, press any key to continue processing" after displaying any error 
  643.      message related to a specific line in the 4OS2.INI file.  "No" continues 
  644.      processing with no pause after an error message is displayed. 
  645.  WindowState= STANDARD | Maximize | Minimize: Switches the 4OS2 window to a 
  646.      maximized or minimized state at startup. Ignored in full-screen sessions. 
  647.      "Standard" means leave the window wherever OS/2 puts it. 
  648.  
  649.  
  650. ΓòÉΓòÉΓòÉ 2.8.2. Configuration Directives ΓòÉΓòÉΓòÉ
  651.  
  652. These directives control the way that 4OS2 operates.  Some can be changed with 
  653. the SETDOS command while 4OS2 is running. 
  654.  
  655.  BatchEcho= YES | No:  Sets the default batch ECHO mode.  Also see SETDOS /V. 
  656.  BeepFreq= nnnn (440):  Sets the default BEEP command frequency in Hz. To 
  657.      disable all 4OS2 error beeps set this or BeepLength to 0; 
  658.  BeepLength= nnnn (2):  Sets the default BEEP length in system clock ticks 
  659.      (approximately 1/18 of a second per tick). 
  660.  CursorIns= nnnn (100):  Sets the percentage of the character cell filled by 
  661.      the 4OS2 cursor in insert mode.  Also see SETDOS /S. 
  662.  CursorOver= nnnn (10):  Sets the percentage of the character cell filled by 
  663.      the 4OS2 cursor in overtype mode.  Also see SETDOS /S. 
  664.  CommandSep= c (&):  This is the character used to separate multiple commands 
  665.      on the same line.  Also see SETDOS /C. 
  666.  DescriptionMax= nnnn (40):  Sets the maximum file description length accepted 
  667.      by DESCRIBE; the range is 20 - 120 characters. 
  668.  EditMode= Insert | OVERSTRIKE:  Lets you start the command line editor in 
  669.      either insert or overstrike mode.  Also see SETDOS /M. 
  670.  EscapeChar= c (^):  Sets the character used to suppress the normal meaning of 
  671.      the following character.  Also see SETDOS /E. 
  672.  HelpBook= String (4OS2+CMDREF):  Tells the internal 4OS2 help command (F1 or 
  673.      HELP) which .INF files to use.  Filenames are separated by a +. Files 
  674.      should be in one of the directories specified by the BOOKSHELF environment 
  675.      variable. 
  676.  HistMin= nnnn (0):  Sets the minimum command length to save in the history 
  677.      list.  0 saves all commands, 300 disables all history saves. 
  678.  HistWinColor= Color:  Sets the default colors for the command line history 
  679.      window. 
  680.  HistWinHeight= nn (10):  Sets the height of the command line history window in 
  681.      lines, including the border. 
  682.  HistWinLeft= nn (50):  Sets the horizontal position of the left side of the 
  683.      command line history window.  The left edge of the screen is 0. 
  684.  HistWinTop= nn (0):  Sets the vertical position of the top of the command line 
  685.      history window.  The top of the screen is 0. 
  686.  HistWinWidth= nn (30):  Sets the width of the command line history window in 
  687.      characters, including the border. 
  688.  NoClobber= Yes | NO:  If set to Yes, prevents standard output redirection from 
  689.      overwriting an existing file, and requires the output file already exist 
  690.      for append redirection.  Also see SETDOS /N. 
  691.  ParameterChar= c ($):  Sets the character used to specify all or all remaining 
  692.      command line arguments (e.g. %$ or %2$). The default is $ in 4OS2 and & in 
  693.      4DOS. Also see SETDOS /P. 
  694.  ScreenRows= nnnn:  Sets the number of screen rows used by the video display. 
  695.      Normally, 4OS2 detects the screen size automatically, but if you have a 
  696.      non-standard display you may need to set it explicitly. Also see SETDOS 
  697.      /R. 
  698.  UpperCase= Yes | NO:  "Yes" specifies filenames should be displayed in the 
  699.      traditional upper-case by internal commands like COPY and DIR.  "No" 
  700.      allows the normal 4OS2 lower-case style.  Also see SETDOS /U. 
  701.  
  702.  
  703. ΓòÉΓòÉΓòÉ 2.8.3. Color Directives ΓòÉΓòÉΓòÉ
  704.  
  705. These directives control the colors that 4OS2 uses for its displays.  The color 
  706. format is: 
  707.  
  708.     [BRIght] [BLInk] fg ON bg [BORder bc]
  709.  
  710. Where fg is the foreground color, bg is the background color, and bc is the 
  711. border color.  The color names are: 
  712.  
  713.     Black         Blue          Green        Red
  714.     Magenta       Cyan          Yellow       White
  715.  
  716. The color names and the keywords BRIGHT, BLINK, and BORDER can be shortened to 
  717. three letters. 
  718.  
  719.  ColorDir= ext1 ext2 ...:colora;ext3 ext4 ... :colorb ... (none):  Sets the 
  720.      directory colors.  The format is the same as that used for the COLORDIR 
  721.      environment variable (see 4OS2 Internal Variables). 
  722.  ListColors= Color:  Sets the colors used by the LIST and SELECT commands. 
  723.  StdColors= Color:  Sets the standard colors to be used when CLS is used 
  724.      without a color specification, and for LIST and SELECT if ListColors is 
  725.      not used. 
  726.  
  727.  
  728. ΓòÉΓòÉΓòÉ 2.8.4. Key Mapping Directives ΓòÉΓòÉΓòÉ
  729.  
  730. The directives in this group allow you to change the keys used for 4OS2 command 
  731. line editing and other internal functions.  They take effect only inside 4OS2 
  732. itself and do not affect other programs (including the help system).  4OS2 
  733. processes all command line editing key assignments before looking for keystroke 
  734. aliases.  For example, if you assign Shift-F1 to HELP and also assign Shift-F1 
  735. to a key alias, the key alias will be ignored.  (Use the "Normal" directives -- 
  736. NormalKey, NormalEditKey, etc. -- to disable the preassigned function for a key 
  737. so it can be used for a keystroke alias.) 
  738.  
  739. There are three pre-mapped keys:  Tab and Shift-Tab (mapped to NextFile and 
  740. PrevFile respectively) and Ctrl-Bksp (mapped to DelWordRight).  If you need to 
  741. clear out these assignments so you can assign Tab, Shift-Tab, or Ctrl-Bksp to a 
  742. keystroke alias, use the ClearKeyMap directive described at the end of this 
  743. section. 
  744.  
  745. The format for a key name is:  [Prefix-]Keyname.  The prefix and key name must 
  746. be separated by a dash.  The prefix can be left out, or it can be any of the 
  747. following: 
  748.  
  749.     Alt     followed by A - Z, 0 - 9, F1 - F12, or Bksp
  750.     Ctrl    followed by A - Z, F1 - F12, Bksp, Enter,
  751.               Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  752.     Shift   followed by F1 - F12 or Tab.
  753.  
  754. The possible key names are: 
  755.  
  756.     A - Z       Esc         Up          PgUp
  757.     0 - 9       Bksp        Down        PgDn
  758.     F1 - F12    Tab         Left        Home
  759.     Ins         Enter       Right       End
  760.     Del
  761.  
  762. General Input Keys 
  763.  
  764. These directives are effective whenever 4OS2 requests input from the keyboard, 
  765. including command line editing and the DESCRIBE, ESET, INPUT, LIST, and SELECT 
  766. commands. (Scrolling through the command history list is controlled by NextHist 
  767. and PrevHist (see below), not by the Up and Down directives below.) 
  768.  
  769.  Backspace= Key (Bksp):  Deletes the character to the left of the cursor. 
  770.  BeginLine= Key (Home):  Moves the cursor to the beginning of the line. 
  771.  Del = Key (Del):  Deletes the character at the cursor. 
  772.  DelToBeginning= Key (Ctrl-Home):  Deletes from the cursor to the start of the 
  773.      line. 
  774.  DelToEnd= Key (Ctrl-End):  Deletes from the cursor to the end of the line. 
  775.  DelWordLeft= Key (Ctrl-L):  Deletes the word to the left of the cursor. 
  776.  DelWordRight= Key (Ctrl-R, Ctrl-Bksp):  Deletes the word to the right of the 
  777.      cursor.  See ClearKeyMap at the end of this section if you need to remove 
  778.      the mapping of Ctrl-Bksp to DelWordRight. 
  779.  Down= Key (Down):  Scrolls the display down one line in LIST; moves the cursor 
  780.      down one line in SELECT and in the command history window. 
  781.  EndLine= Key (End):  Moves the cursor to the end of the line. 
  782.  EraseLine= Key (Esc):  Deletes the entire line. 
  783.  ExecLine= Key (Enter):  Executes or accepts a line. 
  784.  Ins = Key (Ins):  Toggles insert / overstrike mode during line editing. 
  785.  Left= Key (Left):  Moves the cursor left one character; moves the display left 
  786.      8 columns in LIST. 
  787.  NormalKey= Key (none):  Deassigns a general input key in order to disable the 
  788.      usual meaning of the key within 4OS2 and / or make it available for 
  789.      keystroke aliases.  This will cause 4OS2 to treat the keystroke as a 
  790.      "normal" key with no special function. 
  791.  Right= Key (Right):  Moves the cursor right one character; scrolls the display 
  792.      right 8 columns in LIST. 
  793.  Up  = Key (Up):  Scrolls the display up one line in LIST; moves the cursor up 
  794.      one line in SELECT and in the command history window. 
  795.  WordLeft= Key (Ctrl-Left):  Moves the cursor left one word; scrolls the 
  796.      display left 40 columns in LIST. 
  797.  WordRight= Key (Ctrl-Right):  Moves the cursor right one word; scrolls the 
  798.      display right 40 columns in LIST. 
  799.  
  800.  Command Line Editing Keys 
  801.  
  802.  The following directives apply only to command line editing (see Command Line 
  803.  Editing).  They are only effective at the 4OS2 prompt. 
  804.  
  805.  AddFile= Key (F10):  Keeps the current filename completion entry and inserts 
  806.      the next  matching name. 
  807.  CommandEscape= Key (Alt-255):  Allows direct entry of a keystroke that would 
  808.      normally be interpreted as an editor command. 
  809.  DelHistory= Key (Ctrl-D):  Deletes the displayed history list entry and 
  810.      displays the previous entry. 
  811.  EndHistory= Key (Ctrl-E):  Displays the last history list entry. 
  812.  Help= Key (F1):  Invokes the 4OS2 HELP facility. 
  813.  NextFile= Key (F9, Tab):  Gets the next matching filename. See ClearKeyMap at 
  814.      the end of this section if you need to remove the mapping of Tab to 
  815.      NextFile. 
  816.  NextHistory= Key (Down):  Recalls the next command from the command history. 
  817.  NormalEditKey= Key (none):  Deassigns a command line editing key in order to 
  818.      disable the usual meaning of the key while editing a command line and / or 
  819.      make it available for keystroke aliases.  This will cause 4OS2 to treat 
  820.      the keystroke as a "normal" key with no special function. 
  821.  PrevFile= Key (F8, Shift-Tab):  Gets the previous matching filename. See 
  822.      ClearKeyMap at the end of this section if you need to remove the mapping 
  823.      of Shift-Tab to PrevFile. 
  824.  PrevHistory= Key (Up):  Recalls the previous command from the command history. 
  825.  SaveHistory= Key (Ctrl-K):  Saves the command line in the history list without 
  826.      executing it. 
  827.  
  828.  History Window Keys 
  829.  
  830.  HistWinBegin= Key (Ctrl-PgUp):  Moves to the first line of the history when in 
  831.      the history window. 
  832.  HistWinEdit= Key (Ctrl-Enter):  Moves a line from the history window to the 
  833.      prompt for editing. 
  834.  HistWinEnd= Key (Ctrl-PgDn):  Moves to the last line of the history when in 
  835.      the history window. 
  836.  HistWinExec= Key (Enter):  Executes the selected line in the history window. 
  837.  HistWinOpen= Key (PgUp):  Brings up the history window while at the command 
  838.      line. 
  839.  NormalHWinKey= Key (none):  Deassigns a history window key in order to disable 
  840.      the usual meaning of the key within the history window.  This will cause 
  841.      4OS2 to treat the keystroke as a "normal" key with no special function. 
  842.  
  843.  LIST Keys 
  844.  
  845.  These directives control the keystrokes used within the LIST command. 
  846.  
  847.  ListFind= Key (F):  Prompts and searches for a string. 
  848.  ListHighBit= Key (H):  Toggles LIST's "strip high bit" option, which can aid 
  849.      in displaying files from certain word processors. 
  850.  ListNext= Key (N):  Finds the next matching string. 
  851.  ListPrint= Key (P):  Prints the file on LPT1. 
  852.  ListWrap= Key (W):  Toggles LIST's wrap option on and off.  The wrap option 
  853.      wraps text at the right margin. 
  854.  NormalListKey= Key (none):  Deassigns a LIST key in order to disable the usual 
  855.      meaning of the key within LIST.  This will cause 4OS2 to treat the 
  856.      keystroke as a "normal" key with no special function. 
  857.  
  858.  ClearKeyMap Directive 
  859.  
  860.  This directive allows you to start with an empty key map. 
  861.  
  862.  ClearKeyMap:  Clears all current key mappings. ClearKeyMap is a special 
  863.      directive which has no value or "=" after it.  Use ClearKeyMap if you want 
  864.      to make one of the keys in 4OS2's default map (Tab, Shift-Tab, or 
  865.      Ctrl-Bksp) available for a keystroke alias; or in the [Secondary] section 
  866.      to clear key mappings inherited from the primary shell. ClearKeyMap should 
  867.      appear before any other key mapping directives.  If you only need to clear 
  868.      some of the default mappings, use ClearKeyMap, then recreate the mappings 
  869.      you want to retain (e.g. with "Tab=NextFile", etc.). 
  870.  
  871.  
  872. ΓòÉΓòÉΓòÉ 2.8.5. Examples ΓòÉΓòÉΓòÉ
  873.  
  874. The following example gives you an idea of the types of things that can be done 
  875. with the 4OS2.INI file.  The comments on each directive explain what it does. 
  876.  
  877.     History = 1024         ; set history size
  878.     BatchEcho = No         ; default is ECHO OFF
  879.     EditMode = Insert      ; editor in insert mode
  880.     CursorO = 100          ; overstrike cursor 100%
  881.     CursorI = 10           ; insert cursor 10%
  882.     ListFind = S           ; use "S" to search in LIST
  883.     ListNext = A           ; use "A" to search again in LIST
  884.  
  885.  
  886. ΓòÉΓòÉΓòÉ 3. 4OS2 Commands ΓòÉΓòÉΓòÉ
  887.  
  888. The 4OS2 commands are described in detail in this section.  The commands are 
  889. arranged alphabetically, and each includes examples to help you learn to use 
  890. the commands. 
  891.  
  892.  
  893. ΓòÉΓòÉΓòÉ 3.1. 4OS2 - 4OS2 command processor ΓòÉΓòÉΓòÉ
  894.  
  895. SYNTAX     (External OS/2) 
  896.  
  897. [[d:]path]4OS2 [/C /K /L /Q /S][@inifile][command ...]
  898.  
  899. PURPOSE 
  900.  
  901. Start a new copy of the 4OS2 command processor. 
  902.  
  903. COMMENTS 
  904.  
  905. 4OS2 replaces CMD.EXE, the default command processor provided with OS/2. The 
  906. 4OS2 options are: 
  907.  
  908.     /C            Execute the command following the /C, and automatically 
  909.                   return to the previous command processor. 
  910.  
  911.     /K            Execute the command following the /K, but do not return to 
  912.                   the previous command processor.  4OS2 defaults to /K if /C is 
  913.                   not specified. 
  914.  
  915.     /LA           Use local alias list.  4OS2 normally shares its alias list 
  916.                   across all sessions; specifying /LA shares it only among 
  917.                   processes in the same session. 
  918.  
  919.     /LH           Use local history list.  4OS2 normally shares its history 
  920.                   list across all sessions; specifying /LH shares it only among 
  921.                   processes in the same session. 
  922.  
  923.     /Q            Don't echo redirected standard input. 
  924.  
  925.     /S            Don't install a ^C signal handler. 
  926.  
  927.     @inifile      The 4OS2.INI file specification. 
  928.  
  929.     command       The command to execute. 
  930.  
  931.  EXAMPLES 
  932.  
  933.  Start 4OS2 with local alias and history lists, using the 4OS2.INI file in 
  934.  D:\4OS2: 
  935.  
  936.       4OS2 @D:\4OS2\4OS2.INI /LA /LH
  937.  
  938.  
  939. ΓòÉΓòÉΓòÉ 3.2. ? - Display internal commands ΓòÉΓòÉΓòÉ
  940.  
  941. SYNTAX     (Internal 4OS2) 
  942.  
  943. ?
  944.  
  945. PURPOSE 
  946.  
  947. Display the internal commands.  Commands disabled with SETDOS /I will not be 
  948. displayed. 
  949.  
  950.  
  951. ΓòÉΓòÉΓòÉ 3.3. ALIAS - Display / set aliases ΓòÉΓòÉΓòÉ
  952.  
  953. SYNTAX     (Internal 4OS2) 
  954.  
  955. ALIAS [/P] [/R [d:][path]filename...] [name[=][value]]
  956.  
  957. PURPOSE 
  958.  
  959. Load or display the alias list, or define name as a substitute for value. 
  960.  
  961. COMMENTS 
  962.  
  963. Aliases are useful as a means of executing a complex series of commands with a 
  964. few keystrokes.  Aliases can also be used as very fast in-memory batch files, 
  965. and will run much faster than disk-based batch files. 
  966.  
  967. 4OS2 supports two types of aliases; command aliases (where the alias is 
  968. substituted for the first argument on the command line), and "keystroke 
  969. aliases", where the command line editor will immediately substitute the alias 
  970. when the key is pressed. 
  971.  
  972. Keystroke alias names are composed of an @ followed by the key name.  You can 
  973. add a carriage return to a key alias by ending the alias with a ^^r (^ is the 
  974. 4OS2 escape character) if defined at the command line or in a batch file, or ^r 
  975. if defined in an ALIAS /R file.  The valid key names are the same as those 
  976. listed in the section on Key Mapping Directives in Extended Key Codes. 
  977.  
  978. If you only specify "name", ALIAS displays the current alias value for "name". 
  979. Otherwise, ALIAS assigns the command(s) in "value" to "name". "Name" can now be 
  980. used as if it were a built-in or external command.  If you don't specify any 
  981. arguments, ALIAS displays the current alias list. 
  982.  
  983. "Name" is limited to no more than 80 characters, and "value" to no more than 
  984. 255 characters. 
  985.  
  986. The ALIAS options are: 
  987.  
  988.     /P      Pause after displaying each page and wait for a key to be pressed. 
  989.  
  990.     /R      Load an alias list from a file.  This is much faster than loading 
  991.             aliases from a batch file.  The file is in the same format as the 
  992.             ALIAS display, so ALIAS /R can accept as input a file generated by 
  993.             redirecting ALIAS output.  You can add comments to an alias file by 
  994.             starting the comment line with a colon (:). 
  995.  
  996.  For example, the following commands will save the aliases to a file, and then 
  997.  reload them from that file: 
  998.  
  999.       alias > alist
  1000.       alias /r alist
  1001.  
  1002.  (You can load aliases from multiple files by listing all the filenames after 
  1003.  the /R.) 
  1004.  
  1005.  When defining aliases at the command line, back quotes must be used around the 
  1006.  alias arguments that contain multiple commands or variable references (%2, 
  1007.  %2$, etc.) to prevent premature expansion.  Back quotes should NOT be used 
  1008.  when defining aliases in a file to be read with ALIAS /R. 
  1009.  
  1010.  Aliases may be nested; i.e., an alias can refer to another alias, but they 
  1011.  cannot refer back to themselves (a=b=a).  You can stop alias expansion by 
  1012.  prefacing the alias with an asterisk (*).  This also allows an alias to refer 
  1013.  to a command of the same name (see below for an example). 
  1014.  
  1015.  Alias names can be truncated by including an asterisk (*) in the name. 
  1016.  
  1017.  To edit an alias, use ESET; to remove an alias, use UNALIAS. 
  1018.  
  1019.  For more information on aliases (including the use of variables), see the 
  1020.  Aliases section in the printed manual, and the sample file ALIASES distributed 
  1021.  with 4OS2. 
  1022.  
  1023.  See also ESET and UNALIAS. 
  1024.  
  1025.  EXAMPLES 
  1026.  
  1027.  Define D as an alias for DIR /AP: 
  1028.  
  1029.       alias d dir /ap
  1030.  
  1031.  Rename the LIST command to DISPLAY , and alias LIST to an external program: 
  1032.  
  1033.       alias display *list
  1034.       alias list c:\util\list.com
  1035.  
  1036.  The following examples show the use of alias arguments: 
  1037.  
  1038.       alias zap `erase %$ & chkdsk & dir /w`
  1039.       alias reverse `echo %5 %4 %3 %2 %1`
  1040.  
  1041.  The following keystroke alias will insert a "dir /2 /v /p " on the command 
  1042.  line when the Alt-F1 key is pressed: 
  1043.  
  1044.       alias @Alt-F1 `dir /2 /v /p `
  1045.  
  1046.  The same alias set up to execute immediately when Alt-F1 is pressed. 
  1047.  
  1048.       alias @Alt-F1 `dir /2 /v /p^r`
  1049.  
  1050.  
  1051. ΓòÉΓòÉΓòÉ 3.4. ATTRIB - Display / set file attributes ΓòÉΓòÉΓòÉ
  1052.  
  1053. SYNTAX     (Internal 4OS2) 
  1054.  
  1055. ATTRIB [/D /P /Q /S -|+[AHRS]] [d:][path]filename...
  1056.  
  1057. PURPOSE 
  1058.  
  1059. Change the file or subdirectory attributes. 
  1060.  
  1061. COMMENTS 
  1062.  
  1063. The ATTRIB options are: 
  1064.  
  1065.     /D      Also modify subdirectory attributes 
  1066.     /P      Pause after displaying each page 
  1067.     /Q      Quiet mode - don't display filenames 
  1068.     /S      Modify files in the current directory and its subdirectories 
  1069.     +A      Set the archive attribute 
  1070.     -A      Clear the archive attribute 
  1071.     +H      Set the hidden attribute 
  1072.     -H      Clear the hidden attribute 
  1073.     +R      Set the read-only attribute 
  1074.     -R      Clear the read-only attribute 
  1075.     +S      Set the system file attribute 
  1076.     -S      Clear the system file attribute 
  1077.  
  1078.  If you don't specify the /D option, ATTRIB only modifies file attributes. If 
  1079.  you don't specify any attributes to change, ATTRIB displays the current file 
  1080.  attributes.  You can also display the file attributes using the /T option in 
  1081.  DIR. 
  1082.  
  1083.  ATTRIB will preserve the previous file attributes and change only the 
  1084.  specified attributes.  New attribute values are allowed between filenames; 
  1085.  otherwise ATTRIB uses the same attributes specified for the previous file(s). 
  1086.  You cannot modify the directory or volume label attributes. 
  1087.  
  1088.  EXAMPLES 
  1089.  
  1090.  Set the read-only and hidden attributes for the file MEMO: 
  1091.  
  1092.       attrib +rh memo
  1093.  
  1094.  Set the archive attribute (file has been modified) for MEMO and change 
  1095.  TEXT.COM to system and not modified: 
  1096.  
  1097.       attrib +a memo +s -a test.com
  1098.  
  1099.  
  1100. ΓòÉΓòÉΓòÉ 3.5. BEEP - Beep the speaker ΓòÉΓòÉΓòÉ
  1101.  
  1102. SYNTAX     (Internal 4OS2) 
  1103.  
  1104. BEEP [frequency [duration] ...]
  1105.  
  1106. PURPOSE 
  1107.  
  1108. Beep the speaker. 
  1109.  
  1110. COMMENTS 
  1111.  
  1112. BEEP is normally used in batch files to signal that an operation has been 
  1113. completed, or that the computer needs attention (for example, to change disks). 
  1114. Because BEEP allows you to specify the frequency and duration, you can use it 
  1115. to play simple music.  You can specify multiple frequency and duration pairs on 
  1116. the command line. 
  1117.  
  1118. The frequency is specified in Hertz, and the duration in 1/18th second 
  1119. intervals.  No sound will be generated for frequencies less than 37 Hz, 
  1120. allowing you to insert short delays.  The default value for frequency is 440 
  1121. Hz; the default value for duration is 2. 
  1122.  
  1123. The following table gives the frequency values for a five octave range (middle 
  1124. C is 262 Hz): 
  1125.  
  1126.     ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  1127.     Γòæ C      Γöé  131  Γöé  262  Γöé  523  Γöé  1046  Γöé  2093 Γòæ
  1128.     Γòæ C#/Db  Γöé  139  Γöé  277  Γöé  554  Γöé  1108  Γöé  2217 Γòæ
  1129.     Γòæ D      Γöé  147  Γöé  294  Γöé  587  Γöé  1175  Γöé  2349 Γòæ
  1130.     Γòæ D#/Eb  Γöé  156  Γöé  311  Γöé  622  Γöé  1244  Γöé  2489 Γòæ
  1131.     Γòæ E      Γöé  165  Γöé  330  Γöé  659  Γöé  1318  Γöé  2637 Γòæ
  1132.     Γòæ F      Γöé  175  Γöé  349  Γöé  698  Γöé  1397  Γöé  2794 Γòæ
  1133.     Γòæ F#/Gb  Γöé  185  Γöé  370  Γöé  740  Γöé  1480  Γöé  2960 Γòæ
  1134.     Γòæ G      Γöé  196  Γöé  392  Γöé  784  Γöé  1568  Γöé  3136 Γòæ
  1135.     Γòæ G#/Ab  Γöé  208  Γöé  415  Γöé  831  Γöé  1662  Γöé  3322 Γòæ
  1136.     Γòæ A      Γöé  220  Γöé  440  Γöé  880  Γöé  1760  Γöé  3520 Γòæ
  1137.     Γòæ A#/Bb  Γöé  233  Γöé  466  Γöé  932  Γöé  1866  Γöé  3729 Γòæ
  1138.     Γòæ B      Γöé  248  Γöé  494  Γöé  988  Γöé  1973  Γöé  3951 Γòæ
  1139.     ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  1140.  
  1141. EXAMPLES 
  1142.  
  1143. The following batch file fragment runs the program DEMO, plays a few notes, and 
  1144. waits for you to press a key: 
  1145.  
  1146.     demo
  1147.     beep 440 4 587 2 1040 6
  1148.     pause Finished with the demo - press a key to continue
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ 3.6. CALL - Call a batch file ΓòÉΓòÉΓòÉ
  1152.  
  1153. SYNTAX     (Internal 4OS2) 
  1154.  
  1155. CALL [d:][path]filename
  1156.  
  1157. PURPOSE 
  1158.  
  1159. Call a secondary batch file. 
  1160.  
  1161. COMMENTS 
  1162.  
  1163. CALL allows batch files to call other batch files (batch file nesting) without 
  1164. invoking a secondary copy of the command processor.  The calling batch file is 
  1165. suspended while the called batch file runs.  When the called batch file 
  1166. finishes, the calling batch file resumes execution at the next command.  If you 
  1167. execute a batch file from another batch file without using CALL, the first 
  1168. batch file is terminated before the second one starts. 
  1169.  
  1170. The current ECHO state will be inherited by a called batch file. 
  1171.  
  1172. See also CANCEL and QUIT. 
  1173.  
  1174. EXAMPLES 
  1175.  
  1176. The following batch file fragment compares an input line to "wp" and calls a 
  1177. secondary batch file if it matches: 
  1178.  
  1179.     input Enter your choice:  %%option
  1180.     if "%option" == "wp" call wp
  1181.  
  1182.  
  1183. ΓòÉΓòÉΓòÉ 3.7. CANCEL - Quit all batch files ΓòÉΓòÉΓòÉ
  1184.  
  1185. SYNTAX     (Internal 4OS2) 
  1186.  
  1187. CANCEL [value]
  1188.  
  1189. PURPOSE 
  1190.  
  1191. Terminate batch processing. 
  1192.  
  1193. COMMENTS 
  1194.  
  1195. The CANCEL command will end all batch file processing, regardless of the batch 
  1196. nesting level.  (Use QUIT to end a nested batch file and return to the previous 
  1197. batch file.)  If you enter a value, CANCEL will set the ERRORLEVEL to that 
  1198. value.  The value also affects the internal variable %_?, and the conditional 
  1199. command separators && and ||. 
  1200.  
  1201. You can CANCEL at any point in a batch file. 
  1202.  
  1203. See also CALL and QUIT. 
  1204.  
  1205. EXAMPLES 
  1206.  
  1207. The following batch file fragment compares an input line to "end" and 
  1208. terminates all batch file processing if it matches: 
  1209.  
  1210.     input Enter your choice:  %%option
  1211.     if "%option" == "end" cancel
  1212.  
  1213.  
  1214. ΓòÉΓòÉΓòÉ 3.8. CD or CHDIR - Change directory ΓòÉΓòÉΓòÉ
  1215.  
  1216. SYNTAX     (Internal 4OS2) 
  1217.  
  1218. CD [[d:][pathname]
  1219. CHDIR [[d:][pathname]
  1220.  
  1221. PURPOSE 
  1222.  
  1223. Display or change the current directory. 
  1224.  
  1225. COMMENTS 
  1226.  
  1227. Entering CD with no argument or only a drive name will display the current 
  1228. directory.  Entering CD and a pathname will change the current directory. 
  1229.  
  1230. If CD can't change to the specified directory, it will look for the CDPATH (or 
  1231. _CDPATH) environment variable.  CD will append the specified directory name to 
  1232. each directory in CDPATH and attempt to change to that directory, until the 
  1233. first match or the end of the CDPATH argument. 
  1234.  
  1235. The previous directory is saved on each CD, and you can switch back to it with 
  1236. "CD -".  You can switch between two directories by repeatedly entering "CD -". 
  1237. Note that the saved directory is the same for both CD and CDD. 
  1238.  
  1239. You can change directories by pressing ^PgUp at the prompt, which will display 
  1240. a popup window of the most recent directory changes; you can select a directory 
  1241. and switch to it by pressing Enter. 
  1242.  
  1243. You can change to the parent directory with "CD ..".  You can also go up one 
  1244. additional directory level with each additional ".".  For example, "CD ...." 
  1245. will go up three directory levels. 
  1246.  
  1247. Every disk drive on the system has its own current directory.  Specifying both 
  1248. a drive and a directory in the CD command will change the current directory on 
  1249. the specified drive, but will not change the default drive. Use CDD to change 
  1250. both the drive and directory. 
  1251.  
  1252. See also %CDPATH, CDD, and PUSHD. 
  1253.  
  1254. EXAMPLES 
  1255.  
  1256. Change to the subdirectory C:\FINANCE\MYFILES: 
  1257.  
  1258.     cd \finance\myfiles
  1259.  
  1260. Change the default directory on drive A: 
  1261.  
  1262.     cd a:\utility
  1263.  
  1264. Set the CDPATH environment variable and then CD to a directory called DOCS (CD 
  1265. will first attempt to change to DOCS in the current directory, then C:\DOCS, 
  1266. then C:\OS\DOCS, etc.): 
  1267.  
  1268.     set cdpath=c:\;c:\os;c:\util;c:\wp
  1269.     cd docs
  1270.  
  1271.  
  1272. ΓòÉΓòÉΓòÉ 3.9. CDD - Change disk and directory ΓòÉΓòÉΓòÉ
  1273.  
  1274. SYNTAX     (Internal 4OS2) 
  1275.  
  1276. CDD [d:]pathname
  1277.  
  1278. PURPOSE 
  1279.  
  1280. Change the current disk drive and directory. 
  1281.  
  1282. COMMENTS 
  1283.  
  1284. CDD is similar to CD, except it can also change the default disk drive. 
  1285.  
  1286. To start at the root directory, start the pathname with a backslash (\). To 
  1287. start at the parent directory, start the pathname with two periods (..). All 
  1288. other pathnames start at the current directory. 
  1289.  
  1290. If CDD can't change to the specified directory, it will look for the CDPATH (or 
  1291. _CDPATH) environment variable.  CDD will append the specified directory name to 
  1292. each directory in CDPATH and attempt to change to that directory, until the 
  1293. first match or the end of the CDPATH argument. 
  1294.  
  1295. The previous directory is saved on each CDD, and you can switch back to it with 
  1296. "CDD -".  You can switch between two directories by repeatedly entering "CDD 
  1297. -".  Note that the saved directory is the same for both CDD and CD. 
  1298.  
  1299. You can change directories by pressing ^PgUp at the prompt, which will display 
  1300. a popup window of the most recent directory changes; you can select a directory 
  1301. and switch to it by pressing Enter. 
  1302.  
  1303. You can change to the parent directory with "CD ..".  You can also go up one 
  1304. additional directory level with each additional ".".  For example, "CD ...." 
  1305. will go up three directory levels. 
  1306.  
  1307. See also %CDPATH, CD and PUSHD. 
  1308.  
  1309. EXAMPLES 
  1310.  
  1311. Change to the subdirectory C:\WP: 
  1312.  
  1313.     cdd c:\wp
  1314.  
  1315. Set the CDPATH environment variable and then CDD to a directory called DOCS 
  1316. (CDD will first attempt to change to DOCS in the current directory, then 
  1317. C:\DOCS, then C:\OS\DOCS, etc.): 
  1318.  
  1319.     set cdpath=c:\;c:\os;c:\util;c:\wp
  1320.     cdd docs
  1321.  
  1322.  
  1323. ΓòÉΓòÉΓòÉ 3.10. CHCP - Change code page ΓòÉΓòÉΓòÉ
  1324.  
  1325. SYNTAX     (Internal 4OS2) 
  1326.  
  1327. CHCP [n]
  1328.  
  1329. PURPOSE 
  1330.  
  1331. Display or change the current system code page. 
  1332.  
  1333. COMMENTS 
  1334.  
  1335. Code page switching allows you to select different character sets for language 
  1336. support. 
  1337.  
  1338. Before using CHCP, you must have DEVINFO= and CODEPAGE= statements in 
  1339. CONFIG.SYS for the specified code page. 
  1340.  
  1341. CHCP accepts one of the two prepared system code pages.  An error message is 
  1342. displayed if a code page is selected that has not been prepared. 
  1343.  
  1344. Entering CHCP with no argument displays the active code page. 
  1345.  
  1346. The code pages supported by OS/2 are: 
  1347.  
  1348.     437   United States
  1349.     850   Multilingual (Latin I)
  1350.     852   Slavic (Latin II)
  1351.     860   Portuguese
  1352.     863   Canadian-French
  1353.     865   Nordic
  1354.  
  1355. See your OS/2 manual for more information on CHCP and code page switching. 
  1356.  
  1357. EXAMPLES 
  1358.  
  1359. Display the current code page: 
  1360.  
  1361.     chcp
  1362.  
  1363. Set the code page to multilingual: 
  1364.  
  1365.     chcp 850
  1366.  
  1367.  
  1368. ΓòÉΓòÉΓòÉ 3.11. CLS - Clear screen ΓòÉΓòÉΓòÉ
  1369.  
  1370. SYNTAX     (Internal 4OS2) 
  1371.  
  1372. CLS [[bright] [blink] fg ON bg [BORDER fg]]
  1373.  
  1374. PURPOSE 
  1375.  
  1376. Clear the video display, optionally to the specified colors. 
  1377.  
  1378. COMMENTS 
  1379.  
  1380. CLS clears the display and moves the cursor to the upper left corner.  fg is 
  1381. the foreground color, bg the background color.  Only the first three characters 
  1382. of the color name and attributes ("bright" and "blink") are required.  You can 
  1383. set the default colors in the 4OS2.INI file. 
  1384.  
  1385. The available colors are: 
  1386.  
  1387.     Black      Blue      Green      Red
  1388.     Magenta    Cyan      Yellow     White
  1389.  
  1390. CLS is normally used in batch files to clear the screen before displaying text. 
  1391.  
  1392. See also COLOR and 4OS2.INI Color Directives. 
  1393.  
  1394. EXAMPLES 
  1395.  
  1396. Clear the display: 
  1397.  
  1398.     cls
  1399.  
  1400. Clear the display to a blue background, and set white characters as the new 
  1401. default: 
  1402.  
  1403.     cls white on blue
  1404.  
  1405.  
  1406. ΓòÉΓòÉΓòÉ 3.12. COLOR - Set screen colors ΓòÉΓòÉΓòÉ
  1407.  
  1408. SYNTAX     (Internal 4OS2) 
  1409.  
  1410. COLOR [[bright] [blink] fg ON bg [BORDER fg]]
  1411.  
  1412. PURPOSE 
  1413.  
  1414. Set the screen display colors. 
  1415.  
  1416. COMMENTS 
  1417.  
  1418. fg is the foreground color, bg the background color.  Only the first three 
  1419. characters of the color name and attributes ("bright" and "blink") are 
  1420. required. 
  1421.  
  1422. The available colors are: 
  1423.  
  1424.     Black      Blue      Green      Red
  1425.     Magenta    Cyan      Yellow     White
  1426.  
  1427. See also CLS. 
  1428.  
  1429. EXAMPLES 
  1430.  
  1431. Set the default screen colors to bright white text on a blue background: 
  1432.  
  1433.     color bright white on blue
  1434.  
  1435.  
  1436. ΓòÉΓòÉΓòÉ 3.13. COPY - Copy files ΓòÉΓòÉΓòÉ
  1437.  
  1438. SYNTAX     (Internal 4OS2) 
  1439.  
  1440. COPY [d:][path]filename[+]...[/A /B] [[d:][path]filename]
  1441.     [/A /B /C /F /M /N /P /Q /R /S /U /V]
  1442.  
  1443. PURPOSE 
  1444.  
  1445. Copy or append one or more files. 
  1446.  
  1447. COMMENTS 
  1448.  
  1449. 4OS2 allows you to copy several unrelated files to a target directory with a 
  1450. single COPY command.  If there are two or more arguments on the command line, 
  1451. COPY assumes the last argument is the target.  If there is only one argument, 
  1452. the target is assumed to be the current directory. 
  1453.  
  1454. The plus (+) tells COPY to append two or more files to a single target file. 
  1455. If you don't specify a target, COPY will append each subsequent file to the 
  1456. first file. 
  1457.  
  1458. If you specify more than one source file, and the target is NOT a directory, 
  1459. COPY will automatically append the files to the target. 
  1460.  
  1461. The /A(SCII) or /B(inary) options apply to the preceding filename and to all 
  1462. subsequent filenames on the command line until the filename preceding another 
  1463. /A or /B, if any.  All other options apply to all filenames on the command 
  1464. line. 
  1465.  
  1466. The COPY options are: 
  1467.  
  1468.     /A      If used with a source filename, COPY will copy the file up to, but 
  1469.             not including, the first ^Z character in the file.  If you use /A 
  1470.             with a target filename, COPY will add a ^Z to the end of the file. 
  1471.             COPY defaults to /A when appending files. 
  1472.  
  1473.     /B      If used with a source filename, COPY will copy the entire file. 
  1474.             Using /B with a target filename prevents COPY from appending a ^Z 
  1475.             to the target file.  COPY defaults to /B for normal file copies. 
  1476.  
  1477.     /C      Copy only those files where the target exists and is older than the 
  1478.             source (see /U). 
  1479.  
  1480.     /F      Fail the copy if the source file has extended attributes and the 
  1481.             target file system doesn't support extended attributes. 
  1482.  
  1483.     /H      Copy hidden and system files too. 
  1484.  
  1485.     /M      Copy only those files with the archive bit set (see also ATTRIB). 
  1486.             The archive bit will NOT be cleared after copying. 
  1487.  
  1488.     /N      Do everything except actually perform the copy (for testing what 
  1489.             the result of the COPY would be). 
  1490.  
  1491.     /P      Confirm each file copy (Y or N).  An N response will skip that 
  1492.             particular file. 
  1493.  
  1494.     /Q      Don't display filenames as they are copied. 
  1495.  
  1496.     /R      Prompt before overwriting an existing file. 
  1497.  
  1498.     /S      Copy subdirectories - the target must be a directory (COPY will 
  1499.             create it if it doesn't exist).  COPY will copy each subdirectory 
  1500.             to a matching subdirectory of the target. 
  1501.  
  1502.     /U      Copy only those source files that are newer than a matching target 
  1503.             file, or where a matching target file doesn't exist (see /C). 
  1504.  
  1505.     /V      Verify each disk write.  This is the same as executing the VERIFY 
  1506.             ON command, but is only active during the COPY. 
  1507.  
  1508.  See also MOVE. 
  1509.  
  1510.  EXAMPLES 
  1511.  
  1512.  Copy the files MEMO1 and PROJECT8.WKS to the root directory on drive A: 
  1513.  
  1514.       copy memo1 project8.wks a:\
  1515.  
  1516.  Append the files MEMO1, MEMO2, and MEMO3 and store the result in BIGMEMO: 
  1517.  
  1518.       copy memo1+memo2+memo3 bigmemo
  1519.  
  1520.  Copy only those files in the root directory on drive A that are newer than the 
  1521.  matching files in the current directory, or that don't exist in the current 
  1522.  directory: 
  1523.  
  1524.       copy /u a:\*.* c:\*.*
  1525.  
  1526.  Copy files from the root directory on drive A to the current directory, but 
  1527.  prompt before overwriting existing files: 
  1528.  
  1529.       copy /r a:\*.*
  1530.  
  1531.  Copy a downloadable font file to the printer in binary mode: 
  1532.  
  1533.       copy myfont.dat lpt1: /b
  1534.  
  1535.  
  1536. ΓòÉΓòÉΓòÉ 3.14. DATE - Set or display date ΓòÉΓòÉΓòÉ
  1537.  
  1538. SYNTAX     (Internal 4OS2) 
  1539.  
  1540. DATE [mm-dd-yy]
  1541.  
  1542. PURPOSE 
  1543.  
  1544. Display and (optionally) change the system date. 
  1545.  
  1546. COMMENTS 
  1547.  
  1548. If you don't enter any parameters, DATE will display the current system date 
  1549. and time, and prompt for the new date.  Press ENTER if you don't wish to change 
  1550. the date, otherwise enter the new date. 
  1551.  
  1552. The format for the date entry depends on the country code defined in CONFIG.SYS 
  1553. or by the CHCP command.  The default format is U.S. (mm-dd-yy).  The European 
  1554. format is dd-mm-yy; the Japanese is yy-mm-dd. 
  1555.  
  1556. The parameters for the DATE command are: 
  1557.  
  1558.     mm      Month (1 - 12) 
  1559.     dd      Day (1 - 31) 
  1560.     yy      Year (80 - 199 or 1980 - 2099) 
  1561.  
  1562.  You can use hyphens, slashes, or periods to separate the month, day, and year 
  1563.  entries. 
  1564.  
  1565.  See also TIME. 
  1566.  
  1567.  EXAMPLES 
  1568.  
  1569.  Enter the date from the command line: 
  1570.  
  1571.       date 12/25/89
  1572.  
  1573.  To be prompted for the date: 
  1574.  
  1575.       date
  1576.  
  1577.  
  1578. ΓòÉΓòÉΓòÉ 3.15. DEL or ERASE - Delete files ΓòÉΓòÉΓòÉ
  1579.  
  1580. SYNTAX     (Internal 4OS2) 
  1581.  
  1582. DEL [/N /P /Q /S /X /Y /Z] [d:][path]filename...
  1583. ERASE [/N /P /Q /S /X /Y /Z] [d:][path]filename...
  1584.  
  1585. PURPOSE 
  1586.  
  1587. Erase the specified file(s) from the disk. 
  1588.  
  1589. COMMENTS 
  1590.  
  1591. The DEL options are: 
  1592.  
  1593.     /N      Do everything except actually delete the file(s) (for testing what 
  1594.             the result of a DEL would be). 
  1595.  
  1596.     /P      Confirm file deletion for each file. 
  1597.  
  1598.     /Q      Don't display filenames as they are deleted. 
  1599.  
  1600.     /S      Delete matching files in the subdirectories. 
  1601.  
  1602.     /X      Remove empty subdirectories after deleting (use with /S). 
  1603.  
  1604.     /Y      The reverse of /P - it assumes a Y response to everything, 
  1605.             including deleting an entire subdirectory.  Use with caution! 
  1606.  
  1607.     /Z      Delete all files, including read-only, hidden and system files. 
  1608.  
  1609.  If you enter a subdirectory name, or a filename composed only of wildcards, 
  1610.  DEL asks for confirmation (Y or N), unless you specified the /Y(es) option. If 
  1611.  you respond with a Y, DEL will delete all the files in that subdirectory 
  1612.  (except for hidden, system, and read-only files). 
  1613.  
  1614.  EXAMPLES 
  1615.  
  1616.  Erase all the files in the current directory with a .BAK or .PRN extension: 
  1617.  
  1618.       del *.bak *.prn
  1619.  
  1620.  Delete the entire subdirectory tree starting with C:\UTIL, including hidden 
  1621.  and read-only files: 
  1622.  
  1623.       del /sxyz c:\util
  1624.  
  1625.  
  1626. ΓòÉΓòÉΓòÉ 3.16. DELAY - Pause for specified time ΓòÉΓòÉΓòÉ
  1627.  
  1628. SYNTAX     (Internal 4OS2) 
  1629.  
  1630. DELAY [seconds]
  1631.  
  1632. PURPOSE 
  1633.  
  1634. Pause for a specified period of time. 
  1635.  
  1636. COMMENTS 
  1637.  
  1638. DELAY is useful in batch file loops while waiting for a condition to occur. The 
  1639. default value is one second. 
  1640.  
  1641. If you need a shorter delay, use BEEP with a frequency < 37 Hz. 
  1642.  
  1643. You can cancel a DELAY loop by pressing ^C. 
  1644.  
  1645. See also BEEP. 
  1646.  
  1647. EXAMPLES 
  1648.  
  1649. Wait for 10 seconds: 
  1650.  
  1651.     delay 10
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 3.17. DESCRIBE - Describe files ΓòÉΓòÉΓòÉ
  1655.  
  1656. SYNTAX     (Internal 4OS2) 
  1657.  
  1658. DESCRIBE [d:][path]filename... ["description"]
  1659.  
  1660. PURPOSE 
  1661.  
  1662. Create, modify, or delete file and subdirectory descriptions. 
  1663.  
  1664. COMMENTS 
  1665.  
  1666. DESCRIBE adds descriptions to filenames and subdirectories.  The descriptions 
  1667. will be displayed when using DIR with the default single column option, or when 
  1668. using SELECT.  If you're using 4OS2 on an HPFS volume, descriptions will only 
  1669. be displayed if you use the DIR or SELECT /Z (FAT format) option.  The default 
  1670. maximum description length is 40 characters; if you have a screen capable of 
  1671. displaying more than 80 columns, you can increase the maximum description 
  1672. length with the 4OS2.INI DescriptionMax option. 
  1673.  
  1674. File descriptions allow you to identify your files in much more meaningful ways 
  1675. than an eight character filename. 
  1676.  
  1677. You can enter a description on the command line by entering the filename 
  1678. followed by the description enclosed in quotes.  Using wildcards and/or 
  1679. multiple filenames with a description on the command line will give all 
  1680. matching files the same description. 
  1681.  
  1682. Descriptions are stored in each directory in a hidden file called DESCRIPT.ION. 
  1683. Use the ATTRIB command to "unhide" this file if you need to copy or delete it. 
  1684.  
  1685. The description file is modified appropriately whenever you perform an internal 
  1686. command (such as COPY, DEL, MOVE, or RENAME), but not if you use an external 
  1687. command (such as REPLACE or XCOPY). 
  1688.  
  1689. See also DIR and SELECT. 
  1690.  
  1691. EXAMPLES 
  1692.  
  1693. Create a description for the file MEMO.TXT interactively: 
  1694.  
  1695.     describe memo.txt
  1696.  
  1697. Create the same description in a single command: 
  1698.  
  1699.     describe memo.txt "Memo to Bob about party"
  1700.  
  1701.  
  1702. ΓòÉΓòÉΓòÉ 3.18. DETACH - Start detached process ΓòÉΓòÉΓòÉ
  1703.  
  1704. SYNTAX     (Internal 4OS2) 
  1705.  
  1706. DETACH [d:][filename[.ext]]
  1707.  
  1708. PURPOSE 
  1709.  
  1710. Start an OS/2 program in detached mode. 
  1711.  
  1712. COMMENTS 
  1713.  
  1714. A program started with DETACH cannot use the keyboard, mouse, or video display. 
  1715. You can redirect standard I/O to other devices if necessary. 
  1716.  
  1717. If you specify an internal command or batch file (.CMD or .BTM), 4OS2 will 
  1718. detach another copy of 4OS2.EXE to execute the command. 
  1719.  
  1720. EXAMPLES 
  1721.  
  1722. Detach a CHKDSK command and redirect its output to the file DIR.DAT: 
  1723.  
  1724.     detach chkdsk >& dir.dat
  1725.  
  1726.  
  1727. ΓòÉΓòÉΓòÉ 3.19. DIR - Display directory ΓòÉΓòÉΓòÉ
  1728.  
  1729. SYNTAX     (Internal 4OS2) 
  1730.  
  1731. DIR [/1 /2 /4 /A[:-rhsda] /B /C /D /F /J /K /L /M /N /O:-deginrsu
  1732.     /P /S /T /U /V /W /Z] [[d:][path]filename...]
  1733.  
  1734. PURPOSE 
  1735.  
  1736. Display information about files and subdirectories. 
  1737.  
  1738. COMMENTS 
  1739.  
  1740. DIR displays information about the files and subdirectories in the specified 
  1741. directory.  Depending upon the options specified, DIR can show the filename, 
  1742. file attributes, size, date and time of the most recent change to the file, and 
  1743. the file description. 
  1744.  
  1745. The DIR options are: 
  1746.  
  1747.     /1      Single column display - display the filename, size, date, time, and 
  1748.             description.  This is the default. 
  1749.  
  1750.     /2      Two column display - display the filename, size, date, and time. 
  1751.  
  1752.     /4      Four column display - display the filename and size, in K(ilobytes) 
  1753.             or M(egabytes). 
  1754.  
  1755.     /A      Display only those files that have the specified attribute set. A 
  1756.             /A with no attributes will display all files, including hidden and 
  1757.             system files.  Preceding the attribute character with a '-' will 
  1758.             display those files that do not have that attribute set. 
  1759.             Attributes can also be combined.  The attributes are: 
  1760.               R  Read only 
  1761.               H  Hidden 
  1762.               S  System 
  1763.               D  Directory 
  1764.               A  Archive 
  1765.  
  1766.     /B      Suppress header line and summaries, and display file or 
  1767.             subdirectory names only, in a single column (useful when 
  1768.             redirecting output to a file or another program). 
  1769.  
  1770.     /C      Display FAT filenames in upper case (like CMD.EXE).  See also 
  1771.             SETDOS /U. 
  1772.  
  1773.     /D      Disable directory colorization. 
  1774.  
  1775.     /F      Display fully expanded filenames (including drive & path) in one 
  1776.             column. 
  1777.  
  1778.     /J      Justify filenames (same format as CMD.EXE). 
  1779.  
  1780.     /K      Suppress the header display. 
  1781.  
  1782.     /L      Display FAT filenames in lower case.  This option will not convert 
  1783.             extended ASCII characters to lower case. 
  1784.  
  1785.     /M      Suppress the footer display. 
  1786.  
  1787.     /N      Display a FAT volume in HPFS format. 
  1788.  
  1789.     /O      Sort order; any combination of the following options: 
  1790.               -  Reverse the sort order for the next option 
  1791.               a  Sort by ASCII value rather than numeric value 
  1792.               d  Sort by date and time (oldest first) 
  1793.               e  Sort by extension 
  1794.               g  Group subdirectories together 
  1795.               i  Sort by the file description 
  1796.               n  Sort by the filename (this is the default) 
  1797.               r  Reverse the sort order for all options 
  1798.               s  Sort by size 
  1799.               u  Unsorted 
  1800.  
  1801.     /P      Pause after each screen page and wait for a key to be pressed 
  1802.             (useful for displaying long directory listings). 
  1803.  
  1804.     /S      Display contents of the current directory and all of its 
  1805.             subdirectories.  DIR will only display headers and summaries for 
  1806.             those directories with matching filenames. 
  1807.  
  1808.     /T      Display the filenames and attributes only (see ATTRIB), in the 
  1809.             format RHSA, where: 
  1810.               R  Read only 
  1811.               H  Hidden 
  1812.               S  System 
  1813.               A  Archive 
  1814.             When displaying attributes, DIR cannot display file descriptions. 
  1815.  
  1816.     /U      Display summary only (number of files & bytes used; both actual 
  1817.             file size and the disk space used). 
  1818.  
  1819.     /V      Display filenames sorted vertically rather than horizontally (with 
  1820.             the /2, /4, or /W option). 
  1821.  
  1822.     /W      Wide display - display the filenames only, horizontally across the 
  1823.             screen (5 columns on an 80-character display). 
  1824.  
  1825.     /Z      Display an HPFS volume in FAT format.  Filenames longer than 12 
  1826.             characters will be truncated. 
  1827.  
  1828.  DIR allows wildcard characters in the filename.  If you don't specify a 
  1829.  filename, DIR defaults to *.* (display all files and subdirectories in the 
  1830.  current directory). 
  1831.  
  1832.  If you append filenames with a ; (an "include list"), DIR will display the 
  1833.  matching filenames in a single directory listing.  Only the first file in an 
  1834.  include list can have a path. 
  1835.  
  1836.  You can display the subdirectories and files in color by setting the COLORDIR 
  1837.  variable.  The format for COLORDIR is: 
  1838.  
  1839.       ext [...]:[bright][blink] fg [ON bg]; ...
  1840.  
  1841.  where "ext" is the file extension, or one of the following file attributes: 
  1842.  
  1843.       DIRS - directory
  1844.       RDONLY - read-only file
  1845.       HIDDEN - hidden file
  1846.       SYSTEM - system file
  1847.       ARCHIVE - file modified since last backup
  1848.  
  1849.  For example, to display the .COM and .EXE files in red, the .C and .ASM files 
  1850.  in bright cyan, and the read-only files in blinking green: 
  1851.  
  1852.       set colordir=com exe:red; c asm:bright cyan; rdonly:blink green
  1853.  
  1854.  If you don't select a background color, DIR will use the current screen 
  1855.  background color. 
  1856.  
  1857.  If a country code was defined in the CONFIG.SYS file or by the CHCP command, 
  1858.  DIR will display the date in the format for that country.  The default date 
  1859.  format is U.S. (mm-dd-yy). 
  1860.  
  1861.  Options on the command line apply only to the filenames that follow the 
  1862.  option, except that options at the end of the line apply to the preceding 
  1863.  filename only.  This allows you to specify several options for a group of 
  1864.  files, and retains compatibility with CMD.EXE when a single filename is 
  1865.  specified. 
  1866.  
  1867.  See also DESCRIBE and SELECT. 
  1868.  
  1869.  EXAMPLES 
  1870.  
  1871.  Display the .WKS files, and then the .WK1 files in the current directory: 
  1872.  
  1873.       dir *.wks *.wk1
  1874.  
  1875.  Display the .WKS and .WK1 files together (an "include list"): 
  1876.  
  1877.       dir *.wks;*.wk1
  1878.  
  1879.  Display the files on drive C, including hidden and system files, pausing after 
  1880.  each page: 
  1881.  
  1882.       dir /a/sp c:\*.*
  1883.  
  1884.  
  1885. ΓòÉΓòÉΓòÉ 3.20. DIRS - Display directory stack ΓòÉΓòÉΓòÉ
  1886.  
  1887. SYNTAX     (Internal 4OS2) 
  1888.  
  1889. DIRS
  1890.  
  1891. PURPOSE 
  1892.  
  1893. Display the current directory stack. 
  1894.  
  1895. COMMENTS 
  1896.  
  1897. DIRS displays the directory stack used by PUSHD and POPD, oldest entries first. 
  1898. The stack holds 255 characters (about 10 to 20 entries). 
  1899.  
  1900. See also PUSHD and POPD. 
  1901.  
  1902. EXAMPLES 
  1903.  
  1904. Change directories and then display the directory stack: 
  1905.  
  1906.     pushd c:\database
  1907.     pushd d:\wordp\memos
  1908.     dirs
  1909.  
  1910.  
  1911. ΓòÉΓòÉΓòÉ 3.21. DPATH - Display / set data search path ΓòÉΓòÉΓòÉ
  1912.  
  1913. SYNTAX     (Internal 4OS2) 
  1914.  
  1915. DPATH [[d:]path][[;[d:]path]...]]
  1916. DPATH ;
  1917.  
  1918. PURPOSE 
  1919.  
  1920. Tells applications where to search for their files. 
  1921.  
  1922. COMMENTS 
  1923.  
  1924. If you enter DPATH with no parameters, 4OS2 displays the current search path. 
  1925. If you enter DPATH and a semicolon, 4OS2 clears the search path. 
  1926.  
  1927. You can edit an existing DPATH with the ESET command. 
  1928.  
  1929. EXAMPLES 
  1930.  
  1931. The following DPATH command directs applications to search for their data files 
  1932. in the following order: the current directory, the root directory on drive C, 
  1933. the OS2 subdirectory on drive C, and the UTIL subdirectory on drive C: 
  1934.  
  1935.     dpath c:\;c:\os2;c:\util
  1936.  
  1937. Display the current DPATH: 
  1938.  
  1939.     dpath
  1940.  
  1941.  
  1942. ΓòÉΓòÉΓòÉ 3.22. DRAWBOX - Draw a box ΓòÉΓòÉΓòÉ
  1943.  
  1944. SYNTAX     (Internal 4OS2) 
  1945.  
  1946. DRAWBOX ulrow ulcol lrrow lrcol style [bright][blink] fg ON bg
  1947.     [FILL bgfill] [SHADOW]
  1948.  
  1949. PURPOSE 
  1950.  
  1951. Draw a box on the screen. 
  1952.  
  1953. COMMENTS 
  1954.  
  1955. DRAWBOX is useful for creating attractive screen displays in batch files. 
  1956. DRAWBOX detects other lines and boxes on the display, and creates the 
  1957. appropriate connector characters when possible (not all types of lines can be 
  1958. connected with the available characters). 
  1959.  
  1960. The row and column numbering is zero-based, so on a standard 25 line by 80 
  1961. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  1962.  
  1963. The DRAWBOX parameters are: 
  1964.  
  1965.     ulrow         Row for upper left corner 
  1966.  
  1967.     ulcol         Column for upper left corner 
  1968.  
  1969.     lrrow         Row for lower right corner 
  1970.  
  1971.     lrcol         Column for lower right corner 
  1972.  
  1973.     style         Box drawing style: 
  1974.                     0  no line drawing characters (box is drawn with blanks) 
  1975.                     1  single line 
  1976.                     2  double line 
  1977.                     3  single line on top and bottom, double on sides 
  1978.                     4  double line on top and bottom, single on sides 
  1979.  
  1980.     fg            Foreground character color 
  1981.  
  1982.     bg            Background character color 
  1983.  
  1984.     bgfill        Background fill color (for the inside of the box) 
  1985.  
  1986.     SHADOW        Include a transparent drop shadow 
  1987.  
  1988.  Only the first three characters of the color name and attributes ("bright" and 
  1989.  "blink") are required. 
  1990.  
  1991.  The available colors are: 
  1992.  
  1993.       Black      Blue      Green      Red
  1994.       Magenta    Cyan      Yellow     White
  1995.  
  1996.  See also DRAWHLINE and DRAWVLINE. 
  1997.  
  1998.  EXAMPLES 
  1999.  
  2000.  Draw a single line box around the entire screen with bright white lines on a 
  2001.  blue background: 
  2002.  
  2003.       drawbox 0 0 24 79 1 bright white on blue fill blue
  2004.  
  2005.  
  2006. ΓòÉΓòÉΓòÉ 3.23. DRAWHLINE - Draw horizontal line ΓòÉΓòÉΓòÉ
  2007.  
  2008. SYNTAX     (Internal 4OS2) 
  2009.  
  2010. DRAWHLINE row column length style [bright] [blink] fg ON bg
  2011.  
  2012. PURPOSE 
  2013.  
  2014. Draw a horizontal line on the screen. 
  2015.  
  2016. COMMENTS 
  2017.  
  2018. DRAWHLINE is useful for creating attractive screen displays in batch files. 
  2019. DRAWHLINE detects other lines and boxes on the display, and creates the 
  2020. appropriate connector characters when possible (not all types of lines can be 
  2021. connected with the available characters). 
  2022.  
  2023. The row and column numbering is zero-based, so on a standard 25 line by 80 
  2024. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  2025.  
  2026. The DRAWHLINE parameters are: 
  2027.  
  2028.     row         Start row 
  2029.  
  2030.     column      Start column 
  2031.  
  2032.     length      Length of line 
  2033.  
  2034.     style       Line drawing style: 
  2035.                   1  Single line 
  2036.                   2  Double line 
  2037.  
  2038.     fg          Foreground character color 
  2039.  
  2040.     bg          Background character color 
  2041.  
  2042.  Only the first three characters of the color name and attributes ("bright" and 
  2043.  "blink") are required. 
  2044.  
  2045.  The available colors are: 
  2046.  
  2047.       Black      Blue      Green      Red
  2048.       Magenta    Cyan      Yellow     White
  2049.  
  2050.  See also DRAWBOX, DRAWVLINE and SCRPUT. 
  2051.  
  2052.  EXAMPLES 
  2053.  
  2054.  Draw a double line along the top row of the display with green characters on a 
  2055.  blue background: 
  2056.  
  2057.       drawhline 0 0 79 2 green on blue
  2058.  
  2059.  
  2060. ΓòÉΓòÉΓòÉ 3.24. DRAWVLINE - Draw vertical line ΓòÉΓòÉΓòÉ
  2061.  
  2062. SYNTAX     (Internal 4OS2) 
  2063.  
  2064. DRAWVLINE row column length style [bright] [blink] fg ON bg
  2065.  
  2066. PURPOSE 
  2067.  
  2068. Draw a vertical line on the screen. 
  2069.  
  2070. COMMENTS 
  2071.  
  2072. DRAWVLINE is useful for creating attractive screen displays in batch files. 
  2073. DRAWVLINE detects other lines and boxes on the display, and creates the 
  2074. appropriate connector characters when possible (not all types of lines can be 
  2075. connected with the available characters). 
  2076.  
  2077. The row and column numbering is zero-based, so on a standard 25 line by 80 
  2078. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  2079.  
  2080. The DRAWVLINE parameters are: 
  2081.  
  2082.     row         Start row 
  2083.  
  2084.     column      Start column 
  2085.  
  2086.     length      Length of line 
  2087.  
  2088.     style       Line drawing style: 
  2089.                   1  Single line 
  2090.                   2  Double line 
  2091.  
  2092.     fg          Foreground character color 
  2093.  
  2094.     bg          Background character color 
  2095.  
  2096.  Only the first three characters of the color name and attributes ("bright" and 
  2097.  "blink") are required. 
  2098.  
  2099.  The available colors are: 
  2100.  
  2101.       Black      Blue      Green      Red
  2102.       Magenta    Cyan      Yellow     White
  2103.  
  2104.  See also DRAWBOX, DRAWHLINE, and VSCRPUT. 
  2105.  
  2106.  EXAMPLES 
  2107.  
  2108.  Draw a double line along the left margin of the display with bright red 
  2109.  characters on a black background: 
  2110.  
  2111.       drawvline 0 0 24 2 bright red on black
  2112.  
  2113.  
  2114. ΓòÉΓòÉΓòÉ 3.25. ECHO - Display a message ΓòÉΓòÉΓòÉ
  2115.  
  2116. SYNTAX     (Internal 4OS2) 
  2117.  
  2118. ECHO [on | off | message]
  2119.  
  2120. PURPOSE 
  2121.  
  2122. Display the echo status, enable or disable batch file or command line echoing, 
  2123. or display a message. 
  2124.  
  2125. COMMENTS 
  2126.  
  2127. ECHO defaults to ON in batch files.  To prevent a line from being echoed, 
  2128. preface it with the @ symbol.  You can default to ECHO OFF by setting the 
  2129. SETDOS /V option to 0.  (Setting SETDOS /V to 2 will echo all lines, regardless 
  2130. of the echo state or @ symbols.)  The current ECHO state is inherited by called 
  2131. batch files. 
  2132.  
  2133. ECHO defaults to OFF during keyboard input.  If you set ECHO ON from the 
  2134. command line, the fully parsed and expanded commands (including aliases and 
  2135. variables) will be displayed before they are executed.  The keyboard ECHO state 
  2136. is independent of the batch file ECHO state; changing ECHO in a batch file has 
  2137. no effect on the display at the command prompt, and vice versa. 
  2138.  
  2139. If no arguments are entered, ECHO displays the current echo state. 
  2140.  
  2141. ECHO commands in a batch file will send messages to the screen while the batch 
  2142. file executes, even if ECHO is set OFF.  You cannot use the command separator 
  2143. character or the redirection symbols (|><) in an ECHO message, unless you 
  2144. enclose them in quotes or precede them with the escape character.  If you want 
  2145. to echo a blank line, enter: 
  2146.  
  2147.     echo.
  2148.  
  2149. See also ECHOS, SETDOS, SCREEN, SCRPUT, TEXT and VSCRPUT. 
  2150.  
  2151. EXAMPLES 
  2152.  
  2153. Enable command line echoing: 
  2154.  
  2155.     echo on
  2156.  
  2157. Display a message in a batch file: 
  2158.  
  2159.     echo Processing your print files...
  2160.  
  2161. Turn off batch file echoing, without displaying the ECHO command itself: 
  2162.  
  2163.     @echo off
  2164.  
  2165.  
  2166. ΓòÉΓòÉΓòÉ 3.26. ECHOS - Display a message with no CR/LF ΓòÉΓòÉΓòÉ
  2167.  
  2168. SYNTAX     (Internal 4OS2) 
  2169.  
  2170. ECHOS message
  2171.  
  2172. PURPOSE 
  2173.  
  2174. Display a message, without printing a trailing CR/LF. 
  2175.  
  2176. COMMENTS 
  2177.  
  2178. ECHOS is useful for outputting text when you don't want ECHO to add a carriage 
  2179. return / linefeed pair (for example, when redirecting control sequences to a 
  2180. printer).  You cannot use the command separator character or the redirection 
  2181. symbols (|><) in an ECHOS message, unless you enclose them in quotes or precede 
  2182. them with the escape character. 
  2183.  
  2184. See also ECHO. 
  2185.  
  2186. EXAMPLES 
  2187.  
  2188. Send a control sequence (an Esc+H) to the printer. 
  2189.  
  2190.     echos ^eH > lpt1:
  2191.  
  2192.  
  2193. ΓòÉΓòÉΓòÉ 3.27. ENDLOCAL - Restore saved environment ΓòÉΓòÉΓòÉ
  2194.  
  2195. SYNTAX     (Internal 4OS2) 
  2196.  
  2197. ENDLOCAL
  2198.  
  2199. PURPOSE 
  2200.  
  2201. Restore the saved disk drive, directory, aliases, and environment. 
  2202.  
  2203. COMMENTS 
  2204.  
  2205. ENDLOCAL restores the disk drive, directory, aliases, and environment variables 
  2206. saved by the previous SETLOCAL command.  SETLOCAL and ENDLOCAL can only be used 
  2207. in batch files, not in aliases. 
  2208.  
  2209. See also SETLOCAL. 
  2210.  
  2211. EXAMPLES 
  2212.  
  2213. This batch file fragment saves the aliases, environment, drive, and current 
  2214. working directory, changes the drive and directory, modifies some environment 
  2215. variables, runs the program TEST1, and then restores the original values: 
  2216.  
  2217.     setlocal
  2218.     cdd d:\test
  2219.     set path=c:\;c:\dos;c:\util
  2220.     set lib=d:\lib
  2221.     test1
  2222.     endlocal
  2223.  
  2224.  
  2225. ΓòÉΓòÉΓòÉ 3.28. ESET - Edit variable or alias ΓòÉΓòÉΓòÉ
  2226.  
  2227. SYNTAX     (Internal 4OS2) 
  2228.  
  2229. ESET [/A] varname...
  2230.  
  2231. PURPOSE 
  2232.  
  2233. Edit environment variables and/or aliases. 
  2234.  
  2235. COMMENTS 
  2236.  
  2237. ESET allows you to edit your environment variables and aliases using the line 
  2238. editing commands.  The cursor will be positioned at the first character of the 
  2239. variable or alias. 
  2240.  
  2241. The ESET options are: 
  2242.  
  2243.     /A      Assume the argument is an alias.  This allows you to edit an alias 
  2244.             with the same name as an environment variable. 
  2245.  
  2246.  ESET will search for environment variables first, and then aliases. 
  2247.  
  2248.  Environment variable and alias names are limited to 80 characters, and their 
  2249.  arguments to 255 characters. 
  2250.  
  2251.  See also Editing the Command Line, ALIAS, UNALIAS, SET, and UNSET. 
  2252.  
  2253.  EXAMPLES 
  2254.  
  2255.  Edit the executable file search path: 
  2256.  
  2257.       eset path
  2258.  
  2259.  Create and then edit an alias: 
  2260.  
  2261.       alias d dir /djp
  2262.       eset d
  2263.  
  2264.  
  2265. ΓòÉΓòÉΓòÉ 3.29. EXCEPT - Exclude files from command ΓòÉΓòÉΓòÉ
  2266.  
  2267. SYNTAX     (Internal 4OS2) 
  2268.  
  2269. EXCEPT ([d:][path]filename...) command
  2270.  
  2271. PURPOSE 
  2272.  
  2273. Perform a command, except on the file(s) specified. 
  2274.  
  2275. COMMENTS 
  2276.  
  2277. EXCEPT provides a means of executing a command on a group of files and/or 
  2278. subdirectories, except those enclosed within the parentheses. 
  2279.  
  2280. The command can be an internal command or alias, an external command, or a 
  2281. batch file. 
  2282.  
  2283. You may use wildcard characters in a filename. 
  2284.  
  2285. When using filename completion (TAB or F9) to get the filenames inside the 
  2286. parentheses, type a space after the open parenthesis before entering a partial 
  2287. filename or pressing TAB. Otherwise the command line editor will treat the open 
  2288. parenthesis as the first character of the filename to be completed. 
  2289.  
  2290. EXCEPT prevents operations on the specified file(s) by setting the hidden 
  2291. attribute, performing the command, and then clearing the hidden attribute. If 
  2292. EXCEPT is aborted in an unusual way, you may need to use the ATTRIB command to 
  2293. "unhide" (-H) the file(s). 
  2294.  
  2295. EXCEPT will not work with programs or commands that ignore the hidden 
  2296. attribute. 
  2297.  
  2298. See also ATTRIB. 
  2299.  
  2300. EXAMPLES 
  2301.  
  2302. Erase all but the files beginning with MEMO and those ending in .WKS: 
  2303.  
  2304.     except (memo*.* *.wks) del *.*
  2305.  
  2306.  
  2307. ΓòÉΓòÉΓòÉ 3.30. EXIT - Exit secondary processor ΓòÉΓòÉΓòÉ
  2308.  
  2309. SYNTAX     (Internal 4OS2) 
  2310.  
  2311. EXIT [value]
  2312.  
  2313. PURPOSE 
  2314.  
  2315. Exit the current command processor. 
  2316.  
  2317. COMMENTS 
  2318.  
  2319. Some application programs will start a secondary copy of the command processor 
  2320. to allow you execute commands.  To return to the application again, type EXIT. 
  2321.  
  2322. If you EXIT from a primary command processor, you will be returned to PM. 
  2323.  
  2324. If you specify a value, EXIT will return that value to the parent process. 
  2325.  
  2326. EXAMPLES 
  2327.  
  2328. Return to the parent process: 
  2329.  
  2330.     exit
  2331.  
  2332.  
  2333. ΓòÉΓòÉΓòÉ 3.31. FOR - Repeat a command ΓòÉΓòÉΓòÉ
  2334.  
  2335. SYNTAX     (Internal 4OS2) 
  2336.  
  2337. FOR [/A[:-RHSDA]] %%var IN (set) [DO] command
  2338.  
  2339. PURPOSE 
  2340.  
  2341. Repeat a command for several variables. 
  2342.  
  2343. COMMENTS 
  2344.  
  2345. FOR sets var sequentially to each member of (set), and then evaluates and 
  2346. executes command for every argument in (set). If an argument in (set) contains 
  2347. wildcard characters, var will be set sequentially to each matching filename on 
  2348. the disk.  If a filename in (set) begins with an @, var will be set 
  2349. sequentially to each line in the file.  You can nest multiple FOR statements. 
  2350.  
  2351. The only option for FOR is: 
  2352.  
  2353.     /A      Retrieve only those files with the specified attribute.  A /A with 
  2354.             no attributes will retrieve all files, including hidden and system 
  2355.             files, and subdirectories.  Preceding the attribute character with 
  2356.             a '-' will retrieve those files that DON'T have that attribute set. 
  2357.             Attributes can also be combined.  The attributes are: 
  2358.               R  Read only 
  2359.               H  Hidden 
  2360.               S  System 
  2361.               D  Directory 
  2362.               A  Archive 
  2363.  
  2364.  The command can be an internal command or alias, an external command, or a 
  2365.  batch file. 
  2366.  
  2367.  In CMD.EXE you must use a single % for the variable name from the command 
  2368.  line, and %% when in a batch file.  4OS2 will accept either % or %% in either 
  2369.  case. 
  2370.  
  2371.  CMD.EXE requires the variable name to be a single character; 4OS2 supports 
  2372.  variable names up to 80 characters. 
  2373.  
  2374.  CMD.EXE requires the word DO on the command line; it is optional in 4OS2. 
  2375.  
  2376.  EXAMPLES 
  2377.  
  2378.  The following example compiles the C programs in the current directory that 
  2379.  have a "2" or a "3" somewhere in their name: 
  2380.  
  2381.       for %a in (*2*.c *3*.c) do cl %a ;
  2382.  
  2383.  The following example uses variable functions to delete the .BAK files for 
  2384.  which a corresponding .TXT file exists in the current directory: 
  2385.  
  2386.       for %a in (*.txt) if exist %@name[%a].bak del %@name[%a].bak
  2387.  
  2388.  
  2389. ΓòÉΓòÉΓòÉ 3.32. FREE - Display disk utilization ΓòÉΓòÉΓòÉ
  2390.  
  2391. SYNTAX     (Internal 4OS2) 
  2392.  
  2393. FREE [d:] ...
  2394.  
  2395. PURPOSE 
  2396.  
  2397. Display the total disk space, total bytes used, and total bytes free on the 
  2398. specified (or default) drive(s). 
  2399.  
  2400. COMMENTS 
  2401.  
  2402. FREE provides the same disk information as the external command CHKDSK, but 
  2403. without the wait. 
  2404.  
  2405. EXAMPLES 
  2406.  
  2407. Display the status of drives A, B, and C: 
  2408.  
  2409.     free a: b: c:
  2410.  
  2411.  
  2412. ΓòÉΓòÉΓòÉ 3.33. GLOBAL - Execute command in all subdirectories ΓòÉΓòÉΓòÉ
  2413.  
  2414. SYNTAX     (Internal 4OS2) 
  2415.  
  2416. GLOBAL [/H /I /P /Q] command
  2417.  
  2418. PURPOSE 
  2419.  
  2420. Execute a command in the current directory and its subdirectories. 
  2421.  
  2422. COMMENTS 
  2423.  
  2424. GLOBAL performs the specified command first in the current directory, and then 
  2425. in every subdirectory under the current directory. 
  2426.  
  2427. The command can be an internal command or alias, an external command, or a 
  2428. batch file. 
  2429.  
  2430. The GLOBAL options are: 
  2431.  
  2432.     /H      Process hidden subdirectories. 
  2433.  
  2434.     /I      Ignore exit codes.  If this option is not specified, GLOBAL will 
  2435.             terminate if the command returns a non-zero exit code. 
  2436.  
  2437.     /P      Prompt for a Y/N whether to execute the command in each directory. 
  2438.  
  2439.     /Q      Do not display the directory names as each directory is accessed. 
  2440.  
  2441.  EXAMPLES 
  2442.  
  2443.  Copy the files in every directory on drive A to the directory C:\TEMP: 
  2444.  
  2445.       cd a:\ & global copy a:*.* c:\temp
  2446.  
  2447.  
  2448. ΓòÉΓòÉΓòÉ 3.34. GOSUB - Call batch subroutine ΓòÉΓòÉΓòÉ
  2449.  
  2450. SYNTAX     (Internal 4OS2) 
  2451.  
  2452. GOSUB label
  2453.  
  2454. PURPOSE 
  2455.  
  2456. Call a subroutine in a batch file. 
  2457.  
  2458. COMMENTS 
  2459.  
  2460. GOSUB calls the specified label as a subroutine.  The subroutine must end with 
  2461. a RETURN statement.  After the RETURN, the batch file continues with the 
  2462. command following the GOSUB command. 
  2463.  
  2464. GOSUB searches for the label starting at the first line of the batch file. If 
  2465. the label doesn't exist, the batch file is terminated with the error message 
  2466. "Label not found." 
  2467.  
  2468. The label must begin with a colon (:), and appear by itself on the line. GOSUB 
  2469. ignores case differences when matching labels. 
  2470.  
  2471. See also GOTO and RETURN. 
  2472.  
  2473. EXAMPLES 
  2474.  
  2475. The following batch file fragment calls a subroutine that displays the 
  2476. directory and returns: 
  2477.  
  2478.     echo Calling a subroutine
  2479.     gosub subr1
  2480.     echo Returned from the subroutine
  2481.     quit
  2482.     :subr1
  2483.     dir /hw
  2484.     return
  2485.  
  2486.  
  2487. ΓòÉΓòÉΓòÉ 3.35. GOTO - Jump to batch label ΓòÉΓòÉΓòÉ
  2488.  
  2489. SYNTAX     (Internal 4OS2) 
  2490.  
  2491. GOTO [/I] label
  2492.  
  2493. PURPOSE 
  2494.  
  2495. Continue batch file processing at the line following the label. 
  2496.  
  2497. COMMENTS 
  2498.  
  2499. GOTO changes the current position in the batch file to the line immediately 
  2500. following the label. 
  2501.  
  2502. The search for the label starts at the first line of the batch file. If the 
  2503. label doesn't exist, the batch file is terminated with the error message "Label 
  2504. not found." 
  2505.  
  2506. The label must begin with a colon (:), and appear by itself on the line. GOTO 
  2507. ignores case differences when matching labels. 
  2508.  
  2509. A GOTO will cancel all IFF nesting, unless you specify the /I option. 
  2510.  
  2511. See also GOSUB. 
  2512.  
  2513. EXAMPLES 
  2514.  
  2515. The following batch file fragment checks for the existence of the file 
  2516. CONFIG.SYS.  If CONFIG.SYS exists, GOTO jumps to C_EXISTS and copies all the 
  2517. files from the current directory to the root directory on A.  If CONFIG.SYS 
  2518. doesn't exist, the batch file prints an error message and exits. 
  2519.  
  2520.     if exist config.sys goto C_EXISTS
  2521.     echo CONFIG.SYS doesn't exist - exiting
  2522.     quit
  2523.     :c_exists
  2524.     copy *.* a:\
  2525.  
  2526.  
  2527. ΓòÉΓòÉΓòÉ 3.36. HELP - Display 4OS2 online help ΓòÉΓòÉΓòÉ
  2528.  
  2529. SYNTAX     (Internal 4OS2) 
  2530.  
  2531. HELP [command]
  2532.  
  2533. PURPOSE 
  2534.  
  2535. Display the 4OS2 help file. 
  2536.  
  2537. COMMENTS 
  2538.  
  2539. HELP uses the PM VIEW.EXE program to display help for 4OS2 (4OS2.INF) and OS/2 
  2540. in general (CMDREF.INF).  You can change the default .INF files with the 
  2541. HelpBook directive in 4OS2.INI. 
  2542.  
  2543. EXAMPLES 
  2544.  
  2545. Display the HELP table of contents: 
  2546.  
  2547.     help
  2548.  
  2549. Display help for the DIR command: 
  2550.  
  2551.     help dir
  2552.  
  2553.  
  2554. ΓòÉΓòÉΓòÉ 3.37. HISTORY - Display / set command history ΓòÉΓòÉΓòÉ
  2555.  
  2556. SYNTAX     (Internal 4OS2) 
  2557.  
  2558. HISTORY [/A command] [/F /P] [/R [d:][path]filename]
  2559.  
  2560. PURPOSE 
  2561.  
  2562. Display, read, or clear the history list. 
  2563.  
  2564. COMMENTS 
  2565.  
  2566. If no parameters are entered, HISTORY displays the current history list. 
  2567.  
  2568. The HISTORY options are: 
  2569.  
  2570.     /A      Add the specified command to the history list. 
  2571.  
  2572.     /F      Clear the command history list. 
  2573.  
  2574.     /P      Prompt for a key after displaying each page. 
  2575.  
  2576.     /R      Read the command history from the specified file. You can save the 
  2577.             history list by redirecting the output of HISTORY to a file. 
  2578.  
  2579.  The number of commands saved in the history list depends on the length of each 
  2580.  command line.  The history list size can be specified at startup from 256 to 
  2581.  8192 characters.  The default size is 1024 characters. 
  2582.  
  2583.  You can disable saving commands to the history list, or specify a minimum 
  2584.  command line length to save, with the HistMin directive in 4OS2.INI. 
  2585.  
  2586.  EXAMPLES 
  2587.  
  2588.  Display the history list: 
  2589.  
  2590.       history
  2591.  
  2592.  Clear the history entries: 
  2593.  
  2594.       history /f
  2595.  
  2596.  Save the history list to the file HISTFILE, and then read it in again: 
  2597.  
  2598.       history > histfile
  2599.       history /r histfile
  2600.  
  2601.  
  2602. ΓòÉΓòÉΓòÉ 3.38. IF - Conditional command execution ΓòÉΓòÉΓòÉ
  2603.  
  2604. SYNTAX     (Internal 4OS2) 
  2605.  
  2606. IF [NOT] condition [.AND. | .OR. | .XOR. [NOT] ...] command
  2607.  
  2608. PURPOSE 
  2609.  
  2610. Allow conditional execution of commands. 
  2611.  
  2612. COMMENTS 
  2613.  
  2614. IF first tests the given condition.  If the condition is true, IF executes the 
  2615. specified command, otherwise the command will be ignored.  If you use the NOT 
  2616. option, the command is executed only when the condition is false.  IF 
  2617. statements can be nested. 
  2618.  
  2619. The command can be an internal command or alias, an external command, or a 
  2620. batch file. 
  2621.  
  2622. For the string tests, case differences are ignored.  When comparing strings, 
  2623. you should enclose them in double quotes (see examples).  The use of double 
  2624. quotes reduces problems when the strings being compared contain characters that 
  2625. may have another meaning to the parser.  If the strings begin with a digit, IF 
  2626. will do a numeric comparison. Otherwise, IF does an ASCII comparison. 
  2627.  
  2628. The .AND., .OR., and .XOR. tests allow you to combine tests in an IF statement. 
  2629. The expressions are scanned from left to right. 
  2630.  
  2631. The condition can be any of the following: 
  2632.  
  2633.     string1 == string2   or   string1 EQ string2
  2634.         If string1 is equal to string2, the condition is true. 
  2635.  
  2636.     string1 != string2   or   string1 NE string2
  2637.         If string1 is not equal to string2, the condition is true. 
  2638.  
  2639.     string1 LT string2
  2640.         If string1 is < string2, the condition is true. 
  2641.  
  2642.     string1 LE string2
  2643.         If string1 is <= string2, the condition is true. 
  2644.  
  2645.     string1 GE string2
  2646.         If string1 is >= string2, the condition is true. 
  2647.  
  2648.     string1 GT string2
  2649.         If string1 is > string2, the condition is true. 
  2650.  
  2651.  In the tests below, the term "condition" refers to one of the relational 
  2652.  operators described for the string tests above (==, EQ, NE, LT, etc.). 
  2653.  
  2654.     ERRORLEVEL [condition] number
  2655.         Test the exit code of the preceding external program.  If no relational 
  2656.         operator (EQ, GT, etc.) is specified, the default is GE. NOTE:  Not all 
  2657.         programs return an explicit exit code.  In those cases, the behavior of 
  2658.         ERRORLEVEL is undefined. 
  2659.  
  2660.     EXIST [d:][path]filename
  2661.         If the file exists, the condition is true.  You can use wildcard 
  2662.         characters in the filename, in which case the condition is true if any 
  2663.         file matching the wildcards exists. 
  2664.  
  2665.     ISALIAS aliasname
  2666.         If the specified name is an alias, the condition is true. 
  2667.  
  2668.     ISDIR [d:]path
  2669.         If the subdirectory exists, the condition is true. 
  2670.  
  2671.     ISINTERNAL command
  2672.         If the specified command is an internal command, the condition is true. 
  2673.  
  2674.     ISLABEL labelname
  2675.         If the specified label exists in the current batch file, the condition 
  2676.         is true. 
  2677.  
  2678.  See also IFF. 
  2679.  
  2680.  EXAMPLES 
  2681.  
  2682.  Test for the presence of A:\JAN.DOC and copy it to the root directory on drive 
  2683.  C if it exists: 
  2684.  
  2685.       if exist a:\jan.doc copy a:\jan.doc c:\
  2686.  
  2687.  This batch file fragment tests for a string value: 
  2688.  
  2689.       if "%cmd" == "wp" goto wordproc
  2690.       if "%cmd" NE "graphics" goto badentry
  2691.  
  2692.  Test for more than 500K of free disk space on drive A: 
  2693.  
  2694.       if %@diskfree[a:] gt 500 echo More than 500K free
  2695.  
  2696.  Run the program MONOPROG if the monitor type is monochrome: 
  2697.  
  2698.       if %_monitor == mono monoprog
  2699.  
  2700.  
  2701. ΓòÉΓòÉΓòÉ 3.39. IFF - Conditional command execution ΓòÉΓòÉΓòÉ
  2702.  
  2703. SYNTAX     (Internal 4OS2) 
  2704.  
  2705. IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT] ...]
  2706.     THEN & ... & ELSE[[IFF] ... THEN] & ... & ENDIFF
  2707.  
  2708. PURPOSE 
  2709.  
  2710. Allow IF/THEN/ELSE conditional execution of commands. 
  2711.  
  2712. COMMENTS 
  2713.  
  2714. IFF first tests the given condition.  If the condition is true, IFF executes 
  2715. the specified command(s) until the next ELSE, ELSEIFF, or ENDIFF; otherwise the 
  2716. command(s) will be ignored and parsing will continue at the next ELSE, ELSEIFF, 
  2717. or ENDIFF.  If you use the NOT option, commands are executed only when the 
  2718. condition is false.  IFF statements can be nested up to 15 levels deep. 
  2719.  
  2720. The .AND., .OR., and .XOR. tests allow you to combine tests in an IFF 
  2721. statement.  The expressions are scanned from left to right; each new .AND., 
  2722. .OR., or .XOR. tests the combination of all preceding tests. 
  2723.  
  2724. The command can be an internal command or alias, an external command, or a 
  2725. batch file. 
  2726.  
  2727. If you do a GOTO inside an IFF, GOTO assumes you are jumping outside the IFF 
  2728. statement.  You cannot GOTO another part of the same IFF, or inside another IFF 
  2729. statement. 
  2730.  
  2731. See the IF command for a list of the tests available. 
  2732.  
  2733. EXAMPLES 
  2734.  
  2735. The following batch file fragment tests the monitor type (monochrome or color), 
  2736. and sets the appropriate colors and prompt: 
  2737.  
  2738.     iff %_monitor == color then
  2739.       color bright white on blue & cls
  2740.       prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path: $p$e[u$e[44;37m$n$g
  2741.     else
  2742.       prompt=$e[s$e[1;1f$e[0;7m$e[K  Path: $p$e[u$e[0m$n$g
  2743.     endiff
  2744.  
  2745. The following alias checks to see if the argument is a subdirectory.  If so, 
  2746. the alias deletes the subdirectory's files and removes it (enter this on one 
  2747. line): 
  2748.  
  2749.     alias zap `iff isdir %1 then & del /s/x/z %1 & else &
  2750.        echo Not a directory! & endiff`
  2751.  
  2752.  
  2753. ΓòÉΓòÉΓòÉ 3.40. INKEY - Enter environment variable ΓòÉΓòÉΓòÉ
  2754.  
  2755. SYNTAX     (Internal 4OS2) 
  2756.  
  2757. INKEY [/K"..." /Wn] [text] %%varname
  2758.  
  2759. PURPOSE 
  2760.  
  2761. Get a single keystroke environment variable from standard input. 
  2762.  
  2763. COMMENTS 
  2764.  
  2765. You can optionally display prompt text before the variable name. 
  2766.  
  2767. The INKEY options are: 
  2768.  
  2769.     /K      The allowable keystrokes, enclosed in double quotes.  If you want 
  2770.             to read a control or function key, you must enclose it in square 
  2771.             brackets (for example, /K"ab[F1][F10]"). The valid key names are 
  2772.             the same as those listed in the section on Key Mapping Directives 
  2773.             in KEYCODES. 
  2774.  
  2775.     /W      Timeout period, where "n" is the number of seconds to wait for a 
  2776.             response.  If no keystroke is entered by the end of the timeout 
  2777.             period, INKEY returns with the variable unchanged.  You can specify 
  2778.             /W0 to check if a keystroke is waiting, and return immediately. 
  2779.  
  2780.  ASCII values from 1 to 255 are stored as a character.  Extended characters 
  2781.  (for example, function keys & cursor keys) are stored as a string in decimal 
  2782.  format, with a leading @ (for example, the F1 key is stored as @59).  The 
  2783.  ENTER character is a special case; it is stored as its scan code (@28).  See 
  2784.  KEYCODES for the common extended keystrokes. 
  2785.  
  2786.  INKEY and INPUT are normally used as batch file commands, allowing you great 
  2787.  flexibility in entering or changing batch variables. 
  2788.  
  2789.  If you press ^C or ^BREAK while INKEY is waiting for a key, execution of an 
  2790.  alias will be terminated, and execution of a batch file will be suspended 
  2791.  while you are prompted whether to cancel the batch job. 
  2792.  
  2793.  See also INPUT. 
  2794.  
  2795.  EXAMPLES 
  2796.  
  2797.  Prompt for a number and store it in the variable NUM: 
  2798.  
  2799.       inkey /K"123456789" Enter a number from 1 to 9:  %%num
  2800.  
  2801.  The following batch file fragment waits up to 10 seconds for a character, then 
  2802.  tests to see if a "Y" was entered: 
  2803.  
  2804.       set net=N
  2805.       inkey /w10 Do you want to load the network (Y/N)? %%net
  2806.       if "%net"=="Y" goto load_net
  2807.  
  2808.  
  2809. ΓòÉΓòÉΓòÉ 3.41. INPUT - Enter environment variable ΓòÉΓòÉΓòÉ
  2810.  
  2811. SYNTAX     (Internal 4OS2) 
  2812.  
  2813. INPUT [/Wn] [text] %%varname
  2814.  
  2815. PURPOSE 
  2816.  
  2817. Enter an environment variable from the standard input. 
  2818.  
  2819. COMMENTS 
  2820.  
  2821. You can optionally display prompt text before the variable name. 
  2822.  
  2823. The only INPUT option is: 
  2824.  
  2825.     /W      Specify a timeout period, where "n" is the number of seconds to 
  2826.             wait for a response.  If no keystroke is entered by the end of the 
  2827.             timeout period, INPUT returns with the variable unchanged.  If you 
  2828.             enter a key before the timeout period, INPUT will wait indefinitely 
  2829.             for the remainder of the line.  You can specify /W0 to check if a 
  2830.             key is already in the buffer, and return immediately. 
  2831.  
  2832.  All characters entered up to, but not including, the carriage return are 
  2833.  stored in the variable. 
  2834.  
  2835.  INPUT and INKEY are normally used as batch file commands, allowing you great 
  2836.  flexibility in entering or changing batch variables. 
  2837.  
  2838.  See also INKEY. 
  2839.  
  2840.  EXAMPLES 
  2841.  
  2842.  The following batch file fragment prompts for a string and stores it in the 
  2843.  variable FNAME: 
  2844.  
  2845.       input Enter the file name:  %%fname
  2846.  
  2847.  
  2848. ΓòÉΓòÉΓòÉ 3.42. KEYS - Display command history ΓòÉΓòÉΓòÉ
  2849.  
  2850. SYNTAX     (Internal 4OS2) 
  2851.  
  2852. KEYS [ON | OFF | LIST]
  2853.  
  2854. PURPOSE 
  2855.  
  2856. Display the history list, or enable/disable the command line editing keys. 
  2857.  
  2858. COMMENTS 
  2859.  
  2860. 4OS2 includes this command for compatibility with CMD.EXE; for 4OS2 you should 
  2861. use the HISTORY command instead. 
  2862.  
  2863.  
  2864. ΓòÉΓòÉΓòÉ 3.43. LIST - Display files ΓòÉΓòÉΓòÉ
  2865.  
  2866. SYNTAX     (Internal 4OS2) 
  2867.  
  2868. LIST [/H /S /W] [d:][path]filename...
  2869.  
  2870. PURPOSE 
  2871.  
  2872. Display a file with forward and backward paging and scrolling. 
  2873.  
  2874. COMMENTS 
  2875.  
  2876. LIST provides a much faster and more flexible way to view a file than TYPE, 
  2877. without the overhead of using a text editor. 
  2878.  
  2879. The LIST options are: 
  2880.  
  2881.     /H        Strip the high bit from each character before displaying.  This 
  2882.               is useful when displaying files created by some word processors 
  2883.               that turn on the high bit for formatting purposes. 
  2884.  
  2885.     /S        Read from the standard input rather than a file.  This allows you 
  2886.               to redirect command output and view it with LIST. 
  2887.  
  2888.     /W        Wrap the text at the right margin.  This option is useful when 
  2889.               displaying non-text files. 
  2890.  
  2891.  LIST uses the cursor pad to scroll through the file.  The LIST commands are 
  2892.  (the caret ^ means press the Ctrl key together with the specified key): 
  2893.  
  2894.     HOME      Display the first page of the file 
  2895.     END       Display the last page of the file 
  2896.     PgUp      Scroll back one page 
  2897.     PgDn      Scroll forwards one page 
  2898.     Esc       Exit the current file 
  2899.     ^C        Quit LIST 
  2900.              Scroll up one line 
  2901.              Scroll down one line 
  2902.              Scroll left 8 columns 
  2903.              Scroll right 8 columns 
  2904.     ^        Scroll left 40 columns 
  2905.     ^        Scroll right 40 columns 
  2906.     F1        Call the on-line help 
  2907.     F         Prompt and search for a string (case is ignored) 
  2908.     H         Toggle the "strip high bit" (/H) option 
  2909.     N         Find next matching string (case is ignored).  LIST saves the 
  2910.               search string, so you can LIST multiple files and search for the 
  2911.               same string by pressing N in each file. 
  2912.     P         Print the file on LPT1 
  2913.     W         Toggle the "line wrap" (/W) option 
  2914.  
  2915.  LIST is normally only useful for displaying ASCII text files; executable files 
  2916.  (.COM and .EXE) and many data files will be unreadable due to the presence of 
  2917.  non-alphanumeric characters. 
  2918.  
  2919.  See also TYPE. 
  2920.  
  2921.  EXAMPLES 
  2922.  
  2923.  Display the file MEMO.DOC: 
  2924.  
  2925.       list memo.doc
  2926.  
  2927.  Display the output from a DIR command: 
  2928.  
  2929.       dir | list /s
  2930.  
  2931.  
  2932. ΓòÉΓòÉΓòÉ 3.44. LOADBTM - Change batch file mode ΓòÉΓòÉΓòÉ
  2933.  
  2934. SYNTAX     (Internal 4OS2) 
  2935.  
  2936. LOADBTM [on | off]
  2937.  
  2938. PURPOSE 
  2939.  
  2940. Switch a batch file to or from .BTM mode. 
  2941.  
  2942. COMMENTS 
  2943.  
  2944. LOADBTM switches a batch file (.CMD or .BTM) to and from .BTM mode. If no 
  2945. argument is given, it displays the current LOADBTM status. 
  2946.  
  2947. .BTM mode runs from two to five times faster than normal batch mode, but should 
  2948. not be used for self-modifying batch files. 
  2949.  
  2950. LOADBTM can only be used within a .CMD or .BTM file. 
  2951.  
  2952. See the 4OS2 / 4DOS manual for more information on .BTM files. 
  2953.  
  2954. EXAMPLES 
  2955.  
  2956. The following .CMD batch file fragment tests if 4OS2 is the current command 
  2957. processor; if so, it switches to BTM mode: 
  2958.  
  2959.     Rem The initial default state is LOADBTM OFF
  2960.     if "%@eval[2+2]" == "4" loadbtm on
  2961.  
  2962.  
  2963. ΓòÉΓòÉΓòÉ 3.45. LOG - Log commands to file ΓòÉΓòÉΓòÉ
  2964.  
  2965. SYNTAX     (Internal 4OS2) 
  2966.  
  2967. LOG [/W [d:]pathname] [ON | OFF | "text"]
  2968.  
  2969. PURPOSE 
  2970.  
  2971. Save a log of commands to a disk file. 
  2972.  
  2973. COMMENTS 
  2974.  
  2975. The default 4OS2 LOG filename is 4OS2LOG in the root directory of the boot 
  2976. drive.  The LOG status and log filename will be passed to secondary shells. 
  2977.  
  2978. Entering LOG with no parameters displays the log status (ON or OFF). Entering 
  2979. LOG with text writes the text to the log file, even if LOG is set OFF.  This 
  2980. allows you to enter headers in the log file. 
  2981.  
  2982. You can specify a different filename with the /W(rite) option.  /W 
  2983. automatically enables command logging. 
  2984.  
  2985. The commands are stored in the log file as they are executed, after performing 
  2986. any alias or variable expansion. 
  2987.  
  2988. The LOG file format looks like: 
  2989.  
  2990.     [mm/dd/yy  hh:mm:ss] command.
  2991.  
  2992. EXAMPLES 
  2993.  
  2994. Display the LOG status: 
  2995.  
  2996.     log
  2997.  
  2998. Enable command logging: 
  2999.  
  3000.     log on
  3001.  
  3002. Enable command logging to the file C:\LOG\LOGFILE and insert a header: 
  3003.  
  3004.     log /w c:\log\logfile
  3005.     log "Started work on the database system"
  3006.  
  3007.  
  3008. ΓòÉΓòÉΓòÉ 3.46. MD or MKDIR - Create subdirectory ΓòÉΓòÉΓòÉ
  3009.  
  3010. SYNTAX     (Internal 4OS2) 
  3011.  
  3012. MD [d:]pathname...
  3013. MKDIR [d:]pathname...
  3014.  
  3015. PURPOSE 
  3016.  
  3017. Create subdirectories. 
  3018.  
  3019. COMMENTS 
  3020.  
  3021. To start at the root directory, start the pathname with a backslash (\). To 
  3022. start at the parent directory, start the pathname with two periods (..). All 
  3023. other pathnames start at the current directory. 
  3024.  
  3025. See also RD. 
  3026.  
  3027. EXAMPLES 
  3028.  
  3029. Create a subdirectory called MYDIR in the root directory: 
  3030.  
  3031.     md \mydir
  3032.  
  3033.  
  3034. ΓòÉΓòÉΓòÉ 3.47. MEMORY - Display system memory ΓòÉΓòÉΓòÉ
  3035.  
  3036. SYNTAX     (Internal 4OS2) 
  3037.  
  3038. MEMORY
  3039.  
  3040. PURPOSE 
  3041.  
  3042. Display the system RAM status. 
  3043.  
  3044. COMMENTS 
  3045.  
  3046. MEMORY displays the size of the largest free block of RAM, the total and free 
  3047. environment space, the total and free alias list space, and the total command 
  3048. history space. 
  3049.  
  3050. OS/2 provides virtual memory and swaps applications to disk as needed. This 
  3051. makes the size of the largest available free block of RAM as reported by MEMORY 
  3052. only a general reflection of available memory resources, and not a precise 
  3053. statement of the amount of RAM available for applications. 
  3054.  
  3055. EXAMPLES 
  3056.  
  3057. Display your RAM totals: 
  3058.  
  3059.     memory
  3060.  
  3061.  
  3062. ΓòÉΓòÉΓòÉ 3.48. MOVE - Move files ΓòÉΓòÉΓòÉ
  3063.  
  3064. SYNTAX     (Internal 4OS2) 
  3065.  
  3066. MOVE [d:][path]filename... [d:][path][filename]
  3067.     [/C /D /H /N /P /Q /R /S /U]
  3068.  
  3069. PURPOSE 
  3070.  
  3071. Move files to other directories and drives. 
  3072.  
  3073. COMMENTS 
  3074.  
  3075. The MOVE command moves the specified file(s) to the last filename specified, 
  3076. which is designated as the target.  If the target already exists, it is deleted 
  3077. when the file is moved.  You cannot move a file to itself. 
  3078.  
  3079. If there is more than one source file specification, the target must be a 
  3080. directory, and the files are moved to the directory with their original 
  3081. filenames.  If the target is not a directory, MOVE will display an error 
  3082. message and exit. 
  3083.  
  3084. Use caution when using MOVE commands with commands like SELECT.  If multiple 
  3085. files are selected and the target is not a subdirectory, each file will be 
  3086. moved in turn to the target, overwriting the previous file. The net result is 
  3087. that all files but the last will be deleted.  If SELECT is invoked using square 
  3088. brackets instead of parentheses, the MOVE will be done in a single command and 
  3089. MOVE will detect the error. 
  3090.  
  3091. The MOVE options are: 
  3092.  
  3093.     /C      Move only files that exist in the target directory, and where the 
  3094.             source file is newer than the target. 
  3095.  
  3096.     /D      The target must be a directory.  If it doesn't exist, you will be 
  3097.             prompted whether to create it. 
  3098.  
  3099.     /H      Move all files, including hidden & system. 
  3100.  
  3101.     /N      Do everything except actually move the file(s) (for testing what 
  3102.             the result of a MOVE would be). 
  3103.  
  3104.     /P      Prompt for a Y or N response to confirm each move. 
  3105.  
  3106.     /Q      Don't display filenames as they are moved. 
  3107.  
  3108.     /R      Prompt for a Y or N response before overwriting an existing file. 
  3109.  
  3110.     /S      Move an entire subdirectory tree to another location.  The target 
  3111.             directories will be created if they don't exist (except for the 
  3112.             first target, which must already exist).  MOVE will remove empty 
  3113.             subdirectories after the move. 
  3114.  
  3115.     /U      Move only those files that either don't exist in the target 
  3116.             directory, or where the source file is newer than the target. 
  3117.  
  3118.  MOVE first attempts to rename the file(s).  If that fails (the target is on a 
  3119.  different drive, or the target already exists), MOVE will copy the file(s) and 
  3120.  then delete the originals.  If MOVE cannot delete the original (for example, a 
  3121.  read-only file), it will display an error message, but the target file is 
  3122.  still created. 
  3123.  
  3124.  See also COPY and REN. 
  3125.  
  3126.  EXAMPLES 
  3127.  
  3128.  Move some files to a different directory: 
  3129.  
  3130.       move *.wks *.txt c:\finance\myfiles
  3131.  
  3132.  Move all the files in the current directory to A:\, prompting before 
  3133.  overwriting any existing files: 
  3134.  
  3135.       move /r *.* a:\
  3136.  
  3137.  
  3138. ΓòÉΓòÉΓòÉ 3.49. PATH - Set executable file search path ΓòÉΓòÉΓòÉ
  3139.  
  3140. SYNTAX     (Internal 4OS2) 
  3141.  
  3142. PATH [[d:]path][[;[d:]path]...]]
  3143. PATH ;
  3144.  
  3145. PURPOSE 
  3146.  
  3147. Tells 4OS2 where to search for executable and batch files not in the current 
  3148. directory. 
  3149.  
  3150. COMMENTS 
  3151.  
  3152. When searching for an external command (.COM, .EXE, .BTM, and .CMD, in that 
  3153. order), 4OS2 searches the current directory first, then the directories you 
  3154. specify in the PATH, in the order you list them. The directory names are 
  3155. separated by semicolons (; ). 
  3156.  
  3157. In OS/2 2.0, 4OS2 will also search for MS-DOS .BAT files (following .CMD in the 
  3158. search order), for compatibility with CMD.EXE. 
  3159.  
  3160. If you enter PATH with no parameters, PATH displays the current search path. 
  3161. If you enter PATH and a semicolon, PATH clears the search path and will search 
  3162. only the current directory (this is the default at system startup). 
  3163.  
  3164. If you specify an invalid directory, 4OS2 will skip that directory and continue 
  3165. searching with the next directory in the path. 
  3166.  
  3167. If you have a directory '.' in the PATH, 4OS2 will not search the current 
  3168. directory first, but will wait to do so until it reaches that point in the 
  3169. PATH. 
  3170.  
  3171. Some applications also use the PATH variable to search for their files. 
  3172.  
  3173. You can edit an existing path with the ESET command. 
  3174.  
  3175. EXAMPLES 
  3176.  
  3177. The following PATH command sets the search path to the following order: the 
  3178. current directory, the root directory on drive C, the OS2 subdirectory on drive 
  3179. C, and the UTIL subdirectory on drive C: 
  3180.  
  3181.     path c:\;c:\os2;c:\util
  3182.  
  3183. Display the current search path: 
  3184.  
  3185.     path
  3186.  
  3187.  
  3188. ΓòÉΓòÉΓòÉ 3.50. PAUSE - Wait for keystroke ΓòÉΓòÉΓòÉ
  3189.  
  3190. SYNTAX     (Internal 4OS2) 
  3191.  
  3192. PAUSE [message]
  3193.  
  3194. PURPOSE 
  3195.  
  3196. Suspend alias or batch file execution. 
  3197.  
  3198. COMMENTS 
  3199.  
  3200. A PAUSE command will suspend execution, giving you the opportunity to perform 
  3201. activities such as changing disks, turning on the printer, etc. 
  3202.  
  3203. PAUSE waits for any key (except ^C or ^BREAK) to be pressed and then continues 
  3204. executing.  If a prompt message is specified, PAUSE will display the message 
  3205. and wait for a keystroke.  Otherwise, PAUSE will prompt: 
  3206.  
  3207.     Press a key when ready...
  3208.  
  3209. If you press a ^C or ^BREAK while PAUSE is waiting for a key, execution of an 
  3210. alias will be terminated, and execution of a batch file will be suspended while 
  3211. you are prompted whether to cancel the batch file. 
  3212.  
  3213. EXAMPLES 
  3214.  
  3215. The following batch file fragment prompts the user before erasing files: 
  3216.  
  3217.     pause ^C aborts, any other key erases the .LST files:
  3218.     erase *.lst
  3219.  
  3220.  
  3221. ΓòÉΓòÉΓòÉ 3.51. POPD - Restore saved directory ΓòÉΓòÉΓòÉ
  3222.  
  3223. SYNTAX     (Internal 4OS2) 
  3224.  
  3225. POPD [*]
  3226.  
  3227. PURPOSE 
  3228.  
  3229. Change to the disk drive and directory at the top of the directory stack. 
  3230.  
  3231. COMMENTS 
  3232.  
  3233. POPD restores the disk and directory saved using PUSHD (most recent first). 
  3234.  
  3235. The * option clears the directory stack, without changing the current drive and 
  3236. directory. 
  3237.  
  3238. Use the DIRS command to display the directory stack. 
  3239.  
  3240. See also DIRS and PUSHD. 
  3241.  
  3242. EXAMPLES 
  3243.  
  3244. Save and change your disk drive with PUSHD, and then restore it: 
  3245.  
  3246.     pushd d:\database\test
  3247.     popd
  3248.  
  3249. Clear the directory stack: 
  3250.  
  3251.     popd *
  3252.  
  3253.  
  3254. ΓòÉΓòÉΓòÉ 3.52. PROMPT - Change command prompt ΓòÉΓòÉΓòÉ
  3255.  
  3256. SYNTAX     (Internal 4OS2) 
  3257.  
  3258. PROMPT [text]
  3259.  
  3260. PURPOSE 
  3261.  
  3262. Change the command line prompt. 
  3263.  
  3264. COMMENTS 
  3265.  
  3266. If you enter PROMPT with no parameters, PROMPT sets the prompt on drives A and 
  3267. B to $n$g (display current disk only), and on all other drives to $p$g (display 
  3268. current disk and directory). 
  3269.  
  3270. The prompt text can contain special strings of the form $?, where ? is one of 
  3271. the following: 
  3272.  
  3273.     b      The | character 
  3274.     c      The open parenthesis ( 
  3275.     D      Current date, in the format:  Fri  Dec 25, 1992 
  3276.     d      Current date, in the format:  Fri  12-25-92 
  3277.     e      The ASCII ESC character (decimal 27) 
  3278.     f      The close parenthesis ) 
  3279.     g      The > character 
  3280.     h      BACKSPACE over the previous character 
  3281.     i      The default OS/2 line 0 prompt 
  3282.     l      The < character 
  3283.     n      Default drive letter 
  3284.     P      Current disk and directory (upper case) 
  3285.     p      Current disk and directory (lower case) 
  3286.     q      The = character 
  3287.     r      The numeric exit code returned by the last external command 
  3288.     s      The space character 
  3289.     t      Current time, in the format hh:mm:ss 
  3290.     v      OS/2 version number, in the format:  2.0 
  3291.     Xd:    Current disk and directory (upper case) where d: is the drive 
  3292.            specification 
  3293.     xd:    Current disk and directory (lower case) where d: is the drive 
  3294.            specification 
  3295.     z      Display the current shell nesting level (you must be running 4OS2 as 
  3296.            the primary shell in swapping mode).  The primary command processor 
  3297.            is 0. 
  3298.     $      The $ character 
  3299.     _      CR/LF (go to beginning of new line) 
  3300.  
  3301.  You can embed any environment variable, internal variable, or variable 
  3302.  function in your PROMPT string to view system status or resources.  When 
  3303.  defining the PROMPT to include variables of this type, use two % signs before 
  3304.  the variable name, or enclose the prompt string in back-quotes [`] (if you 
  3305.  don't, the prompt display will show the value the variable had when the prompt 
  3306.  was defined, not the value at the moment the prompt is displayed).  For 
  3307.  example, to show free RAM to the left of the standard $p$g prompt: 
  3308.  
  3309.       prompt [%%@dosmem[K]K] $p$g
  3310.         or
  3311.       prompt `[%@dosmem[K]K] $p$g`
  3312.  
  3313.  See 4OS2 Internal Variables and 4OS2 Variable Functions for lists of the 
  3314.  available variables and functions. 
  3315.  
  3316.  See also ANSI. 
  3317.  
  3318.  EXAMPLES 
  3319.  
  3320.  Set the prompt to the current date and time: 
  3321.  
  3322.       prompt $d $t $g
  3323.  
  3324.  
  3325. ΓòÉΓòÉΓòÉ 3.53. PUSHD - Save & change directory ΓòÉΓòÉΓòÉ
  3326.  
  3327. SYNTAX     (Internal 4OS2) 
  3328.  
  3329. PUSHD [[d:]pathname]
  3330.  
  3331. PURPOSE 
  3332.  
  3333. Save the current disk and directory. 
  3334.  
  3335. COMMENTS 
  3336.  
  3337. PUSHD saves the current directory on the directory stack, and if a pathname is 
  3338. specified on the command line, changes the disk drive and directory. The 
  3339. directory stack can hold up to 255 characters (about 10 to 20 entries). If you 
  3340. exceed the directory stack size, the oldest directory is removed before adding 
  3341. the current directory. 
  3342.  
  3343. The saved directory is restored on a "last in, first out" basis by the POPD 
  3344. command.  The directory stack can be displayed with the DIRS command. 
  3345.  
  3346. See also DIRS and POPD. 
  3347.  
  3348. EXAMPLES 
  3349.  
  3350. Save the current directory and change to C:\WORDP\MEMOS: 
  3351.  
  3352.     pushd c:\wordp\memos
  3353.  
  3354.  
  3355. ΓòÉΓòÉΓòÉ 3.54. QUIT - Quit batch file ΓòÉΓòÉΓòÉ
  3356.  
  3357. SYNTAX     (Internal 4OS2) 
  3358.  
  3359. QUIT [value]
  3360.  
  3361. PURPOSE 
  3362.  
  3363. Terminate the current batch file. 
  3364.  
  3365. COMMENTS 
  3366.  
  3367. You can QUIT at any point in a batch file, not just the end.  If you QUIT a 
  3368. batch file called from another batch file, you will be returned to the previous 
  3369. file at the command following the original call.  To end all batch file 
  3370. processing, use CANCEL.  If you specify a value, QUIT will set the ERRORLEVEL 
  3371. to that value.  The value also affects the internal variable %_?, and the 
  3372. conditional command separators && and ||. 
  3373.  
  3374. You can also use QUIT in an alias.  If you QUIT an alias while inside a batch 
  3375. file, QUIT will end both the alias and the batch file. 
  3376.  
  3377. See also CANCEL. 
  3378.  
  3379. EXAMPLES 
  3380.  
  3381. Check to see if the user entered "quit" and exit if true: 
  3382.  
  3383.     input Enter your choice:  %%option
  3384.     if "%option" == "quit" quit
  3385.  
  3386.  
  3387. ΓòÉΓòÉΓòÉ 3.55. RD or RMDIR - Remove subdirectory ΓòÉΓòÉΓòÉ
  3388.  
  3389. SYNTAX     (Internal 4OS2) 
  3390.  
  3391. RD [d:]path...
  3392. RMDIR [d:]path...
  3393.  
  3394. PURPOSE 
  3395.  
  3396. Remove one or more directories. 
  3397.  
  3398. COMMENTS 
  3399.  
  3400. Before removing a subdirectory, you must delete all the files and 
  3401. subdirectories (and their files) in that directory (including any hidden or 
  3402. read-only files). 
  3403.  
  3404. You can use wildcard characters in the directory names. 
  3405.  
  3406. You cannot remove the root directory (\), the current directory (.), or the 
  3407. parent directory (..). 
  3408.  
  3409. See also MD. 
  3410.  
  3411. EXAMPLES 
  3412.  
  3413. Remove the subdirectory MEMOS from the directory WP on the current drive: 
  3414.  
  3415.     rmdir \wp\memos
  3416.  
  3417.  
  3418. ΓòÉΓòÉΓòÉ 3.56. REBOOT - Reboot system ΓòÉΓòÉΓòÉ
  3419.  
  3420. SYNTAX     (Internal 4OS2) 
  3421.  
  3422. REBOOT [/V]
  3423.  
  3424. PURPOSE 
  3425.  
  3426. Reboot the system. 
  3427.  
  3428. COMMENTS 
  3429.  
  3430. The only option for REBOOT is: 
  3431.  
  3432.     /V      Prompt for confirmation (Y or N) before rebooting. 
  3433.  
  3434.  REBOOT shuts down the file systems before rebooting the system, to allow the 
  3435.  disk caches to finish writing any cached data. 
  3436.  
  3437.  EXAMPLES 
  3438.  
  3439.  The following command prompts you to verify the reboot: 
  3440.  
  3441.       reboot /v
  3442.  
  3443.  
  3444. ΓòÉΓòÉΓòÉ 3.57. REM - Batch file comment ΓòÉΓòÉΓòÉ
  3445.  
  3446. SYNTAX     (Internal 4OS2) 
  3447.  
  3448. REM [comment]
  3449.  
  3450. PURPOSE 
  3451.  
  3452. Put a comment in a batch file. 
  3453.  
  3454. COMMENTS 
  3455.  
  3456. If ECHO is ON, or the SETDOS /V option is set, REM will echo the comment. 
  3457. Otherwise, REM will ignore it. If you don't want to echo the line, preface REM 
  3458. with the @ character. (Setting SETDOS /V to 2 will echo all lines, regardless 
  3459. of the echo state or @ symbols.)  The current ECHO state is inherited by called 
  3460. batch files. 
  3461.  
  3462. Enter your comment following the REM, separated by a space or tab. Comments can 
  3463. be up to 295 characters.  Everything following a REM will be ignored, including 
  3464. quote characters, the redirection symbols (|><) and the command separator 
  3465. character.  An alternate way to put a comment in a batch file is to begin the 
  3466. line with a colon (:). The line will be interpreted as a label and ignored. 
  3467. (Make sure you don't have any actual labels beginning with the same word!) 
  3468.  
  3469. Batch file comments are useful for documenting the purpose for a batch file and 
  3470. the procedures used. 
  3471.  
  3472. EXAMPLES 
  3473.  
  3474. Enter comments in a batch file: 
  3475.  
  3476.     rem This batch file provides a menu-based system
  3477.     rem   for accessing the rem word processing utilities.
  3478.     rem Clear the screen and get a selection
  3479.     cls
  3480.  
  3481.  
  3482. ΓòÉΓòÉΓòÉ 3.58. REN or RENAME - Rename files ΓòÉΓòÉΓòÉ
  3483.  
  3484. SYNTAX     (Internal 4OS2) 
  3485.  
  3486. REN [/N /P /Q] [d:][path]filename... [d:][path]filename
  3487. RENAME [/N /P /Q] [d:][path]filename... [d:][path]filename
  3488.  
  3489. PURPOSE 
  3490.  
  3491. Rename files or subdirectories. 
  3492.  
  3493. COMMENTS 
  3494.  
  3495. The last filename is the new name; preceding names are the files or directories 
  3496. to be renamed.  You can use wildcard characters in the filenames.  The new 
  3497. filename must not already exist.  You cannot rename a subdirectory to a new 
  3498. path! 
  3499.  
  3500. The REN options are: 
  3501.  
  3502.     /N      Do everything except actually rename the file(s) (for testing what 
  3503.             the result of a REN would be). 
  3504.  
  3505.     /P      Confirm each rename (Y or N). 
  3506.  
  3507.     /Q      Don't display filenames as they are renamed. 
  3508.  
  3509.  REN in CMD.EXE only allows a path to be specified with the first file name; 
  3510.  the path for the target is always the same as the source.  4OS2 allows you to 
  3511.  optionally select the target path, renaming the source file to a new directory 
  3512.  on the same disk drive.  If you don't specify a path for the target, REN will 
  3513.  assume a "CMD.EXE compatible RENAME" and will rename the source file to the 
  3514.  new name without moving it to another directory. 
  3515.  
  3516.  If you want to rename to a different drive, use MOVE. 
  3517.  
  3518.  See also MOVE. 
  3519.  
  3520.  EXAMPLES 
  3521.  
  3522.  Rename the file MEMO.TXT to OFFICE.TXT: 
  3523.  
  3524.       ren memo.txt office.txt
  3525.  
  3526.  Rename the directory \WORDPROC to \WP: 
  3527.  
  3528.       ren \wordproc \wp
  3529.  
  3530.  
  3531. ΓòÉΓòÉΓòÉ 3.59. RETURN - Return from batch subroutine ΓòÉΓòÉΓòÉ
  3532.  
  3533. SYNTAX     (Internal 4OS2) 
  3534.  
  3535. RETURN
  3536.  
  3537. PURPOSE 
  3538.  
  3539. Return from a GOSUB (subroutine) call in a batch file. 
  3540.  
  3541. COMMENTS 
  3542.  
  3543. The RETURN command returns from a GOSUB call to the command following the 
  3544. original GOSUB. 
  3545.  
  3546. See also GOSUB. 
  3547.  
  3548. EXAMPLES 
  3549.  
  3550. The following batch file fragment calls a subroutine that displays the current 
  3551. directory: 
  3552.  
  3553.     echo Calling a subroutine
  3554.     gosub subr1
  3555.     echo Returned from the subroutine
  3556.     quit
  3557.     :subr1
  3558.     dir /hw
  3559.     return
  3560.  
  3561.  
  3562. ΓòÉΓòÉΓòÉ 3.60. SCREEN - Position cursor ΓòÉΓòÉΓòÉ
  3563.  
  3564. SYNTAX     (Internal 4OS2) 
  3565.  
  3566. SCREEN row column [message]
  3567.  
  3568. PURPOSE 
  3569.  
  3570. Position the cursor on the screen, and optionally display a message. 
  3571.  
  3572. COMMENTS 
  3573.  
  3574. The row and column numbering is zero-based, so on a standard 25 line by 80 
  3575. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  3576.  
  3577. SCREEN does not change the default screen colors.  To display text in specific 
  3578. colors, use SCRPUT. 
  3579.  
  3580. SCREEN checks for a valid row and column, and displays an error message if 
  3581. either value is out of range. 
  3582.  
  3583. See also ECHO, SCRPUT, TEXT, and VSCRPUT. 
  3584.  
  3585. EXAMPLES 
  3586.  
  3587. The following batch file fragment displays a menu: 
  3588.  
  3589.     @echo off
  3590.     cls
  3591.     screen 3 10 Select a number from 1 to 4:
  3592.     screen 6 20 1 - Word Processing
  3593.     screen 7 20 2 - Spreadsheet
  3594.     screen 8 20 3 - Telecommunications
  3595.     screen 9 20 4 - Quit
  3596.  
  3597.  
  3598. ΓòÉΓòÉΓòÉ 3.61. SCRPUT - Display text in color ΓòÉΓòÉΓòÉ
  3599.  
  3600. SYNTAX     (Internal 4OS2) 
  3601.  
  3602. SCRPUT row column [bright] [blink] fg ON bg text
  3603.  
  3604. PURPOSE 
  3605.  
  3606. Display text in color. 
  3607.  
  3608. COMMENTS 
  3609.  
  3610. The row and column numbering is zero-based, so on a standard 25 line by 80 
  3611. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  3612.  
  3613. SCRPUT is similar to SCREEN, but allows you to specify the display colors, and 
  3614. writes directly to the screen. 
  3615.  
  3616. The parameters are: 
  3617.  
  3618.     row         Start row 
  3619.  
  3620.     column      Start column 
  3621.  
  3622.     fg          Foreground character color 
  3623.  
  3624.     bg          Background character color 
  3625.  
  3626.     text        The text to display 
  3627.  
  3628.  Only the first three characters of the color name and attributes ("bright" and 
  3629.  "blink") are required. 
  3630.  
  3631.  The available colors are: 
  3632.  
  3633.       Black      Blue      Green      Red
  3634.       Magenta    Cyan      Yellow     White
  3635.  
  3636.  See also ECHO, SCREEN, TEXT, and VSCRPUT. 
  3637.  
  3638.  EXAMPLES 
  3639.  
  3640.  The following batch file fragment displays a menu in color: 
  3641.  
  3642.       @echo off & cls white on blue
  3643.       scrput 3 10 bri white on blue Select a number from 1 to 4:
  3644.       scrput 6 20 bri red on blue 1 - Word Processing
  3645.       scrput 7 20 bri yellow on blue 2 - Spreadsheet
  3646.       scrput 8 20 bri green on blue 3 - Telecommunications
  3647.       scrput 9 20 bri magenta on blue 4 - Quit
  3648.  
  3649.  
  3650. ΓòÉΓòÉΓòÉ 3.62. SELECT - Select files for command ΓòÉΓòÉΓòÉ
  3651.  
  3652. SYNTAX     (Internal 4OS2) 
  3653.  
  3654. SELECT [/A[:-rhsda] /C /D /O:-deginrsu /Z] command ([path]filename)
  3655.  
  3656. PURPOSE 
  3657.  
  3658. Execute a command on the specified files. 
  3659.  
  3660. COMMENTS 
  3661.  
  3662. SELECT allows you to select command line file arguments by marking the files 
  3663. using a full-screen "point-and-shoot" display.  SELECT substitutes the selected 
  3664. files for the argument enclosed in parentheses, and executes the command for 
  3665. each marked file.  If you specify multiple arguments in the parentheses, SELECT 
  3666. will display the matching files for the first argument, prompt you to mark the 
  3667. files, execute the command for each marked file, and then continue the same 
  3668. procedure with the next argument. 
  3669.  
  3670. The SELECT options are: 
  3671.  
  3672.     /A      Display only those files that have the specified attribute set. 
  3673.             Preceding the attribute character with a '-' will display those 
  3674.             files that DON'T  have that attribute set.  Attributes can also be 
  3675.             combined.  The attributes are: 
  3676.               R  Read only 
  3677.               H  Hidden 
  3678.               S  System 
  3679.               D  Directory 
  3680.               A  Archive 
  3681.  
  3682.     /C      Display filenames in upper case. 
  3683.  
  3684.     /D      Disable directory colorization. 
  3685.  
  3686.     /O      Sort sequence, where ? can be any combination of the following: 
  3687.               -  Reverse the sort order for the next option 
  3688.               a  Sort by ASCII value rather than numeric value 
  3689.               d  Sort by date and time (oldest first) 
  3690.               e  Sort by extension 
  3691.               g  Group subdirectories together 
  3692.               i  Sort by the file description 
  3693.               n  Sort by the filename (this is the default) 
  3694.               r  Reverse the sort order for all options 
  3695.               s  Sort by size 
  3696.               u  Unsorted 
  3697.  
  3698.     /Z      Display HPFS volumes in FAT format, including file descriptions and 
  3699.             truncating filenames to 11 characters. 
  3700.  
  3701.  If you append filenames with a ; (an "include list"), SELECT will display the 
  3702.  matching filenames in a single listing.  Only the first filename in an include 
  3703.  list can have a path. 
  3704.  
  3705.  You can display the file and subdirectory names in color by setting the 
  3706.  COLORDIR variable.  The format for COLORDIR is: 
  3707.  
  3708.       ext [...]:[bright][blink] fg [ON bg]; ...
  3709.  
  3710.  where "ext" is the file extension, or one of the following file attributes: 
  3711.  
  3712.       DIRS - directory
  3713.       RDONLY - read-only file
  3714.       HIDDEN - hidden file
  3715.       SYSTEM - system file
  3716.       ARCHIVE - file modified since last backup
  3717.  
  3718.  For example, to display the .COM and .EXE files in red, the .C and .ASM files 
  3719.  in bright cyan, and the read-only files in blinking green: 
  3720.  
  3721.       set colordir=com exe:red; c asm:bright cyan; rdonly:blink green
  3722.  
  3723.  If you don't select a background color, SELECT will use the current screen 
  3724.  background color. 
  3725.  
  3726.  If you enclose the arguments in square brackets [ ] rather than parentheses, 
  3727.  SELECT will insert all of the arguments into the command line and only execute 
  3728.  the command once.  You must be careful not to exceed the maximum line length 
  3729.  (511 characters). 
  3730.  
  3731.  SELECT uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through 
  3732.  the files matching the argument(s).  Use the + key to select a file, and the - 
  3733.  key to unselect a file.  The * key will reverse all of the current marks 
  3734.  (excluding subdirectories), and the / key will unmark  everything.  After 
  3735.  marking the files, press ENTER to execute the command. You can select a single 
  3736.  file by moving the scroll bar to the filename and pressing ENTER. 
  3737.  
  3738.  To cancel the SELECT command, type an Escape, ^C, or ^BREAK. 
  3739.  
  3740.  EXAMPLES 
  3741.  
  3742.  Select from the files in the current directory with the extension .COM, and 
  3743.  then from the files with the extension .EXE to copy to the root directory on 
  3744.  drive A: 
  3745.  
  3746.       select copy (*.com *.exe) a:\
  3747.  
  3748.  Select and run an executable program (.COM or .EXE) from files in the C:\UTIL 
  3749.  directory (an "include list"): 
  3750.  
  3751.       select (c:\util\*.com;*.exe)
  3752.  
  3753.  
  3754. ΓòÉΓòÉΓòÉ 3.63. SET - Display / set environment variables ΓòÉΓòÉΓòÉ
  3755.  
  3756. SYNTAX     (Internal 4OS2) 
  3757.  
  3758. SET [/P] [/R [d:][path]filename...] [variable=[value]]
  3759.  
  3760. PURPOSE 
  3761.  
  3762. Display, create, modify, or delete environment variables. 
  3763.  
  3764. COMMENTS 
  3765.  
  3766. Entering SET with no variable or value displays the entire environment.  If you 
  3767. don't enter a value, SET will display the value of that variable. Otherwise, 
  3768. the variable and value are placed in the environment.  If the variable already 
  3769. exists, its old contents are replaced by the new value. Variable names are 
  3770. limited to a maximum of 80 characters, and the value to a maximum of 255 
  3771. characters.  The variable names are shifted to upper case before being stored 
  3772. in the environment; the value is stored exactly as entered. 
  3773.  
  3774. The SET options are: 
  3775.  
  3776.     /P      Pause after displaying a page of environment entries. Press ^C to 
  3777.             quit, or any other key to display the next page. 
  3778.  
  3779.     /R      Read environment variables from a file.  This is much faster than 
  3780.             loading variables in a batch file.  The file is in the same format 
  3781.             as the SET display, so SET /R can accept as input a file generated 
  3782.             by redirecting SET output. 
  3783.  
  3784.  For example, the following commands will save the environment variables to a 
  3785.  file, and then reload them from that file: 
  3786.  
  3787.       set > varlist
  3788.       set /r varlist
  3789.  
  3790.  You can load variables from multiple files by listing the filenames 
  3791.  individually after the /R. 
  3792.  
  3793.  You can add comments to a variable file by starting the comment line with a 
  3794.  colon (:). 
  3795.  
  3796.  You can remove multiple environment variables with the UNSET command, and edit 
  3797.  environment variables with the ESET command. 
  3798.  
  3799.  See also ESET and UNSET. 
  3800.  
  3801.  EXAMPLES 
  3802.  
  3803.  Display the current environment: 
  3804.  
  3805.       set
  3806.  
  3807.  Add a variable to the environment: 
  3808.  
  3809.       set mine=c:\finance\myfiles
  3810.  
  3811.  Remove a variable from the environment: 
  3812.  
  3813.       set mine=
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ 3.64. SETDOS - Display / set configuration options ΓòÉΓòÉΓòÉ
  3817.  
  3818. SYNTAX     (Internal 4OS2) 
  3819.  
  3820. SETDOS [/C? /E? /I+|-command /M? /P? /N? /R? /S?:? /U? /V?]
  3821.  
  3822. PURPOSE 
  3823.  
  3824. Display or set 4OS2 configuration options. 
  3825.  
  3826. COMMENTS 
  3827.  
  3828. Most of these options can also be set in 4OS2.INI. The name of the 
  3829. corresponding 4OS2.INI directive for each option, if any, is listed in square 
  3830. brackets [ ] at the end of the description for the option. Use SETDOS rather 
  3831. than 4OS2.INI when you need to make temporary changes. 
  3832.  
  3833. The SETDOS options are: 
  3834.  
  3835.     /C      The COMPOUND option sets the character used for separating multiple 
  3836.             commands on the same line.  The default character is the ampersand 
  3837.             (&).  You cannot use any of the redirection characters (|><), or 
  3838.             the whitespace characters (blank, tab, comma, semicolon, or equal) 
  3839.             as the command separator.  [CommandSep] 
  3840.  
  3841.     /E      The ESCAPE option sets the character used to suppress the normal 
  3842.             meaning of the following character.  Any character following the 
  3843.             escape character will be passed unmodified to the command line. 
  3844.             The default escape character is the caret (^).  You cannot use any 
  3845.             of the redirection characters (|><) or the whitespace characters 
  3846.             (blank, tab, comma, semicolon, or equal) as the escape character. 
  3847.             [EscapeChar] 
  3848.  
  3849.     /I      The INTERNAL option allows you to disable or enable internal 4OS2 
  3850.             commands.  To disable a command, precede the command name with a 
  3851.             minus (-).  To reenable a command, precede it with a plus (+). 
  3852.  
  3853.     /M      The MODE option controls the line editing mode. The default is 
  3854.             overstrike mode (/M0).  If MODE is set to 1, the default is insert 
  3855.             mode.  [EditMode] 
  3856.  
  3857.     /N      The NOCLOBBER option controls output redirection.  If NOCLOBBER is 
  3858.             set to 1, existing files may not be destroyed by output 
  3859.             redirection, and when appending with >>, the output file must 
  3860.             exist.  NOCLOBBER can be overridden with the ! character.  The 
  3861.             default value is 0.  [NoClobber] 
  3862.  
  3863.     /P      The PARAMETER option sets the character used to specify argument 
  3864.             lists in alias and variable expansion.  The default character is $ 
  3865.             (in 4DOS it is &).  [ParameterChar] 
  3866.  
  3867.     /R      The ROWS option determines the number of screen rows used by the 
  3868.             video display.  Normally 4OS2 detects the screen size, but if you 
  3869.             have a non-standard display you may need to set it explicitly.  The 
  3870.             ROWS option does not affect screen scrolling (that is controlled by 
  3871.             your video BIOS and OS/2); it is used only for LIST, SELECT, the 
  3872.             paged output options (i.e., TYPE /P), and error checking in the 
  3873.             screen output commands.  [ScreenRows] 
  3874.  
  3875.     /S      The SHAPE option sets the default cursor shape. The format is 
  3876.             /So:i, where "o" is the cursor size for overstrike mode, and "i" 
  3877.             the cursor size for insert mode.  The size is entered as a 
  3878.             percentage of the total character cell size.  The default values 
  3879.             are 10:100 (a thin underscore cursor for overstrike mode, and a 
  3880.             block cursor for insert mode).  Because of the way video BIOSes 
  3881.             remap the cursor, you may not get a smooth progression in the 
  3882.             cursor size from 0 - 100%. To disable the cursor, use /S0:0. 
  3883.             [CursorOver, CursorIns] 
  3884.  
  3885.     /U      The UPPER option controls the way filenames are displayed for the 
  3886.             internal commands (COPY, DIR, etc.).  If UPPER is 1, filenames will 
  3887.             be displayed in upper case.  The default is /U0 (filenames will be 
  3888.             displayed in lower case).  [UpperCase] 
  3889.  
  3890.     /V      The VERBOSE option controls command echoing in batch files.  If 
  3891.             VERBOSE is set to 0, batch files will NOT be echoed  unless ECHO is 
  3892.             set ON.  The default is 1 (batch file commands WILL be echoed).  If 
  3893.             VERBOSE is set to 2, all batch file lines will be echoed, including 
  3894.             those prefaced by a '@', and when ECHO is OFF.  [BatchEcho] 
  3895.  
  3896.  EXAMPLES 
  3897.  
  3898.  Change the COMPOUND character to a ~ (tilde): 
  3899.  
  3900.       setdos /c~
  3901.  
  3902.  Change MODE to insert, VERBOSE to off, and set NOCLOBBER on: 
  3903.  
  3904.       setdos /m1 /v0 /n1
  3905.  
  3906.  Disable the internal LIST command: 
  3907.  
  3908.       setdos /i-list
  3909.  
  3910.  Change the the PARAMETER character to an &, the COMPOUND character to a ^, and 
  3911.  the ESCAPE character to a  (ctrl-X), so that 4OS2 syntax matches that used in 
  3912.  4DOS.  Note the ^ escape characters used before the new parameter and compound 
  3913.  characters.  These prevent the new characters from being given their old 
  3914.  meanings within the SETDOS command; for example, without them the & would be 
  3915.  taken as the end of the SETDOS command. 
  3916.  
  3917.       setdos /p^& /c^^ /e
  3918.  
  3919.  
  3920. ΓòÉΓòÉΓòÉ 3.65. SETLOCAL - Save environment ΓòÉΓòÉΓòÉ
  3921.  
  3922. SYNTAX     (Internal 4OS2) 
  3923.  
  3924. SETLOCAL
  3925.  
  3926. PURPOSE 
  3927.  
  3928. Save a copy of the current disk drive, directory, aliases, and environment 
  3929. variables. 
  3930.  
  3931. COMMENTS 
  3932.  
  3933. SETLOCAL is used in batch files to save the disk drive, directory, aliases, and 
  3934. environment variables to a reserved block of memory.  You can then change their 
  3935. values, and later restore the original values with ENDLOCAL.  You cannot use 
  3936. SETLOCAL in an alias. 
  3937.  
  3938. SETLOCAL and ENDLOCAL are not nestable within the same batch file. However, you 
  3939. can have multiple SETLOCAL / ENDLOCAL pairs within a batch file, and nested 
  3940. batch files can each have their own SETLOCAL / ENDLOCAL. An ENDLOCAL will be 
  3941. automatically performed at the end of a batch file. 
  3942.  
  3943. Note that if you invoke a batch from another without using CALL, the first 
  3944. batch file is implicitly terminated, and an automatic ENDLOCAL performed. The 
  3945. second batch file will inherit the drive, directory, aliases, and environment 
  3946. variables as they were prior to the SETLOCAL. 
  3947.  
  3948. See also ENDLOCAL. 
  3949.  
  3950. EXAMPLES 
  3951.  
  3952. This batch file fragment saves the disk drive, directory, aliases, and 
  3953. environment variables, changes the disk and directory, modifies some variables, 
  3954. runs a program, and then restores the original values: 
  3955.  
  3956.     setlocal
  3957.     cdd d:\test & set path=c:\;c:\os;c:\util & set lib=d:\lib
  3958.     rem run some program here
  3959.     endlocal
  3960.  
  3961.  
  3962. ΓòÉΓòÉΓòÉ 3.66. SHIFT - Shift batch arguments ΓòÉΓòÉΓòÉ
  3963.  
  3964. SYNTAX     (Internal 4OS2) 
  3965.  
  3966. SHIFT [n]
  3967.  
  3968. PURPOSE 
  3969.  
  3970. Allow the use of more than 10 variables in a batch file. 
  3971.  
  3972. COMMENT 
  3973.  
  3974. SHIFT is provided for compatibility with CMD.EXE, which only supports 10 
  3975. parameters (%0 through %9); 4OS2 supports 128 (%0 to %127), so you may not need 
  3976. to use SHIFT for batch files running exclusively under 4OS2. 
  3977.  
  3978. SHIFT moves each batch file parameter n positions (i.e., if n is 1, then %1 
  3979. becomes %0, %2 becomes %1, etc.).  The default value for n is 1.  You can also 
  3980. reverse a SHIFT by giving a negative value for n (i.e., if n is -1, the former 
  3981. value for %0 is restored, %1 becomes %1, %1 becomes %2, etc.). 
  3982.  
  3983. SHIFT also affects the %$ (command line tail) and %# (number of command 
  3984. arguments) batch variables. 
  3985.  
  3986. EXAMPLES 
  3987.  
  3988. Create a batch file called TEST.BTM: 
  3989.  
  3990.     echo %1 %2 %3 %4
  3991.     shift
  3992.     echo %1 %2 %3 %4
  3993.     shift 2
  3994.     echo %1 %2 %3 %4
  3995.     shift -1
  3996.     echo %1 %2 %3 %4
  3997.  
  3998. Executing TEST.BTM with the arguments "zero one two three four five six" 
  3999. produces the following results: 
  4000.  
  4001.     zero one two three
  4002.     one two three four
  4003.     three four five six
  4004.     two three four five
  4005.  
  4006.  
  4007. ΓòÉΓòÉΓòÉ 3.67. START - Start new session ΓòÉΓòÉΓòÉ
  4008.  
  4009. SYNTAX     (Internal 4OS2) 
  4010.  
  4011. START ["title"] [/B[G] /C /DOS /F[G] /FS /I /ICON=name /INV /K /L
  4012.     /MAX /MIN /N /PGM /PM /POS=x,y,x1,y1 /WAIT /WIN] [command ...]
  4013.  
  4014. PURPOSE 
  4015.  
  4016. Start a program in a new OS/2 session. 
  4017.  
  4018. COMMENTS 
  4019.  
  4020. Entering START with no program name starts another 4OS2 session. 
  4021.  
  4022. START determines the application type automatically and starts it in the 
  4023. appropriate mode (full-screen, windowed, or PM).  If the program is a DOS app 
  4024. or Windows 3.x app, 4OS2 will either return an error message (in OS/2 1.3), or 
  4025. start the program in a VDM (in OS/2 2.0). 
  4026.  
  4027. You cannot start a batch file (.CMD or .BTM) with /PM; use /FS or /WIN. 
  4028.  
  4029. The START options are: 
  4030.  
  4031.     "title"     Specify the title to appear on the title bar and in the PM task 
  4032.                 list.  The title must be enclosed in double quotes and cannot 
  4033.                 exceed 60 characters.  If you don't specify a title, the 
  4034.                 program name is used. 
  4035.  
  4036.     /B[G]       Start as a background session. 
  4037.  
  4038.     /C          Start the application in a 4OS2 session, and end the session 
  4039.                 when the application finishes. 
  4040.  
  4041.     /DOS        (OS/2 2.0 only) Start a foreground DOS session. 
  4042.  
  4043.     /F[G]       Start the session in the foreground.  The default is to start 
  4044.                 in the background, unless you specify /DOS, /FS, /WIN, or /PM. 
  4045.  
  4046.     /FS         Start a foreground full-screen session. 
  4047.  
  4048.     /I          Inherit the environment specified by the SET statements in 
  4049.                 CONFIG.SYS, rather than the current 4OS2 environment. 
  4050.  
  4051.     /ICON       Use the specified icon file. 
  4052.  
  4053.     /INV        Start the session as invisible (no icon; only accessible 
  4054.                 through the Task Manager or Window List). 
  4055.  
  4056.     /K          Start the application in a 4OS2 session, and keep the session 
  4057.                 when the application finishes.  This is the default for all 
  4058.                 non-PM applications. 
  4059.  
  4060.     /L          Start 4OS2 with local alias and history lists. 
  4061.  
  4062.     /MAX        Start the session maximized. 
  4063.  
  4064.     /MIN        Start the session minimized. 
  4065.  
  4066.     /N          Start the program directly without using 4OS2.EXE.  The command 
  4067.                 cannot be a batch file or internal command.  This is the 
  4068.                 default value for PM applications. 
  4069.  
  4070.     /PGM        The next argument is the program name, not a session name. 
  4071.  
  4072.     /PM         Start a foreground PM application. 
  4073.  
  4074.     /POS        Specify the start position (x,y), and the window size (x1,y1) 
  4075.                 in pels (the lower left corner is 0,0). 
  4076.  
  4077.     /WAIT       Start the session as a child session, and wait for it to end 
  4078.                 before continuing. 
  4079.  
  4080.     /WIN        Start a foreground windowed session. 
  4081.  
  4082.  If you specify a session type incompatible with the program (for example, a 
  4083.  /PM with a .CMD file), START will start the session in the default mode for 
  4084.  that program. 
  4085.  
  4086.  See also DETACH 
  4087.  
  4088.  EXAMPLES 
  4089.  
  4090.  Start a full-screen 4OS2 session: 
  4091.  
  4092.       start /fs
  4093.  
  4094.  Start 4DOS in a windowed DOS session (OS/2 2.0 only): 
  4095.  
  4096.       start /dos /win 4DOS.COM
  4097.  
  4098.  (The "4DOS.COM" in this example is optional.  4OS2 will start 4DOS 
  4099.  automatically if no program name is given in a START /DOS command and 4DOS is 
  4100.  your default DOS command processor.) 
  4101.  
  4102.  Start CHKDSK in a minimized background window session, without using 4OS2, and 
  4103.  with the title "Analyzing the disk": 
  4104.  
  4105.       start "Analyzing the disk" /bg /min /win /n chkdsk
  4106.  
  4107.  
  4108. ΓòÉΓòÉΓòÉ 3.68. TEE - Tee pipe fitting ΓòÉΓòÉΓòÉ
  4109.  
  4110. SYNTAX     (Internal 4OS2) 
  4111.  
  4112. TEE [/A] [d:][path]filename...
  4113.  
  4114. PURPOSE 
  4115.  
  4116. Copy standard input to standard output, and save a copy in the specified 
  4117. file(s). 
  4118.  
  4119. COMMENTS 
  4120.  
  4121. The only option for TEE is: 
  4122.  
  4123.     /A      Append output to the file(s) rather than overwriting it. 
  4124.  
  4125.  If you are typing at the keyboard, enter a ^Z to terminate the input. 
  4126.  
  4127.  TEE is often used to save the intermediate output of a pipe. 
  4128.  
  4129.  See also Y. 
  4130.  
  4131.  EXAMPLES 
  4132.  
  4133.  Search the file DOC for any lines containing the string "486", make a copy of 
  4134.  the matching lines in 4.DAT, and write them to the output file 486.DAT: 
  4135.  
  4136.       find "486" doc | tee 4.dat | sort > 486.dat
  4137.  
  4138.  
  4139. ΓòÉΓòÉΓòÉ 3.69. TEXT - Display text block ΓòÉΓòÉΓòÉ
  4140.  
  4141. SYNTAX     (Internal 4OS2) 
  4142.  
  4143. TEXT
  4144.  .
  4145.  .
  4146.  .
  4147. ENDTEXT
  4148.  
  4149. PURPOSE 
  4150.  
  4151. Display a block of text in a batch file. 
  4152.  
  4153. COMMENTS 
  4154.  
  4155. The TEXT command is useful for displaying menus or multiple-line messages. TEXT 
  4156. will display subsequent lines in the text until terminated by ENDTEXT. Both 
  4157. TEXT and ENDTEXT must be entered as the only command on that line. 
  4158.  
  4159. You can change screen colors by inserting ANSI escape sequences into the text 
  4160. block. 
  4161.  
  4162. If the output of TEXT is redirected, all lines in the text block will be 
  4163. written to the specified output file, and not to the screen. 
  4164.  
  4165. See also ECHO, SCREEN, SCRPUT, and VSCRPUT. 
  4166.  
  4167. EXAMPLES 
  4168.  
  4169. The following batch file fragment displays a simple menu: 
  4170.  
  4171.     @echo off & cls & screen 2 0
  4172.     text
  4173.     Enter one of the following:
  4174.  
  4175.         1 - Spreadsheet
  4176.         2 - Word Processing
  4177.         3 - DOS Utilities
  4178.  
  4179.     Enter your selection:
  4180.     endtext
  4181.  
  4182.  
  4183. ΓòÉΓòÉΓòÉ 3.70. TIME - Set/Display time ΓòÉΓòÉΓòÉ
  4184.  
  4185. SYNTAX     (Internal 4OS2) 
  4186.  
  4187. TIME [hh:mm:ss]
  4188.  
  4189. PURPOSE 
  4190.  
  4191. Display or set the current system time. 
  4192.  
  4193. COMMENTS 
  4194.  
  4195. If you don't enter any parameters, TIME will display the current system time 
  4196. and prompt you for a new time.  Press ENTER if you don't wish to change the 
  4197. time, otherwise enter the new time. 
  4198.  
  4199. The parameters for the TIME command are: 
  4200.  
  4201.     hh      Hour (0 - 23) 
  4202.     mm      Minute (0 - 59) 
  4203.     ss      Second (0 - 59) 
  4204.  
  4205.  TIME defaults to 24-hour format; you can optionally enter the time in 12-hour 
  4206.  format by appending an "am" or "pm". 
  4207.  
  4208.  Whenever you create or modify a file, the system time is recorded in the 
  4209.  directory entry. 
  4210.  
  4211.  See also DATE, and TIMER. 
  4212.  
  4213.  EXAMPLES 
  4214.  
  4215.  Enter the time (9:30 am): 
  4216.  
  4217.       time 9:30
  4218.  
  4219.  To be prompted for the time: 
  4220.  
  4221.       time
  4222.  
  4223.  
  4224. ΓòÉΓòÉΓòÉ 3.71. TIMER - System stopwatch ΓòÉΓòÉΓòÉ
  4225.  
  4226. SYNTAX     (Internal 4OS2) 
  4227.  
  4228. TIMER [/1 /2 /3 /S] [ON]
  4229.  
  4230. PURPOSE 
  4231.  
  4232. System stopwatch. 
  4233.  
  4234. COMMENTS 
  4235.  
  4236. The TIMER command turns an internal stopwatch on and off.  The first time you 
  4237. run TIMER, the stopwatch starts.  When you run TIMER again, the stopwatch stops 
  4238. and the elapsed time is displayed.  There are three timers available (1, 2, and 
  4239. 3), so you can time multiple overlapping events.  The default timer is #1. 
  4240.  
  4241. The options for TIMER are: 
  4242.  
  4243.     ON      Force the timer to restart 
  4244.  
  4245.     /1      Use timer #1 
  4246.  
  4247.     /2      Use timer #2 
  4248.  
  4249.     /3      Use timer #3 
  4250.  
  4251.     /S      Display split time without stopping the timer 
  4252.  
  4253.  TIMER is particularly useful for timing events in batch files. 
  4254.  
  4255.  The smallest interval TIMER can measure 0.03 seconds; the largest interval is 
  4256.  23:59:59.99. 
  4257.  
  4258.  See also TIME. 
  4259.  
  4260.  EXAMPLES 
  4261.  
  4262.  Start or stop the timer: 
  4263.  
  4264.       timer
  4265.  
  4266.  Display a split time: 
  4267.  
  4268.       timer /s
  4269.  
  4270.  
  4271. ΓòÉΓòÉΓòÉ 3.72. TYPE - Display files ΓòÉΓòÉΓòÉ
  4272.  
  4273. SYNTAX     (Internal 4OS2) 
  4274.  
  4275. TYPE [/L /P] [d:][pathname]filename...
  4276.  
  4277. PURPOSE 
  4278.  
  4279. Display the contents of the specified file(s). 
  4280.  
  4281. COMMENTS 
  4282.  
  4283. The TYPE command displays a file.  Press ^S to suspend the display, and any 
  4284. character key to continue the display. 
  4285.  
  4286. The TYPE options are: 
  4287.  
  4288.     /L      Print line numbers preceding each line of text. 
  4289.  
  4290.     /P      Pause after each page.  Press ^C to quit, or any other key to 
  4291.             display the next page. 
  4292.  
  4293.  TYPE is normally only useful for displaying ASCII text files; executable files 
  4294.  (.COM and .EXE) and many data files will be unreadable due to the presence of 
  4295.  non-alphanumeric characters. 
  4296.  
  4297.  You will probably find LIST to be more useful for displaying files. 
  4298.  
  4299.  See also LIST. 
  4300.  
  4301.  EXAMPLES 
  4302.  
  4303.  Display the files MEMO1 and MEMO2, pausing at the end of each page: 
  4304.  
  4305.       type /p memo1 memo2
  4306.  
  4307.  
  4308. ΓòÉΓòÉΓòÉ 3.73. UNALIAS - Remove aliases ΓòÉΓòÉΓòÉ
  4309.  
  4310. SYNTAX     (Internal 4OS2) 
  4311.  
  4312. UNALIAS [/Q] alias...
  4313. UNALIAS *
  4314.  
  4315. PURPOSE 
  4316.  
  4317. Remove aliases from the alias list. 
  4318.  
  4319. COMMENTS 
  4320.  
  4321. UNALIAS also accepts the wildcard character * to delete all aliases. 
  4322.  
  4323. The only option for UNALIAS is: 
  4324.  
  4325.     /Q      Don't display an error message if the alias doesn't exist. 
  4326.  
  4327.  See also ALIAS and ESET. 
  4328.  
  4329.  EXAMPLES 
  4330.  
  4331.  Remove the alias DDIR: 
  4332.  
  4333.       unalias ddir
  4334.  
  4335.  Remove the aliases DDIR and ZAP: 
  4336.  
  4337.       unalias ddir zap
  4338.  
  4339.  Remove all the aliases: 
  4340.  
  4341.       unalias *
  4342.  
  4343.  
  4344. ΓòÉΓòÉΓòÉ 3.74. UNSET - Remove environment variables ΓòÉΓòÉΓòÉ
  4345.  
  4346. SYNTAX     (Internal 4OS2) 
  4347.  
  4348. UNSET [/Q] name...
  4349. UNSET *
  4350.  
  4351. PURPOSE 
  4352.  
  4353. Remove variables from the environment. 
  4354.  
  4355. COMMENTS 
  4356.  
  4357. UNSET also accepts the wildcard character * to delete all environment 
  4358. variables.  Use caution with UNSET *; many programs are dependent on 
  4359. environment variables.  (4OS2 relies on PATH and COMSPEC.) 
  4360.  
  4361. The only option for UNSET is: 
  4362.  
  4363.     /Q      Don't display an error message if the environment variable doesn't 
  4364.             exist. 
  4365.  
  4366.  UNSET is often used in conjunction with SETLOCAL / ENDLOCAL in order to clear 
  4367.  the environment of variables that may cause problems for some applications. 
  4368.  
  4369.  See also ESET and SET. 
  4370.  
  4371.  EXAMPLES 
  4372.  
  4373.  Remove the variable CMDLINE: 
  4374.  
  4375.       unset cmdline
  4376.  
  4377.  Remove the variables CMDLINE and PATH: 
  4378.  
  4379.       unset cmdline path
  4380.  
  4381.  Remove all the environment variables: 
  4382.  
  4383.       unset *
  4384.  
  4385.  
  4386. ΓòÉΓòÉΓòÉ 3.75. VER - Display 4OS2 and OS/2 versions ΓòÉΓòÉΓòÉ
  4387.  
  4388. SYNTAX     (Internal 4OS2) 
  4389.  
  4390. VER [/R]
  4391.  
  4392. PURPOSE 
  4393.  
  4394. Display the current 4OS2 and OS/2 versions. 
  4395.  
  4396. COMMENTS 
  4397.  
  4398. The 4OS2 and OS/2 versions consist of a one digit major version number, a 
  4399. period, and a one or two digit minor version number. 
  4400.  
  4401. The only option for VER is: 
  4402.  
  4403.     /R      Display the OS/2 and 4OS2 revision levels. 
  4404.  
  4405.  EXAMPLES 
  4406.  
  4407.  Get the current version of 4OS2 and OS/2: 
  4408.  
  4409.       ver
  4410.  
  4411.  
  4412. ΓòÉΓòÉΓòÉ 3.76. VERIFY - Set disk write verification ΓòÉΓòÉΓòÉ
  4413.  
  4414. SYNTAX     (Internal 4OS2) 
  4415.  
  4416. VERIFY [on | off]
  4417.  
  4418. PURPOSE 
  4419.  
  4420. Display, enable, or disable disk write verification. 
  4421.  
  4422. COMMENTS 
  4423.  
  4424. When VERIFY is ON, the system will verify that no error occurred during each 
  4425. disk write operation.  It does NOT compare the data actually written to the 
  4426. disk.  VERIFY will remain ON until you set it OFF. 
  4427.  
  4428. Entering VERIFY with no parameters will display the current VERIFY state. 
  4429.  
  4430. Verification will slow your disk write operations slightly. 
  4431.  
  4432. At system startup, VERIFY is OFF. 
  4433.  
  4434. EXAMPLES 
  4435.  
  4436. Check the current verify status: 
  4437.  
  4438.     verify
  4439.  
  4440. Enable disk write verification: 
  4441.  
  4442.     verify on
  4443.  
  4444.  
  4445. ΓòÉΓòÉΓòÉ 3.77. VOL - Display volume labels ΓòÉΓòÉΓòÉ
  4446.  
  4447. SYNTAX     (Internal 4OS2) 
  4448.  
  4449. VOL [d:] ...
  4450.  
  4451. PURPOSE 
  4452.  
  4453. Display the disk volume label(s). 
  4454.  
  4455. COMMENTS 
  4456.  
  4457. If you don't enter a drive name, VOL displays the disk label and the volume 
  4458. serial number for the current drive. 
  4459.  
  4460. If the disk doesn't have a volume name, VOL will report it as "unlabeled." 
  4461.  
  4462. Volume labels can be created, changed or deleted with the LABEL command. 
  4463.  
  4464. EXAMPLES 
  4465.  
  4466. Display the disk labels for drives A and B: 
  4467.  
  4468.     vol a: b:
  4469.  
  4470.  
  4471. ΓòÉΓòÉΓòÉ 3.78. VSCRPUT - Write vertical text ΓòÉΓòÉΓòÉ
  4472.  
  4473. SYNTAX     (Internal 4OS2) 
  4474.  
  4475. VSCRPUT row column [bright] [blink] fg ON bg text
  4476.  
  4477. PURPOSE 
  4478.  
  4479. Display text in color in a vertical column. 
  4480.  
  4481. COMMENTS 
  4482.  
  4483. The row and column numbering is zero-based, so on a standard 25 row by 80 
  4484. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  4485.  
  4486. VSCRPUT works like SCRPUT, but writes the text vertically. 
  4487.  
  4488. The parameters are: 
  4489.  
  4490.     row         Start row 
  4491.  
  4492.     column      Start column 
  4493.  
  4494.     fg          Foreground character color 
  4495.  
  4496.     bg          Background character color 
  4497.  
  4498.     text        The text to display 
  4499.  
  4500.  Only the first three characters of the color name and attributes ("bright" and 
  4501.  "blink") are required. 
  4502.  
  4503.  The available colors are: 
  4504.  
  4505.       Black      Blue      Green      Red
  4506.       Magenta    Cyan      Yellow     White
  4507.  
  4508.  See also ECHO, SCREEN, SCRPUT, and TEXT. 
  4509.  
  4510.  EXAMPLES 
  4511.  
  4512.  The following batch file fragment displays an X and Y axis and labels them: 
  4513.  
  4514.       drawhline 20 10 40 1 bright white on blue
  4515.       drawvline 2 10 18 1 bright white on blue
  4516.       scrput 21 20 bright red on blue X axis
  4517.       vcrput 8 9 bright red on blue Y axis
  4518.  
  4519.  
  4520. ΓòÉΓòÉΓòÉ 3.79. Y - Y pipe fitting ΓòÉΓòÉΓòÉ
  4521.  
  4522. SYNTAX     (Internal 4OS2) 
  4523.  
  4524. Y [d:][path]filename...
  4525.  
  4526. PURPOSE 
  4527.  
  4528. Copy standard input to standard output, and then copy the specified file(s) to 
  4529. standard output. 
  4530.  
  4531. COMMENTS 
  4532.  
  4533. Standard input from the console is terminated by a ^Z. 
  4534.  
  4535. See also TEE. 
  4536.  
  4537. EXAMPLES 
  4538.  
  4539. Get text from standard input, append the files MEMO1 and MEMO2 to it, and send 
  4540. the output to MEMOS: 
  4541.  
  4542.     y memo1 memo2 > memos
  4543.  
  4544.  
  4545. ΓòÉΓòÉΓòÉ 4. 4OS2 Reference tables ΓòÉΓòÉΓòÉ
  4546.  
  4547. This section includes an ASCII character table, an ANSI command reference, and 
  4548. a list of the keycodes used by INKEY. 
  4549.  
  4550.  
  4551. ΓòÉΓòÉΓòÉ 4.1. ASCII table ΓòÉΓòÉΓòÉ
  4552.  
  4553.                       Control Characters
  4554.  
  4555.     Dec  Hex  Chr  Nam  Ctl   Γöé   Dec  Hex  Chr  Nam  Ctl
  4556.     ---  ---  ---  ---  ---   Γöé   ---  ---  ---  ---  ---
  4557.     000   00       NUL   ^@   Γöé   016   10      DLE   ^P
  4558.     001   01      SOH   ^A   Γöé   017   11      DC1   ^Q
  4559.     002   02      STX   ^B   Γöé   018   12      DC2   ^R
  4560.     003   03      ETX   ^C   Γöé   019   13      DC3   ^S
  4561.     004   04      EOT   ^D   Γöé   020   14      DC4   ^T
  4562.     005   05      ENQ   ^E   Γöé   021   15      NAK   ^U
  4563.     006   06      ACK   ^F   Γöé   022   16      SYN   ^V
  4564.     007   07       BEL   ^G   Γöé   023   17      ETB   ^W
  4565.     008   08      BS    ^H   Γöé   024   18      CAN   ^X
  4566.     009   09       HT    ^I   Γöé   025   19      EM    ^Y
  4567.     010   0A       LF    ^J   Γöé   026   1A      SUB   ^Z
  4568.     011   0B       VT    ^K   Γöé   027   1B      ESC   ^[
  4569.     012   0C       FF    ^L   Γöé   028   1C      FS    ^\
  4570.     013   0D       CR    ^M   Γöé   029   1D      GS    ^]
  4571.     014   0E      SO    ^N   Γöé   030   1E      RS    ^^
  4572.     015   0F      SI    ^O   Γöé   031   1F      US    ^_
  4573.  
  4574.                   Punctuation, Digits, Upper Case
  4575.  
  4576.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4577.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4578.   032   20      Γöé  048   30   0  Γöé  064   40   @  Γöé  080   50   P
  4579.   033   21   !  Γöé  049   31   1  Γöé  065   41   A  Γöé  081   51   Q
  4580.   034   22   "  Γöé  050   32   2  Γöé  066   42   B  Γöé  082   52   R
  4581.   035   23   #  Γöé  051   33   3  Γöé  067   43   C  Γöé  083   53   S
  4582.   036   24   $  Γöé  052   34   4  Γöé  068   44   D  Γöé  084   54   T
  4583.   037   25   %  Γöé  053   35   5  Γöé  069   45   E  Γöé  085   55   U
  4584.   038   26   &  Γöé  054   36   6  Γöé  070   46   F  Γöé  086   56   V
  4585.   039   27   '  Γöé  055   37   7  Γöé  071   47   G  Γöé  087   57   W
  4586.   040   28   (  Γöé  056   38   8  Γöé  072   48   H  Γöé  088   58   X
  4587.   041   29   )  Γöé  057   39   9  Γöé  073   49   I  Γöé  089   59   Y
  4588.   042   2A   *  Γöé  058   3A   :  Γöé  074   4A   J  Γöé  090   5A   Z
  4589.   043   2B   +  Γöé  059   3B   ;  Γöé  075   4B   K  Γöé  091   5B   [
  4590.   044   2C   ,  Γöé  060   3C   <  Γöé  076   4C   L  Γöé  092   5C   \
  4591.   045   2D   -  Γöé  061   3D   =  Γöé  077   4D   M  Γöé  093   5D   ]
  4592.   046   2E   .  Γöé  062   3E   >  Γöé  078   4E   N  Γöé  094   5E   ^
  4593.   047   2F   /  Γöé  063   3F   ?  Γöé  079   4F   O  Γöé  095   5F   _
  4594.  
  4595.                    Lower Case, Miscellaneous
  4596.  
  4597.                  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4598.                  ---  ---  --- Γöé  ---  ---  ---
  4599.                  096   60   `  Γöé  112   70   p
  4600.                  097   61   a  Γöé  113   71   q
  4601.                  098   62   b  Γöé  114   72   r
  4602.                  099   63   c  Γöé  115   73   s
  4603.                  100   64   d  Γöé  116   74   t
  4604.                  101   65   e  Γöé  117   75   u
  4605.                  102   66   f  Γöé  118   76   v
  4606.                  103   67   g  Γöé  119   77   w
  4607.                  104   68   h  Γöé  120   78   x
  4608.                  105   69   i  Γöé  121   79   y
  4609.                  106   6A   j  Γöé  122   7A   z
  4610.                  107   6B   k  Γöé  123   7B   {
  4611.                  108   6C   l  Γöé  124   7C   |
  4612.                  109   6D   m  Γöé  125   7D   }
  4613.                  110   6E   n  Γöé  126   7E   ~
  4614.                  111   6F   o  Γöé  127   7F   
  4615.  
  4616.                 International; Graphics Characters 1
  4617.  
  4618.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4619.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4620.   128   80   ╨É  Γöé  144   90   ╨á  Γöé  160   A0   ╨░  Γöé  176   B0   Γûæ
  4621.   129   81   ╨æ  Γöé  145   91   ╨í  Γöé  161   A1   ╨▒  Γöé  177   B1   ΓûÆ
  4622.   130   82   ╨Æ  Γöé  146   92   ╨ó  Γöé  162   A2   ╨▓  Γöé  178   B2   Γûô
  4623.   131   83   ╨ô  Γöé  147   93   ╨ú  Γöé  163   A3   ╨│  Γöé  179   B3   Γöé
  4624.   132   84   ╨ö  Γöé  148   94   ╨ñ  Γöé  164   A4   ╨┤  Γöé  180   B4   Γöñ
  4625.   133   85   ╨ò  Γöé  149   95   ╨Ñ  Γöé  165   A5   ╨╡  Γöé  181   B5   Γòí
  4626.   134   86   ╨û  Γöé  150   96   ╨ª  Γöé  166   A6   ╨╢  Γöé  182   B6   Γòó
  4627.   135   87   ╨ù  Γöé  151   97   ╨º  Γöé  167   A7   ╨╖  Γöé  183   B7   Γòû
  4628.   136   88   ╨ÿ  Γöé  152   98   ╨¿  Γöé  168   A8   ╨╕  Γöé  184   B8   Γòò
  4629.   137   89   ╨Ö  Γöé  153   99   ╨⌐  Γöé  169   A9   ╨╣  Γöé  185   B9   Γòú
  4630.   138   8A   ╨Ü  Γöé  154   9A   ╨¬  Γöé  170   AA   ╨║  Γöé  186   BA   Γòæ
  4631.   139   8B   ╨¢  Γöé  155   9B   ╨½  Γöé  171   AB   ╨╗  Γöé  187   BB   Γòù
  4632.   140   8C   ╨£  Γöé  156   9C   ╨¼  Γöé  172   AC   ╨╝  Γöé  188   BC   Γò¥
  4633.   141   8D   ╨¥  Γöé  157   9D   ╨¡  Γöé  173   AD   ╨╜  Γöé  189   BD   Γò£
  4634.   142   8E   ╨₧  Γöé  158   9E   ╨«  Γöé  174   AE   ╨╛  Γöé  190   BE   Γò¢
  4635.   143   8F   ╨ƒ  Γöé  159   9F   ╨»  Γöé  175   AF   ╨┐  Γöé  191   BF   ΓöÉ
  4636.  
  4637.                   Graphics Characters 2; Symbols
  4638.  
  4639.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4640.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4641.   192   C0   Γöö  Γöé  208   D0   Γò¿  Γöé  224   E0   ╤Ç  Γöé  240   F0   ╨ü
  4642.   193   C1   Γö┤  Γöé  209   D1   Γòñ  Γöé  225   E1   ╤ü  Γöé  241   F1   ╤æ
  4643.   194   C2   Γö¼  Γöé  210   D2   ΓòÑ  Γöé  226   E2   ╤é  Γöé  242   F2   ╨ä
  4644.   195   C3   Γö£  Γöé  211   D3   ΓòÖ  Γöé  227   E3   ╤â  Γöé  243   F3   ╤ö
  4645.   196   C4   ΓöÇ  Γöé  212   D4   Γòÿ  Γöé  228   E4   ╤ä  Γöé  244   F4   ╨ç
  4646.   197   C5   Γö╝  Γöé  213   D5   ΓòÆ  Γöé  229   E5   ╤à  Γöé  245   F5   ╤ù
  4647.   198   C6   Γò₧  Γöé  214   D6   Γòô  Γöé  230   E6   ╤å  Γöé  246   F6   ╨Ä
  4648.   199   C7   Γòƒ  Γöé  215   D7   Γò½  Γöé  231   E7   ╤ç  Γöé  247   F7   ╤₧
  4649.   200   C8   ΓòÜ  Γöé  216   D8   Γò¬  Γöé  232   E8   ╤ê  Γöé  248   F8   ┬░
  4650.   201   C9   Γòö  Γöé  217   D9   Γöÿ  Γöé  233   E9   ╤ë  Γöé  249   F9   ΓêÖ
  4651.   202   CA   Γò⌐  Γöé  218   DA   Γöî  Γöé  234   EA   ╤è  Γöé  250   FA   ┬╖
  4652.   203   CB   Γòª  Γöé  219   DB   Γûê  Γöé  235   EB   ╤ï  Γöé  251   FB   ΓêÜ
  4653.   204   CC   Γòá  Γöé  220   DC   Γûä  Γöé  236   EC   ╤î  Γöé  252   FC   Γäû
  4654.   205   CD   ΓòÉ  Γöé  221   DD   Γûî  Γöé  237   ED   ╤ì  Γöé  253   FD   ┬ñ
  4655.   206   CE   Γò¼  Γöé  222   DE   ΓûÉ  Γöé  238   EE   ╤Ä  Γöé  254   FE   Γûá
  4656.   207   CF   Γòº  Γöé  223   DF   ΓûÇ  Γöé  239   EF   ╤Å  Γöé  255   FF
  4657.  
  4658.  
  4659. ΓòÉΓòÉΓòÉ 4.2. ANSI reference ΓòÉΓòÉΓòÉ
  4660.  
  4661. This section is a quick-reference to commonly-used ANSI commands.  This 
  4662. information is generally applicable to OS/2 and the DOS ANSI drivers. 
  4663.  
  4664. An ANSI command string consists of three parts: 
  4665.  
  4666.     ESC[            The ASCII character ESC, followed by a left bracket. These 
  4667.                     two characters must be present in all ANSI strings. 
  4668.     parameters      Optional parameters for the command.  If there are multiple 
  4669.                     parameters they are separated by semicolons. 
  4670.     cmd             A single-letter command.  The case of the letter IS 
  4671.                     meaningful. 
  4672.  
  4673.  For example, to position the cursor to row 7, column 12 the ANSI command is: 
  4674.  
  4675.       ESC[7;12H
  4676.  
  4677.  To transmit ANSI commands to the screen with 4OS2, you should use the ECHO 
  4678.  command.  The ESC character can be generated by inserting it into the string 
  4679.  directly (if you are putting the string in a batch file and your editor will 
  4680.  insert such a character), or by using the internal "escape" character (the 
  4681.  4OS2 default escape character is the caret ^) followed by a lower-case "e". 
  4682.  
  4683.  You can also include ANSI commands in your prompt, using $e to transmit the 
  4684.  ESC character.  You can NOT use PROMPT to transmit ANSI commands to the screen 
  4685.  from a batch file. 
  4686.  
  4687.  Commands 
  4688.  
  4689.     ESC[rowsA               Cursor up 
  4690.     ESC[rowsB               Cursor down 
  4691.     ESC[colsC               Cursor right 
  4692.     ESC[colsD               Cursor left 
  4693.     ESC[row;colH            Set cursor position (top left is row 1, column 1) 
  4694.     ESC[2J                  Clear screen 
  4695.     ESC[K                   Clear from cursor to end of line 
  4696.     ESC[row;colf            Set cursor position, same as "H" command 
  4697.     ESC[=modeh              Set display mode; see table of mode values below 
  4698.     ESC[=model              Set display mode; see table of mode values below 
  4699.     ESC[attr;attr;...m      Set display attributes; see table of attribute 
  4700.                             values below 
  4701.     ESC[key;string;...p     Substitute "string" for the specified key; see key 
  4702.                             substitutions section below 
  4703.     ESC[s                   Save cursor position (may not be nested) 
  4704.     ESC[u                   Restore cursor position after a save 
  4705.  
  4706.  Display Attributes 
  4707.  
  4708.     0         All attributes off (normal white on black) 
  4709.     1         High intensity (bold) 
  4710.     2         Normal intensity 
  4711.     4         Underline (usually effective only on monochrome displays) 
  4712.     5         Blinking 
  4713.     7         Reverse Video 
  4714.     8         Invisible 
  4715.     30-37     Set the foreground color: 
  4716.                 30=Black   31=Red    32=Green  33=Yellow 
  4717.                 34=Blue    35=Magenta  36=Cyan   37=White 
  4718.     40-47     Set the background color, same values as above but substitute 40 
  4719.               for 30 etc. 
  4720.  
  4721.  Settings are cumulative, so (for example) to set a bright red foreground, 
  4722.  first set all attributes off, then set red, then bold: 
  4723.  
  4724.       echo ^e[0;31;1m
  4725.  
  4726.  Display Modes 
  4727.  
  4728.     0       Text 40x25 monochrome 
  4729.     1       Text 40x25 color 
  4730.     2       Text 80x25 monochrome 
  4731.     3       Text 80x25 color 
  4732.     4       Graphics 320x200 4-color 
  4733.     5       Graphics 320x200 4-color 
  4734.     6       Graphics 640x200 2-color 
  4735.     7       (cursor wrap kludge) 
  4736.  
  4737.  Mode  7 is an unfortunate kludge; Setting mode 7 with an "h" command tells 
  4738.  ANSI to wrap text to the next line when it passes the end of a line; setting 
  4739.  mode 7 with an "l" (lower-case L) command tells ANSI not to wrap text.  For 
  4740.  all other modes the "h" and "l" commands are equivalent. 
  4741.  
  4742.  Key Substitutions 
  4743.  
  4744.  The key substitutions ("p") command causes ANSI to substitute the text in 
  4745.  "string" when the specified key is pressed.  The key code can be a single 
  4746.  character in quotes, a numeric ASCII value, or an extended code for a non 
  4747.  ASCII key (e.g. function or cursor keys) in the form 0;n, where n is the scan 
  4748.  code for the key. 
  4749.  
  4750.  The string to be substituted can be a single character or character string in 
  4751.  quotes, a numeric ASCII value, or an extended key code. 
  4752.  
  4753.  For a list of numeric ASCII values, see ASCII. 
  4754.  
  4755.  To clear a key substitution, "substitute" the original key for itself (see 
  4756.  examples). 
  4757.  
  4758.  Examples 
  4759.  
  4760.  Clear the display attributes, then set the display to bright cyan on blue, and 
  4761.  clear the screen: 
  4762.  
  4763.       echo ^e[0;44;36;1m^e[2J
  4764.  
  4765.  Substitute "dir"<cr> for F4: 
  4766.  
  4767.       echo ^e[0;62;"dir";13p
  4768.  
  4769.  Undo the above substitution: 
  4770.  
  4771.       echo ^e[0;62;0;62p
  4772.  
  4773.  Set up a prompt that saves the cursor position, displays the 4OS2 shell level, 
  4774.  date, and time on the top line in bright white on magenta, and then restores 
  4775.  the cursor position and sets the color to bright cyan on blue, and displays 
  4776.  the standard prompt: 
  4777.  
  4778.       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
  4779.  
  4780.  
  4781. ΓòÉΓòÉΓòÉ 4.3. Extended Key Codes ΓòÉΓòÉΓòÉ
  4782.  
  4783. Key Mapping Directives 
  4784.  
  4785. The format for a key name is:  [Prefix-]Keyname.  The prefix and key name must 
  4786. be separated by a dash.  The prefix can be left out, or it can be any of the 
  4787. following: 
  4788.  
  4789.     Alt     followed by A - Z, 0 - 9, F1 - F12, or Bksp
  4790.     Ctrl    followed by A - Z, F1 - F12, Bksp, Enter,
  4791.               Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  4792.     Shift   followed by F1 - F12 or Tab
  4793.  
  4794. The possible key names are: 
  4795.  
  4796.     A - Z       Esc         Up          PgUp
  4797.     0 - 9       Bksp        Down        PgDn
  4798.     F1 - F12    Tab         Left        Home
  4799.     Ins         Enter       Right       End
  4800.     Del
  4801.  
  4802. The following table lists the common extended key codes used by INKEY: 
  4803.  
  4804.     F1  @59   Alt-F1  @104   Ctrl-F1  @94    Shift-F1  @84
  4805.     F2  @60   Alt-F2  @105   Ctrl-F2  @95    Shift-F2  @85
  4806.     F3  @61   Alt-F3  @106   Ctrl-F3  @96    Shift-F3  @86
  4807.     F4  @62   Alt-F4  @107   Ctrl-F4  @97    Shift-F4  @87
  4808.     F5  @63   Alt-F5  @108   Ctrl-F5  @98    Shift-F5  @88
  4809.     F6  @64   Alt-F6  @109   Ctrl-F6  @99    Shift-F6  @89
  4810.     F7  @65   Alt-F7  @110   Ctrl-F7  @100   Shift-F7  @90
  4811.     F8  @66   Alt-F8  @111   Ctrl-F8  @101   Shift-F8  @91
  4812.     F9  @67   Alt-F9  @112   Ctrl-F9  @102   Shift-F9  @92
  4813.     F10 @68   Alt-F10 @113   Ctrl-F10 @103   Shift-F10 @93
  4814.  
  4815.     Home  @71     Up    @72     PgUp   @73
  4816.     Left  @75                   Right  @77
  4817.     End   @79     Down  @80     PgDn   @81
  4818.     Ins   @82     Del   @83
  4819.  
  4820.     Ctrl-Home  @119     Ctrl-PgUp   @132
  4821.     Ctrl-Left  @115     Ctrl-Right  @116
  4822.     Ctrl-End   @117     Ctrl-PgDn   @118
  4823.  
  4824.     Ctrl-A  1    Ctrl-N  14
  4825.     Ctrl-B  2    Ctrl-O  15
  4826.     Ctrl-C  3    Ctrl-P  16
  4827.     Ctrl-D  4    Ctrl-Q  17
  4828.     Ctrl-E  5    Ctrl-R  18
  4829.     Ctrl-F  6    Ctrl-S  19
  4830.     Ctrl-G  7    Ctrl-T  20
  4831.     Ctrl-H  8    Ctrl-U  21
  4832.     Ctrl-I  9    Ctrl-V  22
  4833.     Ctrl-J  10   Ctrl-W  23
  4834.     Ctrl-K  11   Ctrl-X  24
  4835.     Ctrl-L  12   Ctrl-Y  25
  4836.     Ctrl-M  13   Ctrl-Z  26
  4837.  
  4838.     Alt-A  @30   Alt-N  @49   Alt-1  @120
  4839.     Alt-B  @48   Alt-O  @24   Alt-2  @121
  4840.     Alt-C  @46   Alt-P  @25   Alt-3  @122
  4841.     Alt-D  @32   Alt-Q  @16   Alt-4  @123
  4842.     Alt-E  @18   Alt-R  @19   Alt-5  @124
  4843.     Alt-F  @33   Alt-S  @31   Alt-6  @125
  4844.     Alt-G  @34   Alt-T  @20   Alt-7  @126
  4845.     Alt-H  @35   Alt-U  @22   Alt-8  @127
  4846.     Alt-I  @23   Alt-V  @47   Alt-9  @128
  4847.     Alt-J  @36   Alt-W  @17   Alt-0  @129
  4848.     Alt-K  @37   Alt-X  @45
  4849.     Alt-L  @38   Alt-Y  @21
  4850.     Alt-M  @50   Alt-Z  @44
  4851.