Incode Systems Home Page Incode Systems, Inc.


OLDER



(12-10-1998 9:50am OLDER.EXE)
Usage: TargetFile[Options] SourceFile1 SourceFile2 SourceFileN
Where: The date and time TargetFile was last modified is
compared to each of the SourceFiles on the command line.
If TargetFile is older than any of the files compared,
ERRORLEVEL is set to 1, indicating that TargetFile is
is older.
The file name which is newer is echoed to the
StdOut (allowing the name to be collected in a
file, piped to another program, or redirected to NUL).
If TargetFile does not exist, ERRORLEVEL is
also set to 1. If any of SourceFile on the command line
is not found, ERRORLEVEL is set to 2.
Globals are allowed in TargetFile and/or SourceFiles
Options:
/A Ordinarily, the objective is to determine if any
of the matching filespecs are newer than the TargetFile,
so OLDER stops when if finds the first one. The /A option
forces OLDER to check and report on all files.

-More-

Hit a key ...
/F File-By-File option. Ordinarily, globals used in either TargetFile
or a SourceFile are evaluated exhaustively. For example:
a TargetFile of A:*.* and a SourceFile of C:*.* would ordinarily
compare every file on the A drive with every file on the C drive,
and if the /A option were used, OLDER would print a list of every
file on the C drive which is older than any file on the A drive,
with many duplicated file names. The /F option allows the SourceFile
to be used as a Mask over the TargetFile for each TargetFile.
With the /F option our example would compare every file on the A.
drive with the file on the C drive having the same name.

/N Newer option. TargetFile checked to see if NEWER than SourceFile.

OLDER may be used to create batch files which check
dependency relationships and recreate files when the files
they depend on have changed (much like a MAKE utility
but without the overhead of the MAKE program itself; all DOS
memory is available to run the recreation programs)