AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to BAT Magic  <--  <--- Return to Home Page
   Local Database  BAT Magic   [168 / 250] RSS
 From   To   Subject   Date/Time 
Message   Visitor    ALL   DATETIME.BAT   November 8, 1995
 12:29 AM *  

@echo off
echo @echo off    > setdt.bat
echo set cdt=%%3 >> setdt.bat
echo set ctm=%%4 >> setdt.bat
dir setdt|find "BAT">router.bat
call router
del router.bat
del setdt.bat


Title:      "Environmental Date and Time"
Reference:  PC World June 1990
Author:     Cecil M. Goeldner
Files:      DATETIME.DOC, DATETIME.BAT, TESTDT.BAT

To add the date and time to DOS 3.3 (or a later version) batch-file
programs, use the technique demonstrated in DATETIME.BAT. The program
assigns the date to variables %cdt% (current date) and %ctm% (current
time). When DATETIME.BAT runs, it stores three lines in a new file
SETDT.BAT. First is an @echo off command. The second and third lines
have SET commands that assign arguments %3 and %4 to environment
variables, using the > and >> operators to create the new batch file
and append text to it.

Next, dir lists SETDT.BAT's directory entry, from which FIND
filters other text such as the pathname and bytes-free value. The
result--a single-line batch file reading something like "SETDT BAT
39 2-15-90 9:42a." Calling this batch file executes SETDT with
four arguments: BAT, 39, 2-15-90, and 9:42a, the first two of which
are ignored. The last two are saved to variables %cdt% and %ctm%.
After these steps, DATETIME.BAT erases ROUTER.BAT and SETDT.BAT,
leaving the date and time in the environment.

To use this technique, you must be running DOS 3.3 or a later version
that implements the CALL command. Copy DATETIME.BAT to a directory
listed in a PATH command and call it from another batch file. Run
TESTDT.BAT for an example of how DATETIME.BAT and its resulting
variables can be used. FIND.EXE must also be in the current path.

___ Blue Wave/QWK v2.12
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to BAT Magic  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0129 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.1.241108