home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / 175b917u.zip / FMSFMT10.ZIP / FMSFMT.DOC < prev    next >
Text File  |  1993-12-29  |  11KB  |  272 lines

  1. FMSFMT version 1.0 - An RBBS Utility
  2. by Ken Goosens.  Dec 29, 1993
  3.  
  4. Contents
  5.     0.0  Licensing
  6.     1.0  What is FMSFMT?
  7.     2.0  What's New?
  8.     3.0  How to Set up FMSFMT
  9.     4.0  Sample Applications
  10.     5.0  Recompiling
  11.  
  12.  
  13.                       0.0  Licensing
  14.  
  15. The author does not ask for any donation for use of FMSFMT.
  16. The rights to the code are exclusively retained by the author.
  17.  
  18. Everyone is free to use FMSFMT without any cost.   Everyone is
  19. free to distribute FMSFMT without cost, provided they charge nothing
  20. for FMSFMT.  You cannot distribute FMSFMT with any shareware or
  21. commercial product without permission of the author.   Modified
  22. versions of FMSFMT can be distributed only with permission of the
  23. author.  Enhancements or fixes to the code are welcome.   Anyone
  24. is free to write (and charge for) an improvement over FMSFMT in
  25. a language other than BASIC.  For support, the author can be reached
  26. via the RBBS conference on RBBS-Net or on his Bulletin Board at
  27. 703-978-6360.
  28.  
  29.  
  30.                 1.0  What is FMSFMT?
  31.  
  32. FMSFMT is a utility to reformat File Management System (FMS) directories
  33. used by the Remote Bulletin Board System (RBBS-PC).   It will perform
  34. the following kinds of reformatting, in any combination:
  35.  
  36. o   merge another directory into an existing FMS directory, provided
  37.     the two are sorted the same way.   Special cases of merges
  38.     include
  39.  
  40.         (1)  importing a whole new list of files added to an FMS, without
  41.              any descriptions (e.g. results of a "dir" command redirected
  42.              to a file)
  43.  
  44.         (2)  merging another FMS directory with your own, based
  45.              say on date (e.g. bought a CD-Rom of files to add to your
  46.              BBS)
  47.  
  48. o   globally convert category codes
  49.  
  50. o   change the length of an FMS directory
  51.  
  52. o   correctly formating file names (e.g. change "GERMAN   ZIP" to
  53.     "GERMAN.ZIP") and dates (e.g. change "1/05/91" to "01-05-91"),
  54.     and move the name, size, date, and description to the proper
  55.     position, leaving room if any item is missing
  56.  
  57. o   add/substitute dates, category codes, and/or descriptions
  58.  
  59. o   combine extended descriptions to the file name/size/date so
  60.     they can be sorted and then create an FMS directory with
  61.     standard extended descriptions from the resorted file.
  62.  
  63. o   Add descriptions from ZIP files from the FILE_ID.DIZ.  These
  64.     are reformatted to fit into RBBS's format.
  65.  
  66. FMSFMT should be distributed as FMSFMT10.ZIP and consists
  67. of the following files:
  68.  
  69. FMSFMT.EXE    executable program
  70. FMSFMT.BAS    source code
  71. *.CFG         sample configuration set ups for runs
  72. *.DIR         sample BBS listings of files
  73. GETDIZ.BAT    batch file needed to get DIZ descriptions
  74. FMSFMT.TEM    Template configuration file with all options
  75.  
  76. FMSFMT does not support directory chaining for the file merged into.
  77. You must separately merge into each chained part, which means you
  78. have to break your inputs into corresponding parts (e.g. if upload
  79. directory has 1993 on, chained part earlier files, you must break
  80. your input into a part for 1993 on, and earlier than 1993, merging
  81. into each separately).
  82.  
  83.                    2.0  What's New
  84.  
  85. Nothing.  This is the first release.
  86.  
  87.                    3.0  How to Set up FMSFMT
  88.  
  89. FMSFMT operates differently from most PC programs in the program
  90. does not offer the user a simple menu of choices.  FMSFMT is designed
  91. instead to run batch with little or not user intervention.   On the
  92. command line, or in a file, you set up FMSFMT to do exactly what you
  93. want, then run the program.   The configuration file of directions is
  94. self explanatory and use to set up using your favorite full screen
  95. text editor.   It may take longer to get the program running the way
  96. you want the first time.   But whenever you repeat the run, no
  97. additional work is required.
  98.  
  99. To execute FMSFMT with configuration XYZ.CFG, invoke FMSFMT from
  100. the DOS prompt as
  101.  
  102.                  FMSFMT XYZ.CFG
  103.  
  104. Use your favorite full screen editor to set up a configuration for
  105. your application.  A general configuration file is provided as
  106. FMSFMT.TEM.
  107.  
  108.                      4.0  Sample Applications
  109.  
  110. ********************************************************************
  111. 4.1  Merge a date sorted non-FMS directory into a date sorted FMS
  112.      directory.
  113.  
  114. Configuration file:  FFDATE.CFG.
  115.  
  116. Input file:  CDDATE.DIR.  Has entries in proper place for file name,
  117. size, date,and description.  But has no category code.  Does have extended
  118. descriptions on lines after the first (multi-line descriptions).  FMSFMT
  119. must essentially add category codes (default is UNC, but can be controlled
  120. by "/AddCat=") and reposition the extended descriptions so that they
  121. procede the entry (1st after goes to 1st above, 2nd after to 2nd above,
  122. etc.).
  123.  
  124. Merges into file UPLOADS.DIR (controlled by "/MergeTo=").  Produces
  125. MASTDATE.DIR (controlled by "/NewDir=").
  126.  
  127. ************************************************************************
  128. 4.2  Convert "old" style RBBS directories into a master FMS directory.
  129.  
  130. Configuration file:  FFOLD.CFG.
  131.  
  132. Input files:  GAMES.DIR, PICS.DIR, UTILS.DIR.   Each separate .DIR file
  133. is a category determined by the prefix (GAMES, PICS, UTILS).   GAMES
  134. are to have category code GAM, PICS to have PIC, and UTILS to have UTL.
  135. Each .DIR is already sorted by date.
  136.  
  137. The file to be created is MAST.DIR, with a 43 character description
  138. field, sorted by date.
  139.  
  140. ***********************************************************************
  141. 4.3  Merge FMS descriptions for a CD Rom into a master FMS directory.
  142.  
  143. While the CD Rom has a description in FMS format, the category
  144. codes do not match the ones you use, and the lengths of the
  145. description field are different.
  146.  
  147. Configuration file:  FFRBOX.CFG.
  148.  
  149. The CD Rom directory is CDMASTER.DIR.  Your old master FMS directory
  150. is UPLOADS.DIR.  The new master FMS directory to create is
  151. MASTER.DIR.
  152.  
  153. The problem with different category codes is handled by telling
  154. FMSFMT to convert the CD Rom category codes over to your own.  This
  155. is controlled by "/ReplaceCat=".
  156.  
  157. The total length of a line in CD Master is 79 characters (43 character
  158. description field).  Your UPLOADS.DIR has as its length 76 (40 character
  159. description.  You decide to go with the longer length so that no part
  160. of the description field will get truncated.  You specify the length
  161. of the new directory to be 79 using parameter "/NewLen=".
  162.  
  163. **********************************************
  164. 4.4  Converting Date Sorted to Name Sorted
  165.  
  166. Your master FMS directory is sorted by name, so that the extended
  167. descriptions occur after the entry.   You want to create a master
  168. list of downloadable files, only sorted by name, so that the callers
  169. can look in either directory.
  170.  
  171. Solution:  Break the processing into 3 parts.  (1) Use FMSFMT to create
  172. an intermediate file with the extended descriptions on the same line as
  173. the name/size/description.  (2) Then using QSORT (a free utility) to sort
  174. the file based on name.  (3) Use FMSFMT to make a new master FMS from
  175. the resorted files, putting the extended descriptions back properly.
  176.  
  177. Configuration file for step (1):  FFCOMEXT.CFG.
  178.  
  179. This takes as input MASTDATE.DIR.  Note that there is no file to
  180. merge into in this process, so "/MergeTo=" is commented out by putting
  181. an "*" in front of the line.   The key parameter to tell FMSFMT to 
  182. combine the extended descriptions on one line with the name entry is
  183. "\CombineExtended".   The output goes to MASTCOMB.DIR.
  184.  
  185. Step (2):  the command to sort MASTCOMB.DIR by the front characters, i.e.
  186. the name, to file SORTCOMB.DIR, is
  187.  
  188.      QSORT MASTCOMB.DIR SORTCOMB.DIR
  189.  
  190. Configuration file for step (3):  FFBSCOMB.CFG.
  191.  
  192. This takes as input SORTCOMB.DIR and produces NAMES.DIR.
  193. To let RBBS-PC know that NAMES.DIR is an FMS directory, a header
  194. line with "\FMS NOSORT" has to be included at the top.
  195. This is specified with the "\Header=" option.  To indicate how
  196. the output file is to be written out, include the parameter
  197. "/TargetSortedByName".   Also, you must include "\StartIsFMS"
  198. so that FMSFMT knows to keep the category codes in the input.
  199.  
  200. Note: all these steps can be put into a single batch file,
  201. say MAKNAMES.BAT, which has in it 3 lines:
  202.  
  203.      FMSFMT FFCOMEXT.CFG /BATCH
  204.      QSORT MASTCOMB.DIR SORTCOMB.DIR
  205.      FMSFMT FFBSCOMB.CFG /BATCH
  206.  
  207. The "/BATCH" tells FMSFMT to run batch without prompting for
  208. confirmation, and then this process could be run in the RBBS
  209. daily event to create the NAMES.DIR.
  210.  
  211. An alternative application where name sorted files are
  212. converted to a directory with the extended descriptions
  213. combined on a single line is in configuration file FFCE2.CFG
  214.  
  215. *********************************************************
  216. 4.5  Add new batches of file names/size/date/category codes
  217.  
  218. Suppose you get a bunch of new files, copying them over to your
  219. BBS and you want to add entries to your master FMS with everything
  220. but a description.  A way to do this is to redirect the output of
  221. the "dir" command to a file, and use FMS to merge in the files.
  222. We will use the name and size, but want to override the date of
  223. the file with today's date, so we use "/AddDate=  TODAY".  The
  224. category code we will use for these files is "UTL", so we use
  225. "/AddCat=     UTL".   We will also put in a default description,
  226. so we use "/AddDesc=    DOS utility", which we will later edit.
  227.  
  228. Configuration file:  FFDOSDIR.CFG.
  229.  
  230. *********************************************************
  231. 4.6  Add new batches of file names/size/date/category codes
  232.      using the description into ZIP files when they exist.
  233.  
  234. Configuration file:  FFDIZ.CFG.
  235.  
  236. The input file is DOSDIZ.DIR, merged into UPLOADS.DIR, to create
  237. FMSDIZ.DIR.  Note: if the DIZ description tries to create a pattern
  238. across lines, the pattern will be destroyed when the lines are
  239. reformatted to best file into extended descriptions.  PKUNZIP.EXE
  240. must be present in the path for this option to work.   And the
  241. ZIP files to be added must either be in the current directory
  242. or where "Directory of" specifies in the input file.  Note:  this
  243. option will not add in any DIZ unless the files listed happen
  244. to be where the file DOSDIZ.DIR specified.  DOSDIZ.DIR was
  245. created by redirecting the dos "dir" command to the file, appending
  246. some from different directories.
  247.  
  248. FMSFMT requires a file called GETDIZ.BAT to exist.   This file
  249. should delete any previous FILE_ID.DIZ, then extract the
  250. FILE_ID.DIZ, and set the error level to 0 to counter any error
  251. that PKUNZIP.EXE encounters.  The file to extract the DIZ from
  252. will be passed as the first parameter and therefore can be
  253. referred to in the BAT file as "%1".  A sample GETDIZ.BAT is 
  254. provided.
  255.  
  256. Note:  FMSFMT will accept at most 23 extended description lines.
  257. Note:  you must have sufficent memory free for FMSFMT to be
  258. able to shell to PKUNZIP.EXE.  I don't know how little free
  259. memory is needed, but 597K free works fine.
  260.  
  261.                       5.0  Recompiling
  262.  
  263. FMSFMT is written in Basic for MicroSoft's Professional Basic 7.1,
  264. Except for the ON LOCAL ERROR..., it will compile under QuickBasic
  265. 4.5.
  266.  
  267. For Professional Basic 7.1, the commands to recompile are:
  268.  
  269. bc FMSfmt,FMSfmt /o/x;
  270. link FMSfmt,,,;
  271.  
  272.