Kilowatt Software's P o o f ! (TM)   series of programs

Links

Master program index

Keyword out of context index

Keyword in context index

Glossary of terms

Introduction

Kilowatt Software's Poof!(TM) programs provide numerous productivity opportunities for users of NT 4.0, Windows 98, and Windows 2000 system environments.

Poof!(TM) programs are performed as commands from MS-DOS command prompt windows. These programs can also be used in batch scripts, or DOSKEY macro definitions. Some programs are specifically intended for use in batch scripts. All of the Poof!(TM) programs are designed for a minimal, specific purpose.

Although this series of programs provides you with many opportunities for productivity, you are advised to backup your files regularly before using these programs. Some programs alter the contents of existing files. Other programs replace existing files, or remove them. There is no way to reverse the affect of these changes afterwards. If you do not have a backup, then prior file contents or entire files may be irrecoverable.

Program categories

The following categories of programs are available:

File management programs

The following programs help you manage files on your computer.

ASSOCEXT associates an executable program with a file extension
CAT concatenate one or more files into a single composite file
CATBIN concatenates the binary contents of one file to the end of another file
CP protected copy of a file to another file or directory
DISKFREE determines how much space is free on one or more disks
DRIVES shows active drives and current directories
FI vertical filename listing
FILEINFO detailed file information listing
FILES horizontal filename listing
LS vertical filename listing
MV protected movement of a file to another file or directory
NEWER determines if one file is newer than another
RM removes one or more files with cautionary prompts for each removal
RO converts one or more files to be read-only
RW converts one or more files to be writeable
SETFTIME sets a file's last modification time
TOUCHE sets the last modification time of one or more files to the current time
WHEREIS locates file(s) within the current directory, or all subdirectories

Command launching tools

The following programs can launch nested commands; or are associated with nested command launching. These programs can significantly improve your productivity.

! ! command shell
ALIAS maintains and displays substitution strings for the ! shell program.
ASK asks question, sends response to standard output
DELVE perform command in current directory and all subdirectories
DOMANY performs a command on a series of files, or other arguments
DOMANY2 performs a command on a series of files, or other arguments
FILECMD performs a command that is composed from all lines in a file
REPEATN performs a command multiple times

Software development tools

The following programs are associated with software development activities.

CFLOW source program abstraction
CLSPATH locates a java.CLASS file within the prevailing CLASSPATH environment
COM extracts comments from C/C++/Java source programs
DCOM extracts source (minus comments) from C/C++/Java source programs
DECAF Java class file decompiler
DGARNER extracts source (minus special comments) from C/C++/Java source programs
DQUOTE locates all double-quoted strings in input text file(s)
EBNF extended backus-naur form syntax analyzer
ENUMSTR prepares a Windows resource file STRINGTABLE from a C/C++ 'enum' definition.
EXEPATH does a standard Windows search for an executable file
GARNER gathers special remarks from program source files for conversion to HTML
GETDEPS determines functional dependencies of C/C++ programs
GETFUNS determines functions defined in C/C++ programs
GETVER shows windows system version information
IDELVE shows hierarchy of 'included' source files
IPATH locates an 'included' file within INCLUDE environment variable directories
MODPROC tests existence of module and optionally a procedure
MODVER shows module version information
NEWER determines if one file is newer than another
SEEKFILE locates a file by searching through directories defined by a system
SPLICE splices a segment into one or more text files
SQUEEZE removes trailing spaces and runs of multiple spaces from a text file
TOHTML converts output of GARNER program to HTML content, and prepares an index
TOUCHE sets the last modification time of one or more files to the current time
UNREFD identifies unreferenced functions in C/C++ programs

Math and conversion utilities

The following programs are math and conversion utilities.

C2X convert characters to hexadecimal equivalent
D2X convert decimal value to hexadecimal equivalent
RADIX converts a numeric value to another numeric base
RANDOM generates a random number
SUMCOL totals numeric values in the first or a specific column of a text file
X2C convert hexadecimal values to character equivalent
X2D convert hexadecimal value to decimal equivalent

