
                                  DSTRAUTIL.EXE
                 DarkStar Technologies Remote Access Utilities

                     Copyright 1994, DarkStar Technologies

                                   Version 1.X


Introduction
=-=-=-=-=-=-

        DSTRAUTL is a collection of functions that I find useful to help me
maintain my BBS.  I run Remote Access Version 2, and like the program in the
overall sense.  However, some of the sysop programs could definitely use some
more features.  For example, I have 10 CD-ROM's that I rotate on and off my
BBS ( I'm still working on the 10 CD players for them :-) ), however RA has no
way of tagging large numbers ( or whole file area's ) as off-line.  This is
where DSTRAUTL comes in.  By using the FSET feature you can flag entire file
area's as off-line.  For example, on my system file area's 200-219 are one CD,
and area's 230-239 is another.  By simply issuing two commands ( and changing
the CD of course ) RA will list the files that are on-line as on-line and
those which are off-line as missing.  In the above example the two commands
would be ( assuming that area 200 - 219 are currently on-line ):

                        DSTRAUTL FSET MISSING ON 200 219
                        DSTRAUTL FSET MISSING OFF 230 239

        This has the big advantage of keeping all of the CD's in the file list
all of the time ( so RA can do an upload check for duplicates, or generate file
lists from them ).

        The above example would take you forever to do by hand, but is quickly
accomplished by DSTRAUTL.

Registering
=-=-=-=-=-=

        Please see the register.txt for more information.

Legal Stuff
=-=-=-=-=-=

        Please see the legal.txt for more information.

Getting Help
=-=-=-=-=-=-

        The next two sections are command summaries.  The second is what I used
each function for when I orginally wrote it.  If you know what you need then
you can pretty much skip this section.

        The first summary is exactly the same as the command line help.  This
gives a basic overview of what the function does and all of the command
options.

Commands
=-=-=-=-

Ŀ
 Command: FCOPY 

  Desc.: Useful for setting up groups of file areas that all have similar
         properties, like security level, flags and paths.  By setting up a
         single area first you can then copy it to as many others as you like.

  Usage: DSTRAUTL FCOPY <source> <range_start> [<range_end>]

              <source> is the file area to copy
         <range_start> is the area number you wish to be the first copied to
           <range_end> is the last area number you wish to be copied to.

Example: DSTRAUTL FCOPY 75 76 85

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: MCOPY 

  Desc.: Useful for setting up groups of message areas that all have similar
         properties, like security level and flags.  By setting up a single
         area first you can then copy it to as many others as you like.

  Usage: DSTRAUTL MCOPY <source> <range_start> [<range_end>]

              <source> is the message area to copy.
         <range_start> is the area number you wish to be the first copied to.
           <range_end> is the last area number you wish to be copied to.

Example: DSTRAUTL MCOPY 75 76 85

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: FMOVE 

  Desc.: An easier way to move file areas around.

  Usage: DSTRAUTL FMOVE <source> <destination>

              <source> is the file area to move.
         <destination> is the area number you wish to move it to.

Example: DSTRAUTL FMOVE 75 76

   Note: This function copies over any area that already exists
         in the destination.

Ŀ
 Command: MMOVE 

  Desc.: An easier way to move message areas around.

  Usage: DSTRAUTL MMOVE <source> <destination>

              <source> is the message area to move.
         <destination> is the area number you wish to move it to.

Example: DSTRAUTL MMOVE 75 76

   Note: This function copies over any area that already exists
         in the destination.

Ŀ
 Command: FSET 

  Desc.: This allows you to set the file flags on all files in a given file
         area(s).  This is useful for CD-ROM areas when you wish to change the
         CD that is currently on-line.  You can first set the current CD areas
         to have the MISSING flag ON, then set the new CD areas with MISSING
         flag OFF.

  Usage: DSTRAUTL FSET <flag> <state> <range_start> [<range_end>]

                <flag> is one of the following: DELETED, UNLISTED, FREE,
                       LOCKED, NOTAVAIL, MISSING, NOTIME.
               <state> is either ON or OFF.
         <range_start> is the first area number you wish to have changed.
           <range_end> is the last area number you wish to have changed.

Example: DSTRAUTL FSET MISSING OFF 85 93

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: FJUSTIFY 

  Desc.: Just one of those things I had a use for, it justifies the desc.
         of a file area to a given length and position.

  Usage: DSTRAUTL FJUSTIFY <type> [<length>] [<range_start>] [<range_end>]

                <type> - Type of justification, one of the following:
                         LEFT, RIGHT, CENTER.
              <length> - how many characters to pad the title.
         <range_start> is the first area number you wish to have changed.
           <range_end> is the last area number you wish to have changed.

Example: DSTRAUTL FJUSTIFY RIGHT 30 75 83

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: MJUSTIFY 

  Desc.: Just one of those things I had a use for, it justifies the desc.
         of a message area to a given length and position.

  Usage: DSTRAUTL MJUSTIFY <type> [<length>] [<range_start>] [<range_end>]

                <type> - Type of justification, one of the following:
                         LEFT, RIGHT, CENTER.
              <length> - how many characters to pad the title.
         <range_start> is the first area number you wish to have changed.
           <range_end> is the last area number you wish to have changed.

Example: DSTRAUTL MJUSTIFY RIGHT 30 75 83

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: FIMPORT 

  Desc.: Adds file areas to RA from a list in a text file.

  Usage: DSTRAUTL FIMPORT <file> <source> <destination> [<add dir name>]
                <file> the file to read the list of areas to import from.
              <source> the source area to use as a template.
         <destination> the first area to place the imported areas to.
        <add dir name> YES or NO, whether to place the area name at the
                       end of the file path.

Example: DSTRAUTL FIMPORT F:\FILES\TEST.LST 250 250

Ŀ
 Command: MIMPORT 

  Desc.: Adds message areas to RA from a list in a text file.

  Usage: DSTRAUTL MIMPORT <file> <source> <destination>
                <file> the file to read the list of areas to import from.
              <source> the source area to use as a template.
         <destination> the first area to place the imported areas to.

Example: DSTRAUTL MIMPORT F:\FILES\FIDONET.NA 250 250

Ŀ
 Command: MDELETE 

  Desc.: Deletes message areas in a given list.

  Usage: DSTRAUTL MDELETE <file> [<offset>]
           <file> the list of areas.
         <offset> where in the RA message base name to start the compare.

Example: DSTRAUTL MEDELETE FIDONONE.NO

Ŀ
 Command: MCOMPRESS 

  Desc.: Removes spaces from message areas list in a given range

  Usage: DSTRAUTL MCOMPRESS [<range_start> [<range_end>]]
         <range_start> first area.
           <range_end> last area.

Example: DSTRAUTL MCOMPRESS
Example: DSTRAUTL MCOMPRESS 150 500

Ŀ
 Command: GIF 

  Desc.: Reads the resolution and number of colors ( optionally the
         comment as well ) from a GIF and adds it to RA's file database.

  Usage: DSTRAUTL GIF <range_start> [<range_end>] [<comments>] [<new>]
         <range_start> is the first area number you wish to have updated.
           <range_end> is the last area number you wish to have updated.
             <comment> is either YES or NO
                 <new> whether to do only new descriptions or replace all
                       descriptions ( defaults to all ). Choices: ALL NEW.

Example: DSTRAUTL GIF 75 83 NO

   Note: if <range_start> is specified but <range_end> is not, the <source> is
         copied only to the area specified in <range_start>.

Ŀ
 Command: LOG 

  Desc.: Searches a path for all RA.LOG files and then trims them down to
         the specified size.

  Usage: DSTRAUTL LOG <size> [<path>]
         <size> size in bytes you wish the log to be.
         <path> is the path to start the search on.

Example: DSTRAUTL LOG 35 F:\RA

   Note: If given a path, the program will search all subdirectories in this
         path, but nothing above it.

Ŀ
 Command: FIXONLINE 

  Desc.: Replaces the description in the USERON.BBS file for a door that is
         run with a user defined description.

  Usage: DSTRAUTL FIXONLINE <node> <program>

            <node> which node should be changed.
         <program> the name of the program.

Example: DSTRAUTL 1 OOII

Ŀ
 Command: ARCCOMMENT 

  Desc.: Searches a directory and all subdirectories for any archive files
         and replaces the comments in them with a new one.

  Usage: DSTRAUTL ARCCOMMENT <file> [<path>]

         <file> the new comment file.
         <path> the starting path.

Example: DSTRAUTL ARCCOMMENT THMBBS.ASC F:\FILES

Ŀ
 Command: DUPESEARCH 

  Desc.: Searches RA's file bases for duplicate uploads after the file
         has been accepted.

  Usage: DSTRAUTL DUPESEARCH <file> [<delete>]

           <file> the file to check for duplicates this can also be a
                  a wild card match, such that all files in a given
                  directory can be checked.
         <delete> if DELETE is passed the file will be deleted.

Example: DSTRAUTL DUPESEARCH F:\FILES\TEST.ZIP
         DSTRAUTL DUPESEARCH F:\FILES\*.* DELETE

Ŀ
 Command: AREASBBS 

  Desc.: Generates a AREAS.BBS for FastEcho 1.4.

  Usage: DSTRAUTL AREASBBS <range_start> <range_end> <aka address> [<start>]

         <range_start> the first RA message base to export.
           <range_end> the last RA message base to export.
         <aka address> the network address for the hub.
               <start> starts at the nth character for the message base name.

Example: DSTRAUTL AREASBBS 150 250 1:250/9999 5

Ŀ
 Command: TIC 

  Desc.: Imports a file from a Fidonet TIC file.

  Usage: DSTRAUTL TIC

Example: DSTRAUTL TIC


Personal Command Summary
=-=-=-=-=-=-=-=-=-=-=-=-

Ŀ
 Command: FCOPY 

        I used this function when I set up the CD ROM area's on my BBS, since
I had almost 200 area's to set up, setting the security and other flags for each
area seemed like a lot of wasted time and effort.  With this command you can
simply set up one area in raconfig and then let DSTRAUTL copy it as many
times as needed.  You then only need to go through and edit the file base name
and directory.

Ŀ
 Command: MCOPY 

        I haven't actually used this command yet, I suspect I will be in the
near future when my fidonet feed comes in and I have to set up all the areas.
It was added because I was bored and figured that if I had an FCOPY I should
have a MCOPY as well.

Ŀ
 Command: FMOVE 

        I use this command when I need to move area's around.  Quite useful.

Ŀ
 Command: MMOVE 

        Like MCOPY, it was added simply because.

Ŀ
 Command: FSET 

        An ever so convenient options, I use this for taking CD's on and
        off-line. ( see intro. )

Ŀ
 Command: FJUSTIFY 

        One of the things that I like to have in my menu text files is a box
        around the current file area name.  However, since the file area names
        are different lengths, it's impossible to set up right.  This solves the
        problem by padding the file base name with spaces.

Ŀ
 Command: MJUSTIFY 

        Like MCOPY, it was added simply because.

Ŀ
 Command: GIF 

        This was added so that new files that were uploaded would have the
        resolution added to the file database, as well I had a CD that did not
        come with a files.bbs.

Ŀ
 Command: LOG 

        I hate having log files get out of hand, this will search all sub
        directories for RA.LOG ( I have a both a standard node as well as a
        local node that generate a log file as well as the utilities which
        generate an ra.log in the standard ra path ) and trim them down to a
        reasonable size.

Ŀ
 Command: FIXONLINE 

        The companion program to this is a program for windows that gives
        you the status of each node.  In RA with a type 7 exit you can tell
        RA what to place in the description field of the useron.bbs file,
        however, there is a 10 character limit to this.  In 10 characters you
        can't say diddle.  This allows you to place up to 108 characters here.
        Note that this is unsupported by RA, I have tried it with versions
        2.00 - 2.02, however, I do not guarantee that it will work with any
        other version, use it at your own risk.

Ŀ
 Command: ARCCOMMENT 

        When my BBS went from 1 line to 2 lines I had a problem, all of the
        comments in the archives on the board referred to only one node.  This
        simply replaces any existing comments with a new one.

Ŀ
 Command: DUPESEARCH 

        OK, so I found a bug in RA.  My board has 6+gig of files listed, which
        bog down even the new File Database system in RA when searching for
        duplicates.  This normally isn't a problem, until someone tries to
        upload a file.  For example, if they upload with Zmodem RA starts the
        transfer and receives the first file name.  It then starts the
        duplicate search.  However before it finishes Zmodem has timed out on
        the user's end.  This lets you do the duplicate search after the file
        has been uploaded, while the virus scan is taking place.  By adding this
        to a .bat file that is called when a virus scan is executed.  For
        example:

                -= Start of Bat File =-

                F:
                CD\RA
                DSTRAUTL FIXONLINE %3 THDPRO
                DSTRAUTL DUPESEARCH %1
                IF ERRORLEVEL 15 GOTO END

                CD\RA\UTILITY\THDPRO
                THDPRO %1 %2

                :END
                F:
                CD\RA\NODE%3

                -= End of Bat file =-

        The first two lines simply get us to the right area to run DSTRAUTL
        from.  The first call to DSTRAUTL fixes the on-line description for us.
        The second call checks for duplicates.  The errorlevel is set to 15 if
        a duplicate was found, and our bat file will jump to the end.
        Otherwise the bat file calls THDPRO ( the BEST file scanner I've found )
        and everything else progresses normally.

        There is one other thing you should do if you are going to use this
        system.  CHANGE THE LANGUAGE FILES so that the user doesn't think they
        have a virus on there system.

        There is also another purpose to this function, it can be used when
        a sysop is about to add files to the system himself.  By calling it
        with the form DSTRAUTL DUPESEARCH C:\TEMP\*.* DELETE it will check
        all files in c:\temp and delete all duplicates it finds in c:\temp.
        This makes life easy when you are unsure if the files already exist
        on your system or not.

Ŀ
 Command: AREASBBS 

        This function was used when I added the fidonet areas to FastEcho,
        the mail tosser I use.  By exporting the existing areas from FastEcho
        in an areas.bbs file and then creating another areas.bbs with
        DSTRAUTL, I used a text editor and appended all the fidonet areas.

Ŀ
 Command: TIC 

        This function is a TIC processor for RA, the problem I have with
        existing ones are many, none seem to do what I want.  Likewise they
        tend to shell out to use RAFILE to add descriptions.  The only time
        that this function shells out is if you have told it to do an upload
        check.  Likewise, all of the options can be setup for individual areas
        and a default setup for all.  When it adds a file, it can use several
        different options.  These include AREA name or a defined string.

        For more info, please see the section on the DSTRATIC.INI file.


DSTRAUTL.INI File
=-=-=-=-=-=-=-=-=

        There are several bits of information that DSTRAUTL needs to use on a
regular basis, these are stored in a file called DSTRAUTL.INI.  Listed here
are what each setting does.  They can be changed with any text editor.

[Defaults]
SharedFileTimeOut=60            Determines how long DSTRAUTL tries to open a file
                                if set to 0, DSTRAUTL tries forever.  This is
                                really only used when SHARE.EXE is loaded and
                                you have two tasks wanting access to the same
                                file.
TempDirectory=c:\temp           This is where DSTRAUTL uses as a temp storage
                                area, currently no files are placed here by
                                DSTRAUTL.
RAPath=F:\RA                    The path to RA, if the environment variable is
                                not set, or the config.ra is not in the
                                current directory, this path is used.

[CommentFiles]
1=file_id.diz                   This is a list of all files that should be
2=*.sdi                         searched for when added comments to the RA
                                file base.  They will be searched for in order
                                and once one is found, the search will end.

[FixOnlineDescription]                  A list of all the programs that you
OOII=playing Operation Overkill II      will be using and their description.
DEP=in the deposit door
OLMS=in OLMS Mail Door
THDPRO=finished upload and now THDPRO is running

[Archivers]                     This is a list of all the currently available
1=PkZip                         archivers on your system.  Note that they should
2=Arj                           be listed in order or most commonly used.  This
3=Lharc                         will speed up the search when trying to identify
4=PkArc                         a specific archive type.

[PkZip]                         The archiver specific information that is needed
Compress=pkzip ^d ^s -ex        to perform the operations.  They are as follows:
Uncompress=pkunzip ^s ^d
Comment=pkzip ^d -z < ^s > NUL          Compress - line used to compress files
AS1=80                                             into an archive. Where ^d is
AS2=75                                             replaced with the archive
AS3=-1                                             name and ^s is replaced with
AS4=-1                                             the filename to add to the
                                                   archive.
[PkArc]
Compress=pkarc a ^s ^d                  Uncompress - line used to decompress
Uncompress=pkxarc ^s ^d                              files from an archive.
AS1=26                                               Where ^s is the archive
AS2=8                                                file, ^d is the file to
AS3=-1                                               extract.  ^s & ^d are
AS4=-1                                               replaced by DSTRAUTL.

[Arj]                                   Comment - If the archiver supports
Compress=arj a ^d ^s                              comments then add this line,
Uncompress=arj x ^s ^d                            if not leave it out.  ^d is
Comment=arj c ^d -z^s > NUL                       replaced by the archive name
AS1=96                                            and ^s is the comment file.
AS2=234
AS3=-1                                  AS1 -> AS4 - are the autosense
AS4=-1                                               characters used to
                                                     determine what kind of
[Lharc]                                              archive we are dealing with
Compress=lha a ^d ^s                                 these are the first four
Uncompress=lha x ^s ^d\                              characters of the archive.
AS1=34                                               If a -1 is placed in one
AS2=-1                                               of these, that character
AS3=45                                               is skipped.
AS4=108

[DuplicateExcludeList]          This is a list of area's that the duplicate
99=YES                          search command will not scan, useful for
                                excluding the upload area.  This list should
                                be in the form excluded_area=YES

        The autosense characters should never have to be modified.  However
they can be easily obtained by taking several archives from the desired archiver
and, using a disk editor, looking for a pattern in the first four characters.

DSTRATIC.INI File
=-=-=-=-=-=-=-=-=

        This file holds all the options for the TIC command, the format of the
file is as follows:

[Options]
LogState=0                                      1=On, 0=Off
IncomingDir=F:\FD\IN                            Where to find TIC files

[R12LIST]                                       Options for Echo area R12LIST
RAArea=55

[Default]                                       Default options for an area
RAArea=185                                      RA file area to put the files
UploaderName=FIDO-%s                            What name should be placed in
                                                the uploaded by field
DupeSearch=FALSE                                Do a Duplicate search, very slow
UseExcludeList=FALSE                            Use the exclude list in
                                                DSTRAUTL.INI
WhatToDoWithDupes=0                             What to do if a duplicate is
                                                found   0 - delete
                                                        1 - delete tic only
                                                        2 - move to dupe dir
                                                        3 - skip
DupeDirectory=F:\FILES\DUPES                    Where to put dupes if so
                                                desired can either be a path
                                                or a RA file area number.
AddFileToDataBase=TRUE                          Add the file and desc to RA's
                                                file database
FileAttributes=                                 Set File attributes when added
                                                the FDB, can be blank or
                                                have any of the following
                                                keywords on a line:
                                                        DELETED
                                                        UNLISTED
                                                        FREE
                                                        NOTAVAILABLE
                                                        LOCKED
                                                        MISSING
                                                        NOTIME
Cost=                                           set the cost of the file in the
                                                File data base.
PassWord=                                       set the password in the file
                                                data base
KeyWord1=                                       Sets the keywords in the
KeyWord2=                                       file data base
KeyWord3=
KeyWord4=
KeyWord5=
FindAndUseDescInArchive=TRUE                    Search the file for file_id.diz
                                                etc. and use them?  The files
                                                that are searched for are
                                                listed in the [CommentFiles]
                                                section of DSTRAUTL.INI
TouchIncoming=TRUE                              Update the file date to current
DeleteTIC=TRUE                                  Delete the TIC afterwards
DeleteIncoming=TRUE                             Delete the file from IncomingDir
CheckCRCValueInTIC=FALSE                        Check the CRC value in the TIC
WhatToDoWithBadCRCs=0                           what to do if a bad CRC value is
                                                found   0 - delete
                                                        1 - delete tic only
                                                        2 - move to bad crc dir
                                                        3 - skip
BadCRCDirectory=F:\FILES\BADCRCS                where to put bad crc files if so
                                                desired can either be a path
                                                or a RA file area number.
RunUploadProcessor=TRUE                         Run the upload processor
UploadPrecessorCommandString=THDPRO %s 0        Upload processor command line
AllowReplacesCommand=TRUE                       Allow the replace command in
                                                incoming tics, if so, dstrautl
                                                will search for duplicates and
                                                flag them for deletion.
ReplacesAreas=191 185                           Allows you to limit where
                                                dstrautl searches for duplicates
                                                adding ALL will let dstrautl
                                                search all areas it finds in
                                                files.ra.

        The [Default] section holds the defaults for all areas, you can override
these defaults by setting up an area individually, for example, above R12LIST
has the same options as [Default] except files go to file area 55.

        When a %s is encountered in the UploaderName, the file area name from
the TIC file ( the file echo name ) is placed there for the uploader.  For
example:
                UploaderName=%s

        would give R12LIST as the uploader if the file came from R12LIST.  You
could also do this:

                UploaderName=FIDO-%s

        would give FIDO-R12LIST as the uploader in the above example.

        Note that if an area doesn't exist as a group then the defaults from
the default area are used, which means you only have to specify the
areas that you want to be different from the defaults.
