



            Bruce Feist           FORFILE ver 1.1     September 24, 1990



                                   FORFILE version 1.1
                    Copyright 1987, 1988, 1990 by Bruce D. Feist

                 FORFILE is a simple utility to execute a DOS command on
            a group of files with similar names.  In effect, it is
            similar to the FOR command of DOS -- but it it deals only
            with files and, within that constraint, is more flexible.

                 The syntax of FORFILE is:

                 FORFILE filemask options doscommand parameters, where:

                 "filemask" is a DOS wildcarded filename, with optional
                      directory and drive specifiers.
                 "options" can be chosen from the following; in the
                      event of conflicting options, the last one
                      specified will be used, and case is ignored:
                      /E+  will cause execution to terminate as soon as
                           an error is encountered.
                      /E- will cause execution to continue through all
                           filenames matching "filemask", whether or not
                           errors occur.
                      /L+ will cause the name of each file to be written
                           to standard output as FORFILE executes the
                           command with it.
                      /L- inhibits the writing of filenames.
                      /Vc sets the "variable character identifier" to
                           character c, whatever that is; see
                           "parameters".
                      The defaults are /E+ /L+ /V`.
                 'doscommand' is any valid DOS command or program; it
                      must be either an internal command, contained in
                      the current directory, or in a directory specified
                      by the PATH environment variable.
                 'parameters' are the parameters for the command to be
                      executed.  Before execution for each file,
                      substitution occurs as follows:
                      Occurences of "'d" are replaced by the drive of
                           the file, including the trailing colon.
                      Occurences of "'p" are replaced by the path of the
                           directory that the file is located in, with
                           leading and trailing backslashes.
                      Occurences of "`f" are replaced by the name of the
                           file, without its extension.
                      Occurences of "`e" are replaced by the extension
                           of the file, with its leading period.
                      Occurences of "`[" are replaced by a less than
                           sign (<); this is useful for forcing
                           redirection of input on a by-file basis.
                      Occurences of "`]" are replaced by a greater than
                           sign (>); this is useful for forcing
                           redirection of output on a by-file basis.



            Bruce Feist           FORFILE ver 1.1     September 24, 1990



                      These substitutions are done ignoring case; "`D",
                           "`P", "`F", and "`E" are also replaced.
                           Also, the "`" symbol (which is called the
                           "variable identifier character") can be
                           altered using the "/V" option.
                 Examples:

                 FORFILE A:*.* DEL C:`F`E

                 deletes all files in the current directory on C: that
            have corresponding files on A:.

                 FORFILE *.c /C% /e- REN %f%e %f.BAK %f.BAC

                 renames the .BAK files corresponding to all .C files in
            the current directory to end in .BAC.

                 FORFILE *.TXT SORT `[`F`E `]`F.SRT

                 sorts all .TXT files into corresponding .SRT files.

                 The FORFILE program and this documentation are
            copyrighted materials, which I am making available for free
            distribution subject to the following conditions:

                 1)   No changes may be made to either the program or
            the documentation.

                 2)   The program and the documentation can only be
            distributed TOGETHER.

                 3)   I reserve the right to limit distribution of
            further versions of the program and documentation.

                 If you have any questions or comments, either send me a
            message on CompuServe at [71320,3635], or write to me at the
            address below.

                 Thank you, and use it well.

            Bruce D. Feist
            Enlightened Software
            926 Kemper Street
            Alexandria, VA 22304-1502