HTML preparation programs

The following programs are helpful for creating HTML files.

CSV2HTML converts a comma separated value file to a corresponding web page
FILENOTE shows contents of text file(s) within a scrolling marquee
IND2HTML converts indented text files to web pages
INNOTE shows contents of the input text file within a scrolling marquee
SHOWNOTE shows argument text within a scrolling marquee
TOHTML converts output of GARNER program to HTML content, and prepares an index

Batch script aids

The following programs are helpful within batch scripts.

BEEP generates one of various audible message sounds
JOURNAL writes a time-stamped note to a journal file
MSGBOX shows a standard message window
NEWER determines if one file is newer than another
PICKLIST A visual list selection accessory for use in batch scripts
QUERY shows a simple YES or NO prompt within a message window
SAYRC shows the return code of commands
SLEEP snoozes for awhile

Clipboard utilities

The following programs are helpful for interacting with the system clipboard.

CLIPARGS adds a line composed from command arguments to the clipboard
CLIPIN adds the contents of a file to the system clipboard
CLIPOUT adds the contents of the system clipboard to a file
CLIPPATH adds directory path of a file to the system clipboard
CLIPPING copies a text fragment to the clipboard

Binary file utilities

The following programs are helpful for accessing binary files.

ASC_ONLY extracts ASCII characters from a binary file
CATBIN concatenates the binary contents of one file to the end of another file
CHARDIST determine frequency of byte values in input file
CHECKSUM compute signature of a binary file
CMP performs binary comparison of two files
EXCISE extracts binary segment from a file
HX show binary content of a file
ZAP alters the contents of a binary file

Miscellaneous programs

The following programs are used for miscellaneous activities.

ALARMER shows alarms defined in ALARMS.ASC
ARGS shows command arguments
ASCII displays the ASCII character table
COLLIM8 converts a vertical file into a multiple column file
DATE shows the current time and date using a UNIX(TM) format
DIRMON monitors file changes in a directory, or subdirectory tree
FINDWND locates one or more windows having a caption, or caption segment
KWIC first stage of 'keyword in context' pipeline
KWOC converts an indented keyword definition file to 'keyword out of context' format
LENGTH counts characters in input argument
LOGEVENT reports an event to the NT event log
MAX finds the line with the largest number in the first column of a file
NEWSHELL creates a new command shell usually via a file drop action
NOW shows the current time and date using a format that is easy to read.
RULER shows a simple character column ruler
SEEK locates topics and associated items within an indented text file
SENDMSG sends a message to another application
TCPIP_ID shows network addresses
TEE shows pipeline input while redirecting to pipeline output
TELLTIME shows programming information about the current time,
TIMESTR format the current time using various options
UNROTATE final stage of 'keyword in context' pipeline
Z the 'do nothing' program

Starting an MS-DOS command prompt window

A command prompt window is often started by locating the 'MS-DOS prompt' or 'Command prompt' entry within the 'Programs' selections of the 'Start' menu. A shortcut is usually available, or can be added, on the desktop as well.

You can also start an MS-DOS command prompt window by selecting 'Run' from the 'Start' menu. In the input field type 'cmd' in NT environments and 'command' in Windows 98 environments, then press the OK button.

You can create a new command prompt shortcut on the desktop as well. The easiest way to do this is to select an existing 'MS-DOS prompt' desktop icon with the mouse, and drag&drop it to another area on the desktop. You can then customize the new icon by:

  1. Renaming it
  2. Changing the icon
  3. Specifying an initial 'Working:' folder.

You can prepare folders containing various command prompt shortcuts. Shortcuts you created on the desktop can be dragged and dropped to these other folders.

Command usage

Program usage information can be displayed by typing the program name, and specifying either '-H' or '/H'.

