Documentation for the WIN9X/NT "almost filters" and utilities

Bingrep  | a grep (text search) for binary files.
Ffeed    | reads a filespec and sends files to standard output.
Grabasc  | a tsr ascii text screen capture utility.
Hexval   | create character arrays from binary files.
Idiff    | compare 2 textfiles and report differences.
Igrep    | a grep (text search) for text files.
Longtext | remove wordwrap from textfiles (DOS to Windows Text).
Mloc     | count lines in text files and report totals.
Modeget  | get video mode.
Modeset  | set video mode.
Newfiles | create list of files modified after specified date.
Pipecon  | pipe the console to a diskfile.
Touch    | modify file dates and times.
Txt2pcx  | convert ascii text to monochrome .PCX image.
Unfeed   | undo a lumped file created by ffeed into single files.
Whereis  | search the harddisk for files specified.
Which    | search the environment for the specified file.
Wraptext | add wordwrap to textfiles (Windows to DOS Text).
Yesno    | batchfile extension to allow yes/no questions.

========================================================================

BINGREP

A simple grep for binary files using upper case comparison only. BinGrep
is a command line utility program that allows a case-insensitive search
for strings in binary files. The output can be redirected to a file, and
groups of files can be searched (wildcards are supported).

This "batch mode" of operation may save some time since this can run
unattended and the output can be redirected to file for review later.
Only the files that contain a match are reported.

Usage is : BINGREP ["search spec"] [filename.* (optional)]

------------------------------------------------------------------------

FFEED

This "almost-filter" is a "filter feed" program.

It reads the command line (which can include wildcards) for a file spec.
If it finds one it opens all matching files and sends each to standard
output, separated by a formfeed character followed by the filename.

This is good for processing more than one file through filters and
replaces the "type" command for multiple file processing since the type
command only handles one file at a time.

Optionally this accepts an @list for input. Using a sorted list of files
will give you a specified read order. The dir /b command can be
redirected to a list to provide an @list.

Possible uses are searching a large group of files for the occurance of
some string, like with FIND.

        Example:

                FFEED *.CPP | FIND "//"

This will find all comments within a series of C++ programs, but,
unfortunately, won't supply the name of each file containing the comment
line.

------------------------------------------------------------------------

GRABASC

A TSR (terminate and stay resident program) that allows text screens to
be captured without color attributes and saved to a disk file. For use
in 80-column text mode 3 or 7.

Once grabasc has been loaded, each time the SHIFT-PRINT SCREEN key
combination is pressed the text from the current screen will be added to
a diskfile called HANDFULL.TXT.

This is similar to the way a screen capture works with some modem
communications packages except that grabasc.exe has the brains to trim
whitespace from the end of each line of screen-text.

Grabbing ascii text from program screens was an extremely useful
programming or documentation technique in the days of DOS, since much
typing could be avoided by inhaling the captured screens into a text
editor or word processor.

Recycled text-screen captures have many other uses.

On the request of George Smart I have added a command line argument to
save from 1 to 25 lines.

Usage is "Grabasc [number-of-lines]"

i.e. Starting Grabasc by typing "Grabasc 14" will allow a save of 14
lines each time the shift-print-screen is pressed.

------------------------------------------------------------------------

HEXVAL

A C Programmers Tool. Create Character Arrays from Binary Files suitable
for embedding in C programs.

------------------------------------------------------------------------

IDIFF

Rewritten version of an ancient diff... This program compares 2 text
files and reports their differences.

                  Options -
                  -b ignore whitespace
                  -i ignore case
                  -! ignore characters after (Clarion) comments

------------------------------------------------------------------------

IGREP

A grep with list options.

Searches text files for matching strings. Searches multiple files and
accepts lists of multiple searches. Nicely formatted output which can be
redirected to file and post-processed.

Usage is "IGREP ["search spec"] [filename(s)] -icq!s"
A List of Multiple Search Specs can also be Used :
Usage is "IGREP @[listname] [filename(s)] -icq!s"
Switches are -i (ignore case)
             -c (ignore c comments)
             -q (no banner)
             -! (ignore clarion comments)
             -s (match only lines with clarion strings)


