;FREESPACE
; Computes total free space on the system
        Drives=DiskScan(6)     ; 6=4+2 Network and Local Drives
        Dmax=strlen(Drives)
        BoxOpen("Network Free Space","Looking for space on hard drives")
        Delay(2)
        DIndex=1
        TotalSize=0
        DriveReport=""

        :COUNTSPACE
        NextDrive=StrSub(Drives,Dindex,1)
        a=DiskFree(NextDrive)/1024
        TotalSize=a+TotalSize
        BoxText("Checking %NextDrive%:")
        DriveReport=strcat(DriveReport,NextDrive," = ",@TAB,a,"K",@TAB,strfill("|",(a+2500)/5000),@CRLF)
        DIndex=Dindex+3  ;each entry is 3 bytes long
        if DIndex<=Dmax then goto COUNTSPACE
        BoxShut()
        Message("Total Space Available = %TotalSize%K",DriveReport)
        Drop(TotalSize,DriveReport,Drives,NextDrive)
        Exit