Generally, you can request usage information by specifying either '-?' or '/?'. However, some programs process file patterns that can contain the wild-card characters '*' and '?'. These programs process '-?' and '/?' requests as wild-card file patterns. For these programs you should use either '-H' or '/H' instead.

Detailed usage information (HTML text) can be displayed by specifying '-!' or '/!' after the program name.

The following is an example of a command usage request:

 ff /h

Which shows how to use the FF program.

The usage information that is displayed by a command is constrained by the size of the prompt window. Detailed program usage information is provided in web pages. For example, the following link shows information for the FF program.

Command line format

Command lines have the following general format:

 ProgramName [Options] [Arguments] [ < infile] [ [>]> outfile]

The square bracket characters ('[') and (']') around an item indicate that it is optional. The less than ('<') and greater than ('>') characters are used for redirecting input and output files respectively.

Command pipelining

Many command programs can participate in pipelining operations. This provides many opportunities, as programs can be combined in various ways. Pipeline segments are delimited by the vertical bar character ('|'). The output of the program to the left of the vertical bar is passed as input to the program to the right of the vertical bar. More than one vertical bar can appear in a command line.

Any program that supports input file redirection via the ('<') character can appear after a vertical bar. Any program that supports output file redirection via the ('>') character can appear before a vertical bar.

The following are examples of command pipelining sequences.

  1.  WORDS < abc.java | FF -t seek

    This example shows all words that contain 'seek' in the file 'abc.java'. The output of the WORDS program is passed as input to the FF program.

  2.  WORDS < infile | FSORT /i | UNIQUE /i > unique.wds

    This example shows all unique words in a file. The output of the WORDS program is passed as input to the FSORT program. The output of the FSORT program is passed as input to the UNIQUE program. Finally, the output of the UNIQUE program is written to the file 'unique.wds'.

Command program search

The search for programs to execute as commands involves numerous possibilities, and many opportunities for confusion. In all cases, when a file extension is absent, multiple implicit file extensions are tried: BAT, or EXE. NT systems will also try to locate the implicit CMD extension.

A command program to locate can be fully qualified, a relative path, or a partial name. Examples of each are:

When a fully qualified path is specified, the program is executed if the file exists, otherwise an error message is displayed.

Relative path names are converted to fully qualified paths, by using the current working directory. The current drive is used unless an explicit drive is specified, in which case the current working directory of that drive is used as well. A directory name that consists of two dots ('..') indicates that the file is in the parent directory. When backslashes appear each term between backslashes is a directory name, relative to the current directory.

If the current drive is 'C' and the current directory is the root, then the first 'relative' path above is converted to a complete path by adding 'C:\' ahead of the path. The resulting path is 'C:\windows\notepad.exe'.

Similarly if the current directory is 'C:\windows\system', then the second example becomes 'C:\windows\notepad.exe' as well. For the 'c:\windows' directory is the parent directory of the 'c:\windows\system' directory.

The search for partially specified command programs will first search the current directory. If the program is not found there, then all of the directories that are defined within the PATH environment variable are searched. Directories within this variable are separated by semicolons. When a directory name contains a space, its entire name must be enclosed in double-quotes when it is added to the PATH environment variable definition.

The following is an example of a PATH environment variable value:

 c:\windows;c:\windows\system;c:\kwsw

A search for the 'FF' program will try all of the following:

  1. c:\windows\FF.EXE

  2. c:\windows\FF.BAT

  3. c:\windows\system\FF.EXE

  4. c:\windows\system\FF.BAT

  5. c:\kwsw\FF.EXE [ <-- this is where the FF program should be found !]

  6. c:\kwsw\FF.BAT

You can use the EXEPATH program to determine the fully qualified path that is used for a partially qualified or relative file name, in the current drive and working directory.

For example:

 exepath FF.EXE

How to update the PATH environment variable

Before you update your PATH environment variable, make sure you are fully alert! If a Windows system expert is nearby, you might request assistance the first time you try to modify the PATH environment variable.

