home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DIR / CSAP302.ZIP / CSAP.DOC < prev    next >
Encoding:
Text File  |  1990-06-20  |  8.2 KB  |  178 lines

  1.                  CSAP - Sort And Pack Directories
  2.                Version: 3.0.2    Date: June 20, 1990
  3.                      Author: Don A. Williams
  4.  
  5. ****************************  NOTICE!  **************************
  6. *   Contrary to the current trend  in  MS-DOS  software  this   *
  7. *   program,  for  whatever  it is worth,  is NOT copyrighted   *
  8. *   (with the exception of the runtime library  from  Borland   *
  9. *   International's  Turbo  C)!  The program,  in whole or in   *
  10. *   part,  may be used freely in any fashion  or  environment   *
  11. *   desired.  If  you  find this program to be useful to you,   *
  12. *   do NOT send any contribution to the author;  in the words   *
  13. *   of  Rick  Conn,   'Enjoy!'  However,   if  you  make  any   *
  14. *   improvements,  I would enjoy  receiving  a  copy  of  the   *
  15. *   modified  source.  I  can  be reached,  usually within 24   *
  16. *   hours,  by  messages  on  any  of  the  Phoenix  systems,   *
  17. *   particularly:                                               *
  18. *                                                               *
  19. *               Bob's Answering Machine [OPUS]                  *
  20. *                   (602) 242-3158   1200/2400 bps              *
  21. *               Radioactive West        [PCBOARD]               *
  22. *                   (602) 873-0810   1200/2400 bps              *
  23. *               The Tool Shop BBS       [PCBOARD]               *
  24. *                   (602) 279-2673   1200/2400/9600 bps         *
  25. *                   (Good luck trying!  VERY BUSY!)             *
  26. *               Technoids Anonymous     [PCBOARD]               *
  27. *                   (602) 899-4876   300/1200/2400 bps          *
  28. *                                                               *
  29. *   All can be reached through PC Pursuit.                      *
  30. *                                                               *
  31. *   or:                                                         *
  32. *                on GEnie, mail address: DON-WILL               *
  33. *                on CompuServ:           75410,543              *
  34. *                                                               *
  35. *   Every  effort has been made to avoid error and moderately   *
  36. *   extensive testing has been  performed  on  this  program,   *
  37. *   however, the author does not warrant it to be fit for any   *
  38. *   purpose  or  to  be  free  from  error  and disclaims any   *
  39. *   liability for actual or any other damage arising from the   *
  40. *   use of this program.                                        *
  41. *****************************************************************
  42.  
  43.  
  44. CSAP is a program to sort PC/MS-DOS directories in any  of  three
  45. orders   and  to  write  out  the  sorted  directory.   It  is  a
  46. replacement for my earlier SAP  which  was  written  in  assembly
  47. language  and  had  a  number of nasty bugs!  CSAP,  from version
  48. 2.0.2 up,  supports all of the  options  provided  by  SAP  3.01,
  49. however,  the  manner  of  specification  and  the  defaults  are
  50. different.  CSAP, from version 3.0.0 up, supports MS-DOS 4.xx and
  51. DR DOS  3.xx  large  partitions.  Also,  beginning  with  version
  52. 3.0.0,   CSAP   provides   the   optional   ability  to  truncate
  53. directories,  i.e.  return disk space not used by a directory  to
  54. the free disk space.
  55.  
  56.                         **** WARNING ****
  57.  
  58. Due to the fact that CSAP alters the directories and,  if the new 
  59. "truncate directories" option is selected,  the FATs on the disk, 
  60. it should NOT be executed out of a "shell" or in a  multi-tasking 
  61. environment!  
  62.  
  63. Changes between this documentation and  prior  versions  will  be
  64. indicated by 'change bars',  i.e.  the character '|' in the right
  65. margin.
  66.  
  67. There is a major exception to the sort.  An  MS-DOS  system  disk
  68. contains  two  files that MUST be the FIRST two files in the root
  69. directory.  These files contain MSDOS itself and the BIOS for the
  70. system.  Unfortunately, there is no sure way to distinguish these
  71. files from any other files although usually they have the  System
  72. and/or Hidden attributes and their Extension is 'SYS'.  If either
  73. of  the first two files in the root directory have the System and
  74. Hidden attributes,  CSAP will assume that the disk  is  a  system
  75. disk and will exclude the first two files from the sort.
  76.  
  77.  
  78. USAGE
  79.  
  80.         CSAP [options] [directory_name]
  81.                      or
  82.         CSAP [directory_name] [options]
  83.  
  84. Both parameters are optional and,  if neither is specified,  CSAP
  85. will sort the current directory and all elements in the directory
  86. tree  below  it  in  ascending order on the "Name" field.  As did
  87. SAP,  CSAP will sort all subdirectory entry  so  that  they  fall
  88. ahead  of  any  file  entries.  The directory_name parameter,  if
  89. supplied, specifies to CSAP the directory with which to start the
  90. sort.  Unless otherwise instructed, CSAP will sort that directory
  91. and all directories below it in the directory hierarchy.
  92.  
  93. If no disk is specified in the path name,  CSAP will work on  the 
  94. 'current' or 'default' disk, the disk shown in the MS-DOS prompt.  
  95. If the first character of the path name,  after the optional disk 
  96. specification,  is a '\'or a '/',  CSAP will assume that the path
  97. starts  at  the  root directory.  If the path name does not begin
  98. with a '\'or a '/',  SAP will assume that the path starts at  the
  99. 'current' directory and will prefix the specified path name  with 
  100. that  of  the  current  directory  before using it.  With version
  101. 2.1.2,  CSAP will accept either the '\' or the '/' characters  as
  102. separators in path specifications.
  103.  
  104. The options provide the user with a means of controlling the sort
  105. order.  They are as follows:
  106.  
  107.         -N    Sort on entry Name and Extension(the default).
  108.         -E    Sort on entry Extension then Name.
  109.         -D    Sort on entry Date/Time.
  110.         -S    Sort on entry Size.
  111.         -I    Invert the  sort  order,  i.e  sort  in  descending
  112.               order.
  113.         -L    Sort only one level of the hierarchy.
  114.         -R    Report the number of removed  "deleted"entries  and
  115.               the sector addresses of the directory.
  116.         -P    Do not remove "deleted" entries [reversed from SAP].
  117.         -V    Verify  (request  permission  from  the   operator)  
  118.               before sorting each directory.                       
  119.         -T    Truncate directories, i.e. return unused disk space
  120.               to the free space pool.
  121.  
  122. The  case  and order of the options is not important and they can
  123. be specified individually, i.e.
  124.  
  125.         CSAP -d -i
  126.  
  127. or combined, i.e.
  128.  
  129.         CSAP -di
  130.  
  131.  
  132. EXAMPLES:
  133.  
  134. Following are some simple examples of the use of CSAP:
  135.  
  136.         1.  A>CSAP
  137.  
  138.             This form of the CSAP command (with no  command  line
  139.             parameters)  will sort the "current" directory of the
  140.             "current" or "default" disk (disk A in this  example)
  141.             and  all  directories below it in the hierarchy.  The
  142.             directories  will  be  sorted  in  name   order   and
  143.             "deleted" entries will be removed.
  144.  
  145.         2.  A>CSAP -V
  146.  
  147.             This  form  of  the CSAP command is the same as in 1.
  148.             except that CSAP will  pause  for  user  confirmation
  149.             before sorting each directory.
  150.  
  151.         3.  A>CSAP \
  152.  
  153.             This  form  of  the CSAP command will sort the "Root"
  154.             directory of the "Current" disk, in ths example, A:\.
  155.             All directories on disk A would be sorted.
  156.  
  157.         4.  A> CSAP \ -L
  158.  
  159.             This form would, again,  sort the "Root" directory of
  160.             disk A but the "-L" option would limit the sorting to
  161.             just the "Root".
  162.  
  163.         5.  A>CSAP \ -R
  164.  
  165.             This  form  of the CSAP would sort all directories on
  166.             disk A and show,  for each  directory,  the  relative
  167.             sectors  occupied  by the directory and the number of
  168.             "erased" entries removed.
  169.  
  170.         6.  A>CSAP \ -DR
  171.  
  172.             This form of the CSAP command will,  again,  sort all 
  173.             of  the  directories  on  disk  A  but  this  time in 
  174.             Date/Time order.  The "R" option would, again,  cause 
  175.             the  relative  sectors occupied by each directory and 
  176.             the number of entries removed to be displayed.  
  177.  
  178.