home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / DOS / UTILITY / SCHIJF / B_DIR12 / B_DOC.TXT next >
Text File  |  1995-03-26  |  11KB  |  172 lines

  1. B.EXE directory lister for OS/2 and DOS
  2. Version 1.2  March 25,1995
  3. Dohn Arms
  4.  
  5. Copyright 1995 Dohn Arms
  6.  
  7. Permission to use, copy and distribute this software and its documentation for 
  8. any purpose and without charging more than a nominal fee for copying is hereby 
  9. granted, provided that the above copyright notice appear in all copies and 
  10. that both that copyright notice and this permission notice appear in 
  11. supporting documentation.  This software is provided "as is" without express 
  12. or implied warranty.
  13.  
  14. This program is "freeware" which means that you do not have to pay for it.  It 
  15. is not public domain, which means that I own the program and no one is allowed 
  16. to alter the program before redistributing it.
  17.  
  18. The only thing that I ask of anybody that actually uses my program is that if 
  19. they have access to E-mail, that they send me a message telling me if my 
  20. program is particularly useful or not.  I just want to see that people 
  21. actually use this.  My E-mail address is: dohnarms@uiuc.edu .
  22.  
  23.  
  24. What is this program?
  25.      This is a command line program that is to be used to view the contents of 
  26. a directory.  This program is designed to be an alternative for DIR.  It has 
  27. most of the functionality of DIR, except recursive directory searching, and 
  28. compression information.  The reason I wrote the program was since I disliked 
  29. DIR and I wanted an easy way to view the information contained in a directory. 
  30. Like DIR, you can also set default switches in an environment variable.
  31.  
  32. What's with the name?
  33.      The name was simply a convenience for me due to the fact that I like one 
  34. letter names for programs that I use a lot.  I already had programs named C, 
  35. D, and E, so I named it B.  If you don't like this (which I would probably 
  36. think true), rename it to whatever you like.  The program is written with 
  37. renaming it in mind.  The help text (seen with /? switch) will reflect the new 
  38. name, as will the environment variable.  The only condition is that you must 
  39. keep the .EXE extension in the new name (there are ways to run EXE programs 
  40. after dropping the .EXE extensions).  So change B.EXE to BDIR.EXE if you like, 
  41. and look at the help screen.  The environment variable would then be BDIR, 
  42. also.
  43.  
  44. Description:
  45.      When run with no switches, you will see all the files and subdirectories 
  46. in a directory.  The uppercase brown names are the subdirectories.  The gray 
  47. names are files that do not have an extension that is being searched for.  
  48. Anything of another color is a file of a searched-for extension; the colors 
  49. are yellow, light green, red, cyan, light cyan, and dark green (these are the
  50. official names for these colors).  By default, the extensions for OS/2 are 
  51. EXE, COM, CMD, INF, TXT, and ZIP.  For DOS, they are EXE, COM, BAT, DOC, TXT, 
  52. and ZIP.  If there is an asterisk next to a subdirectory or a file, that means 
  53. that the file or subdirectory is hidden (from normal view, anyway) or is a 
  54. system file or both.  If the name of a file is uppercase, that means the file 
  55. is either read-only or is a system file or both (if the file is composed of 
  56. characters with no cases (such as numbers), you won't be able to tell).
  57.      Under the listing of files and subdirectories, the directory being shown 
  58. is displayed.  Under that is the total number of files shown, with the total 
  59. size of the files.  Also, to the side of this is the total number of 
  60. subdirectories shown.
  61.      If all the files can't fit onto the screen, the scrolling stops when the 
  62. maximum number per screen has scrolled by.  If you don't want to see any more 
  63. of the files, you can stop the scrolling by merely pressing the Escape key 
  64. ("Esc").  All the files that were visible remain visible on the screen. 
  65.      In the wide view (/W), you will only see file names.  In the default 
  66. normal view (/N), there will be a size in bytes next to each file, and a 
  67. "<DIR>" next to each subdirectory.  In the date-time view (/D), there will be 
  68. the time and date of the last write of each file and directory.  If you are
  69. using one of the previous views and if a file or subdirectory name is longer 
  70. than 13 characters, in the OS/2 version of B, there will be a ">>" character 
  71. at the end showing that the file name has been cut off.  In the long view 
  72. (/L), the complete file name is shown, along with file attributes and time up 
  73. to a half-second.
  74.      Using the sort switch (/O), you can change how the files and directories 
  75. are sorted.  The files and directories are always grouped apart under each 
  76. type of sort.  You can choose to not sort (/OU). There is the default sort by 
  77. name (/ON), sort by extension (/OE), sort by size (/OS), and sort by time 
  78. (/OT).  Using the last three switches, if files have the same extension, size, 
  79. or time, they will be sub-sorted according to name.  You can specify a reverse 
  80. sort for any of them (except /OU) by adding a negative sign after the switch 
  81. (such as /ON- for a reverse name sort).
  82.      If you do not wish to see the subdirectories in a directory, using the 
  83. file-only switch (/K) will remove all subdirectories.  If you do not want to 
  84. see the files, using the subdirectory-only switch (/S) will show only 
  85. subdirectories.
  86.      If you want to see the total sizes of subdirectory trees and the total 
  87. size of the current directory tree, using the total size switch (/Z) will have 
  88. the "<DIR>" next to each subdirectory replaced with its size in kilobytes 
  89. (1 K = 1024 bytes).  Also, at the bottom, the total directory size will be 
  90. displayed.
  91.      If you wished to see the free space on the disk where the directory 
  92. viewed is, use the free-space switch (/F) and the information will appear at 
  93. the bottom, along with the total space on the disk.
  94.      If you want to see what the extensions being highlighted actually are, 
  95. use the extension viewing switch (/E), and they will appear in their 
  96. respective colors at the bottom of the screen.
  97.      Most people will probably want to change the default extensions to suit 
  98. their needs.  The extension changing switch (/C) will allow this.  You can 
  99. supply a list of up to twelve extensions, each having up to three letters.  
  100. To do this, simply space out each extension after the /C switch.  For example, 
  101. the default OS/2 extensions would be added like this: "/C COM EXE CMD INF TXT 
  102. ZIP".  The colors taken by the extensions for the first six are unique, then 
  103. the next six extensions take those same colors over again; extension one and 
  104. seven have the same color, etc.  You can also use a comma as a placeholder if 
  105. you want to skip over an extension spot in order to keep colors the same, for 
  106. example adding DOC as an extension with the same color as TXT: "/C COM EXE CMD 
  107. INF TXT ZIP , , , , DOC"; however this shows up with the /E switch, and you can 
  108. always avoid this by using the switch that changes the default colors.
  109.      Some people might want to change the colors.  To do this, there is a 
  110. switch to alter the color scheme (/A).  You need to specify nine colors: 
  111. 1) the color of any text seen, 2) the color of subdirectories, 3) the color of 
  112. unhighlighted files, 4) the color of extension one, ... and 9) the color of 
  113. extension six.  The colors have a number equivalent, which can be explicitly 
  114. seen if you use the /? Switch, and are the colors from the old CGA monitor:
  115.   0 = black        1 = blue             2 = green         3 = cyan
  116.   4 = red          5 = magenta          6 = brown         7 = light gray
  117.   8 = dark gray    9 = light blue      10 = light green  11 = light cyan
  118.  12 = light red   13 = light magenta   14 = yellow       15 = white
  119. To use these, string them together with commas after the /A switch.  For 
  120. instance, the default colors would look like "/A15,6,7,10,14,12,3,11,2".
  121.      If you use the environment variable to set default switches (described 
  122. later), and if you want to override switches /K, /S, /F, /Z, and /E, using 
  123. them a second time will toggle them off. So if you have it defined to show the 
  124. free space every time with /F, you can turn it off on the command line by 
  125. using /F again.
  126.      If you like a certain set of switches to be used by default, you can put 
  127. them into the environment variable.  To do this, the command looks like 
  128. "SET B=(switches)".  You can do this from the command line, or you can put it 
  129. in your CONFIG.SYS (for OS/2) or AUTOEXEC.BAT (for DOS).  An example would 
  130. look like "SET B=/C C ZIP DOC TXT EXE CMD H /F /OD-".
  131. NOTE:  If you changed the name of B to something else, the environment 
  132. variable will also be changed from B.  If you renamed B.EXE to BDIR.EXE, the 
  133. variable would be BDIR. 
  134.  
  135. Form of Command:
  136. B.EXE [path][wildcard] [/?] [/W|/N|/D|/L] [/K|/S] [/F] [/Z] [/O<N|S|E|D|U>[-]]
  137.     [/E] [/C [ext 1] [ext 2] ... [ext 12]] [/Ac1,c2,c3,c4,c5,c6,c7,c8,c9]
  138. /?  The help screen
  139. /W  Wide view (uses five columns with only file names)
  140. /N  Normal view (uses three columns and adds file sizes)
  141. /D  Detail view (uses two columns and adds dates and times)
  142. /L  Long view (uses one column and adds long names and attributes)
  143. /K  Files only (cuts out subdirectories)
  144. /S  Subdirectories only (cuts out files)
  145. /F  Shows free space on a disk
  146. /Z  Shows sizes of subdirectory trees and total size of directory tree
  147. /O% Changes sort order, '-' at the end does a reverse sort 
  148.     % =  N : name   S : size   E : extension   D : date   U : unsorted
  149. /E  Shows the extensions being used to highlight files
  150. /C  Change highlighting extensions (1-3 letters for 1-12 extensions)
  151. /A(colors)  Alter color scheme, where the nine color order is: text, 
  152.     directories, unhighlighted files, extension 1, extension 2, extension 3, 
  153.     extension 4, extension 5, and extension 6.  The colors are:
  154.      0 = black        1 = blue             2 = green         3 = cyan
  155.      4 = red          5 = magenta          6 = brown         7 = light gray
  156.      8 = dark gray    9 = light blue      10 = light green  11 = light cyan
  157.     12 = light red   13 = light magenta   14 = yellow       15 = white
  158.  
  159. To set default switches: "SET B=(command line arguments)"
  160.                                                 
  161.  
  162. Contacting the Author:
  163.      If you have any comments about my program, feel free to E-mail me or 
  164. write me.  I actually want to hear from you if you actually use this, so I 
  165. know my work in putting this on the Internet has not been in vain.  I hope you 
  166. find this useful.
  167. E-Mail:      dohnarms@uiuc.edu
  168. Mail:        Dohn Arms
  169.              Loomis Laboratory of Physics
  170.              1110 West Green Street
  171.              Urbana, IL  61801-3080
  172.