Dec 092017
Report AGE of a file in days. Return Errorlevels & Set Env.Var “AGE”=fi. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
AGE.DOC | 3234 | 1054 | deflated |
AGE.EXE | 24730 | 16648 | deflated |
DEMOAGE.BAT | 550 | 205 | deflated |
SETGLOB.COM | 1110 | 941 | deflated |
SETGLOB.DOC | 796 | 416 | deflated |
TESTAGE.BAT | 366 | 128 | deflated |
Download File AGE11.ZIP Here
Contents of the AGE.DOC file
*****************************************************************************
* PROGRAMME TO FIND THE AGE OF A FILE (in days) *
*****************************************************************************
AGE - File Age Tester 1.1 (c) 1988, Geoff S. Drayson
Usage: AGE
where is the full directory path to the file,
is the Maximum allowed age not to get Errorlevel 1.
is the Maximum allowed age not to get Errorlevel 2.
Use of Parameters are optional: Normal Exit : ERRORLEVEL 0.
AGE HELP DISPLAY : ERRORLEVEL 4.
AGE Display AGE information.
If file not found : ERRORLEVEL 3.
AGE Surpress Display.
If AGE > age1 : ERRORLEVEL 1.
AGE Surpress Display.
If age2 > AGE > age1 : ERRORLEVEL 1.
If AGE > age2 & age1 : ERRORLEVEL 2.
[ Make age2 > age1 ]
****************************************************************************
FILES INCLUDED ARE :
AGE.DOC ............... This file.
AGE.EXE ............... Programme file.
TESTAGE.BAT ........... Batch programme to report Errorlevels. (Test Prog)
DEMOAGE.BAT ........... Batch programme to demonstrate use of AGE.EXE
SETGLOB.COM ........... COM prog to set the PRIMARY Environment variables.
SETGLOB.DOC ........... Doc file for SETGLOB.COM
****************************************************************************
DEMOAGE.BAT is called in exactly the same way as AGE.EXE
ie. DEMOAGE
Assume the file is created called when a Hard Disk BACKUP is done.
DEMONSTATION:
=============
(1) {type} DEMOAGE
(2) {type} DEMOAGE where is a valid filename
Assume that the filename above reports an AGE of 10 days (say)
(3) {type} DEMOAGE 14
Since the file is less than 14 days old. ERRORLEVEL 0 (Nothing)
(4) {type} DEMOAGE 7
Since the file is older than 7 days ERRORLEVEL 1 (Warning)
(5) {type} DEMOAGE 7 10
Since the file is older than BOTH 7 and 10 days ERRORLEVEL 2 (Command)
(6) etc
*******************************************************************************
If DEMOAGE 7 14 was included in your AUTOEXEC.BAT file, your
PC would inform you each time you BOOTED of your BACKUP status.
******************************************************************************
REVISIONS: Rev 1.1 (March 30 1988)
==========
If filename exists and the Environment Variable AGE exists,
then, (provided SETGLOB.COM is in directory or PATH), the
Environment Variable AGE will be set to the filename age in Days.
NOTE: AGE in the PRIMARY Environment is updated (NOT the Env Copy).
See SETGLOB.DOC
* PROGRAMME TO FIND THE AGE OF A FILE (in days) *
*****************************************************************************
AGE - File Age Tester 1.1 (c) 1988, Geoff S. Drayson
Usage: AGE
where
Use of Parameters are optional: Normal Exit : ERRORLEVEL 0.
AGE HELP DISPLAY : ERRORLEVEL 4.
AGE
If file not found : ERRORLEVEL 3.
AGE
If AGE > age1 : ERRORLEVEL 1.
AGE
If age2 > AGE > age1 : ERRORLEVEL 1.
If AGE > age2 & age1 : ERRORLEVEL 2.
[ Make age2 > age1 ]
****************************************************************************
FILES INCLUDED ARE :
AGE.DOC ............... This file.
AGE.EXE ............... Programme file.
TESTAGE.BAT ........... Batch programme to report Errorlevels. (Test Prog)
DEMOAGE.BAT ........... Batch programme to demonstrate use of AGE.EXE
SETGLOB.COM ........... COM prog to set the PRIMARY Environment variables.
SETGLOB.DOC ........... Doc file for SETGLOB.COM
****************************************************************************
DEMOAGE.BAT is called in exactly the same way as AGE.EXE
ie. DEMOAGE
Assume the file is created called
DEMONSTATION:
=============
(1) {type} DEMOAGE
(2) {type} DEMOAGE
Assume that the filename above reports an AGE of 10 days (say)
(3) {type} DEMOAGE
Since the file is less than 14 days old. ERRORLEVEL 0 (Nothing)
(4) {type} DEMOAGE
Since the file is older than 7 days ERRORLEVEL 1 (Warning)
(5) {type} DEMOAGE
Since the file is older than BOTH 7 and 10 days ERRORLEVEL 2 (Command)
(6) etc
*******************************************************************************
If DEMOAGE
PC would inform you each time you BOOTED of your BACKUP status.
******************************************************************************
REVISIONS: Rev 1.1 (March 30 1988)
==========
If filename exists and the Environment Variable AGE exists,
then, (provided SETGLOB.COM is in directory or PATH), the
Environment Variable AGE will be set to the filename age in Days.
NOTE: AGE in the PRIMARY Environment is updated (NOT the Env Copy).
See SETGLOB.DOC
December 9, 2017
Add comments