Drive Display

By mm01 on May 05, 2004

add this in your aliases. displays the total and freespace of your hard drives.
to use this just type '/sys'

Example....

System Info...
Running Win 2K :: Current Time is (5/5/04@2:58am)
Uptime: 1day 1hr 16mins 33secs
Physical Drives:
c:\ [free(27.41gB) total(37.25gB)]
e:\ [free(54.69gB) total(74.5gB)]
f:\ [free(8.66gB) total(29.3gB)]
g:\ [free(29.22gB) total(29.29gB)]
Total freespace = 131.51 of 185.01gB

alias freespace { return $round($calc(($disk($$1).free)/1024^3),2) $+ gB }
alias totalspace { return $round($calc(($disk($$1).size)/1024^3),2) $+ gB }
alias sys {
  var %i = 0
  echo -a System Info...
  echo -a Running Win $os :: Current Time is ( $+ $asctime(m/d/yy) $+ @ $+ $time(h:nntt) $+ )
  echo -a Uptime: $duration($calc(($ticks)/1000))
  echo -a Physical Drives:
  while (%i <= $disk(0)) {
    :next
    inc %i 1
    if ($disk(%i) == $false) { goto next }
    elseif (%i == $disk(0)) { goto end }
    else { echo -a $lower($disk(%i).path)  [free( $+ $freespace(%i) $+ ) total( $+ $totalspace(%i) $+ )] }
  }
  :end
  var %x = 0 | var %s = 0 | var %f = 0
  while (%x <= $disk(0)) {
    :next1
    inc %x 1
    if (%x == $disk(0)) {
      inc %s $calc(($disk(%x).size)/1024^3)
      inc %f $calc(($disk(%x).free)/1024^3)
      goto end1
    }
    else {
      inc %s $calc(($disk(%x).size)/1024^3)
      inc %f $calc(($disk(%x).free)/1024^3)
      goto next1
    }
  }
  :end1
  echo -a Total freespace = $round(%f,2) of $round(%s,2) $+ gB
}

Comments

Sign in to comment.
Swat-Warrior   -  Nov 21, 2010

Works but lags me out :P

 Respond  
CowBoy   -  Dec 24, 2004

Yes it does work but after it displays all your physical drives it lags like crazzy

 Respond  
Slippery   -  Jun 21, 2004

works... but maybe its me... the lag is so bad it causes a crash...

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.