Igrep is an interpreted search utility written in Perl to scan
arbitrary text files for strings matching a specified pattern, extract
information matching the pattern from those text files, and print a
report to standard output based on that information.

While not a regular expression matching program like a true grep, (Igrep
does a simple substring comparison), most searches are usually if not
always for simple string matches, so this is not usually an impediment.

I prefer the output format that Igrep provides, and I also like to
search a large number of files using a search list and case insensitive
or case sensitive comparison, and I do not always want to type a
filename when I am grepping so I like to default to *.* rather than
grepping stdin like a true grep.

A patternfile of Multiple Search Specs can also be Used :

The patternfile used by Igrep is a plain text file with each search
string on a seperate line. This is especially handy when searching files
for multiple search strings.

As noted above, the patternfile name is preceded with @.

The output is to standard out, and can be redirected to a file.

An informative banner is displayed for the first 3 lines.

If a pattern is found in a file, the filename is listed alone on a line.
If no patterns are found, the filename is not listed.

Following the listing of the filename, the line containing each pattern
found is listed in the format LineNumber:Line.

If no patterns are found or a problem is encountered, this information
is also outputted.

If no args are entered, usage is displayed.

I have a word of caution for anyone that redirects this output to a
file. Consider redirecting to a file in a different directory if you are
grepping through everything in the current directory, or you will get a
sharing violation (which is preferable to an infinite state of recursion
when you grep the file that you are redirecting into).

------------------------------------------------------------------------

LONGTEXT

LongText is a command line utility program that removes word wrap (hard
returns) from text files prior to importing into windows word processors
like msword or windows write. This is helpful if text is created in a
normal editor then formatted and printed in windows.

Good for programmers who write specs and documentation in a programmers
editor and need to finish the job as a formal document.

Usage is : "longtext [infile.txt] [outfile.txt] msword"

If a line begins with a number, or a line begins with a "pound sign",
then the line is considered to be "standalone" and it is left alone.

If a line begins with a "pound sign", the pound sign is stripped-off. If
the line begins with a number it is left on and assumed to be a member
of a numbered list.

The command line switch "msword" causes LongText to substitute a "soft
return" (Ascii 11) instead of a hard return (Ascii 13, Ascii 10). This
is especially useful when preserving formatting in a "MSWORD 97"
document.

------------------------------------------------------------------------

MLOC - "Thousands of Lines Of Code"

A CommandLine Utility to Count Lines in Text Files or program source
files.

Reports Number of Files and Number of Lines to Screen

------------------------------------------------------------------------

MODEGET

Gets the video mode from the DOS command line.

------------------------------------------------------------------------

MODESET

Sets the video mode from the DOS command line. Useful for video cards
that support pretty small text modes.

------------------------------------------------------------------------

NEWFILES

Create a list of file names modified on or since the date entered on the
command line. Use to build lists for selected back-ups, etc.

------------------------------------------------------------------------

PIPECON

This program was written to capture console output to a log file. I had
hoped to also echo the Console back to the screen but I found that this
did not work on all systems.

The most common usage of Pipecon is "PIPECON [ANY.BAT]" which will spawn
the child proces and write the files C:\PIPECON.LOG and C:\PIPECON.ERR
to the root of drive C:.

The last line in the Batch File should be "EXIT" which will unload
PIPECON. The redirected console log files on the root of drive C: can be
viewed or renamed an saved as a record of the batch that was run. This
can be helpful especially when calling commands from the batch that
interfere with normal redirection, when redirection is desirable
especially in the case of a long batch process that must be reviewed for
anomalies or errors.

------------------------------------------------------------------------

TOUCH

Modify File Times and Dates in Windows 95/98/NT

Touch is a command line utility program that allows updating the time of
a file to be the current system time. Alternately the time and/or the
date of a file can be specified as optional command line parameters.
Touch handles long filenames.

Usage is : "touch -cfv mm-dd-yyyy hh:mm:ss FileName*.*"
- or -   : "touch -cfv mm-dd-yy hh:mm FileName*.*"

The date, time, and -cvf options are not necessary (optional).

Touch attempts to set the time of each existing file to the current
system time.  If the file exists, the touch will occur only if it is not
read-only (but see the -f (force) option below).

The -f (force) option will try to force the touch regardless of whether
or not the file is read-only.

