home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
waffle
/
allfil62.zip
/
ALLFILES.DOC
< prev
next >
Wrap
Text File
|
1993-04-06
|
16KB
|
389 lines
A L L F I L E S -- a utility for Waffle BBS 1.65 (MS-DOS)
Scan a Waffle 1.65 dirs file and associated directory information files,
creating a set of directory /info files and summary listings. Produce
extra information on some special file types (gif, jpg, bin).
This is a program that has been in the making for ages (at least from 1987),
that's why this first non-beta public release comes up as version 6.2.
However, the version I've used up 'till now for myself was very rigid and
only produced listings the way I wanted them, to reconfigure it you had to
recompile it (and it was a mess I didn't want anyone to see on the inside).
This new version is (hopefully) configurable to all your needs, and most of
this document will handle just *how* to configure this beast.
Some basic assumptions that are made in allfiles. Your file areas are
hierarchially ordered (for example you have all PC files under /download/pc,
all graphics under /download/graphics and so forth). Your /info files are
in a good order, with all files accounted for and no descriptions missing
(see the chkfiles program also written by me for help on getting them neatly
arranged). You only allow uploads to a directory of which no file listings
are required.
You should have FILES set in your config.sys to an appropriately large value
when using allfiles (the five DOS filehandles, dirs, summarys, rawinfo, info
and special files make a total of thirteen files open at the same time when
using the sample allfiles.cnf file).
QUICK INSTALL
-------------
Unzip the archive in a appropriate place (I use /waffle/allfiles).
Edit your Waffle dirs file (default location /waffle/system/dirs), adding
a /name label (with a possible symbolic name for the directory) to those
directories you want included in the summary listing.
Edit allfiles.cnf. You can remove the comment from the /noinfo line to
disable rawinfo/info rewriting. Check that the lines following the comment
"The file listings, one per line" agree with your directory setup.
Edit update.bat to reflect the same changes, and also make sure the other
values are appropriate to your directory structure.
If you did not enable /noinfo mode in the configuration file, in each of
your download directories, rename the @files file to @files.raw (allfiles
will create new @files files from these) *or* see below under "Rawinfo
files" on changing the name of the info files.
Copy update.bat to your path. Ready to fly!
INPUT FILES
-----------
First, there is the configuration file for the program (see the sample
allfiles.cnf provided with the package). As you will notice, the file
syntax is identical with the Waffle dirs file (no accident).
Second, there is the standard Waffle dirs file. Allfiles adds some special
fields to the file, which are ignored by Waffle.
Third (optional), there are the /rawinfo files (by default named @files.raw)
in each download directory.
OUTPUT FILES
------------
Output is done to several summary and the /info files (by default named
@files) simultaneously. There are as many summary files as you specify in
the configuration file, and one /info file per download directory.
Directories which have lines in the /rawinfo files will only be written
to the /info file, not the summary files. If /zeros is set, also zero-
length files will have descriptions written to the /info files.
CONFIGURATION FILE
------------------
Here are the settable parameters in the configuration file [defaults used
by allfiles if not given shown in brackets], see under "output conversions"
for explanation of the escape sequences used:
/dirs Where your Waffle dirs file is located
[/waffle/system/dirs]
/noinfo Disable the rawinfo/info rewriting mechanism [0]
/zeros Rewrite also zero length file's names [0]
/info The default info file name [@files]
/rawinfo The default raw info file name [@files.raw]
/infoformat Format for output to info files [%f\t%T\n]
/masterformat Format for output to summary files
[%-12f%6L%3d/%02m/%02y %T\n]
/plusformat Format for output of lines starting with plus in the
rawinfo files [ Size Updated %t\n]
/begin Summary listing beginning header, where
%t will give the listing /name
%f the listing /dir
time-related %'s will give the current time
[List of %t files on SomeBBS, Somewhere\n
%A, %2d %B %02y %H:%M\n]
/header Header used at the beginning of a new directory, if
no value for /name is given in the dirs file where
%f will give the current directory
[\n*** %f ***\n\n]
/nameheader Header used at the beginning of a new directory
if a /name is specified in dirs where
%f will give the current directory
%t will give the specified /name
[\n*** %f (%t) ***\n\n]
/footer Footer used at the end of a directory listing
%L and %l give space usage for this directory
%n will give number of files in this directory
[\nTotal %L in %n files\n]
/end Epilogue placed at the end of a summary listing, where
%L and %l give the total file space usage
%N will give the total number of directories
%n will give the total number of files
%t will give the listing /name
%f the /dir
[\nGrand total %L in %n files in %N directories\n
*** End of %t files listing ***\n]
/rom Allfiles should also scan /rom entries in the dirs
files; see below for the gory details of these
The following three parameters should appear on the same line, once per
each summary file wanted:
/list A file where a summary listing is output
/dir What subdirectories are placed in the listing (%f)
/name The name of the listing (%t)
A sample configuration file for producing a listing of the Simtel20 CD-ROM
is also included in the package (December'93 version, expect directory name
changes on the newer versions).
DIRS FILE
---------
Allfiles parses the basic Waffle dirs file for its own purposes, but it also
recognizes some extra fields which Waffle will ignore:
/name The name of the directory for human consumption;
even if you do not wish to give your directories names,
you must specify /name for all directories you want
listings generated from; thus, you would not place
/name on directories which only contain subdirectories
/ínfo Overrides the default /info set in the config file
/rawinfo Overrides the default /rawinfo set in the config file
/column File descriptions start from the specified column on
/skip Skip the specified amount of lines from the beginning
of the info/rawinfo file before starting to match files
/rom The directory is on CD-ROM (or other readonly device)
and will not be listed unless /rom is given in the
allfiles configuration file; in this case, allfiles
will *read* the info file directly without attempting
to create it
Here are some lines from my dirs file, specifying a few normal directories
on the hard disk, and then some CD-ROM directories (lines are wrapped for
ease of reading with \ -- I think Waffle doesn't support this):
1 /access=0 /name="Download Section, general information" \
/dir="c:/download" /free
5 /access=2 /name="Ye Olde Hacker's phonenumbers" \
/dir="c:/download/hackers"
- /access=2 /dir="c:/download/graphics" /hide
7 /access=2 /name="Graphics, GIF pictures" \
/dir="c:/download/graphics/gif"
8 /access=2 /name="Graphics, JPEG/JFIF pictures" \
/dir="c:/download/graphics/jpeg"
9 /access=2 /name="Graphics, X-rated animations" \
/dir="c:/download/graphics/x-anim"
101 /access=2 /hide /rom /name="Simtel20 CD-ROM, June 1992" \
/info="c:/download/@msdos" /dir="e:/msdos"
102 /access=2 /hide /rom /name /info=00_index.txt /column=33 \
/skip=4 /dir="e:/msdos/4dos"
103 /access=2 /hide /rom /name /info=00_index.txt /column=33 \
/skip=4 /dir="e:/msdos/abc"
RAWINFO FILES
-------------
By default, allfiles rewrites the rawinfo (by default named @files.raw)
files to the info files used by Waffle (default @files). At the simplest,
the original Waffle @files can be re-used as rawinfo files.
You have two alternatives for this. You can do
ren @files @files.raw
(if you are using the default filenames) in each directory on your system
for which you wish to generate a listing for.
The other alternative is to change the /info and /rawinfo parameters and
FILEINFO in the Waffle static file to have Waffle use generated files for
reading the info:
FILEINFO: @listing
and
/info="@listing" /rawinfo="@files"
(This will also allow you to edit @files, as you probably are used to do).
Verify that you do not override these settings in the dirs with /info.
The rawinfo file may contain wildcards as the first field. In this case one
line is created into the info file and the listings per matched filename and
an error is generated if no files match the wildcard. This is a nice way to
keep multi-part file listings' version info etc. always up to date, as the
%t strings are also interpreted for \ escapes. One should note that the
files are output into the listing in the order the MS-DOS pattern matcher
returns them, which is the same order they appear in the directory. I find
a directory sorting utility (like Norton's "ds") very useful.
Rawinfo may also contain lines starting with a plus '+' (which is illegal in
MS-DOS filenames). In this case, the special /plusformat output format is
used for that line to the summary files, but no output is produced to the
info file. I use this to produce subheaders with column titles.
Lines which start with whitespace (or are empty) are copied as-is to the
summary files, no output to the info file. This is useful for comments on
packages and file formats in general.
The following examples are produced with the default formats:
--the source @files.raw--
+TeleMate 3.10
tm310-?.zip TeleMate 3.10, part \7 of 3
TeleMate is a nice terminal program, I use it myself.
--generated @files--
tm310-1.zip TeleMate 3.10, part 1 of 3
tm310-2.zip TeleMate 3.10, part 2 of 3
tm310-3.zip TeleMate 3.10, part 3 of 3
--generated summary listing--
Size Updated TeleMate 3.10
tm310-1.zip 209k 12/08/92 TeleMate 3.10, part 1 of 3
tm310-2.zip 201k 12/08/92 TeleMate 3.10, part 2 of 3
tm310-3.zip 172k 12/08/92 TeleMate 3.10, part 3 of 3
TeleMate is a nice terminal program, I use it myself.
--
OUTPUT CONVERSIONS
------------------
The strings specified in the allfiles configuration file may contain special
output conversions. First of all, as in C, the character \ precedes certain
one-character escapes:
\a \b \f \n \r \t \v As in C: BEL, BS, FF, NL, CR, HT, VT
Notice that NL is translated to CR-LF on output
\1 \2 \3 \4 \5 \6 \7 \8 The 1st thru 8th character of the filename
handled or space if the filename is shorter
\x \y \z The 1st thru 3rd character of the extension
of the filename handled, or space if shorter
Note that these \-escapes are also interpreted in the file descriptions
in the rawinfo files, as opposed to the following % conversions.
The % conversions are reminiscent to the ones used in the strftime() function:
%a Abbreviated three-letter english weekday name
%A Full english weekday name
%b Abbreviated three-letter english month name
%B Full english month name
%d Day of month
%f Tail part of filename being handled (without directory)
%F Full filename being handled (with directory)
%H Hour in 24-hour clock
%I Hour in 12-hour clock
%L File length either in bytes or kilobytes; if file is longer
than 99999 bytes, the length is given in k's (with a trailing
'k' character), else output is bytes
%l File length in bytes
%M Minute
%m Month number
%N Number of directories matched in current summary
%n Amount of files matched in current directory
%p "am" or "pm" depending on hour
%S Second
%T File description preceded by extra info for special files
%t Basic file description text
%w Week day number, 0=Sunday
%Y Year with century
%y Year without century
The conversion character may also be preceded by digits specifying a minimum
field width, a leading zero specifying zero fill (for numeric fields) or a
hyphen '-' to specify right justification within the specified field width.
Special information of %T is given for the following file extensions:
bin MacBinary file is assumed, and the four-character creator
information is extracted from the header
gif The x and y dimensions and bitmap plane count is extracted
jpg The x and y dimensions and bitmap plane count (usually 24)
is extracted
Thus, the allfiles default format string "%-12f%6L%3d/%02m/%02y %T\n"
specifies the following conversions:
%-12f Twelve-character right-justified field of the tail filename
%6L Six-character file length in either bytes or kilobytes
%3d Three-character field of day of month
%02m Two-character zero-filled field of month
%02y Two-character zero-filled field of year without century
%T The file description, with special information
\n Output newline
To produce output similar to the normal Waffle master listing, one would
use the format "-12f%8l %02d-%b-%02y %t\n".
Here are some files (as shown by DIR without US settings), and the allfiles
information produced using the default format and the descriptions from a
/rawinfo file:
--DIR listing--
ALLFILES DOC 151613 08-16-92 1:21a
GLVIEWER BIN 88064 07-25-92 2:14a
JYBOX JPG 59682 11-02-91 4:59p
JRGN2910 ZIP 505474 07-25-92 2:14a
HAREMTIG GIF 91729 04-11-91 12:39a
--summary file--
allfiles.doc 149k 16/08/92 All BBS files
glviewer.bin 88064 25/07/92 SIT! GL animation file viewer for Macintosh
jybox.jpg 59682 2/11/91 554x829x24 Our mascot: the steel Venus
jrgn2910.zip 494k 25/07/92 Hacker's Dictionary 2.9.10 ESSENTIAL!
haremtig.gif 91729 11/04/91 496x528x8 'Toon Harem Tiger
--
UPDATE.BAT
----------
The update.bat batch file that accompanies this package is the frontend
I normally use to generate the file listings and their zipped versions.
Edit the parameters in the batch file to match your system settings.
Update is normally used without parameters, but it can take up to nine
parameters which will be evaluated after reading in the configuration file,
thus for example overriding the summary file starter in the config file.
update /begin:"\"List of %t files on MyBBS (at home)\n\""
or
update /begin:"'List of %t files on MyBBS (at home)\n'"
The colon has to be used instead of the usual equals sign '=' because of
command batch file parser syntax limitations, and the double quotes have
to be escaped or the MicroS*t C c0 argument parser will strip them. The
allfiles parser will also understand single apostrophes as quotes.
Unfortunately, this method suffers from the usual command batch parser
limitations and is not really usable (for example, to use it from another
batch file you need to double the percent signs). Some characters seem
to be impossible in batch file arguments, like commas and equal signs.
BUGS
----
/begin and /end can be BUFSIZ characters long, others only 80 characters.
The formats of the summary files should be controllable listing-by-listing.
The output should (optionally) be paged. Something should be done to @banner
files. I'd like to see an option in Waffle to not "log in" to directories,
and just use the /info files, as they are sure to be correct when produced
with this program. This would speed logging into a directory quite a lot,
specially on CD-ROM (where Waffle won't be able to rewrite @files, anyway).
A maximum of total 4 gigabytes of files in less than 4 billion files can be
handled (due to 32-bit word length).
Version 6.2 by Otto J. Makela (BBS V.32bis/HST +358 41 211 562)
Distributed under the GNU General Public Licence: see file COPYING for details
Otto J. Makela <otto@jyu.fi>
Kauppakatu 1 B 18
SF-40100 Jyvaskyla, Finland