BATCON 1.0 by Access Success
January 25, 1998


BATCON is a collection of DOS batch files and distributable
programs (freeware or shareware without "bundling" restrictions)
which form a simple and efficient interface for converting computer
files from one format to another.  The latest distribution archives
of these programs are provided, and registration is encouraged for
shareware one regularly uses in a conversion process (I am a
registered user of all of the included shareware).  The programs
were selected after extensive Internet and bulletin board searches,
identifying and comparing them with other programs of a similar
purpose.

Over the years, I've learned a lot about converting various file
formats to text that may be read with any document viewing
software, or edited with any word processor.  My home page on the
world wide web, Empowerment Zone (http://www.empowermentzone.com),
specializes in plain text collections on numerous
self help-oriented subjects, which may be read online or downloaded
using any web browser, and with alternative input or output
equipment operated by people with disabilities.  The vision is to
make empowering knowledge as freely available as possible.

This version of BATCON supports conversions to either text files or
ASCII documents from the following formats:  executable, HTML,
Norton Guide, rich text format, Word, WordPerfect, WordStar, and
Write.  In addition, Windows help files may be converted to Word or
rich text format (and subsequently to a text file or ASCII
document).  Any file format may be UU or MIME encoded for email
transmission, or compressed into a zip archive.  Almost any encoded
email format may be decoded (including UU, MIME, and BINHEX).  Most
file formats may be identified and the integrity of zip archives
may be tested.

The BATCON processes have been tested in DOS 6.2 and in a DOS box
under Windows 95.  They generally do not support long file names,
so one should assume a base name of up to 8 characters and an
extension of up to 3.  They are provided "as is," without any
assumption of liability for their results by Access Success. 
Feedback is welcome, as are suggested enhancements or additions to
the conversions presently provided.  The best way to do this is by
writing to Jamal Mazrui at the email address empower@smart.net

Thanks go to the following beta testers:  Don Barrett,
Geoff Chapman, and Steve Zielinski.

BATCON may be installed simply by placing all its executable and
configuration files (having .bat, .exe, and .ini extensions) in a
directory on the DOS search path.  The zip archives need not be in
this directory.  The BATCON executable files could be added to an
existing directory on the search path, e.g., a c:\batch or c:\util
directory.  Alternatively, they may be placed in a new directory
which is added to the path.  

Running the batch file install.bat creates a C:\BATCON directory
and a C:\BATCON\ARCHIVES subdirectory, then copies all
conversion-related files into the BATCON directory (.bat, .exe and
.ini file extensions) and all distribution archives (.zip file
extensions) into its ARCHIVES subdirectory.  If it is used, it
should be run after the batcon archive is uncompressed into an
empty directory, which may then be cleaned out after the
installation.

The BATCON interface is explained in the following points:
characteristics:

*    A BATCON conversion does not change the input file.

*    The screen is cleared at the beginning of a conversion.

*    The format of a file is designated by the extension part of
     its name, which may be from 1 to 3 characters.  This
     convention is also used by Windows to associate programs with
     documents of a certain type.

*    The following formats are presently defined:

     *    any = any format and extension

     *    asc = ASCII document, text consisting of characters in
          the first half of the ASCII sequence with carriage
          return/line feed codes at paragraph (but not line)
          breaks.  Other terms commonly used for this format
          include "generic word processor format" and "text
          document."  This format is useful for editing with any
          word processor.  Since it does not put a carriage
          return/line feed combination at the end of each line, the
          word processor can wrap the text according to its own
          margin settings.  The carriage return/line feed
          combination at the end of each paragraph preserves the
          paragraph structure of the document, including section
          headings which are treated like paragraphs.

     *    doc = Microsoft Word (almost any version except complex
          Word 97 documents)

     *    htm = Hyper Text Markup Language, the source code of
          web pages

     *    hlp = Windows help (Windows 3.1 format with hlp2doc.bat
          and both Windows 3.1 and 95 formats with hlp2rtf.bat,
          hlp2txt.bat, and hlp2asc.bat)

     *    mm = MIME encoded

     *    ng = Norton Guide

     *    rtf = rich text format

     *    tgz = a zipped tar archive, commonly found on Unix
          systems

     *    txt = plain text, consisting of characters in the first
          half of the ASCII sequence with carriage return/line feed
          codes at ends of lines, preferrably having a maximum line
          length of 80 characters--optimally one of 65--in a
          monospaced font.  This format is useful for reading text
          with any document viewing program.  A line length less
          than 80 characters is preferred so that entire lines fit
          on the screen without scrolling.  A line length of 65 is
          even better so that the document may be printed directly
          with one inch left and write margins using a 10 character
          per inch monospaced font a common default with
          word processors and printers).  For editing purposes, the
          .asc (ASCII document) format is more suitable.  

     *    web = text version of an HTML file including references
          to linked web pages

     *    wpd = Corel WordPerfect (almost any version)

     *    WRI = Microsoft Write

     *    WS = WordStar

     *    uu = UU encoded

     *    zip = an industry standard zip archive of one or more
          compressed files