In NT environments, the PATH environment variable is defined by selecting 'Control Panel' from the 'Settings' selection of the Start menu. You then activate the 'System' icon. Then, double-click the PATH variable in the User section. After editing the value, you must press the 'Set' button, and then OK. If you press the OK button, without pressing the 'Set' button, the PATH variable is not changed. You will need to restart command prompt windows that are already active, after revising the PATH variable, as the change does not take effect until the command prompt window is started again.

In Windows 98 environments, you define the PATH environment variable in your AUTOEXEC.BAT file. Please make a back up of this file before revising it. Note, there may be more than one definition of the PATH environment variable in the AUTOEXEC.BAT file. Be sure to update the one that is really used. You will need to restart command prompt windows after revising the PATH variable, as the change does not take effect until the command prompt is started again. In Windows 98 environments you need to restart your system.

You can locally alter the PATH environment variable for a specific command prompt window. Usually you will want to do this by defining a batch script that sets the PATH environment variable. The following line prepares a minimal path.

 set PATH=c:\windows;c:\windows\system;c:\kwsw

In Windows 98 environments, you will probably want to copy the PATH environment variable line from your AUTOEXEC.BAT file.

You should add the directory that contains Poof!(TM) programs to your PATH environment variable.

Wild-card characters

Command line program arguments may contain wild-card characters that are expanded with file names that match them. The '?' character matches a single character. The '*' matches all names that have matched up to that point. Some examples appear below.

??matches 2 letter file names that do not have an extension
??.defmatches 2 letter file names that have a '.def' extension
abc?.defmatches 4 letter file names that start with 'abc', and have a '.def' extension
a*.defmatches all file names that start with 'a', and have a '.def' extension
a*.d*matches all file names that start with 'a', and have an extension that starts with '.d'
a*.*matches all file names that start with 'a', and have any extension or no extension
*.*matches all file names
*matches all file names
*.matches all file names that do not have an extension

File formats

Various Poof!(TM) programs process text files that are organized in the following formats:

  1. Plain text files

  2. Bundled text files

  3. Comma separated value (CSV) files

  4. Tab delimited value files

  5. Indented text files

Plain text files

These are text files that do not have any special organization. These files can be prepared by the standard Notepad and WordPad accessories.

Plain text files can be processed by the following programs:

BUNDLE gather multiple text files into a single bundle file
CAT concatenate one or more files into a single composite file
CENTER horizontally centers input lines
CHG substitutes one text string for another in one or more files
CLIPIN adds the contents of a file to the system clipboard
DROP drops leading lines from the input file
EGREP generalized regular expression text search, using extended regular expressions
FF fast file search for text
FGREP fast file search for text
FSORT file sorting utility
GIST identify most frequent meaningful words in a text file
GREP generalized regular expression text search
HEAD show leading lines of a text file
INNOTE shows contents of the input text file within a scrolling marquee
LOWERIT converts the input file to lower case
MERGE merges the contents of two sorted files to form a third file
NUMBER selects a specific line, or numbers all lines
PF pattern find -- generalized regular expression text search, using extended regular expressions
PICK selects lines and/or ranges of lines from a text file
PREFIX prefixes output with empty lines
RANGE selects a range of lines from a text file
RAVEL transforms text file with lengthy lines to a shorter line format
SIDESIDE visually compares two similar text files
SPACE adds line spacing between text file lines
SPLICE splices a segment into one or more text files
SQUEEZE removes trailing spaces and runs of multiple spaces from a text file
STRIP removes leading and/or trailing spaces from text file lines
TAIL show trailing lines of a text file
TR translates characters in a text file with replacements
UNIQUE finds unique, duplicate, or omitted items
UPPERIT converts the input file to upper case
WC counts lines, words, and/or chars in one or more files
WORDS extracts all words from a text file

Bundled text files

The BUNDLE program combines multiple text files into a single bundled text file.

