home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / BCMD10.ZIP / BCMD.DOC < prev    next >
Text File  |  1993-08-14  |  26KB  |  864 lines

  1.         BCMD  Copyright (c) 1993  Thomas G. Hanlin III
  2.        =----------------------------------------------=
  3.            The Better Command Utilities, version 1.0
  4.  
  5.  
  6.  
  7. The Better Command Utilities, or BCMD, is a set of commands
  8. which provide improved replacements for existing DOS commands
  9. (like DIR and COPY) and many entirely new commands as well. BCMD
  10. may be used instead of, or along with, existing DOS commands.
  11.  
  12. BCMD offers many improvements over the default DOS commands.
  13. These include multiple file specifications on a single command
  14. line, exception filespecs, directory colorization, 132-column
  15. support, test modes, support for file descriptions and other
  16. goodies. Help is built into each command and will be displayed
  17. if you use the /? switch.
  18.  
  19. The BCMD collection is copyrighted. It may be distributed only
  20. under the following conditions:
  21.  
  22.    All BCMD files must be distributed together as a unit.
  23.    No files may be altered, added, or deleted from this unit.
  24.  
  25. BCMD is not free software. If you find this evaluation copy
  26. suited to your needs, send in your registration. The ORDER.FRM
  27. file gives complete ordering information. Registration gets you
  28. such perks as the latest version of BCMD and a free upgrade to
  29. the following release as soon as it comes out, with discounts on
  30. all future upgrades.
  31.  
  32. You use BCMD entirely at your own risk. It works for me on the
  33. computers I've tried it on. I can't guarantee it will do the
  34. same for you. If you have trouble using BCMD, tell me about it,
  35. and I'll see what I can do. The WHERE.BBS file is a list of mail
  36. and email addresses at which you may find me.
  37.  
  38.                       Table of Contents                 page 2
  39.  
  40.  
  41.  
  42.  Overview and Legal Info ................................... 1
  43.  
  44.  General Notes ............................................. 3
  45.  
  46.  BCHOICE (batch input) ..................................... 4
  47.  BCOPY (copy file) ......................................... 5
  48.  BDEL (delete file) ........................................ 6
  49.  BDIR (file directory) ..................................... 7
  50.  BEEP (sound effects)....................................... 8
  51.  BMD (make directory) ...................................... 9
  52.  BRD (remove directory) .................................... 9
  53.  BREN (rename file) ....................................... 10
  54.  BTYPE (display file) ..................................... 11
  55.  
  56.  CAL (calendar) ........................................... 11
  57.  CALC (calculator) ........................................ 12
  58.  CAPSLOCK (Caps Lock setting) ............................. 12
  59.  COLOR (set display colors) ............................... 13
  60.  
  61.  DESCRIBE (describe file) ................................. 14
  62.  
  63.  ECHOS (echo w/o CR/LF) ................................... 15
  64.  
  65.  FREE (show disk space) ................................... 15
  66.  
  67.  KEYSPEED (set keyboard speed) ............................ 16
  68.  
  69.  LOCASE (lowercase filter) ................................ 16
  70.  LOCATE (set cursor position) ............................. 17
  71.  LTRIM (left trim filter) ................................. 17
  72.  
  73.  NUMLOCK (Num Lock setting) ............................... 18
  74.  
  75.  ONESPACE (one space filter) .............................. 18
  76.  
  77.  TYME (time and date) ..................................... 19
  78.  
  79.  UNANSI (remove ANSI filter) .............................. 19
  80.  UNCPM (remove Ctrl-Z EOFs) ............................... 20
  81.  UPCASE (uppercase filter) ................................ 21
  82.  
  83.                          General Notes                  page 3
  84.  
  85.  
  86.  
  87. The BCMD utilities which act as replacements for existing DOS
  88. commands are given names which start with "B" to differentiate
  89. them from the corresponding DOS command. These include:
  90.  
  91.    BCHOICE, BCOPY, BDEL, BDIR, BMD, BRD, BREN, BTYPE
  92.  
  93. These commands act much like the DOS commands they're based on,
  94. by default. You can customize them with additional capabilities
  95. using command-line options and/or environment variables.
  96.  
  97. Like DOS, BCMD will normally display filenames in uppercase. You
  98. can change this to lowercase for all of the BCMD utilities by
  99. setting a BCMD environment variable:
  100.  
  101.    SET BCMD=/L
  102.  
  103. Place that SET line in your AUTOEXEC.BAT file if you'd like to
  104. install it automatically whenever you start your computer.
  105.  
  106. If you don't want the status reporting that most BCMD commands
  107. give you as a matter of course, you can also turn it off with
  108. the BCMD environment variable, using the /Q (quiet) switch.
  109.  
  110. Individual BCMD commands will often have their own environment
  111. variables so you can customize them to your preferences. These
  112. will be discussed in the documentation for each command.
  113.  
  114. Some BCMD commands support color. For color support to work, you
  115. must have an ANSI driver (such as ANSI.SYS) installed. See your
  116. DOS manual for details on ANSI if BCMD displays odd characters
  117. instead of color.
  118.  
  119. BCMD file descriptions are maintained in a format compatible
  120. with the 4DOS and NDOS command shells.
  121.  
  122. BCMD disk access remains to be optimized. Some commands in some
  123. configurations will be noticeably slow on floppy drives.
  124.  
  125.                             BCHOICE                     page 4
  126.  
  127.  
  128.  
  129. The CHOICE command debuted in MS-DOS 6.0, when Microsoft finally
  130. noticed that interactive batch files might be handy. It is a
  131. flexible input command that allows you to specify a list of
  132. valid responses and a timeout in case no one is present. The
  133. BCHOICE command works the same way, but for any DOS version.
  134.  
  135. Syntax:
  136.    BCHOICE {options} {text}
  137.  
  138. Options:
  139.  
  140.    /C[:]keys    keys to accept
  141.    /N           no prompt
  142.    /S           case sensitive
  143.    /T[:]c,nnnn  default answer, seconds to wait for answer
  144.  
  145. If you do not specify which keys to accept, YN will be assumed.
  146. You may choose a default answer and the amount of time to wait
  147. for an answer (0-9999 seconds). The result is returned via the
  148. DOS error level: 1 for the first key listed, 2 for the second,
  149. etc; 0 if ^C or Break is pressed; 255 if syntax error.
  150.  
  151. The text prompt should be enclosed in quotation marks for best
  152. results. Otherwise, the text may be altered in various ways by
  153. the command-line parser.
  154.  
  155. Example:
  156.    BCHOICE /T:N,4 "Shall we play a game "
  157.  
  158. This example displays:
  159.  
  160. Shall we play a game [Y,N]?
  161.  
  162. ...and waits for up to four seconds for an answer, assuming "N"
  163. if no key is pressed.
  164.  
  165.                              BCOPY                      page 5
  166.  
  167.  
  168.  
  169. The BCOPY command is similar to the DOS command, COPY. It is a
  170. pure file-to-file copy command, however. It does not support
  171. devices or append operations.
  172.  
  173. Unlike the DOS command it replaces, BCOPY can accept multiple
  174. source and destination files, can copy hidden, read-only, and
  175. system files, accepts exception specifications, and allows
  176. prompting for confirmation before copying or before overwriting
  177. existing files.
  178.  
  179. When specifying multiple source or destination files, enclose
  180. them in parentheses so BCOPY can tell which is which.
  181.  
  182. Syntax:
  183.    BCOPY {options} [source(s)] [dest(s)] {/E [exception(s)]}
  184.  
  185. Options:
  186.    /E   copy everything EXCEPT for the following files
  187.    /H   copy hidden, read-only, and system files too
  188.    /L   display filenames in lowercase
  189.    /N   don't actually copy anything (for testing BCOPY)
  190.    /P   prompt for confirmation before copying each file
  191.    /Q   quiet: don't display filenames or summary
  192.    /R   prompt before overwriting existing files
  193.    /Y   assume YES to all requests for confirmation
  194.  
  195. The following parameters may be set as defaults for BCOPY by
  196. setting the BCOPY environment variable: /H /L /P /Q /R /Y
  197.  
  198. Example:
  199.    BCOPY (A: B:) C:\MISC
  200.  
  201. The above example copies all files on both A: and B: drives to
  202. the directory C:\MISC.
  203.  
  204. Example:
  205.    BCOPY *.* A: /E *.LTR *.TXT
  206.  
  207. The above example copies all files in the current directory to
  208. drive A:, except for files that end in .LTR or .TXT.
  209.  
  210.                              BDEL                       page 6
  211.  
  212.  
  213.  
  214. The BDEL command is similar to the DOS command, DEL (or ERASE).
  215.  
  216. Unlike the DOS command it replaces, BDEL can accept multiple
  217. file specs, can delete hidden, read-only, and system files,
  218. accepts exception specifications, and can recurse through an
  219. entire directory tree.
  220.  
  221. Syntax:
  222.    BDEL {options} [file(s)] {/E [exception file(s)]}
  223.  
  224. Options:
  225.    /E   delete everything EXCEPT for the following files
  226.    /H   delete hidden, read-only, and system files too
  227.    /L   display filenames in lowercase
  228.    /N   don't actually delete anything (for testing BDEL)
  229.    /P   prompt for confirmation before deleting each file
  230.    /Q   quiet: don't display filenames or summary
  231.    /S   recurse through subdirectories
  232.    /Y   assume YES to all requests for confirmation
  233.  
  234. The following parameters may be set as defaults for BDEL by
  235. setting the BDEL environment variable: /H /L /P /Q /Y
  236.  
  237. Example:
  238.    BDEL A: B: /E *.EXE
  239.  
  240. The above example deletes all files on both A: and B: drives,
  241. except for files ending in .EXE.
  242.  
  243. Example:
  244.    BDEL /H /P *.*
  245.  
  246. The above example deletes all files in the current directory,
  247. including hidden, read-only, and system files. It asks for
  248. confirmation before deleting each file.
  249.  
  250. Example:
  251.    BDEL /S C:\*.BAK
  252.  
  253. The above example deletes all files in every directory on the C:
  254. drive which end in the extension .BAK.
  255.  
  256.                              BDIR                       page 7
  257.  
  258.  
  259.  
  260. The BDIR command is similar to the DOS command, DIR.
  261.  
  262. Unlike the DOS command it replaces, BDIR can accept multiple
  263. file specs, can colorize its listing, supports 132 columns,
  264. allows descriptions to be tagged onto files, can show file
  265. attributes, and is highly configurable.
  266.  
  267. Syntax:
  268.    BDIR {options} {file(s)} {/E [exception file(s)]}
  269.  
  270. Options:
  271.    /A   attributes (any of ADHRS: Arc Dir Hid R/O Sys)
  272.    /B   bare list: filenames only, single column
  273.    /D   don't show dot directories ("." and "..")
  274.    /E   dir of everything EXCEPT for the following files
  275.    /K   suppress header (pathname, etc)
  276.    /L   display filenames in lowercase
  277.    /M   suppress footer (totals, etc)
  278.    /O   sorting order (any of DGNS: Date GroupDirs Name Size)
  279.    /P   prompt to continue at end of each full screen
  280.    /S   recurse through subdirectories
  281.    /T   display file attributes
  282.    /U   display only summary info
  283.    /W   wide list: filenames only, multiple columns
  284.    /X   extra wide output (132-column mode)
  285.    /Y   display file descriptions
  286.    /Z   colorize (defaults may be changed with COLORDIR vbl)
  287.  
  288. The following parameters may be set as defaults for BDIR by
  289. setting the BDIR environment variable:
  290.    /A /D /K /L /M /O /P /T /X /Y /Z
  291.  
  292. Example:
  293.    BDIR /Z /Y /D /OGN
  294.  
  295. The above example displays all files in the current directory,
  296. colorized, with descriptions (if any). Dot directories, if any,
  297. are not displayed. Subdirectories are grouped before files, and
  298. all of it is sorted in alphabetical order.
  299.  
  300.                              BEEP                       page 8
  301.  
  302.  
  303.  
  304. The BEEP command provides simple sound effects through the PC
  305. speaker.
  306.  
  307. Syntax:
  308.    BEEP {frequency duration}
  309.  
  310. The frequency is specified in Hertz (cycles per second). The
  311. duration is given in 1/18th seconds. No sound will be generated
  312. for frequencies below 20, allowing you to use this as a delay
  313. command as well.
  314.  
  315. If no parameters are specified, a 440 Hz tone will sound for 2
  316. eighteenths of a second.
  317.  
  318. You may specify multiple frequency/duration pairs on the same
  319. line.
  320.  
  321.    Note     Frequency (highest octave)
  322.    =====    =========
  323.      A         3520
  324.    A#,B-       3714
  325.      B         3952
  326.      C         4186
  327.    C#,D-       4434
  328.      D         4698
  329.    D#,E-       4978
  330.      E         5274
  331.      F         5588
  332.    F#,G-       5920
  333.      G         6272
  334.    G#,A-       6644
  335.  
  336. You can drop down an octave by halving the frequency for a given
  337. note. A "#" suffix indicates a sharp, and "-" a flat note.
  338.  
  339.                               BMD                       page 9
  340.  
  341.  
  342.  
  343. The BMD command is similar to the DOS command, MD (or MKDIR).
  344.  
  345. Unlike the DOS command it replaces, BMD can accept multiple
  346. directory specifications.
  347.  
  348. Syntax:
  349.    BMD [directory] {directory} {etc}
  350.  
  351. Example:
  352.    BMD ONE TWO
  353.  
  354. The above example creates the subdirectories ONE and TWO.
  355.  
  356.  
  357.  
  358.  
  359.                               BRD
  360.  
  361.  
  362.  
  363. The BRD command is similar to the DOS command, RD (or RMDIR).
  364.  
  365. Unlike the DOS command it replaces, BRD can accept multiple
  366. directory specifications.
  367.  
  368. Syntax:
  369.    BRD [directory] {directory} {etc}
  370.  
  371. Example:
  372.    BRD ONE TWO
  373.  
  374. The above example removes the subdirectories ONE and TWO.
  375.  
  376.                              BREN                      page 10
  377.  
  378.  
  379.  
  380. The BREN command is similar to the DOS command, REN (or RENAME).
  381.  
  382. Unlike the DOS command it replaces, BREN can accept multiple
  383. source files, accepts full paths for both source and destination
  384. filespecs, allows renaming from one drive to another, can rename
  385. hidden, read-only, and system files, allows overwriting existing
  386. files, accepts exception specifications, and allows prompting
  387. for confirmation before renaming or before overwriting existing
  388. files.
  389.  
  390. When specifying multiple source files, the source files must be
  391. enclosed in parentheses, and the destination must be a directory
  392. rather than a filespec.
  393.  
  394. By default, the rename will fail if the destination file already
  395. exists. You can override this with /R (add /Y if you don't want
  396. to confirm each overwrite yourself).
  397.  
  398. Syntax:
  399.    BREN {options} [source(s)] [destination] {/E [exception(s)]}
  400.  
  401. Options:
  402.    /E   rename everything EXCEPT for the following files
  403.    /H   rename hidden, read-only, and system files too
  404.    /L   display filenames in lowercase
  405.    /N   don't actually rename anything (for testing BREN)
  406.    /P   prompt for confirmation before renaming each file
  407.    /Q   quiet: don't display filenames or summary
  408.    /R   prompt before overwriting existing files
  409.    /Y   assume YES to all requests for confirmation
  410.  
  411. The following parameters may be set as defaults for BREN by
  412. setting the BREN environment variable: /H /L /P /Q /R /Y
  413.  
  414. Example:
  415.    BREN (A: B:) C:\MISC /E *.TXT
  416.  
  417. The above example moves all files on both A: and B: drives to
  418. the directory C:\MISC, except for files ending in .TXT. The
  419. rename is not done for files that already exist in C:\MISC.
  420.  
  421. Example:
  422.    BREN /R /Y *.BAK \BACKUP
  423.  
  424. The above example moves all .BAK files from the current
  425. directory to the \BACKUP directory, overwriting any existing
  426. files by the same name.
  427.  
  428.                              BTYPE                     page 11
  429.  
  430.  
  431.  
  432. The BTYPE command is similar to the DOS command, TYPE.
  433.  
  434. Unlike the DOS command it replaces, BTYPE provides pagination.
  435.  
  436. Syntax:
  437.    BTYPE {options} [file(s)]
  438.  
  439. Options:
  440.    /P   prompt to continue at end of each full screen
  441.  
  442.  
  443.  
  444.  
  445.                               CAL
  446.  
  447.  
  448.  
  449. The CAL command displays a calendar. If no parameters are given,
  450. the calendar is for the current month and year. Month and/or
  451. year values can be specified as well.
  452.  
  453. Syntax:
  454.    CAL {month} {year}
  455.  
  456. If the month is specified, it must be spelled out. It may be
  457. abbreviated to as few as three characters (JAN, FEB, etc).
  458.  
  459. You may enter either two digits or four digits for the year. If
  460. two digits are used, the 21st century will be assumed for 0-9,
  461. or the 20th century otherwise. The calendar program accepts a
  462. year range of 1900-2078.
  463.  
  464.                              CALC                      page 12
  465.  
  466.  
  467.  
  468. The CALC command is a calculator.
  469.  
  470. Syntax:
  471.    CALC expression
  472.  
  473. Expressions may use the following operators:
  474.    +    add
  475.    -    subtract
  476.    *    multiply
  477.    /    divide
  478.    ^    raise to a power
  479.    **   raise to a power (alternate form)
  480.  
  481. Parentheses may be used to override the default algebraic
  482. precedence, which is: negation, raise to power, multiply and
  483. divide, add and subtract.
  484.  
  485. Example:
  486.    CALC 19.95 * 1.05 + 3
  487.  
  488.  
  489.  
  490.  
  491.                            CAPSLOCK
  492.  
  493.  
  494.  
  495. The CAPSLOCK command lets you get or set the Caps Lock state.
  496.  
  497. Syntax:
  498.    CAPSLOCK {ON or OFF}
  499.  
  500. The current Caps Lock state is displayed if you do not give a
  501. parameter. Otherwise, Caps Lock is set as you request.
  502.  
  503.                              COLOR                     page 13
  504.  
  505.  
  506.  
  507. The COLOR command allows you to set the display colors. An ANSI
  508. driver must be installed for it to function.
  509.  
  510. Syntax:
  511.    COLOR {BRIGHT} {BLINKING} foregroundcolor {ON backgroundcolor}
  512.  
  513. Colors:
  514.    BLACK   BLUE   GREEN   RED   MAGENTA   CYAN   YELLOW   WHITE
  515.  
  516. Color parameters may be shortened to as little as three
  517. characters each. BROWN may be used instead of YELLOW (on most
  518. displays, the "normal" color appears brown, and the "bright"
  519. version of the same color appears yellow).
  520.  
  521. Example:
  522.    COLOR BRIGHT WHITE ON RED
  523.  
  524. The above example sets the foreground color to bright white, and
  525. the background color to red. A shorter version of the same thing
  526. might look like this:
  527.    COLOR BRI WHI ON RED
  528.  
  529.                            DESCRIBE                    page 14
  530.  
  531.  
  532.  
  533. The DESCRIBE command allows you to attach a description to a
  534. file or subdirectory name. This description will be shown when
  535. you use the BDIR directory command. It is also compatible with
  536. the 4DOS and NDOS command shells, and will be shown by the DIR
  537. command provided with those shells.
  538.  
  539. Descriptions may be up to 120 characters, although the part of
  540. the description that is shown depends on the BDIR parameters. It
  541. is 31-37 characters in 80-column mode, depending on whether file
  542. attributes are also being shown. In 132-column mode, up to 81
  543. characters of the file description are displayed.
  544.  
  545. Descriptions are kept in a hidden file named DESCRIPT.ION. They
  546. are automatically maintained by BCMD file utilities (BDEL, BREN,
  547. BCOPY, etc) and other software that is aware of descriptions
  548. (4DOS, NDOS, etc). Descriptions may not be properly updated if
  549. you do file handling with other software.
  550.  
  551. Syntax:
  552.    DESCRIBE {options} [file(s)] {/E [except file(s)]} {"desc"}
  553.  
  554. Options:
  555.    /E   describe everything EXCEPT for the following files
  556.    /L   display filenames in lowercase
  557.    /Q   quiet: don't display filenames or summary
  558.  
  559. The description may be included on the DESCRIBE command line, or
  560. you may leave it off-- in which case, you will be prompted for a
  561. description for each of the selected files.
  562.  
  563. Example:
  564.    DESCRIBE BCMD.DOC "Documentation for BCMD utilities"
  565.  
  566. In the above example, the file BCMD.DOC will be tagged with the
  567. description "Documentation for BCMD utilities" (without the
  568. quotation marks).
  569.  
  570. Example:
  571.    DESCRIBE *.DOC
  572.  
  573. In the above example, the DESCRIBE command will ask you for a
  574. description for each of the .DOC files in the current directory.
  575.  
  576.                              ECHOS                     page 15
  577.  
  578.  
  579.  
  580. The ECHOS command is for use in batch files. It displays text
  581. like the ECHO command, but without moving to the next line. This
  582. makes it easy to display multiple items on the same line. In
  583. order for this to be effective, the batch ECHO state must be
  584. turned off so that the batch commands aren't shown.
  585.  
  586. Syntax:
  587.    ECHOS message
  588.  
  589. Example:
  590.    ECHO OFF
  591.    ECHOS This is
  592.    ECHOS  a test
  593.  
  594. This example displays:
  595.  
  596. This is a test
  597.  
  598.  
  599.  
  600.  
  601.                              FREE
  602.  
  603.  
  604.  
  605. The FREE command shows the amount of disk space available and
  606. the amount used.
  607.  
  608. Syntax:
  609.    FREE {drive{:}} {drive{:}} {etc}
  610.  
  611. If no drive specs are given, stats for the current drive will be
  612. shown. One or more drives may be specified. A colon (":") may,
  613. optionally, be placed after each drive letter.
  614.  
  615. Example:
  616.    FREE C: D:
  617.  
  618.                            KEYSPEED                    page 16
  619.  
  620.  
  621.  
  622. The KEYSPEED command sets the keyboard repeat rate. It will not
  623. work on 8088 PCs.
  624.  
  625. The default keyboard repeat rate is quite sluggish, and you'll
  626. be amazed at how much more responsive your machine is with
  627. faster settings! You can also reduce responsiveness in order to
  628. make the keyboard more manageable for young children, etc.
  629.  
  630. Syntax:
  631.    KEYSPEED delay repeatrate
  632.  
  633. The starting delay may be 0-3, and is 2 by default. The repeat
  634. rate may be 0-31, and is 10 by default. In both cases, settings
  635. of zero are fastest.
  636.  
  637. Example:
  638.    KEYSPEED 0 0
  639.  
  640. The above example sets the keyboard repeat as fast as possible.
  641.  
  642. Example:
  643.    KEYSPEED 2 10
  644.  
  645. The above example restores the default keyboard repeat rate.
  646.  
  647.  
  648.  
  649.  
  650.  
  651.                             LOCASE
  652.  
  653.  
  654.  
  655. The LOCASE filter converts text to lowercase. It works only with
  656. ASCII characters, so it does not fully support international
  657. character sets.
  658.  
  659. Filters are used in conjunction with redirection or piping. They
  660. accept an incoming stream of text, modify it, and pass it on.
  661.  
  662. Example:
  663.    LOCASE <BCMD.NEW
  664.  
  665. The above example converts the BCMD.NEW file to lowercase and
  666. displays the results.
  667.  
  668. Example:
  669.    BDIR | LOCASE
  670.  
  671. The above example converts the output of the BDIR command to
  672. lowercase and displays the results.
  673.  
  674.                             LOCATE                     page 17
  675.  
  676.  
  677.  
  678. The LOCATE command sets the cursor position. It is intended for
  679. use primarily in designing displays for batch files. An ANSI
  680. driver, such as ANSI.SYS, must be installed.
  681.  
  682. Syntax:
  683.    LOCATE row column
  684.  
  685. Cursor coordinates are based on (1,1), which is the upper left
  686. corner of the display. A typical display has rows 1-25 and
  687. columns 1-80.
  688.  
  689. Example:
  690.    LOCATE 5 1
  691.  
  692. The above example positions the cursor on the first column of
  693. the fifth row of the screen.
  694.  
  695.  
  696.  
  697.  
  698.                              LTRIM
  699.  
  700.  
  701.  
  702. The LTRIM filter removes blanks from the left side of each line
  703. of text. Blanks are construed as space or tab characters.
  704.  
  705. Filters are used in conjunction with redirection or piping. They
  706. accept an incoming stream of text, modify it, and pass it on.
  707.  
  708. Example:
  709.    LTRIM <BCMD.NEW
  710.  
  711. The above example trims blanks from the left side of each line
  712. of the BCMD.NEW file and displays the results.
  713.  
  714. Example:
  715.    BDIR | LTRIM
  716.  
  717. The above example trims blanks from the left side of each line
  718. of the output of the BDIR command and displays the results.
  719.  
  720.                             NUMLOCK                    page 18
  721.  
  722.  
  723.  
  724. The NUMLOCK command lets you get or set the Num Lock state.
  725.  
  726. Syntax:
  727.    NUMLOCK {ON or OFF}
  728.  
  729. The current Num Lock state is displayed if you do not give a
  730. parameter. Otherwise, Num Lock is set as you request.
  731.  
  732.  
  733.  
  734.  
  735.                            ONESPACE
  736.  
  737.  
  738.  
  739. The ONESPACE filter converts multiple spaces in a line of text
  740. to single spaces.
  741.  
  742. Filters are used in conjunction with redirection or piping. They
  743. accept an incoming stream of text, modify it, and pass it on.
  744.  
  745. Example:
  746.    ONESPACE <BCMD.NEW
  747.  
  748. The above example takes each line of the file BCMD.NEW, converts
  749. sequences of two or more spaces to one space, and displays the
  750. results.
  751.  
  752. Example:
  753.    BDIR | ONESPACE
  754.  
  755. The above example takes the output of the BDIR command, converts
  756. sequences of two or more spaces in a line to a single space, and
  757. displays the results.
  758.  
  759.                              TYME                      page 19
  760.  
  761.  
  762.  
  763. The TYME command displays the current time and date in a readily
  764. understandable format.
  765.  
  766. Syntax:
  767.    TYME
  768.  
  769. The output of TYME looks like this:
  770.  
  771. It is 11:11 am on Saturday, August 14, 1993.
  772.  
  773.  
  774.  
  775.  
  776.                             UNANSI
  777.  
  778.  
  779.  
  780. The UNANSI filter removes ANSI sequences from text. This can be
  781. useful in cleaning up text that was captured from a BBS and
  782. removing colors from BDIR output if color is on by default, and
  783. so on.
  784.  
  785. Filters are used in conjunction with redirection or piping. They
  786. accept an incoming stream of text, modify it, and pass it on.
  787.  
  788. Example:
  789.    UNANSI <CAPTURE.BBS
  790.  
  791. The above example removes all ANSI sequences from the file
  792. CAPTURE.BBS and displays the results.
  793.  
  794. Example:
  795.    BDIR | UNANSI
  796.  
  797. The above example removes ANSI sequences from the output of the
  798. BDIR command and displays the results.
  799.  
  800.                              UNCPM                     page 20
  801.  
  802.  
  803.  
  804. The UNCPM command removes control-Z characters from the end of
  805. files. This is normally used only on text files.
  806.  
  807. The old CP/M operating system did not keep track of the exact
  808. size of files, so the end of text files was normally marked with
  809. a control-Z character. This carried over into the early days of
  810. MS-DOS, which was designed to make the transition from CP/M as
  811. easy as possible. Unfortunately, some programs still use Ctrl-Z
  812. as an end-of-file marker, even though MS-DOS keeps track of
  813. exact file sizes. This can lead to trouble.
  814.  
  815. If there happens to be a Ctrl-Z embedded in a file which is
  816. handled by a CP/M-style program, the file will be truncated at
  817. the Ctrl-Z. This can quite readily occur if an editor adds a
  818. Ctrl-Z to the end of a file which is subsequently appended to by
  819. a program which doesn't expect CP/M terminators, for example.
  820. The UNCPM utility helps avoid such errors.
  821.  
  822. Syntax:
  823.    UNCPM {options} [file(s)] {/E [exception file(s)]}
  824.  
  825. Options:
  826.    /E   UnCPM everything EXCEPT for the following files
  827.    /H   UnCPM hidden, read-only, and system files too
  828.    /L   display filenames in lowercase
  829.    /N   don't actually UnCPM anything (for testing UNCPM)
  830.    /P   prompt for confirmation before UnCPMing each file
  831.    /Q   quiet: don't display filenames or summary
  832.    /S   recurse through subdirectories
  833.    /Y   assume YES to all requests for confirmation
  834.  
  835. Example:
  836.    UNCPM *.TXT *.DOC
  837.  
  838. The above example removes Ctrl-Z terminators from all files
  839. ending in .TXT and .DOC in the current directory.
  840.  
  841.                             UPCASE                     page 21
  842.  
  843.  
  844.  
  845. The UPCASE filter converts text to uppercase. It works only with
  846. ASCII characters, so it does not fully support international
  847. character sets.
  848.  
  849. Filters are used in conjunction with redirection or piping. They
  850. accept an incoming stream of text, modify it, and pass it on.
  851.  
  852. Example:
  853.    UPCASE <BCMD.NEW
  854.  
  855. The above example converts the BCMD.NEW file to uppercase and
  856. displays the results.
  857.  
  858. Example:
  859.    BDIR | UPCASE
  860.  
  861. The above example converts the output of the BDIR command to
  862. uppercase and displays the results.
  863.  
  864.