; **/ ; * Shows the space! ; * ; * @author Mohamed Mansour ; * @since 5/12/2006 ; * @build 0.1 ; */ alias Tools.ShowAllSpace { ;// Initializations var %output = FREE SPACE: $chr(32) var %diskarray = $disk(0) var %currarray = 1 var %tspace = 0 var %fspace = 0 ;// Lets loop through the Disk Array while ( %currarray <= %diskarray ) { ;echo -an %diskarray ;// Current Disk Array Stats var %totalspace = $disk( $+ %currarray $+ ).size var %freespace = $disk( $+ %currarray $+ ).free var %currspace = $calc(%totalspace - %freespace) var %currpath = $remove($disk( $+ %currarray $+ ).path ,\) var %label = $disk( $+ %currarray $+ ).label ;// Only record the non zero arrays if ( %freespace != 0 ) { ;// Lets record the the total disk space %tspace = $calc( %tspace + $disk( $+ %currarray $+ ).size ) %fspace = $calc( %fspace + $disk( $+ %currarray $+ ).free ) ;// Here is the output buffer %output = $+(%output, $chr(32)  $+ %currpath $+  $chr(32)) %output = $+(%output, ( $+ %label $+ ) $bytes(%freespace,G)) %output = $+(%output, $+ / $+ $bytes(%totalspace,G) gb) } ;// Lets Goto the next Disk Array %currarray = $calc(%currarray + 1) } var %percentage = $int($calc( %fspace / %tspace * 100 )) ;// Lets add the total Disk Array count %output = $+(%output,$chr(32) Total Free: $bytes(%fspace,G) $+ gb) %output = $+(%output,( $+ %percentage $+ % $+ ) free out of $bytes(%tspace,G)) %output = $+(%output, gb) ;// Message out the buffer to Channel or Query /MSG $active $1 } ;// ### Menu menu query,channel { - Total Space: /Tools.ShowAllSpace - }