----^--->
/\

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

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

GetFree

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

.GetFree

Description

  1. Displays the available free bytes on the current drive (output is adjusted to stay within the limits allowable by the command shell)
  2. Saves the value in #Free
  3. Saves the previous value of #Free (if it exists) in #Previous_#Free
  4. Sets errorlevel based on the result

Syntax

%.GetFree%    

Parameters and Switches

none

   

Errorlevels and Output Variables

Display to
STDOUT

 

Value of
#Free

 

Error
Level

  Description of Result

0

 

Actual
Bytes

 

123

  0 bytes free

1-999

 

Actual
Bytes

 

3

  Less than 1,000 bytes free

1000-999999

 

Actual
Bytes

 

2

  Less than 1,000,000 bytes free

1000000-999999999

 

Actual
Bytes

 

1

  Less than 1,000,000,000 bytes free

1000000000
to
2000000000

 

Actual
Bytes

 

0

  Bytes free is between 1 Billion and 1,999,999,999

2000000000

 

2000000000

 

0

  Bytes free is 2,000,000,000 or greater

Examples, Notes and Instructions

NT
2K
XP
K3
C:\GuardPost>%.GetFree%
1925828608

C:\GuardPost>ECHO:%Errorlevel%
0

C:\GuardPost>SET #Free
#Free=1925828608

C:\GuardPost>
D:

D:\>%.GetFree%
11436032

D:\>ECHO:%Errorlevel%
1

D:\>SET #Free
#Free=11436032

D:\>SET #Previous_#Free
#Previous_#Free=1925828608

D:\

  • Output is displayed to STDOUT
  • To suppress console display, use

    %.GetFree% %.Quiet%

    {errorlevel and output variable(s) will still be available}


.GetValue
Series

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

Related .Mount/\Commands, #Constants, $Functions, :Procedures

Resource

  Short Description
#FreeM   Free space on current drive in Millions of bytes (M is 1000000 NOT MB, which is 1048576)
#FreeM_d   Free space on Drive d (in Millions of bytes, where d is any accessible local or remote drive)
#Free_d   Free space on Drive d (in bytes, where d is any accessible local or remote drive)

 

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
/\
//\\
//
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\