Bundled text files can be processed by the following programs:

BUNDLE gather multiple text files into a single bundle file
GETONE extracts a single file from a bundle file
LBUNDLE lists files contained in a bundle file
UNBUNDLE extracts all files from a bundle file

Bundle files can also be created by using the CAT program.

Comma separated value (CSV) files

These are text files that contain multiple values per line, with each value separated by a comma. When a value contains one or more commas the value is enclosed in double quotes. CSV files are commonly prepared by export operations from spreadsheets, databases, and similar applications.

Comma separated value files can be processed by the following programs:

CSV2HTML converts a comma separated value file to a corresponding web page
CSV2TABT converts a comma separated value file to a corresponding tab delimited
FROMCSV converts a comma separated value file to a vertical format
TABT2CSV converts a tab delimited text file to a corresponding
TOCSV converts a vertical attribute file to a comma separated value file

Tab delimited value files

These are text files that contain multiple values per line, with each value separated by a tab. Tab delimited files are commonly prepared by export operations from spreadsheets, databases, and similar applications.

Tab delimited value files can be processed by the following programs:

COL extracts a column from a text file
CUT extracts one or more columns from a text file
DETAB convert tabs in text files to spaces
PASTE join the contents of multiple text files vertically
TABT2CSV converts a tab delimited text file to a corresponding

Indented text files

These are text files that store items within topics by simple space indentation. Topic lines do not have a leading space. Related items follow. Each item line starts with a space. The end of items within a topic is determined when a subsequent topic line is reached.

The following is an example of an indented file:

Amphibians
  Amphibians are an interesting class within the subphylum vertebrata.
  With soft skins, and often gills, they are able to stay underwater for prolonged periods of time.
  They can live on land as well.
  Amphibians are cold blooded.
  frog
  newt
  salamander
  tadpole

Birds
  Birds are a well adapted class within the subphylum vertebrata.
  With leathery skins, and always feathered, they can usually fly.
  Birds are warm blooded.
  cardinal
  chicken
  cormorant
  finch
  hawk
  ostrich
  robin
  seagull
  turkey

Fish
  Fish are the oldest class within the subphylum vertebrata.
  These have scaly skins, and always have gills.
  With rare exceptions, they can not live long out of the water.
  Fish are cold blooded.
  betta
  minnow
  guppy
  sunfish
  swordfish
  walking catfish

Mammals
  Mammals are the newest class within the subphylum vertebrata.
  With leathery skins, and often furry, they are well adapted to life on land.
  They can usually swim well in the water, but must surface for air within a short period of time.
  Mammals are warm blooded.
  dolphin
  fox
  human being
  manatee
  otter
  skunk
  woodchuck

Reptiles
  Reptiles are the first class within the subphylum vertebrata to spend almost
  all of their lives out of the water.
  They have leathery skins, but lack fur.
  Like mammals they usually can swim well in the water, but must eventually
  surface for air.
  Reptiles are cold blooded creatures.
  alligator
  crocodile
  horned toad
  sidewinder
  tortoise
  turtle

Note: intervening empty lines between topics are ignored. Long lines within topics are wrapped. Long lines can be explicitly wrapped by using the HTML <BR> tag. Less than characters ('<') must be entered using the HTML sequence &lt;. Greater than characters ('>') must be entered using the HTML sequence -- &gt;. Ampersand characters ('&') must be entered using the HTML sequence -- &amp;.

Indented text files can be processed by the following programs:

CLIPPING copies a text fragment to the clipboard
IND2HTML converts indented text files to web pages
KWOC converts an indented keyword definition file to 'keyword out of context' format
SEEK locates topics and associated items within an indented text file


Kilowatt Software's P o o f ! (TM)   programs
Version 1.0
Copyright © 2000, 2001, 2002
All Rights Reserved.
Web: http://www.kilowattsoftware.com/
E-Mail: support@kilowattsoftware.com

Last updated on: 9 Dec 2002