.ReportHeader
Description
Displays a header for a standardized report. The default header is the FileName.Ext of the current script with a line of dashes above and
below. This text can be modified by setting the ReportTitle variable with your custom title.
Syntax
Parameters and Switches
|
ReportTitle |
|
an optional text string to describe the
currently running script. If set, this text will be placed in the header instead of FileName.Ext. |
Errorlevels and Output Variables
Examples, Notes and Instructions
- .ReportHeader is useful, in conjunction with other commands, for formatting text on the screen and in log files.
Example 1 - using the default filename and extension of the currently running script
%.ReportHeader%
-----------------------------------------------------------------------------
NTCmdLib.cmd
-----------------------------------------------------------------------------
Example 2 - using a custom ReportTitle
SET "ReportTitle=Expert NT/2K/XP/K3 Command Library Release 2004.03.14"
%.ReportHeader%
-----------------------------------------------------------------------------
Expert NT/2K/XP/K3 Command Library Release 2004.03.14
-----------------------------------------------------------------------------
Example 3 - the following code segment is similar to the final report of the "Almost Free" Snapshot Expert
script
NT
2K
XP
K3 |
%.ReportHeader%
ECHO: Source File: %#TAB% %~nx1%
ECHO: Destination Folder: %#TAB% %SafePlace%
ECHO: Snapshot Passes: %#TAB% %Snapshot_Passes%
ECHO: Snapshots Taken: %#TAB% %Snapshots_Taken%
ECHO: Snapshots Missed: %#TAB% %Snapshots_Missed%
ECHO: Total Wait Time: %#TAB% %Total_Wait_Minutes% minute^(s^)
%.ReportFooter% |
Sample output from the code above is:
-----------------------------------------------------------------------------
!Snapshot running on MOUNT as Administrator
-----------------------------------------------------------------------------
Source File: !Snapshot.cmd
Destination Folder: c:\!snapshot
Snapshot Passes: 96
Snapshots Taken: 7
Snapshots Missed: 0
Total Wait Time: 480 minute(s)
_____________________________________________________________________________
[Sat 03/20/2004 02:09:45] !Snapshot Expert 2004.03.14 - Task Complete.
|
K
E
Y |
Common Commands |
INTERNAL |
External |
/SWITCH |
Parameter |
Help text |
AddonTool |
|
Mounted Commands |
.Mount/\Command |
CmdShorthand |
#Constant |
$FUNCTION |
:Procedure |
!GuardNote |
|
Operating Systems |
NT/2K/XP/K3 |
NT Only |
NT/2K |
2K Only |
2K/XP |
XP Only |
XP/K3 |
K3 Only |
2K/XP/K3 |
|