mIRC Drive Statistics
This script will post the usage and capacity of each drive.
type /hddstats
Output
[Drive: C: (||------------------) 25.29GB/237.98GB]
[Drive: D: (||||||||||||||------) 2637.38GB/3725.9GB]
[Drive: E: (|||||||||||||||||||-) 3516.02GB/3725.9GB]
[Drive: F: (|||||||||||||||||||-) 3491.33GB/3725.9GB]
[Drive: G: (||||||||||||||||||||) 3656.3GB/3725.9GB]
[Drive: H: (|||||||||||||||-----) 1355.26GB/1862.89GB]
[Total: 14681.58GB/17004.46GB]
alias hddstats {
if ($0 == 0) {
var %drives cdefghijklmnopqrstuvwxyz
var %i 1
while (%i <= $len(%drives)) {
set %drive $mid(%drives,%i,1)
if ($disk(%drive) == $true) {
if ($disk(%drive).type == fixed) {
showdrivestats %drive $+ :
say $result
}
}
inc %i
}
unset %drive
showdrivestats
say $result
}
else {
showdrivestats $1
say $result
}
}
alias showdrivestats {
if ($0 == 0) {
;hddbar
;var %hddbar $result
hddsize $1
var %hddsize $result
return $+ $chr(91) $+ $+ Total %hddsize $+ ]
}
else {
if ($disk($1) == $false) { return }
hddbar $1
var %hddbar $result
hddsize $1
var %hddsize $result
return $+ $chr(91) $+ $+ Drive $1 %hddbar %hddsize $+ ]
}
}
alias hddbar {
var %bar_size 20
if (%bar_size == 0) { return }
if ($0 == 0) { return }
if ($disk($1) == $false) { return }
var %bar_unused $round($calc(($disk($1).free / $disk($1).size) * %bar_size),0)
var %bar_used $round($calc(%bar_size - %bar_unused),0)
return ( $+ $str(|,%bar_used) $+ $str(-,%bar_unused) $+ )
}
alias hddsize {
if ($0 == 0) {
var %drives cdefghijklmnopqrstuvwxyz
var %totalfree 0
var %totalsize 0
var %i 1
while (%i <= $len(%drives)) {
set %drive $mid(%drives,%i,1)
if ($disk(%drive) == $true) {
if ($disk(%drive).type == fixed) {
inc %totalfree $disk(%drive).free
inc %totalsize $disk(%drive).size
}
}
inc %i
}
unset %drive
var %divisor 1024/1024/1024
var %size GB
var %hdd_bfree $round($calc(%totalfree / %divisor),2)
var %hdd_btotal $round($calc(%totalsize / %divisor),2)
var %hdd_bused $calc(%hdd_btotal - %hdd_bfree)
return %hdd_bused $+ %size $+ / $+ %hdd_btotal $+ %size
}
else {
if ($disk($1) == $false) { return }
var %divisor 1024/1024/1024
var %size GB
var %hdd_bfree $round($calc($disk($1).free / %divisor),2)
var %hdd_btotal $round($calc($disk($1).size / %divisor),2)
var %hdd_bused $calc(%hdd_btotal - %hdd_bfree)
return %hdd_bused $+ %size $+ / $+ %hdd_btotal $+ %size
}
}