- May
- 3,515
- 5
Several commands report various match counts in their text output. DIR
reports file count, directory count, total storage used, etc. FFIND reports
number of files and matching lines. Many other commands also include such
reports. In many instances in a batch file one may need nothing but the
number, and must parse redirected output to find the values. I suggest that
all such commands set internal variables with their names styled
_commandname_reporttype. For example, FFIND could set _FFIND_LINES and
_FFIND_FILES, resp., for the number of matching lines and matching files, as
reported in the last (summary) line of its output.
--
Steve
reports file count, directory count, total storage used, etc. FFIND reports
number of files and matching lines. Many other commands also include such
reports. In many instances in a batch file one may need nothing but the
number, and must parse redirected output to find the values. I suggest that
all such commands set internal variables with their names styled
_commandname_reporttype. For example, FFIND could set _FFIND_LINES and
_FFIND_FILES, resp., for the number of matching lines and matching files, as
reported in the last (summary) line of its output.
--
Steve