home *** CD-ROM | disk | FTP | other *** search
- FMSFMT version 1.0 - An RBBS Utility
- by Ken Goosens. Dec 29, 1993
-
- Contents
- 0.0 Licensing
- 1.0 What is FMSFMT?
- 2.0 What's New?
- 3.0 How to Set up FMSFMT
- 4.0 Sample Applications
- 5.0 Recompiling
-
-
- 0.0 Licensing
-
- The author does not ask for any donation for use of FMSFMT.
- The rights to the code are exclusively retained by the author.
-
- Everyone is free to use FMSFMT without any cost. Everyone is
- free to distribute FMSFMT without cost, provided they charge nothing
- for FMSFMT. You cannot distribute FMSFMT with any shareware or
- commercial product without permission of the author. Modified
- versions of FMSFMT can be distributed only with permission of the
- author. Enhancements or fixes to the code are welcome. Anyone
- is free to write (and charge for) an improvement over FMSFMT in
- a language other than BASIC. For support, the author can be reached
- via the RBBS conference on RBBS-Net or on his Bulletin Board at
- 703-978-6360.
-
-
- 1.0 What is FMSFMT?
-
- FMSFMT is a utility to reformat File Management System (FMS) directories
- used by the Remote Bulletin Board System (RBBS-PC). It will perform
- the following kinds of reformatting, in any combination:
-
- o merge another directory into an existing FMS directory, provided
- the two are sorted the same way. Special cases of merges
- include
-
- (1) importing a whole new list of files added to an FMS, without
- any descriptions (e.g. results of a "dir" command redirected
- to a file)
-
- (2) merging another FMS directory with your own, based
- say on date (e.g. bought a CD-Rom of files to add to your
- BBS)
-
- o globally convert category codes
-
- o change the length of an FMS directory
-
- o correctly formating file names (e.g. change "GERMAN ZIP" to
- "GERMAN.ZIP") and dates (e.g. change "1/05/91" to "01-05-91"),
- and move the name, size, date, and description to the proper
- position, leaving room if any item is missing
-
- o add/substitute dates, category codes, and/or descriptions
-
- o combine extended descriptions to the file name/size/date so
- they can be sorted and then create an FMS directory with
- standard extended descriptions from the resorted file.
-
- o Add descriptions from ZIP files from the FILE_ID.DIZ. These
- are reformatted to fit into RBBS's format.
-
- FMSFMT should be distributed as FMSFMT10.ZIP and consists
- of the following files:
-
- FMSFMT.EXE executable program
- FMSFMT.BAS source code
- *.CFG sample configuration set ups for runs
- *.DIR sample BBS listings of files
- GETDIZ.BAT batch file needed to get DIZ descriptions
- FMSFMT.TEM Template configuration file with all options
-
- FMSFMT does not support directory chaining for the file merged into.
- You must separately merge into each chained part, which means you
- have to break your inputs into corresponding parts (e.g. if upload
- directory has 1993 on, chained part earlier files, you must break
- your input into a part for 1993 on, and earlier than 1993, merging
- into each separately).
-
- 2.0 What's New
-
- Nothing. This is the first release.
-
- 3.0 How to Set up FMSFMT
-
- FMSFMT operates differently from most PC programs in the program
- does not offer the user a simple menu of choices. FMSFMT is designed
- instead to run batch with little or not user intervention. On the
- command line, or in a file, you set up FMSFMT to do exactly what you
- want, then run the program. The configuration file of directions is
- self explanatory and use to set up using your favorite full screen
- text editor. It may take longer to get the program running the way
- you want the first time. But whenever you repeat the run, no
- additional work is required.
-
- To execute FMSFMT with configuration XYZ.CFG, invoke FMSFMT from
- the DOS prompt as
-
- FMSFMT XYZ.CFG
-
- Use your favorite full screen editor to set up a configuration for
- your application. A general configuration file is provided as
- FMSFMT.TEM.
-
- 4.0 Sample Applications
-
- ********************************************************************
- 4.1 Merge a date sorted non-FMS directory into a date sorted FMS
- directory.
-
- Configuration file: FFDATE.CFG.
-
- Input file: CDDATE.DIR. Has entries in proper place for file name,
- size, date,and description. But has no category code. Does have extended
- descriptions on lines after the first (multi-line descriptions). FMSFMT
- must essentially add category codes (default is UNC, but can be controlled
- by "/AddCat=") and reposition the extended descriptions so that they
- procede the entry (1st after goes to 1st above, 2nd after to 2nd above,
- etc.).
-
- Merges into file UPLOADS.DIR (controlled by "/MergeTo="). Produces
- MASTDATE.DIR (controlled by "/NewDir=").
-
- ************************************************************************
- 4.2 Convert "old" style RBBS directories into a master FMS directory.
-
- Configuration file: FFOLD.CFG.
-
- Input files: GAMES.DIR, PICS.DIR, UTILS.DIR. Each separate .DIR file
- is a category determined by the prefix (GAMES, PICS, UTILS). GAMES
- are to have category code GAM, PICS to have PIC, and UTILS to have UTL.
- Each .DIR is already sorted by date.
-
- The file to be created is MAST.DIR, with a 43 character description
- field, sorted by date.
-
- ***********************************************************************
- 4.3 Merge FMS descriptions for a CD Rom into a master FMS directory.
-
- While the CD Rom has a description in FMS format, the category
- codes do not match the ones you use, and the lengths of the
- description field are different.
-
- Configuration file: FFRBOX.CFG.
-
- The CD Rom directory is CDMASTER.DIR. Your old master FMS directory
- is UPLOADS.DIR. The new master FMS directory to create is
- MASTER.DIR.
-
- The problem with different category codes is handled by telling
- FMSFMT to convert the CD Rom category codes over to your own. This
- is controlled by "/ReplaceCat=".
-
- The total length of a line in CD Master is 79 characters (43 character
- description field). Your UPLOADS.DIR has as its length 76 (40 character
- description. You decide to go with the longer length so that no part
- of the description field will get truncated. You specify the length
- of the new directory to be 79 using parameter "/NewLen=".
-
- **********************************************
- 4.4 Converting Date Sorted to Name Sorted
-
- Your master FMS directory is sorted by name, so that the extended
- descriptions occur after the entry. You want to create a master
- list of downloadable files, only sorted by name, so that the callers
- can look in either directory.
-
- Solution: Break the processing into 3 parts. (1) Use FMSFMT to create
- an intermediate file with the extended descriptions on the same line as
- the name/size/description. (2) Then using QSORT (a free utility) to sort
- the file based on name. (3) Use FMSFMT to make a new master FMS from
- the resorted files, putting the extended descriptions back properly.
-
- Configuration file for step (1): FFCOMEXT.CFG.
-
- This takes as input MASTDATE.DIR. Note that there is no file to
- merge into in this process, so "/MergeTo=" is commented out by putting
- an "*" in front of the line. The key parameter to tell FMSFMT to
- combine the extended descriptions on one line with the name entry is
- "\CombineExtended". The output goes to MASTCOMB.DIR.
-
- Step (2): the command to sort MASTCOMB.DIR by the front characters, i.e.
- the name, to file SORTCOMB.DIR, is
-
- QSORT MASTCOMB.DIR SORTCOMB.DIR
-
- Configuration file for step (3): FFBSCOMB.CFG.
-
- This takes as input SORTCOMB.DIR and produces NAMES.DIR.
- To let RBBS-PC know that NAMES.DIR is an FMS directory, a header
- line with "\FMS NOSORT" has to be included at the top.
- This is specified with the "\Header=" option. To indicate how
- the output file is to be written out, include the parameter
- "/TargetSortedByName". Also, you must include "\StartIsFMS"
- so that FMSFMT knows to keep the category codes in the input.
-
- Note: all these steps can be put into a single batch file,
- say MAKNAMES.BAT, which has in it 3 lines:
-
- FMSFMT FFCOMEXT.CFG /BATCH
- QSORT MASTCOMB.DIR SORTCOMB.DIR
- FMSFMT FFBSCOMB.CFG /BATCH
-
- The "/BATCH" tells FMSFMT to run batch without prompting for
- confirmation, and then this process could be run in the RBBS
- daily event to create the NAMES.DIR.
-
- An alternative application where name sorted files are
- converted to a directory with the extended descriptions
- combined on a single line is in configuration file FFCE2.CFG
-
- *********************************************************
- 4.5 Add new batches of file names/size/date/category codes
-
- Suppose you get a bunch of new files, copying them over to your
- BBS and you want to add entries to your master FMS with everything
- but a description. A way to do this is to redirect the output of
- the "dir" command to a file, and use FMS to merge in the files.
- We will use the name and size, but want to override the date of
- the file with today's date, so we use "/AddDate= TODAY". The
- category code we will use for these files is "UTL", so we use
- "/AddCat= UTL". We will also put in a default description,
- so we use "/AddDesc= DOS utility", which we will later edit.
-
- Configuration file: FFDOSDIR.CFG.
-
- *********************************************************
- 4.6 Add new batches of file names/size/date/category codes
- using the description into ZIP files when they exist.
-
- Configuration file: FFDIZ.CFG.
-
- The input file is DOSDIZ.DIR, merged into UPLOADS.DIR, to create
- FMSDIZ.DIR. Note: if the DIZ description tries to create a pattern
- across lines, the pattern will be destroyed when the lines are
- reformatted to best file into extended descriptions. PKUNZIP.EXE
- must be present in the path for this option to work. And the
- ZIP files to be added must either be in the current directory
- or where "Directory of" specifies in the input file. Note: this
- option will not add in any DIZ unless the files listed happen
- to be where the file DOSDIZ.DIR specified. DOSDIZ.DIR was
- created by redirecting the dos "dir" command to the file, appending
- some from different directories.
-
- FMSFMT requires a file called GETDIZ.BAT to exist. This file
- should delete any previous FILE_ID.DIZ, then extract the
- FILE_ID.DIZ, and set the error level to 0 to counter any error
- that PKUNZIP.EXE encounters. The file to extract the DIZ from
- will be passed as the first parameter and therefore can be
- referred to in the BAT file as "%1". A sample GETDIZ.BAT is
- provided.
-
- Note: FMSFMT will accept at most 23 extended description lines.
- Note: you must have sufficent memory free for FMSFMT to be
- able to shell to PKUNZIP.EXE. I don't know how little free
- memory is needed, but 597K free works fine.
-
- 5.0 Recompiling
-
- FMSFMT is written in Basic for MicroSoft's Professional Basic 7.1,
- Except for the ON LOCAL ERROR..., it will compile under QuickBasic
- 4.5.
-
- For Professional Basic 7.1, the commands to recompile are:
-
- bc FMSfmt,FMSfmt /o/x;
- link FMSfmt,,,;
-