"John A Grandy" wrote
> for example: i want the nt "time" command to print the time to the batch
> file's log-file


The (FREE) Advanced NT/2K/XP Command Library (ntlib.cmd) provides the
..Mount/\Commands ".DateEcho" and ".TimeEcho", which CONSISTENTLY
echo the date or time under NT/2K/XP/K3 using only what is
available in a standard install of each platform.
*******
C:\GuardPost>%.DateEcho% Optional Message
[Mon 09/01/2003] Optional Message
C:\GuardPost>%.TimeEcho% Optional Message
[05:18:51] Optional Message

-OR-

C:\GuardPost>%.TimeEcho% Job Started >> logfile.txt

C:\GuardPost>%.TimeEcho% Working... >> logfile.txt

C:\GuardPost>%.TimeEcho% Job Finished >> logfile.txt

C:\GuardPost>type logfile.txt
[05:30:19] Job Started
[05:30:27] Working...
[05:30:36] Job Finished

*******

Related commands:


[The following echo to STDOUT]

__________________________________________________ ________LogDateEcho
20030901 Optional message from LogDateEcho
__________________________________________________ ________LogTimeEcho
051853 Optional message from LogTimeEcho
__________________________________________________ ________dtEcho
[Mon 09/01/2003 05:18:53] Optional message from dtEcho
__________________________________________________ ________ldtEcho
20030901 051853 Optional message from ldtEcho


*******

[The following echo to STDERR]

__________________________________________________ ________dErrEcho
[Mon 09/01/2003] Optional error message from dErrEcho
__________________________________________________ ________ldErrEcho
20030901 Optional error message from ldErrEcho
__________________________________________________ ________tErrEcho
[05:18:53] Optional error message from tErrEcho
__________________________________________________ ________ltErrEcho
051853 Optional error message from ltErrEcho
__________________________________________________ ________dtErrEcho
[Mon 09/01/2003 05:18:53] Optional error message from dtErrEcho
__________________________________________________ ________ldtErrEcho
20030901 051855 Optional error message from ldtErrEcho

*******
All of the above are part of the .[Value]Echo Series of .Mount/\Commands.
See the .ValueEcho Page for details
(http://TheSystemGuard.com/MtCmds/ValueEcho)

*******
Notes:

1. .Mount/\Commands are constructed using ONLY builtin
commands common to all four platforms (NT/2K/XP/K3).
2. .M/\C's are NOT case sensitive. Mixed case is used
for Visual Clarity only.
3. ntlib.cmd provides over 100 resources to assist with
writing and documenting cross-platform scripts,
including 57 fully functional .Mt/\Cmds.
You can obtain it (for FREE) at (http://ntlib.com).

*******

-tsg
__________________________________________________ __________
TheSystemGuard.com | BoomingOrFuming.com | MountCommands.com
Free and "Almost Free" Knowledge for Windows System Admins!