home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 013 / sd54.arc / SD54.DOC < prev   
Encoding:
Text File  |  1987-02-26  |  52.5 KB  |  1,215 lines

  1. ------------------------------------------------------------------------
  2.  
  3.           SD: MS-DOS Sorted Directory Utility Program
  4.           Version 5.4 (C) 01-Feb-87 by John F. Stetson
  5.           42 Tivoli Lake Ct., Silver Spring, Md. 20906
  6.  
  7. ------------------------------------------------------------------------
  8.  
  9. System Requirements
  10.  
  11. ------------------------------------------------------------------------
  12.  
  13. SD.COM is a sorted directory utility program which  operates  under  the
  14. Microsoft  Disk  Operating  System  Version  2.0  and  above.  There are
  15. versions of the program tailored for the following types of systems:
  16.  
  17.     IBM-PC Systems and Compatibles    (SDPC.COM)
  18.  
  19.     Zenith Z-100 Series Systems    (SD100.COM)
  20.  
  21.     Generic MS-DOS Systems        (SDGEN.COM)
  22.  
  23. These files, together with this documentation file, are  distributed  in
  24. the  form  of  an  archive  file called SD54.ARC which can be found on a
  25. variety of Computer Bulletin Board systems or obtained directly from the
  26. author, as described below.  The appropriate .COM file should be renamed
  27. to SD.COM and placed in the root  directory  of  the  system  disk,  for
  28. normal use.
  29.  
  30. This version of the program requires less than 8k bytes  of  disk  space
  31. and  about  16-24k  bytes  of  memory during execution, depending on the
  32. number of files in the directories being processed.
  33.  
  34. Support is provided for IBM-PC compatible monochrome monitors, and  both
  35. CGA and EGA color monitors.  Support is provided for both monochrome and
  36. color Z-100 monitors.
  37.  
  38. Current program limitations are 100 total  directories    when  processing
  39. global subdirectories and about 2000 files per directory.
  40.  
  41. ------------------------------------------------------------------------
  42.  
  43. Design Philosophy
  44.  
  45. ------------------------------------------------------------------------
  46.  
  47. SD provides more information than the resident MS-DOS DIR command  about
  48. the  files  on    a disk, and allows the user to select, sort, format, and
  49. display the information in a variety of ways.  This is    accomplished  by
  50. specifying  a pattern name to select the desired files and by specifying
  51. any of a variety of command lines "switches" which allow you  to  modify
  52. the  behavior of the program.  The switch names have been selected using
  53. letters, as much as possible, so that it  is  easier  to  associate  the
  54. function  of  a  switch  with its name.  In addition, the default switch
  55. values have been carefully chosen to reflect their most common use,  and
  56. for compatibility with the standard DIR command.
  57.  
  58. Although the program is relatively small, it is possible to use it in an
  59. almost    infinite  variety  of  ways  by  using the switches in different
  60. combinations.  A significant amount of effort has gone    into  optimizing
  61. the  performance  of  the  program,  due  to  the  number of times it is
  62. typically used.  The  program  is  designed  to  be  as  transparent  as
  63. possible  in  normal  operation,  and does not impose itself between the
  64. user  and  the    operating  system.    This  allows  both   novice    and
  65. sophisticated users to use it in the way that best meets their needs.
  66.  
  67. The program defaults to using the BIOS (rather    than  DOS)  for  console
  68. output, which results in noticeably faster displays.  Command output can
  69. still be redirected to an output file by using a special switch.
  70.  
  71. Maximum possible use is made of the horizontal dimension of  the  screen
  72. to minimize the loss of previously displayed data by screen scrolling.
  73.  
  74. Support is provided for a variety of file selection attributes.
  75.  
  76. Support is provided for a variety of screen display formats with varying
  77. amounts of detailed file information displayed.
  78.  
  79. A variety of user customizable command line switches  and  screen  field
  80. display colors are also supported.
  81.  
  82. Every effort has been made to keep the size of the program to a minimum,
  83. for  efficient    use  on floppy disk based systems.  However, many of the
  84. capabilities of both MS-DOS and this program  are  only  fully    realized
  85. when   using  large  hard  (fixed)  disks  with  hierarchical  directory
  86. structures to organize files.
  87.  
  88. ------------------------------------------------------------------------
  89.  
  90. Modes of Operation
  91.  
  92. ------------------------------------------------------------------------
  93.  
  94. SD is a versatile program that can be used in a variety of ways:
  95.  
  96. The most common use is to simply display information  about  files  (and
  97. subdirectories)  in  a    single (usually the current) directory.  Most of
  98. the sort field switches are used in this mode.
  99.  
  100. The program can be used to search or scan  all    (or  a    subset)  of  the
  101. directories  on  a  disk for one or more files or directories which meet
  102. the specified criteria.  The /g switch is used in this mode.
  103.  
  104. The program can be  used  to  display  detailed  information  about  the
  105. structure of a disk and about the location of files on the disk.  The /i
  106. or /p and /1 switches are used in this mode.
  107.  
  108. The program can be used to create an output file by redirecting  console
  109. output    which may be subsequently used as input to another program.  The
  110. /r switch is used in this mode.
  111.  
  112. ------------------------------------------------------------------------
  113.  
  114. Command Line Syntax
  115.  
  116. ------------------------------------------------------------------------
  117.  
  118. The complete form of the DOS command line to run the program is:
  119.  
  120. D>sd [drive:][path][filespec] [/switches] [>[>]device/file]
  121.  
  122. In most cases, only one or two parameters are specified, so the  command
  123. syntax    isn't  as  formidable  as  it  may appear at first.  Each of the
  124. command line parameters is optional (as the [] characters indicate)  and
  125. may  be  used  together in any combination or order.  Spaces may also be
  126. freely used at any point to improve readability.   The    various  command
  127. line parameters are described below:
  128.  
  129. [drive:]
  130.  
  131. This parameter specifies the name of the disk  drive  to  be  processed.
  132. Typical  drive    letters  are A: or B: for floppy disks and C: for a hard
  133. disk on the IBM-PC/XT or E: on the Zenith Z-100.    RAM  (memory)  disks
  134. installed  as  device  drivers may also be specified, and typically have
  135. the highest drive letter currently in use  by  the  system  assigned  to
  136. them.     If  no drive letter is specified, the currently logged-in drive
  137. (shown in the DOS prompt) is used.
  138.  
  139. [path]
  140.  
  141. This parameter specifies the path  through  the  hierarchical  directory
  142. structure  to  the  desired  directory    which  contains  the files to be
  143. processed.  The general form of the path parameter is shown below:
  144.  
  145. [path] = [\][directory][\directory]...[\directory][\]
  146.  
  147. The path name may simply be the name of the root directory (\),  or  the
  148. same of a subdirectory in the root directory.  The standard DOS . and ..
  149. directory names  may  be  used    to  refer  to  the  current  and  parent
  150. directories,  respectively.    If  a  path is not specified, the current
  151. directory on the specified disk drive is used.
  152.  
  153. [filespec]
  154.  
  155. This parameter specifies  which  file  names  are  to  be  selected  for
  156. processing from the previously specified directory (if any).  A complete
  157. (unambiguous) file name may be specified, or  an  ambiguous  file  name,
  158. containing  'wildcard'  characters  (?  or *) may be specified to select
  159. several files.    Either the file name (first 8 characters)  or  the  file
  160. extension  (last  3  characters)  or both may be completely omitted.  In
  161. these cases, wildcard characters are automatically  used  to  match  all
  162. possible  file names in the selected directory.  You may specify leading
  163. characters of the file names you wish to match,  omitting  the    trailing
  164. characters of the name, the period delimiter, and the file extension. In
  165. this respect, SD processes  file  specifications  differently than  DIR.
  166.  
  167. For example: sd abc  is equivalent to: dir abc*.*
  168.  
  169. [/switches]
  170.  
  171. This parameter specifies one or more 'switch'  or  option  values  which
  172. modify    the operation of the command.  All switches are optional and may
  173. be specified before the drive, path, and filespec, after them,    or  both
  174. before    and  after.   An almost infinite variety of different processing
  175. modes may be selected by combining  the  various  switches  together  in
  176. different combinations.  Each switch has a default value, which has been
  177. carefully selected to represent the most  frequently  used  option,  for
  178. most users. Specifying a switch overrides or 'toggles' the value of that
  179. command option.  A  special  'patch'  area  has  been  provided  at  the
  180. beginning  of the SD.COM file so that sophisticated users can tailor the
  181. default switch settings to their needs.  If a default  switch  value  is
  182. modified,  specification  of  that option will toggle the option back to
  183. its original state,  if  appropriate.     Detailed  descriptions  of  all
  184. switches are given below.
  185.  
  186. [>[>]device/file]
  187.  
  188. This parameter is actually a standard feature of DOS called  redirection
  189. of  output  to    the  'standard output' (STDOUT) device.  This allows the
  190. console output generated by the program  to  be  transmitted  to  either
  191. another device (usually the printer device: PRN), or to a disk file.  By
  192. redirecting the output of the command to a file, you can later    use  the
  193. file  as  input  to a word processor, disk catalog system, etc.  If this
  194. parameter is specified, the /r switch must also be specified so that the
  195. program  will  know  to  use  the  standard  DOS console output services
  196. instead of those in the BIOS, which cannot be redirected.
  197.  
  198. Console output may be paused by typing any character  and  is  restarted
  199. when another character is typed.  If /q (or /r) is not specified, output
  200. is paused every time the  screen  fills.  Pressing  ESCAPE  (preferred),
  201. Control-C, or Control-Break will terminate the program immediately.
  202.  
  203. ------------------------------------------------------------------------
  204.  
  205. Command Line Switches
  206.  
  207. ------------------------------------------------------------------------
  208.  
  209. If a switch value other than those described below (//, for example)  is
  210. specified,  a  message    is displayed and the user is given the choice of
  211. exiting back to DOS by pressing the ESCAPE key, or receiving a screen of
  212. help  information, if any other key is pressed.  The preferred method of
  213. displaying command help information is by means of the /?  switch.
  214.  
  215. ------------------------------------------------------------------------
  216.  
  217. File Attribute Selection Switches
  218.  
  219. ------------------------------------------------------------------------
  220.  
  221. Syntax: /s[attr-switch]...[attr-switch]
  222.  
  223. /s  - Select all directories and files
  224. /sd - Select only Directories (no files)
  225. /sf - Select only Files (no directories)
  226. /sa - Select files with the Archive attribute
  227. /sr - Select files with the Read/Only attribute
  228. /sh - Select files with the Hidden attribute
  229. /ss - Select files with the System attribute
  230.  
  231. These switches are used to further restrict which files are selected (in
  232. addition to any filespec) based on the attributes of the files.
  233.  
  234. If a /s switch is not specified, the default is to  select  all  of  the
  235. subdirectories    and  files in the specified directory, except those with
  236. either the Hidden or System attribute.     This  includes  files    with  no
  237. special    attributes,    the  Archive  attribute,  and/or  the  Read/Only
  238. attribute.  This is the same method of attribute selection used  by  the
  239. DIR  command,  except  that  the  . (current)  and .. (parent) directory
  240. entries which occur in all directories other than the root directory are
  241. not displayed.
  242.  
  243. If /s is specified with no other attribute  switch,  Hidden  and  System
  244. files are also selected, thus providing the most information.
  245.  
  246. If /sd is specified, all and only the subdirectories  in  the  specified
  247. directory are selected.
  248.  
  249. If /sf is specified, all and only the  files  with  no    attributes,  the
  250. Archive attribute  and/or the Read/Only attribute are selected.  The /sh
  251. and/or /ss switches may be added to /sf, if desired.
  252.  
  253. If a /sa, /sr, /sh, or /ss switch is specified by itself, all  and  only
  254. the files with the specified attribute are selected.  These switches may
  255. also be combined in any order and the intervening /s switch(es) omitted:
  256.  
  257. D>sd c:\dir/sa/sr    - OR -    D>sd c:\dir/sar
  258.  
  259. When multiple /s switches are specified, the effect is 'additive';  i.e.
  260. for  the  example  above, all files with either the Archive or Read/Only
  261. attribute will be selected from the specified directory.
  262.  
  263. Specification of any /s switch(es) other than /sd causes  an  additional
  264. 'totals'  line to be displayed which summaries the number of files which
  265. have each of the requested attributes.
  266.  
  267. One difference between SD and CHKDSK is that  CHKDSK  considers  a  disk
  268. volume label to be a "hidden file", whereas SD does not.
  269.  
  270. ------------------------------------------------------------------------
  271.  
  272. Description of File Attributes
  273.  
  274. ------------------------------------------------------------------------
  275.  
  276. The Archive attribute is automatically set by DOS when a file is created
  277. or  updated,  and  is  reset  by  the  BACKUP  program and other similar
  278. programs when the file is backed up from a hard disk to a floppy disk.
  279.  
  280. The Read/Only attribute is supposedly used  to    mark  a  file  as  being
  281. "Read/Only";   it  cannot  be  written  to  by  standard  MS-DOS  system
  282. functions.  However, DOS V2 allowed FCB style writes to  files    with the
  283. Read/Only  attribute;  only  Handle  style  writes were precluded.  This
  284. oversight was apparently corrected starting with DOS  V3.    The  ATTRIB
  285. command  introduced  in  DOS  V3  allows  the Archive and Read/Only file
  286. attributes to be set and reset from the DOS command level.
  287.  
  288. The Hidden attribute "hides" a file from normal directory searches (such
  289. as  the  DIR  command) and is sometimes used by copy protection schemes.
  290. However, any program which is capable of issuing  the proper  DOS system
  291. call can find any "hidden" files, just as SD does.
  292.  
  293. The System attribute identifies a "system" file and also  precludes  the
  294. file  from  being  found by normal directory searches.    The standard DOS
  295. System files are the BIOS and DOS .COM files which are always the  first
  296. two files on a bootable system disk.  COMMAND.COM is not identified as a
  297. system file, since many programs need to be able to locate it  in  order
  298. to execute it as a "child process".
  299.  
  300. Although not provided as an intrinsic part of DOS, there are  a  variety
  301. of  utility  programs  available which can set and reset any of the file
  302. attributes mentioned above.  This is normally done using the DOS INT 21H
  303. function  43H  to  change a file's attributes.  It is also possible (and
  304. more risky!) to directly modify the disk sector  containing  the  file's
  305. directory  information,  using    DEBUG or other sector level disk editing
  306. utility programs.
  307.  
  308. ------------------------------------------------------------------------
  309.  
  310. File Selection By Date
  311.  
  312. ------------------------------------------------------------------------
  313.  
  314. Syntax: /@[+/-][days][+/-]
  315.  
  316. The /@ switch is used to select files based on their age (the  date  the
  317. file was created or last updated). Since dates are specified relative to
  318. the current system date (normally set by the DATE command or  real  time
  319. clock  at  boot  time),  it  is  essential  that  the system date be set
  320. correctly in order for this feature to work properly.
  321.  
  322. Files may be selected which are exactly the  specified    number    of  days
  323. old, or either newer (+) or older (-) than the specified number of days.
  324. The number of days specified may range from 0  to  9999,  syntactically,
  325. but cannot be so large as to pre-date January 1, 1980, which is when the
  326. universe was created (according to DOS!).
  327.  
  328. Think of the date specification  process  in  two  steps:  go  back  the
  329. specified number of days and then find the files written before (-), on,
  330. or after (+) that date.
  331.  
  332. For example:
  333.  
  334. /@    select files written today (days=0)
  335. /@1+    select files written during last 2 days
  336. /@7    select files written exactly one week ago
  337. /@+30    select files written during the past month
  338. /@-365    select files written more than a year ago
  339.  
  340. The +/- may be specified either before or after the number of days.
  341.  
  342. ------------------------------------------------------------------------
  343.  
  344. Sort Field Selection Switches
  345.  
  346. ------------------------------------------------------------------------
  347.  
  348. Syntax: /sort-switch[+/-]
  349.  
  350. /a - Sort by file Allocation unit (cluster #)
  351. /b - Sort by file size in Bytes
  352. /d - Sort by (1) file Date and (2) time
  353. /e - Sort by (1) file Extension and (2) name
  354. /f - Sort by (1) File Name and (2) extension
  355. /n - No sort - display entries in directory order
  356.  
  357. These switches specify which fields are to be used as sort  'keys'  when
  358. formatting  the  output  information.     These switches are all mutually
  359. exclusive; i.e. only one sort switch should be specified.   If    no  sort
  360. switch is specified, the default is by file name and extension (/f).
  361.  
  362. Sort switches may optionally followed by a + for an ascending sort or  a
  363. -  for    a  descending sort.  The default sort direction is ascending for
  364. all sort switches except /d, which is descending.
  365.  
  366. The /a switch sorts the file entries by the first allocation unit number
  367. (starting  cluster  number)  of  the  file.  This is simply the absolute
  368. location on the disk where the file is located.  Although  not    normally
  369. used, this switch can be used to determine the actual order of the files
  370. on the disk, which is independent of their order in the disk  directory,
  371. especially on a disk whose space has become "fragmented" by the creation
  372. and deletion of many files with differing sizes.
  373.  
  374. The /b switch is used to find either the smallest or largest files on  a
  375. disk,  or  to  discover  which    file(s)  have sizes which lie in a given
  376. range. This can be helpful when it is known that a file of a given  size
  377. is  missing  from  a  disk,  and  it desired to find out its identity by
  378. examining the contents of another disk which does contain the file.
  379.  
  380. The /d switch is a  frequently    used  sorting  option,    especially  when
  381. combined  with    the  /2  or /1 switch.    This allows either the newest or
  382. oldest files on a disk to be easily identified.  Of course, the validity
  383. of  this  information  is once again dependent on the correct setting of
  384. the system date at the time the files were written.
  385.  
  386. The /e switch is helpful  in  identifying  which,  if  any,  files  have
  387. "strange"  file  name extensions.  Since most standard files have one of
  388. only a few possible types (extensions), such as .BAT, .COM,  .EXE,  etc.
  389. using this switch will separate out any non-standard file names.
  390.  
  391. The /f switch simply sorts the selected directory entries by  file  name
  392. and  extension,  which    is perhaps the most used sorting sequence.  Once
  393. again, any "strange" file names will tend to collect  at  the  beginning
  394. and end of the list, where they can be easily identified.
  395.  
  396. The /n switch bypasses the sort process with the result  that  the  file
  397. entries  are  displayed  in  the order they occur in the disk directory.
  398. This is helpful when examining a bootable disk to insure that the  order
  399. of  files  is  optimal    (in  the  order  they are needed during the boot
  400. sequence, and by frequence of use after boot-up). This is the same order
  401. of file names as that displayed by the DIR command.
  402.  
  403. ------------------------------------------------------------------------
  404.  
  405. Output Format Control Switches
  406.  
  407. ------------------------------------------------------------------------
  408.  
  409. Syntax: /output-switch ... /output-switch
  410.  
  411. These switches are used to specify the    appearance  and  format  of  the
  412. generated  output  and other miscellaneous functions.  The switches fall
  413. into several categories which are described separately.
  414.  
  415. ------------------------------------------------------------------------
  416.  
  417. Help Information Switch
  418.  
  419. ------------------------------------------------------------------------
  420.  
  421. The /? switch causes program help  information    to  be    displayed.  This
  422. includes a summary of the command line syntax and available switches.
  423.  
  424. ------------------------------------------------------------------------
  425.  
  426. Output Column Switches
  427.  
  428. ------------------------------------------------------------------------
  429.  
  430. The /1, /2, /4, and /6 switches specify the  number  of  output  columns
  431. and, inversely, the amount of file information displayed:
  432.  
  433. /1 - 1 column  - path, file name, size, date, time, starting cluster,
  434.          starting sector (with /p), and attributes
  435.  
  436. /2 - 2 columns - file name, size, date and time
  437.  
  438. /4 - 4 columns - file name and size
  439.  
  440. /6 - 6 columns - file name only
  441.  
  442. A larger number of columns allows more files  to  be  displayed  on  the
  443. console  screen  at one time, at the cost of losing some of the detailed
  444. file information.  A smaller number of columns allows more detailed file
  445. information to be displayed, at the cost of only being able to display a
  446. limited number of files.  All of these switches are mutually  exclusive;
  447. only one should be specified.  The default switch is /4.
  448.  
  449. If the /1 switch is specified, the output information  begins  with  the
  450. specified  path  name.     This can be useful when used as input to a disk
  451. catalog program (when used with the /v switch to get the volume label).
  452.  
  453. Subdirectory entries (normally found in the root  directory)  are  shown
  454. with  special  screen  attributes,  for  emphasis.    This is especially
  455. helpful when using the /6 switch, since there isn't room for  the  <Dir>
  456. indicator  (directory  names  may be up to 11 characters long, just like
  457. file names).
  458.  
  459. The time a file was last written to is only accurate to a resolution  of
  460. 2  seconds;  all  values  will    have  an  even number of seconds.  Files
  461. created with early versions of DOS may not have either a  date    or  time
  462. stamp.    In this case, these fields will appear as periods.
  463.  
  464. Each file attribute (if any) is denoted by a letter:
  465.  
  466. A - Archive    R - Read/Only    H - Hidden    S - System
  467.  
  468. ------------------------------------------------------------------------
  469.  
  470. Output Toggle Switches
  471.  
  472. ------------------------------------------------------------------------
  473.  
  474. The next group of switches are all 'toggles'; i.e. their  default  state
  475. is  'off'  and  they are toggled 'on' when specified.  These may be used
  476. together in many different combinations.
  477.  
  478. /c - Clear the console screen before displaying output
  479. /g - Perform Global subdirectory processing
  480. /h - Display output sorted Horizontally
  481. /i - Display Information summary
  482. /k - Display memory and disk space in Kbytes
  483. /l - Generate file name List
  484. /m - Display system version and Memory information
  485. /p - Display disk Parameter information
  486. /q - Quick output (no pauses when the console screen fills)
  487. /r - Generate output which is suitable for Redirection
  488. /t - Display only the Totals output lines
  489. /v - Display disk Volume label and creation date & time
  490.  
  491. The /c switch causes the console display screen to be cleared before any
  492. output is displayed.
  493.  
  494. The  /g  switch  requests  global  subdirectory  processing.  All  other
  495. switches  operate  as  usual.     After    the  specified    target directory
  496. (usually, but not necessarily,    a  root  directory)  is  processed,  all
  497. subdirectories    below  that directory are processed in alphabetic order.
  498. After all directories have been processed, a grand totals line    for  all
  499. of  the  directories and files is displayed,  followed by a grand totals
  500. line for file attributes (if a /s switch was specified).
  501.  
  502. The /g switch has a variety of uses.  It can be used to  simply  display
  503. the  total  number  of directories, files, etc. on a disk, when combined
  504. with the /t switch.  It can be used to locate any and all occurrences of
  505. a  file  anywhere on a disk with a complex directory structure by simply
  506. specifying a file name.  However, if  a  fully    qualified  (unambiguous)
  507. file  name is specified and you have a resident "data path" type utility
  508. program installed, you may see spurious copies of the specified file  in
  509. all  directories!    This  can    occur  because    these  types of programs
  510. intercept the DOS directory search  functions  and  redrive  them  using
  511. additional  directory  paths.     In this case, simply make the file name
  512. ambiguous by  inserting  one  or  more    *  or  ?  characters.     Another
  513. interesting use is to specify the /sd switch,  which will display all of
  514. the directories on the disk below the specified directory.
  515.  
  516. The /h switch causes the  file    entries  to  be  displayed  horizontally
  517. rather    than  vertically (according to the sort option specified).  This
  518. is handy when more than a screen's worth of output is generated, so that
  519. the sequence of file entries is continuous after the screen scrolls.
  520.  
  521. The /i switch causes a summary of information about the  specified  disk
  522. to  be    displayed.    This  is    equivalent  to specifying the /m/v/p/s/t
  523. switches.  The only other switches  which make sense with /i are /c, /g,
  524. /k, /q, and /r.
  525.  
  526. The /k switch requests that system memory and disk space information  be
  527. displayed  in  units  of kilobytes (1024 bytes), rather than the default
  528. units of bytes.  In addition, these values are    rounded  upward,  taking
  529. into  account the allocation unit (cluster) size for the specified disk.
  530. System memory values are simply rounded to the next higher kilobyte. Use
  531. of  the  /k  switch  will reveal the actual amount of disk space used by
  532. each file, rather than the normal file size, which may be much less. For
  533. disks  with  a    cluster  size less than 1024 bytes (primarily RAMDISKs),
  534. specifying the /k switch may cause the displayed number of bytes used to
  535. actually  exceed  the  total space used on the disk.  This is due to the
  536. cumulative effect of adding a series of rounded values.
  537.  
  538. The /l switch will cause a list of file names (only)  to  be  generated.
  539. All other output (file information and totals lines) is suppressed. This
  540. switch    is  normally  used  with  the  /sf  switch  (to  suppress    any
  541. directories),  and  the  /r  switch to redirect the output to a file for
  542. processing by another program.    /l can also be combined  with the  digit
  543. switches to simply cause the suppression of the totals lines.  Since any
  544. embedded spaces are removed, the file names are ready to be operated  on
  545. by  copy  commands  which  might  be  generated automatically by another
  546. program.  The /h, /i, /k, /m, /p, /t, and /v switches are  not    normally
  547. used with the /l switch.
  548.  
  549. The /m switch will display the DOS  system  version  and  system  memory
  550. usage: System Memory Used, Free, and the Total Available.
  551.  
  552. The /p switch will display a variety of disk parameters  from  the  BIOS
  553. Parameter Block (BPB) in the disk boot sector (if available),  and other
  554. parameters obtained directly from DOS.
  555.  
  556. The first line of BPB disk parameters contains:
  557.  
  558. OEM Info  -  This  field  usually  contains  the   Original    Equipment
  559. Manufacturer's  name (IBM, ZDS, etc.) and the DOS version used to format
  560. the disk (2.1, 3.2, etc.).
  561.  
  562. Sectors/FAT - The number of sectors per File Allocation Table.
  563.  
  564. Root Dir Size - The  maximum  number  of  entries  in  the  disk's  root
  565. directory.
  566.  
  567. Total Sectors - The total number of sectors on the disk,  including  the
  568. Boot sector(s), FAT sectors, Root Directory sectors, and Data sectors.
  569.  
  570. The second line of BPB disk parameters contains:
  571.  
  572. FATs - The number of File Allocation Tables (usually 2).
  573.  
  574. Reserved Sectors - The number of sectors reserved at  the  beginning  of
  575. the disk for the boot sector, partition tables, etc.
  576.  
  577. Sectors/Track - The number of sectors per track on the disk.
  578.  
  579. Heads - The number of heads on a hard or floppy disk.  Some RAMDISKs may
  580. have too many heads for their own good!
  581.  
  582. Hidden Sectors - The number of sectors on a hard disk hidden from use by
  583. DOS  when  processing the current disk partition.  This area on the disk
  584. may either  contain  partition    information,  or  the  data  in  another
  585. partition, depending on the partitioning scheme used.
  586.  
  587. The line of DOS disk parameters contains:
  588.  
  589. Media Byte - The media descriptor byte is used to describe the size  and
  590. format    of  the disk media (Number of sides, Number of Tracks, Number of
  591. Sectors per Track).  Some typical PC media bytes are:
  592.  
  593. Media Byte    Sides       Tracks      Sectors/Track      Disk Type
  594. ----------    -----       ------      -------------      ---------
  595.    FFH          2          8         40          5" floppy
  596.    FEH          1          8         40          5" floppy
  597.    FDH          2          9         40          5" floppy
  598.    FCH          1          9         40          5" floppy
  599.    F9H          2         15         80          5" floppy
  600.    F8H          -         --         --          Hard Disk
  601.  
  602. Although the media byte is used  by  the  BIOS    to  determine  the  disk
  603. characteristics  in  certain  cases, not all MS-DOS BIOS implementations
  604. use exactly the same media bytes for the same disk types.  Two    examples
  605. are  the  media bytes used for 8" floppy disks and 5.25" 96 TPI 80 Track
  606. 8/9 Sector/Track floppy disks, which are not  uniformly  supported  with
  607. the same media byte in all BIOS or Device Driver implementations.
  608.  
  609. Bytes/Sector - The number of bytes per sector on the disk.
  610.  
  611. Sectors/Cluster - The number of sectors per cluster on the disk.
  612.  
  613. Clusters - The total number of data clusters on the disk.  This does not
  614. include  the  boot sector, FATs, or root directory.  DOS uses 16 bit FAT
  615. entries if a disk has more than 4085 data clusters.  This  is  indicated
  616. by the notation (16) after the number of clusters.
  617.  
  618. Most MS-DOS and PC-DOS V1 disks do not have  a    BPB  in  the  disk  boot
  619. sector, so the BPB information isn't displayed in this case.  Also, some
  620. RAMDISKs may not have a "boot  sector"  at  all!    Zenith  Z-100  disks
  621. contain  a  partial  BPB  in  the boot sector, so the second line of BPB
  622. information isn't displayed for these disks.
  623.  
  624. If both /1 and /p are specified, both the starting  cluster  number  and
  625. starting  sector number for each file are displayed.  See the section on
  626. Disk Space Allocation below for more information.
  627.  
  628. The /q switch suppresses the console reads  which  normally  occur  when
  629. output information is about to scroll off the screen.
  630.  
  631. The /r switch causes console output to go through DOS, rather  than  the
  632. BIOS.  Although  this  usually    slows down the output and suppresses the
  633. screen attributes (colors) normally used, this    is  necessary  when  the
  634. need  arises  to  redirect  the output to a file or device (printer) for
  635. subsequent processing.
  636.  
  637. /r must be specified when either the DOS command line redirection symbol
  638. (>) is used or the Control-P printer echo function is used.  The program
  639. normally displays a graphics vertical bar symbol  to  separate    adjacent
  640. columns  of  output  information.  This is changed to the standard ASCII
  641. (|) character if redirection is requested.    Specification  of  the  /r
  642. switch causes the /q switch to be turned on automatically.
  643.  
  644. The /t    switch    suppresses  the  display  of  detailed    information  for
  645. individual  files  and    directories  and only displays the directory and
  646. disk space totals lines.
  647.  
  648. The directory totals line includes the target directory path, the number
  649. of subdirectories, the number of files selected, and the total number of
  650. bytes in the selected files.
  651.  
  652. The disk space totals line includes the space used, percent used,  space
  653. free, and total space on the disk.
  654.  
  655. The /t switch is used  when you wish to compare the total number or size
  656. of  files  on  two  different  disks or directories.  If a difference is
  657. detected, other switches (such as /b or /d) can  be  used  to  determine
  658. which files are missing (or different).
  659.  
  660. Another difference between SD and DIR is that SD counts directories  and
  661. files separately; DIR includes both in its 'file' count.
  662.  
  663. The /v switch causes the disk volume label  (if  any),    and  the  volume
  664. creation date and time to be displayed.  In addition, the current day of
  665. the week, date, and time are displayed.
  666.  
  667. ------------------------------------------------------------------------
  668.  
  669. DOS Disk Space Allocation
  670.  
  671. ------------------------------------------------------------------------
  672.  
  673. Disk space for files is allocated in units  called  clusters  which  are
  674. composed of one or more physical disk sectors.
  675.  
  676. Typical values of cluster sizes for standard disk types are shown below:
  677.  
  678. Disk Type    Sectors/Track    Capacity       Cluster Size     FAT Size
  679. ---------    -------------    --------       ------------     --------
  680. SS 48 TPI       8        160k        512           12
  681. SS 48 TPI       9        180k        512           12
  682. DS 48 TPI       8        320k           1024           12
  683. DS 48 TPI       9        360k           1024           12
  684. DS 96 TPI       8        640k           2048           12
  685. DS 96 TPI       9        720k           2048           12
  686. DS 96 TPI      15        1.2m           2048           12
  687. Hard Disk      17        10m           4096           12
  688. Hard Disk      17        20m           2048           16
  689. Hard Disk      17        30m           2048           16
  690.  
  691. Most DOS disks use 512 bytes per  sector,  and    with  the  12  bit  File
  692. Allocation  Table entries prior to DOS V3 (4096 clusters), this requires
  693. that progressively greater cluster  sizes  be  used  to  support  larger
  694. storage  devices.    This  can    result in a substantial amount of wasted
  695. space for large capacity hard disks with many  relatively  small  files.
  696. DOS  V3 added support for 16 bit FAT entries which allows 65536 clusters
  697. to be used, thus allowing a much smaller cluster size to be used with  a
  698. corresponding better utilization of disk space.
  699.  
  700. The starting cluster number of a file is an index into the  disk's  File
  701. Allocation Table (FAT) which contains another index for the next cluster
  702. for the file, etc. until  an  end  of  file  entry  is    reached.    This
  703. technique  allows disk space to be dynamically allocated and deallocated
  704. in an efficient manner.  Therefore, the FAT contains  the  cluster-level
  705. information  for  each file, with the initial FAT index contained in the
  706. directory entry for the file.
  707.  
  708. A somewhat more useful, although complex, entity is the starting logical
  709. sector    number of a file.  This is the absolute disk sector number where
  710. the file starts, and can be used as input to the DEBUG program    to  read
  711. and  write  absolute  disk  sectors  for  a  file.    This  value can be
  712. calculated  from  the  starting  cluster  number  for  the  file   using
  713. information contained in the BIOS Parameter Block (BPB) which is located
  714. in the disk boot sector (the first sector on the disk).  Specifying  the
  715. /p switch causes the boot sector to be read and if the /1 switch is also
  716. specified, the starting sector number for each file is    displayed  after
  717. the starting cluster number.
  718.  
  719. Each MS-DOS disk contains the following data areas:
  720.  
  721. Reserved (Boot) Sector(s) - usually 1 sector
  722.  
  723. File Allocation Table(s)  - usually 2 copies
  724.  
  725. Root Directory Area      - variable size, 32 bytes/entry
  726.  
  727. Disk Data Area          - space for files and subdirectories
  728.  
  729. In order to calculate the starting sector number  of  a  file,    we  must
  730. first calculate the sector number of the Disk Data Area:
  731.  
  732. Logical Sector number of the Disk data area (LSD) =
  733.  
  734. (Number of Reserved Sectors) +
  735.  
  736. (Number of FATs) * (Sectors/FAT) +
  737.  
  738. (32 * (Number of Root Dir. Entries) + Bytes/Sector - 1) / (Bytes/Sector)
  739.  
  740. Starting Logical Sector number of a File (LSF) =
  741.  
  742. LSD + (Starting Cluster Number - 2) * (Sectors/Cluster)
  743.  
  744. Using the information displayed by the /p and /1 switches and the  DEBUG
  745. program,  it is relatively easy to examine (and change!) the information
  746. in the data areas described above, as well as any  of  the  files  on  a
  747. disk.     This  should  not normally be necessary, and is not recommended
  748. under normal circumstances.  However, it can  be  educational  and  even
  749. helpful when attempting to recover data from a damaged disk.
  750.  
  751. ------------------------------------------------------------------------
  752.  
  753. IBM-PC EGA Switches and Support
  754.  
  755. ------------------------------------------------------------------------
  756.  
  757. /25 - Display 25 lines on EGA (PC's only)
  758. /43 - Display 43 lines on EGA (PC's only)
  759.  
  760. The /25 and /43 switches change to the specified number of lines on  the
  761. screen    when  using  an  EGA  on  a PC compatible system.  The screen is
  762. automatically cleared and the screen remains set to this size  when  the
  763. program  terminates.  If an EGA is in use and the number of screen lines
  764. has already been changed to a value other than the default  of    25,  the
  765. program will use that value.
  766.  
  767. If /c is specified, the entire    screen    is  cleared  using  the  current
  768. number of lines, which may be more or less than the standard 25.
  769.  
  770. ------------------------------------------------------------------------
  771.  
  772. Modifying the Default Switch Values
  773.  
  774. ------------------------------------------------------------------------
  775.  
  776. The default switch values may be altered by using the DEBUG  program  to
  777. modify the following bytes in the SD.COM file:
  778.  
  779. Offset      Switch    Default    Possible Value(s)
  780. ------      ------    -------    -----------------
  781.  0102       Sort       'F'      'A', 'B', 'D', 'E', 'F', 'N'
  782.  0103       Cols       '4'      '1', '2', '4', '6'
  783.  0104        /c           0    0, 1=Clear display screen
  784.  0105        /g           0    0, 1=Global subdirectories
  785.  0106        /h           0    0, 1=Horizontal output display
  786.  0107        /i           0    0, 1=Display Info summary
  787.  0108        /k           0    0, 1=Display space in Kbytes
  788.  0109        /l           0    0, 1=Generate file name List
  789.  010A        /m           0    0, 1=Display system Memory usage
  790.  010B        /p           0    0, 1=Display disk Parameters
  791.  010C        /q           0    0, 1=Quick output (no pauses)
  792.  010D        /r           0    0, 1=Allow output Redirection
  793.  010E        /t           0    0, 1=Totals output lines only
  794.  010F        /v           0    0, 1=Volume label information
  795.  
  796. For example:
  797.  
  798. D>DEBUG SD.COM      (Load SD.COM into memory using DEBUG.COM)
  799. -E103 '2'         (Change the default number of columns to 2)
  800. -E10F 01      (Display the volume label info as a default)
  801. -W          (Write the modified file back to disk)
  802. -Q          (Exit to DOS from DEBUG)
  803. D>sd          (Execute the modified version of SD.COM)
  804.  
  805. ------------------------------------------------------------------------
  806.  
  807. Screen Color Selection
  808.  
  809. ------------------------------------------------------------------------
  810.  
  811. The default foreground and background colors  (screen  attributes)  used
  812. for the following displayed output fields may be changed with DEBUG:
  813.  
  814. File colors apply to individual disk file entries.
  815.  
  816. Directory colors apply to individual directory entries.
  817.  
  818. Separator colors apply to the separator characters  which  are    used  to
  819. divide the entry columns vertically.
  820.  
  821. Text colors apply to the leading and trailing text lines.
  822.  
  823. Normal colors apply to the normal state of the screen before  and  after
  824. SD.COM    is  executed.     These    colors    should    be  changed to match the
  825. standard screen colors used, if they are other than white on black.
  826.  
  827. For the IBM-PC:
  828.  
  829. Offset      Field Attribute          Default  Description
  830. ------      ---------------          -------  -----------
  831.  0110      File Fore/Back Colors       7+16*1   White on Blue
  832.  0111      Directory Fore/Back Colors  0+16*2   Black on Green
  833.  0112      Separator Fore/Back Colors  4+16*0   Red on Black
  834.  0113      Text Fore/Back Colors       6+16*0   Brown on Black
  835.  0114      Normal Fore/Back Colors     7+16*0   White on Black
  836.  
  837.  0115      File Mono Attributes          7+16*0   Normal Video
  838.  0116      Directory Mono Attributes   0+16*7   Reverse Video
  839.  0117      Separator Mono Attributes   7+16*0   Normal Video
  840.  0118      Text Mono Attributes          7+16*0   Normal Video
  841.  0119      Normal Mono Attributes      7+16*0   Normal Video
  842.  
  843.     0 = Black,       1 = Blue,      2 = Green,     3 = Cyan
  844.     4 = Red,       5 = Magenta,   6 = Brown,     7 = White
  845.  
  846. The PC version of SD.COM uses either the color or monochrome  attributes
  847. specified  at  the  offsets  in  the  table  above, based on the type of
  848. monitor being used.
  849.  
  850. Once the desired foreground and background colors (attributes) have been
  851. selected for an output field, compute the field attribute byte using the
  852. formula: ATTRIBUTE = FCOLOR+16*BCOLOR, where FCOLOR and BCOLOR    are  the
  853. foreground and background colors (attributes), respectively.
  854.  
  855. Intensified foreground colors corresponding to the 8 standard colors may
  856. be  selected  by  adding 8 to the foreground color number.  For example,
  857. specify foreground color (6+8)=14  to  get  a  foreground  yellow  color
  858. instead  of  the  unintensified  brown.    The blinking attribute may be
  859. selected by adding 8 to the background color number.   However,  use  of
  860. this  attribute  is not recommended, since it may be distracting.  For a
  861. monochrome monitor, selecting Blue on  Black  (1+16*0)    will  cause  the
  862. output field to be underlined.
  863.  
  864. For the Z-100:
  865.  
  866. Offset      Field Color          Def.(Color)     Def.(Mono)
  867. ------      -----------          -----------     ----------
  868.  0110      File Fore Color       '7' White      '7' White
  869.  0111      File Back Color       '1' Blue       '0' Black
  870.  0112      Directory Fore Color       '0' Black      '0' Black
  871.  0113      Directory Back Color       '4' Green      '6' Yellow
  872.  0114      Separator Fore Color       '2' Red        '7' White
  873.  0115      Separator Back Color       '0' Black      '0' Black
  874.  0116      Text Fore Color       '6' Yellow     '7' White
  875.  0117      Text Back Color       '0' Black      '0' Black
  876.  0118      Normal Fore Color       '7' White      '7' White
  877.  0119      Normal Back Color       '0' Black      '0' Black
  878.  
  879.    '0' = Black,   '1' = Blue,    '2' = Red,     '3' = Magenta
  880.    '4' = Green,   '5' = Cyan,    '6' = Yellow,  '7' = White
  881.  
  882. Two different sets of default colors are shown in the  table  above  for
  883. color and monochrome monitors.    As supplied, the Z-100 version of SD.COM
  884. is configured for a color monitor.  For proper operation on  the  Z-100,
  885. an  ALTCHAR.SYS  file must exist in the root directory of the boot disk,
  886. and the file must contain the standard Z-100 graphics font  symbols  (or
  887. the graphics vertical bar separator will appear as a grave accent).
  888.  
  889. ------------------------------------------------------------------------
  890.  
  891. Generic MS-DOS Version
  892.  
  893. ------------------------------------------------------------------------
  894.  
  895. The generic MS-DOS version of the program should work  on  any    computer
  896. system    capable  of  running MS-DOS 2.0 or higher.  Most of the standard
  897. features of the program are available with the following exceptions:
  898.  
  899. The /c switch simply prints two blank lines, since there isn't a generic
  900. method of clearing the console screen.
  901.  
  902. The /r switch is defaulted, since there is no generic method of  sending
  903. data to the console through the BIOS.
  904.  
  905. The console display screen is assumed to consist of 24 lines.
  906.  
  907. There is no patch area for screen attributes (colors).
  908.  
  909. ------------------------------------------------------------------------
  910.  
  911. System Return Codes
  912.  
  913. ------------------------------------------------------------------------
  914.  
  915. The following return codes are set and may be checked
  916. for using the IF ERRORLEVEL statement in a .BAT file:
  917.  
  918. 0  -  One or more matching files were found.
  919. 1  -  No matching files were found.
  920. 2  -  Bad drive (doesn't exist or syntax error).
  921. 3  -  Bad path (doesn't exist or syntax error).
  922. 4  -  Bad file specification (syntax error).
  923. 5  -  Bad date (too large or syntax error).
  924. 6  -  Bad boot sector (too large or bad sector).
  925. 7  -  Too many directories (when /g specified).
  926.  
  927. For example:
  928.  
  929. ECHO OFF
  930. sd %1 /r >nul
  931. IF ERRORLEVEL 2 ECHO Drive does not exist!
  932.  
  933. ------------------------------------------------------------------------
  934.  
  935. Examples of Use
  936.  
  937. ------------------------------------------------------------------------
  938.  
  939. A>sd
  940.  
  941. Display the current directory of drive A.
  942.  
  943. C>sd /?
  944.  
  945. Display program help information.
  946.  
  947. B>sd/d/6
  948.  
  949. Display the current directory of drive B, sorted by descending date  and
  950. time, using the six column format (file names only).
  951.  
  952. D>sd c:\/ss/2
  953.  
  954. Display only the system files in the root directory of    drive  C,  using
  955. the two column output format.
  956.  
  957. C>sd b:/t
  958.  
  959. Display the totals information for the current directory of drive B.
  960.  
  961. A>sd c:\/sd
  962.  
  963. Display all of the subdirectories in the root directory of drive C.
  964.  
  965. A>sd c:\/l/sf/r >files.dat
  966.  
  967. Create a file called "a:files.dat" which contains a sorted list  of  all
  968. files (no directories) in the root directory of drive C.
  969.  
  970. A>sd *.asm/b-
  971.  
  972. Display all files having an extension of "asm" in the current  directory
  973. of drive A and sort the output by descending file size.
  974.  
  975. D>sd/v/n/1/r
  976.  
  977. Display volume label information and all files in the current  directory
  978. of  drive D, do not sort the file entries, use one output column, do not
  979. pause when the console screen fills, and allow output redirection.  This
  980. combination of switches causes SD to behave similarly to DIR.
  981.  
  982. B>sd \/s/n/2
  983.  
  984. Select all files in the root directory of drive B, including those  with
  985. the  hidden  and/or  system attribute, do not sort the file entries, and
  986. display the output using the two column format.
  987.  
  988. B>sd/r temp.* >c:temp.dir
  989.  
  990. Select all files having a name of "temp" in  the  current  directory  of
  991. drive B, and redirect the console output to file "c:temp.dir".
  992.  
  993. B>sd/r/1 c:\*.com >>c:temp.dir
  994.  
  995. Select all files with an extension of "com" in  the  root  directory  of
  996. drive  C,  format  using  one  output  column,    and redirect the console
  997. output, appending to the file "c:temp.dir".
  998.  
  999. D>sd a:/v/p/1
  1000.  
  1001. Display volume label information, disk parameter  information,    and  all
  1002. file information for the current directory of drive A.
  1003.  
  1004. B>sd e:/m/k
  1005.  
  1006. Display DOS system  version  and  memory  information  and  the  current
  1007. directory of drive E, rounding the space values to kbytes.
  1008.  
  1009. C>sd /h/2
  1010.  
  1011. Display all files and directories in the current directory  on    drive  C
  1012. sorted and displayed from left to right, using the two column format.
  1013.  
  1014. C>sd \/i
  1015.  
  1016. Display system information  for  the  disk  in    drive  C  and  its  root
  1017. directory.
  1018.  
  1019. A>sd t/c/k/q
  1020.  
  1021. Select all files in the current directory of drive A whose  names  begin
  1022. with  "t",  clear the screen before displaying output, display file size
  1023. and disk space values in kilobytes and do not pause the console output.
  1024.  
  1025. C>sd \/e
  1026.  
  1027. Display all files in the root  directory  of  drive  C    sorted    by  file
  1028. extension and by file name.
  1029.  
  1030. B>sd temp
  1031.  
  1032. If temp is an existing subdirectory in the current directory of drive B,
  1033. then  select  all of the files in that directory.  Otherwise, select all
  1034. files in the current directory of drive B whose names begin with "temp".
  1035.  
  1036. B>sd temp*.*
  1037.  
  1038. Display all directories and files in the current directory of drive B
  1039. whose names begin with "temp".
  1040.  
  1041. A>sd ../sar
  1042.  
  1043. Display all files in the parent directory of the  current  directory  of
  1044. drive A with either the archive or read/only attribute.
  1045.  
  1046. A>sd c:/d/2/@+30
  1047.  
  1048. Display all files in the current directory of drive C which were created
  1049. during the past month sorted by date and time, using two output columns.
  1050.  
  1051. C>sd \/m/v/p/s/g/1
  1052.  
  1053. Display system version and memory information, disk volume  information,
  1054. disk  parameter  information,  and  all information for all files in all
  1055. directories of drive C.
  1056.  
  1057. C>sd \/g/t
  1058.  
  1059. Display totals information only for all directories on drive C.
  1060.  
  1061. C>sd d:\test/g
  1062.  
  1063. Display information for files and directories at and  below  the  "test"
  1064. directory level of drive D.
  1065.  
  1066. A>sd c:\*.exe/g
  1067.  
  1068. Display information for all .exe files in all directories on drive C.
  1069.  
  1070. A>sd c:\/g/sd
  1071.  
  1072. Display all directory names on drive C.
  1073.  
  1074. B>sd ..\*.a?m/d+/4
  1075.  
  1076. Display all files in the parent directory of the  current  directory  of
  1077. drive  B  whose  extensions begin with "a" and end with "m" and sort the
  1078. output by ascending date and time using the four column output format.
  1079.  
  1080. C>sd/r/v/1 b:\dir1\dir2\dir3\*.doc/d >prn
  1081.  
  1082. Select    all  files  having  an    extension  of  "doc"  in  the  directory
  1083. "\dir1\dir2\dir3"  of  drive  B.  Sort the output by date and time.  Use
  1084. the one column output  format  and  include  volume  label  information.
  1085. Redirect the console output to the printer.
  1086.  
  1087. A>sd b:/r (Type Control-P/RETURN)
  1088. (console output is duplicated on the printer)
  1089. A> (Type Control-P/RETURN for PC's, Control-N/RETURN for Z-100)
  1090.  
  1091. Display the current directory of  drive  B  and  duplicate  the  console
  1092. output on the printer.
  1093.  
  1094. ------------------------------------------------------------------------
  1095.  
  1096. Modification History
  1097.  
  1098. ------------------------------------------------------------------------
  1099.  
  1100. 01-Feb-87 ... V5.4 (Major Rewrite)
  1101.  
  1102. Created generic MS-DOS version of program.
  1103. Corrected intermittent looping condition on 80286's.
  1104. Added /? switch to directly display help information.
  1105. Allow help information to be bypassed, if bad switch.
  1106. Terminate program if either ESCAPE or CTRL-C is typed.
  1107. Changed exit from INT 20H to INT 21H function 4CH and
  1108. added return codes for ERRORLEVEL testing by .BAT files.
  1109. Changed 'No files found' message to 'No matching files'.
  1110. Always output values in kbytes if /k switch specified.
  1111. Always display fully qualified path name on totals line.
  1112. Changed /r console output function from OUTCHR to DCIO
  1113. for better performance and to prevent Control-C aborts.
  1114. Added /h switch for horizontal column sorting.
  1115. Added /l switch for output of file names only.
  1116. Added /i switch which is equivalent to /m/v/p/s/t.
  1117. Added /sf switch to select file entries only (no dirs).
  1118. Added /@ switch for file selection before, on, after date.
  1119. Changed /a switch to sort by file allocation unit.
  1120. Added +/- to switches to specify ascending/descending sort.
  1121. Changed /p display from Bytes/Cluster to Sectors/Cluster.
  1122. Identify 16 bit FATs with the notation (16) after Clusters.
  1123. Display starting cluster number of files if /1 specified.
  1124. Read boot sector and display BPB information for /p or /i.
  1125. If /1/p specified, display file starting sector numbers.
  1126. Added support for EGA cards with more than 25 lines.
  1127. Added /25 and /43 switches to switch EGA video modes.
  1128. Added /g switch for global subdirectory processing.
  1129.  
  1130. 14-Oct-86 ... V5.3
  1131.  
  1132. Display message if no matching files found.
  1133. Added DOS version number to /m switch output.
  1134. Added user patchable foreground and background colors.
  1135. Save registers across call to Z-100 MTR-100 ROM BIOS
  1136. console output routine - fixes system hangs with ROM V2.5.
  1137.  
  1138. 26-May-86 ... V5.2
  1139.  
  1140. Moved day, date and time to volume information line.
  1141. Added total disk space used to last totals line.
  1142. Added percent of total disk space used to totals line.
  1143.  
  1144. 17-May-86 ... V5.1
  1145.  
  1146. Fixed parsing bug: sd filename/s -> Bad filespec.
  1147. Display directory entries in reverse video if no /r.
  1148. Added /m switch to display system memory utilization.
  1149. Added /p switch to display disk parms (instead of /v/t).
  1150.  
  1151. 12-Feb-86 ... V5.0 (Major Rewrite)
  1152.  
  1153. Added /1/2/4/6 output column switches and removed /l switch.
  1154. Changed default output format from 2 to 4 column display.
  1155. Added display of seconds to time information for files.
  1156. Added directory path display to output information.
  1157. Added number of directories and file types to output.
  1158. Added total disk space to output information.
  1159. Added /f sort by filename switch (default sort type).
  1160. Changed /e switch to sort by both file extension and name.
  1161. Added patch area to allow switch defaults to be changed.
  1162. Changed parsing to allow switches before and after filespec.
  1163. Fixed several miscellaneous path/filespec parsing bugs.
  1164. Changed path detection from CHMOD to CHDIR system call.
  1165. Added graphics vertical bar character for IBM-PC.
  1166. Suppressed display of . and .. subdirectories.
  1167. Changed display to 25 output lines for IBM-PC.
  1168. Suppressed trailing delimiter if only one output line.
  1169. Added bad filespec message instead of syntax message.
  1170. Added /k switch to display disk space in rounded kbytes.
  1171. Expanded /s switch with d,a,h,r,s file selection values.
  1172. Added display of disk parameters if both /v and /t specified.
  1173. Removed support for operation under MS-DOS V1.
  1174.  
  1175. ------------------------------------------------------------------------
  1176.  
  1177. Miscellaneous Information
  1178.  
  1179. ------------------------------------------------------------------------
  1180.  
  1181. Possible Future Modifications
  1182.  
  1183. Option to read FAT to display file clusters & bad sectors.
  1184. Write directly to Video RAM for faster screen output.
  1185. Support full screen operation - forward/backward scrolling.
  1186. Allow options to be changed dynamically & program cloned or
  1187. implement a separate configuration program to clone program.
  1188. Modify to terminate and stay resident.
  1189. Add file management capabilities.
  1190.  
  1191. Distribution Policy
  1192.  
  1193. The SD54.ARC file may be freely copied and distributed as  long  as  the
  1194. only  charge  is  for  media  and  reproduction  costs,  etc.  Under  no
  1195. conditions should the program either be sold for a profit or distributed
  1196. in modified form without the permission of the author.
  1197.  
  1198. If you would like to receive the latest version of the program on  disk,
  1199. including the 8088 assembly language source code and several other handy
  1200. utilities, send a check to the author at the address below for $20.00.
  1201.  
  1202. If  you  wish  to  contact  me    with  bug  reports,   suggestions    for
  1203. improvements,  and/or  especially  large  financial  donations, I can be
  1204. reached using the information provided below:
  1205.  
  1206. John F. Stetson
  1207. 42 Tivoli Lake Court
  1208. Silver Spring, Md. 20906
  1209.  
  1210. (Home) (301) 946-5615 (after 7 PM)
  1211. (Work) (301) 340-4544
  1212.  
  1213. Compuserve [70320,353]
  1214. ------------------------------------------------------------------------
  1215.