If a file does not exist, an attempt will be made to create it unless
the -c (don't create) option is specified.

The -v (verbose) option turns on verbose mode and touch will report each
file it touches.

The date and time options allow specification of the date and time to be
used instead of the system date and time.

When the date and time options are used, the previous file time or date
is preserved if a change is not specified for both the time and the date
together. This allows only the time or only the date to be changed
without affecting the other value.

The format of the date and time options is like that of the DOS date and
time commands.

Allowable date formats are MM-DD-CCYY and MM-DD-YY. For the date, ccyy
may be just 2 digits (yy) (eg. 80) in which case 1980 is inferred. When
a 2 digit year is used, dates before 1980 are considered to be after
2000, since DOS files start in 1980.

Allowable time formats are HH:MM:SS and HH:MM. For the time format
seconds may be eliminated. Time is specified in military time format
(range 00:00:00 - 23:59:59).

Other than the variations noted above, partial dates and times cannot be
used.

Wildcards can appear in the file name.

------------------------------------------------------------------------

TXT2PCX

Usage is "TXT2PCX [my.txt] [columns-optional]"

Txt2pcx.exe is a command line ascii text document converter which will
take a straight ascii file and convert it to a monochrome PCX image.

This is especially useful when preparing screen shots or other
facsimiles of ASCII files required for documentation purposes for output
from a Desktop publishing program.

My own screen capture program (GRABASC.EXE) can be used to generate the
initial text file. There are certain programs that are not compatible
with GRABASC, and I have tested the screen capture utility THEGRAB(tm)
using the /ASCII switch with these and obtained better results.

TXT2PCX can also be used in conjunction with printer intercept programs
including my own REAPER and SOWER programs to produce PCX files of
printed reports.

------------------------------------------------------------------------

UNFEED

This program is an  "un-filter feed" program. That is to say that it
recreates the individual files from a redirected file containing the
"lumped" output from the ffeed program.

The filename is stored after an ascii character 12 (the printer formfeed
caharacter) in column 0 as a separator between files in "lumped" files.
A lumped file is non-compressed plain ascii text with filename
separators in between file sections as noted above.

Originally written to "dearc aztec arcs"... That is to say, to "un-lump"
the source files that were stored in the same lumped text format by Manx
Software in the distribution of their C compiler source. These had the
extension.arc.

------------------------------------------------------------------------

WHEREIS

Find all occurences of files on the drive.

------------------------------------------------------------------------

WHICH

Search for a file using the searchpath in the environment. Return a dos
errorlevel that can be used by a batch file.

------------------------------------------------------------------------

WRAPTEXT

WrapText is a command line utility program that adds word wrap (hard
returns) to text files created in windows word processors like msword or
windows write, prior to processing in a text editor or a programmers
editor.

Adding word wrap is helpful if text is created in a windows editor (i.e.
msword) then processed and re-editted in a programmers editor.

Good for programmers who write specs and documentation in a windows
editor and need to finish the job in a programmers editor.

Usage is : "wraptext [infile.txt] [outfile.txt] {limit-default 72}"

If a line begins with a "pound sign", then the line is considered to be
"standalone" and it is left alone. If a line begins with a "pound sign",
the pound sign is stripped-off.

Line length for word wrap is set to 72 characters by default (the
defacto standard for MS-DOS text files) but can be set to any value from
1-2047 by using the command line option.

------------------------------------------------------------------------

YESNO

A batchfile extension utility.

  returns 1 if no
  returns 0 if yes
  defaults to 0 (no)

Usage is YESNO [prompt]
Allows an optional command line prompt.

------------------------------------------------------------------------

Licence Agreement
-----------------

You have a royalty-free right to use, modify, reproduce and distribute
these programs and their source code and associated files in any
non-competitive way you find useful, provided that you agree that Bill
Buckels and the other respective authors have no warranty obligations or
liability resulting from said use or distribution in any way whatsoever.
If you don't agree, remove all associated files from your computer now.

Bill Buckels
589 Oxford Street
Winnipeg, Manitoba, Canada R3M 3J2

Email: bbuckels@escape.ca
WebSite: http://www.escape.ca/~bbuckels

March 31, 2000

End of Document
