----^--->
/\

//\\
//The\
/Sy
stem\
////
Guard
\

In the mount of the LORD it shall be seen. Genesis 22:14

.GetValue

Booming Or Fuming? | MasterCatalog | ntlib (FREE) | NTCmdLib | MtCmds | Scripts | Almost Free | TheGuardBook | Help

 

Types of
.Mount/\Commands

.CrystalClear | .ExactName | .ExitELn | .GetValue | .ifCondition | .ifELn | .IsPattern | .ListValue | .NetValue | .NowValue | .RedirRapids | .ReliableReporting | .RestoreValue | .SetELn | .ValueEcho

GetValue
Series

  .GetCD | .GetDate | GetDirSize | GetDirSizeM | GetFree | GetFreeM | GetIPAddr | GetIPGateway | GetIPMask | GetLogDate | GetLogTime | GetLogTimeP | GetMac | GetNic | GetOS | GetRole | GetTempFile | GetTime | GetTimeP

.Get[Value] Series

  1. Retrieve, optionally reformat and display a single value to the console
  2. Place the retrieved value in a variable named #value
  3. Set an errorlevel, if applicable, based on the result

(sample times and dates are based on Wednesday, January 1, 2003 at 7:05:30.07 AM local time, Regional Settings=US English)

.Mt/\Cmd

Sample
Output
Description
.GetOS 2K Displays the current Operating System (NT/2K/XP/K3) -AND- updates #os
.GetRole Wkstn Displays the current Role (Wkstn or Server) -AND- updates #Role
     
.GetFree 123456789 Displays the free space (in bytes) on the current drive, updates #Free -AND- saves the previous value of #Free (if available) in #Previous_#Free
.GetFreeM 123 Displays the free space (in Millions of bytes) on the current drive, updates #FreeM, -AND- saves the previous value of #FreeM (if available) in #Previous_#FreeM
.GetDirSize 123456789 Displays the size (in bytes) of the current directory, updates #DirSize -AND- saves the previous value of #DirSize (if available) in #Previous_#DirSize
.GetDirSizeM 123 Displays the size (in Millions of bytes) of the current directory, updates #DirSizeM -AND- saves the previous value of #DirSizeM (if available) in #Previous_#DirSizeM
     
.GetCD C:\ Displays the current directory -AND- updates #cd       
.GetLines 25 Displays the number of lines in the current console window -AND- updates #Lines
.GetCols 80 Displays the number of columns in the current console window -AND- updates #Cols
.GetPrompt $P$G Displays the current prompt string -AND- updates #Prompt
     
.GetIPAddr 172.16.7.77 Displays the current IP Address as nnn.nnn.nnn.nnn, or none or multi) -AND- updates #IPAddr
.GetIPGateway 172.16.7.1 Displays the current Default Gateway Address as nnn.nnn.nnn.nnn, or none or multi) -AND- updates #IPGateway
.GetIPMask 255.255.255.0 Displays the current Subnet Mask as nnn.nnn.nnn.nnn, or none or multi) -AND- updates #IPMask
.GetNic PCI Bus Master Adapter Displays the current Description text from (IPConfig /all) as "text" or none or multi) -AND- updates #nic
.GetMac 0080C6F16AB3 Displays the current MAC (Hardware Address) as
nn-nn-nn-nn-nn-nn, or none or multi) -AND- updates #mac
     
.GetDate Wed 01/01/2003 Displays the current date (format from DATE /T) -AND- updates #Date
.GetTime 07:05:30 Displays the current time as hh:mn:ss -AND- updates #Time
.GetTimeP 07:05:30.07 Displays the Precise time as hh:mn:ss.hs -AND- updates #TimeP
.GetLogDate 20030101 Displays the current date as yyyymmdd -AND- updates #LogDate
.GetLogTime 070530 Displays the current time as hhmnss -AND- updates #LogTime
.GetLogTimeP 07053007 Displays the Precise time as hhmnsshs -AND- updates #LogTimeP

If multiple instances of value are found, the .Get[Value] command will return "multi", and set errorlevel to 2.  In that case, use the associated .List[Value] command to display all instances, one per line.  If no instances are found, .Get[Value] will return "none", and set errorlevel to 1.


/\
//\\
//
The\
/Sy
stem\
////
Guard
\
COME ON UP WITH US!
and
Congratulations On Your Decision
to
RISE ABOVE
THE REST!

^
/
!\
/LIB\

TheSystemGuard.com [Revised: 2007-03-29]
Copyright 1995-2007, JWC
Computer Communications,
All Rights Reserved, Worldwide.
 Disclaimer       Privacy       About Us       More


Communication Is Business!

We Master It With Knowledge!

^
/
.\
/M^C\