*    A conversion process, executed by means of a batch file,
     produces an output file of specified type from an input file
     of specified type.  The name of the batch file consists of the
     extension of the input format, then the digit 2 (indicating
     the meaning "to"), followed by the output file extension, and
     then the .bat suffix.  For example, hlp2rtf.bat is the name of
     a batch file that will convert a file in Windows help format
     with a .hlp extension to an output file in rich text format
     with the same base name and a .rtf extension, e.g., 

     hlp2rtf tutorial

     would convert tutorial.hlp to tutorial.rtf

     Note that a file extension may be less than 3 characters.  For
     example, the command

     ng2txt manual

     would convert manual.ng in Norton Guide format to manual.txt
     in text format.

*    One may rename a file to an appropriate extension in order to
     facilitate its use as the input to a conversion.  For example,
     to determine what text strings are contained in a binary file
     assist.dll, try renaming it to assist.exe and running the
     command

     exe2txt assist

*    Invoking a conversion process with no parameters, or with the
     /h or /? parameters will display a help screen describing the
     purpose, input, and output of the batch file.

*    The first and usually only parameter is the input file. 
     Typically, it is supplied without an extension, and has the
     implied extension of the format at the beginning of the batch
     file.  The output file usually has the same name, except with
     the extension and format denoted by the direction of the batch
     file, e.g., 

     htm2asc article

     would convert the web page article.htm to the ASCII document
     article.asc

*    the any extension means that the base name plus extension
     should be specified and that the format may be one of various
     types.

*    The conversion will abort with an error message if the input
     file specified is not found.

*    If the input file is found, an anticipated output file will be
     deleted if it already exists.  An exception is the any2zip
     conversion which adds the input file to a zip archive that
     already exists.

*    If the input file is found, the conversion will be attempted
     using a particular program with appropriate parameters.

*    If necessary, a temporary file is created and piped as
     keyboard input to the conversion process in order to minimize
     the chance that manual user intervention will be required by
     the program.

*    The screen display of the program, while often unnecessary, is
     not redirected by the batch file, in case it provides specific
     information about problems encountered and solutions attempted
     during the conversion process.

*    The error level returned by the program is checked and
     reported if it is above zero.  A nonzero error level is a
     standard way that programs report an execution error.

*    A temporary file for piped keyboard input, batcon.tmp, is
     deleted if it exists.  A temporary batch file, batcon.bat, may
     also be used and then deleted.

*    Another BATCON naming convention begins with the test prefix,
     then the digit 4, (indicating the meaning "for"), followed by
     a format extension.  For example,

     test4zip messages

     will test the file named messages.zip and issue a report of
     its type on the screen. The command

     test4any filename.ext

     will test a file specified with any extension and try to
     identify its format type.

*    In addition to the input file parameter, two optional
     paramaters may be supplied to a conversion process.  For
     example,

     any2txt article /a

     would tell the any2txt process to produce output in the
     Windows ANSI character set rather than the default DOS ASCII
     set.  Using optional parameters requires knowledge of the
     particular program that the batch file invokes.

The following lists the programs distributed with BATCON, their
freeware or shareware status, the batch files that use them, and
where versions current as of this writing may be found on the
Internet (some I downloaded from bulletin board systems and could
not find an Internet location).

batcon.exe, freeware, used to aid other conversion programs in
any2txt.bat, any2asc.bat, any2uu.bat, any2mm.bat, and any2zip.bat,
http://www.empowermentzone.com/batcon10.zip

cnvtxtwp.exe, freeware, used in txt2wpd.bat

help2doc.exe, freeware, used in hlp2doc.bat (renamed from
hlp2doc.exe to help2doc.exe to eleminate conflicts when executing
the batch file),
ftp.web.ad.jp/pub3/Coast/msdos/fileutil/hlp2doc.zip

helpdeco.exe, freeware, used in hlp2rtf.bat and with VIEW in
hlp2txt.bat and hlp2asc.bat,
http://oak.oakland.edu/pub/simtelnet/win95/winhelp/helpdc21.zip

htmstrip.exe, shareware $50, used in htm2txt.bat, htm2web.bat, and
htm2asc.bat (reads configuration information from htmstrip.ini),
http://www.geocities.com/SiliconValley/Lakes/2414/htmst712.zip

ngp.exe, freeware, used in ng2txt.bat

pkzip.exe and pkunzip.exe, shareware $47, used in any2zip.bat
zip2any.bat, and test4zip.bat, ftp://ftp.pkware.com/pkz204g.exe

textcon.exe, shareware $25, used in txt2asc.bat,
http://oak.oakland.edu/pub/simtelnet/msdos/txtutl/textc173.zip

untgz.exe, freeware, used in tgz2any.bat,
http://oak.oakland.edu/pub/simtelnet/msdos/arcers/untgz095.zip

uudeview.exe and uuenview.exe, freeware, used in eml2any.bat,
any2uu.bat, and any2mm.bat,
http://www.uni-frankfurt.de/~fp/uudeview/Apps/frank/uudvd05d.zip

view.exe, shareware $25, used in any2txt.bat, any2asc.bat,
doc2txt.bat, doc2asc.bat, rtf2txt.bat, rtf2asc.bat, wpd2txt.bat,
wpd2asc.bat, wri2txt.bat, wri2asc.bat, ws2txt.bat, and ws2asc.bat,
http://www.nrcan.gc.ca/~mdrury/view134a.zip

whatis.exe, freeware, used in test4any.bat

xray.exe, freeware, used in exe2txt.bat,
http://oak.oakland.edu/pub/simtelnet/msdos/fileutil/xray105.zip
