home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
DEMO510.ZIP
/
DIRMNT3.INS
/
ENVDATE.DOC
< prev
next >
Wrap
Text File
|
1999-01-25
|
1KB
|
31 lines
ENVDATE is a simple program which sets an environment variable equal to
the system date. This allows you to execute batch files which can access
the date string and use it in filenames (in particular, this is good for
running periodic events which archive disk files into a unique filename
each time they are run).
Since it is not possible to modify the "master" DOS environment, this
program actually modifies a copy of the environment, then executes a
specified program (usually a batch file) as a subprocess where it can
access the new environment. The syntax is:
ENVDATE ProgramName Parameters ...
Where "ProgramName" is the name of the program (batch file) you want to
run. An environment variable called DATE, containing the system date in
YYMMDD format, is created and available to the program as it is
executed. If you execute ENVDATE with no parameters, it will run a
straight DOS shell, where you can type SET to examine the environment.
When you run ENVDATE with an actual batch file, the batch file can
access the date as %DATE%.
When executing ENVDATE from an SLBBS door or event, specify it as
ENVDATE.EXE to avoid generating an extra COMMAND.COM invocation.
I have included the source code (Turbo Pascal 5.5) so that you can add to
or modify the variables used.
Frank LaRosa 4/4/90