|
| |
$CENTER (Center a String)
Description
Centers a variable's contents or a "Quoted String" in
an 80-column console window.
Syntax
At the Command Prompt (library
IS NOT initialized)
|
C:\>NTCmdLib |
$CENTER VariableName|"Quoted String" |
At the Command Prompt (library
IS initialized)
|
C:\>L
|
$CENTER VariableName|"Quoted String" |
In a Script (library
IS NOT initialized)
|
CALL
NTCmdLib |
$CENTER VariableName|"Quoted String" |
In a Script (library IS
initialized)
|
%.Call% |
$CENTER VariableName|"Quoted String" |
Parameters and Switches
| VariableName |
|
Name of a variable containing a string to be centered. |
| "Quoted String" |
|
A literal string to be centered. |
Errorlevels, Output Variables and Custom Mount/\Commands
|
Name |
|
Value |
|
Description/Contents |
|
_CENTER |
|
Report Title |
|
Variable containing the centered text. |
|
ErrorLevel |
|
Description/Contents |
|
0 |
|
Success |
|
2 |
|
Missing or invalid parameter |
Examples, Notes and Instructions
Example 1 - Center a string from the command line
|
C:\GuardPost>NTCmdLib
$CENTER "Center this Report Title for %computername%"
^ =========================================================================
/!\ NTCmdLib.cmd 2004.03.28 NT/2K/XP/K3 ("Almost Freeware" at $9 or less!)
/LIB\ =========================================================================
....'....1....'....2....'....3....'....4....'....5....'....6....'....7....'....
Center this Report Title for Server1
C:\GuardPost>ECHO
%_CENTER%
Center this Report Title for Server1
C:\GuardPost>
|
Notes
- Output is displayed to STDOUT, errors to STDERR
- To suppress console display, use the library GlobalSwitch /Quiet (or simply /q)
NTCmdLib /Q TaskID /TaskSwitches Parameters
CALL NTCmdLib /Q TaskID /TaskSwitches Parameters
%.Call% /Q TaskID /TaskSwitches Parameters
Related .Mount/\Commands, #Constants,
$Functions, :Procedures
|
Resource |
|
Short Description |
| |
|
|
|
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 |
|