home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / dirp202.zip / dirp.doc next >
Text File  |  1995-04-16  |  15KB  |  390 lines

  1. DIRP v2.02 - Copyright (c) 1995 Richard Hulme   All Rights Reserved
  2.  
  3. DIRP is essentially the same as the standard DIR command.  However, DIRP will
  4. only list programs (i.e. those files which can be executed).
  5.  
  6. I find that this program helps enormously when you change into a directory
  7. with tens or hundreds of files, or when you have decompressed an archive
  8. which has just filled your directory with all sorts of files.  You can see at
  9. a glance what program to run.
  10.  
  11. This version of DIRP now includes support for nearly all of the normal DIR
  12. switches as well as being able to run under OS/2 or DOS.
  13.  
  14. Although the program's output is almost identical to the normal DOS or OS/2
  15. output, none of the code (pure assembler!) has been ripped from COMMAND.COM
  16. or CMD.EXE.
  17.  
  18. What follows is the usage for the DOS version.  After that is a description
  19. of any differences in the OS/2 version.
  20.  
  21. --------------------------------------------------------------------------------
  22.  
  23.   The syntax for DIRP is:
  24.  
  25. DIRP [drive:][directory][filespec] [/A[ashr]] [/B] [/F] [/L] [/MAN]
  26.      [/N] [/O[neds]] [/P] [/R] [/S] [/W]
  27.  
  28. [drive:][dir] specify the drive and directory to list
  29. [filespec]    specifies all programs matching a pattern
  30.               (filename portion must contain at least one of '?' or '*')
  31. /A[ashr]      List only programs with specified attribute
  32.               a Archive   s System   h Hidden   r Read Only
  33. /B            Bare format - program names only
  34. /F            Show fully-qualified program names
  35. /L            Display program names in lower-case
  36. /MAN          Create DIRP.DOC in current directory
  37. /N            Show program list in new OS/2 format
  38. /O[neds]      Order programs.
  39.               n Name   e Extension   d Date & Time   s Size   - Reverses order
  40. /P            Pause after each screenful
  41. /R            Display .LONGNAME extended attribute (in an OS/2 VDM only)
  42. /S            Display programs in sub-directories
  43. /W            Display program names across the screen
  44.  
  45. The above can be displayed by using the /? switch.
  46.  
  47. File Specification
  48. ------------------
  49.  
  50. The number of programs displayed can be restricted by the use of wildcard
  51. characters (? and *).  The question mark represents a single character and
  52. the asterisk represents any number of characters.
  53.  
  54.   For example:
  55.  
  56.   DIRP SE*.*            - This will match any program such as 'SEARCH.EXE',
  57.                           'SETUP.COM' etc.
  58.   DIRP ?LET             - This will match any program such as 'ALET.BAT',
  59.                           '1LET.COM' etc.
  60.   DIRP L?ST*.*          - This will match any program such as 'LAST.COM',
  61.                           'LISTER.EXE' etc.
  62.  
  63. When specifying the filespec, any extension given is ignored (since this
  64. defeats the point of matching .EXE, .COM and .BAT).  If a filespec is given,
  65. the filename portion of it must contain at least one wildcard character
  66. (i.e. ? or *).
  67.  
  68. Switches
  69. --------
  70.  
  71. All switches can be placed in an environment variable (except /MAN) so that
  72. you can alter the default action.  For example, to make sure that all programs
  73. are sorted into alphabetical order, place the following line in your
  74. AUTOEXEC.BAT:
  75.  
  76.   SET DIRCMD=/ONE
  77.  
  78.  
  79.  
  80. Attribute Mask - /A
  81. -------------------
  82. This switch allows you to restrict the list of programs output to those
  83. with, or without, particular attributes.
  84.  
  85. On its own, all programs, even those with the hidden and system attributes,
  86. are displayed.
  87.  
  88. By following the /A with one or more options, you can select only certain
  89. attributes.
  90.  
  91.   R     Display all programs with the READ-ONLY attribute set
  92.   A     Display all programs with the ARCHIVE attribute set
  93.   S     Display all programs with the SYSTEM attribute set
  94.   H     Display all programs with the HIDDEN attribute set
  95.  
  96. Preceding the option with a hyphen ('-') makes that option inverted, so:
  97.  
  98.   -R    Display all programs with the READ-ONLY attribute reset
  99.   -A    Display all programs with the ARCHIVE attribute reset
  100.   -S    Display all programs with the SYSTEM attribute reset
  101.   -H    Display all programs with the HIDDEN attribute reset
  102.  
  103. In fact, /-A will reset any previous attribute masks and only display those
  104. programs which don't have the SYSTEM or HIDDEN attribute set.
  105.  
  106. Examples
  107. --------
  108.   DIRP /A                       Display all programs
  109.  
  110.   DIRP /AR                      Display all programs which are READ-ONLY
  111.                                 Ignore any programs which don't have it set
  112.  
  113.   DIRP /A-RH-A                  Display all programs which are not READ-ONLY,
  114.                                 have the hidden attribute set, and don't have
  115.                                 the ARCHIVE attribute set.
  116.  
  117. If, for example, you specify /AH on the command line, this does not mean
  118. 'display programs with only the HIDDEN attribute set'.  It means 'display
  119. programs with *at least* the HIDDEN attribute set'.  If you wanted programs
  120. with only the HIDDEN attribute set, you should put /AH-R-S-A on the command
  121. line.
  122.  
  123. N.B.  The order of the options is unimportant.
  124.  
  125.  
  126. Bare Format - /B
  127. ----------------
  128. This switch will only display the program names.  The header information
  129. is not displayed (volume label, serial number, current directory), nor is
  130. any information about each file other than its name.  Also, no summary
  131. information is displayed (total number of bytes used, total number of bytes
  132. free).
  133.  
  134. For example:
  135. DIRP.EXE
  136. DISKEDIT.COM
  137. .
  138. .
  139. .
  140. etc.
  141.  
  142.  
  143. Fully-Qualified Program Names - /F
  144. ----------------------------------
  145. This switch is effectively the same as /B, except that the drive letter and
  146. full path for each file is displayed.
  147.  
  148. For example:
  149. C:\UTILS\DIRP.EXE
  150. C:\UTILS\DISKEDIT.COM
  151. .
  152. .
  153. .
  154. etc.
  155.  
  156.  
  157. Lower Case - /L
  158. ---------------
  159. This switch simply displays all the program names in lower case instead of
  160. the default of upper-case
  161.  
  162.  
  163. Create manual - /MAN
  164. --------------------
  165. This will decompress this manual (DIRP.DOC) to the current directory.
  166.  
  167. Display in new OS/2 format - /N
  168. -------------------------------
  169. This switch changes the format of the information displayed on the screen.
  170. Instead of the usual FAT layout:
  171.  
  172.   FILENAME.EXT  FILESIZE  DATE  TIME
  173.  
  174. The information is displayed in the new OS/2 format:
  175.  
  176.   DATE  TIME  FILESIZE  EASIZE  FILENAME.EXT
  177.  
  178. The extra field 'EASIZE' shows the number of bytes of extended attributes
  179. associated with that program.
  180.  
  181. Extended attributes (EAs) are only available under OS/2.  They allow programs
  182. to store up to 64K of related data with a program (such as a revision history,
  183. a bitmap to use etc.).
  184.  
  185. This switch will still work under normal DOS, however, the EASIZE field will
  186. always show 0.
  187.  
  188. If DIRP is run in a Virtual Dos Machine (VDM) under OS/2, the EASIZE field
  189. will show the correct value.
  190.  
  191.  
  192. Sort Program information - /O
  193. -----------------------------
  194. This switch allows you to sort the program information on particular fields.
  195.  
  196. The switch is followed by one or more options:
  197.  
  198.   N             Sort on program name          (A - Z)
  199.   E             Sort on program extension     (A - Z)
  200.   S             Sort on program size          (smallest first)
  201.   D             Sort on program date and time (oldest first)
  202.  
  203. As with the /A switch, preceding with a hyphen can be used to invert the
  204. meaning.
  205.  
  206. If the 'O' is preceded with a hyphen, the program names are displayed
  207. unsorted.
  208.  
  209. If any of the options are preceded by a hyphen, the order is inverted.
  210. That is:
  211.  
  212.   -N            Sort on program name          (Z - A)
  213.   -E            Sort on program extension     (Z - A)
  214.   -S            Sort on program size          (largest first)
  215.   -D            Sort on program date and time (newest first)
  216.  
  217. The order in which the options appear *does* make a difference.  The program
  218. details are sorted in the order in which the options appear.  So, /OSN
  219. would first sort the information on size.  If any programs had exactly the
  220. same size, those programs would then be sorted on their names.
  221.  
  222.  
  223. Pause - /P
  224. ----------
  225. This switch causes DIRP to pause after each screenful of information has been
  226. displayed.  DIRP will automatically adjust to the number of rows on the
  227. screen.
  228.  
  229.  
  230. Display .LONGNAME extended attribute - /R
  231. -----------------------------------------
  232. This switch is only functional when running in a Virtual Dos Machine under
  233. OS/2.  The .LONGNAME extended attribute is usually created when a file with
  234. a long filename is copied to a file system (such as FAT) which doesn't
  235. support long filenames.  The filename is converted to something which *can*
  236. be stored, and then a .LONGNAME extended attribute is created which holds the
  237. full length filename.
  238.  
  239. See the description of the /N parameter for an explanation of extended
  240. attributes.
  241.  
  242.  
  243. Recurse into sub-directories - /S
  244. ---------------------------------
  245. This switch will display all the programs matching the filespec given on
  246. the drive and directory specified (or the current if none given) and also
  247. all sub-directories below.
  248.  
  249. After each directory, a one line summary is given which specifies the
  250. number of programs in that directory and the number of bytes used.
  251.  
  252. Once the last directory has been displayed, a final summary is given which
  253. shows the total number of programs displayed, and the total number of bytes
  254. used, along with the number of bytes free on the drive
  255.  
  256.  
  257. Wide Format - /W
  258. ----------------
  259. This causes the program names to be displayed across the screen.  No other
  260. information is displayed with each filename.  DIRP will automatically adjust
  261. the number of columns to fill the screen.
  262.  
  263.                         -----------------------------
  264.  
  265. Due to the fact that the filenames must be first stored in memory (for
  266. possible sorting), a limit is created on the number of filenames that can be
  267. sorted.  This limit is just under 3000 program details.
  268.  
  269. In the unlikely event that a directory has more programs than there is space
  270. for, DIRP will load the as many program details in as it can, sort them, print
  271. them and then get the next set of program details and repeat until there are
  272. no more programs.
  273.  
  274. Note that this limit is for each directory.  When the /S switch is used to
  275. recurse into sub-directories, each directory has this limit, rather than the
  276. limit including all sub-directories.
  277.  
  278.                         -----------------------------
  279.  
  280. Differences under OS/2
  281. ----------------------
  282.  
  283. The OS/2 portion of the program requires OS/2 v2.0 or above to run (I have
  284. tried it on v2.1, 2.11 and Warp).  It is a 32-bit program and therefore
  285. requires a 386 or better (but since OS/2 v2.0 and above require a 386 or
  286. better, this isn't a problem!)
  287.  
  288. All files with the .CMD (similar to batch files) extension are recognised.
  289. Also, normal DOS batch files (*.BAT) are still displayed.  Although they
  290. *aren't* OS/2 programs, they *can* be run from the OS/2 command line.
  291.  
  292. The OS/2 portion will accept long filenames on the command line (using the
  293. normal convention of double-quotes for filespecs containing special
  294. characters).  It also displays long filenames on the screen.
  295.  
  296. The /R (display .LONGNAME EA) is not available under OS/2.  This is purely to
  297. stay consistent with the normal DIR command.  If enough people want it under
  298. OS/2, I'll add it.
  299.  
  300. The limit of around 3000 program details doesn't really apply.  There *is* a
  301. limit, but it will vary depending on the lengths of the program names
  302. retrieved.  At the very minimum, you should get just under 4000 program
  303. details (and that's with each program name 255 characters long!)
  304.  
  305.                         -----------------------------
  306.  
  307. I retain the copyright on the DIRP program and documentation.  However, you
  308. may distribute them as much as you like under the following conditions:
  309.  
  310.     i) The copyright statement in the program or documentation must not be
  311.        changed.
  312.    ii) The program and document file must not be changed in any way.
  313.   iii) If the program is distributed with any other package (excluding
  314.        shareware/freeware CDs, disks etc.), a credit must be given to me
  315.        either on the packaging or in the program itself.
  316.        The credit must be at least:
  317.  
  318.         'DIRP v2.02  Copyright 1995 Richard Hulme  All rights reserved'
  319.  
  320.    iv) The author is not liable for any damage, financial or otherwise,
  321.        caused by the use of this program.
  322.  
  323. If this program is distributed on a shareware/public domain disk (or CD-ROM),
  324. I would appreciate a short message just to let me know, so I can see how far
  325. my program is getting.  I would also appreciate a message from anyone who
  326. finds this program useful - my biggest reward is seeing that the time I have
  327. spent on this program has been worthwhile.
  328.  
  329. DIRP should work with all versions of DOS above version 3. As far as I am
  330. aware, I have not used any calls that were unavailable in this version.
  331.  
  332. Since I am a poor student, and I've put a lot of time and effort into this
  333. program, I have decided to release this program as BeggarWare (yes, another
  334. xxxWare!).  That is, if you feel you want to pay for this program, send me
  335. however much you feel like sending.  All monies sent should be in pounds
  336. sterling (whether cheque/PO etc) to the address below.
  337.  
  338. Contacting the author:
  339.  
  340. SnailMail:                      Fido Netmail:
  341. Richard Hulme                   Richard Hulme 2:250/109.10
  342. 14 Rushyfield Crescent,         Boss BBS:Kneptune BBS (+44) 161 777 8088
  343. Romiley,
  344. Stockport,                      Internet:
  345. Cheshire.                       cm3bcrph@bs47a.staffs.ac.uk
  346. SK6 4LG
  347. England
  348.  
  349. I would appreciate reports of any bugs you find.  As far as I know, there are
  350. no bugs in DIRP, but it is impossible to try it out on all the possible
  351. hardware combinations.  Please give as much detail as possible, e.g what
  352. switches you were using at the time, any TSRs loaded, register dumps if under
  353. OS/2, version of operating system etc.
  354.  
  355. Revision history
  356. ----------------
  357.  
  358. v2.02   Bug fix.
  359.         Very obscure - Under OS/2, any directories starting with a period
  360.         would not be checked when recursing sub-directories - fixed.
  361.  
  362.         Minor documentation changes.
  363.  
  364. v2.01   Bug fix.
  365.         Problem with sorting on dates in DOS version - fixed
  366.         Problem with recursing sub-dirs on a networked drive under OS/2
  367.         (Lantastic particularly, unsure about Lan Manager) - fixed.
  368.  
  369.         Recursing sub-directories on a Lantastic for OS/2 drive in an OS/2
  370.         session takes quite a while.  This is not (as far as I can tell) my
  371.         fault.  Lantastic is returning more information than I asked for and
  372.         so I have to spend time syphoning off the information I *do* want.
  373.  
  374. v2.0    Brand new version which can be run under OS/2 v2.x+ or normal DOS.
  375.         Now requires to be run under at least v3.00 of DOS (not a problem
  376.         for most, I guess!)
  377.         Added National Language Support for times and dates.
  378.         Added support for wildcards in filespec.
  379.         Added support for nearly all the normal DIR switches.
  380.         Added built-in manual.
  381.         
  382. v1.2    Fixed problems with some CD-ROM drives and made the program a little
  383.         more OS/2 friendly (removed some undocumented calls).
  384.  
  385. v1.1    Fixed problems when redirecting the output
  386.  
  387. v1.0    First version of DIRP
  388.  
  389. DIRP v2.02   Copyright 1995 Richard Hulme   All rights reserved
  390.