|
| |
.ListFreeM
Description
- Displays the available free space (in Millions of bytes) on the current drive
- Saves the value in #FreeM
- Saves the previous value of #FreeM (if it exists) in #Previous_#FreeM
- Sets errorlevel based on the result
| Using this offset, we can easily perform mathematical calculations on values up to 1.776 Petabytes (PB),
1,818 Terabytes (TB) or 1,862,645 Gigabytes (GB), without exceeding the
limits of the native shell scripting environment. |
Syntax
Parameters and Switches
Errorlevels and Output Variables
|
Display to
STDOUT |
|
Value of
#Free |
|
Error
Level |
|
Description of
Result |
|
0 |
|
Actual Bytes
(in Millions) |
|
123 |
|
Less than 1M
bytes free |
|
1 to 999 |
|
Actual Bytes
(in Millions) |
|
3 |
|
Less than 1,000M
bytes free |
|
1000
to
999999 |
|
Actual Bytes
(in Millions) |
|
2 |
|
Less than 1,000,000M
bytes free |
|
1000000
to
999999999 |
|
Actual Bytes
(in Millions) |
|
1 |
|
Less than 1,000,000,000M
bytes free |
|
1000000000
to
2000000000 |
|
Actual Bytes
(in Millions) |
|
0 |
|
Bytes free is between
1,000,000,000M and 1,999,999,999M |
|
2000000000 |
|
Actual Bytes
(in Millions) |
|
0 |
|
Bytes free is 2,000,000,000M
or greater |
Examples, Notes and Instructions
NT
2K
XP
K3 |
C:\GuardPost>%.GetFreeM%
1925
C:\GuardPost>ECHO:%Errorlevel%
2
C:\GuardPost>SET #Free
#FreeM=1925
C:\GuardPost>D:
D:\>%.GetFreeM%
11
D:\>ECHO:%Errorlevel%
3
D:\>SET #FreeM
#Free=11
D:\>SET #Previous_#Free
#Previous_#Free=1925 |
- All output is in whole Millions of bytes (1,000,000) NOT Megabytes (1,048,576)
- Output is displayed to STDOUT
- To suppress console display, use
%.GetFreeM% %.Quiet%
{errorlevel and output variable(s) will still be available}
Related .Mount/\Commands, #Constants,
$Functions, :Procedures
|
Resource |
|
Short Description |
|
#Free |
|
Free space on current drive - values of 2,000,000,000 or greater will be displayed as 2000000000 |
|
#Free_d |
|
Free space on Drive d (in bytes, where
d is any accessible local or remote drive) |
|
#FreeM_d |
|
Free space on Drive d (in Millions of 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 |
|