Three requirements:
repeated search via a bat file (better choice a script)
- user selected source folder
- output to a file
- file name and versioning filters are needed to be selected
Instead of old-world BATs, imo might as well learn a scripting language
that will take you much further into the future - - like
PHP
PHP is portable to other systems {mac, pc, linux} while keeping the grammar identical.
PHP code is easy to read and write; eg the IF THEN ELSE reads
Code:
if ($thisVariable > 1234) {
/* do the TRUE case */
} else {
/* do the FALSE case */
}
compounding test like
A & B then do can be written several ways but this
nested series will test each condition ONCE and stop testing on the first failure
(so it's fast)
Code:
if ($filename == "foo.exc") {
switch ($version) { /* testing version as a character string */
case "1.0":
/* do the foo.exc version 1.0 thing */
break;
case "2.1":
/* do the foo.exc version 2.1 thing */
break;
case "2.2":
/* do the foo.exc version 2.2 thing */
break;
default:
/* case not understood */
}
} else {
/* proper file not found so ignore version tests */
}
your invocation might look like
myscript searchDirName fileNamePattern outputFilePathandFileName
Placing
myscript on a mapped drive would allow it to be maintained in one place
but used everywhere (assuming each client system had PHP also installed)
Yea, you need to install PHP globally but many things also have global resource requirements.
Just my $0.02
btw: the help files for PHP come as HTML files too