home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 February / PCWorld_1999-02_cd.bin / software / Zkuste / WinBat98 / FREEDISK.WB_ < prev    next >
Text File  |  1996-01-05  |  861b  |  33 lines

  1. ;FREESPACE
  2. ; Computes total free space on the system
  3.         Drives=DiskScan(6)     ; 6=4+2 Network and Local Drives
  4.         Dmax=strlen(Drives)
  5.         BoxOpen("Network Free Space","Looking for space on hard drives")
  6.         Delay(2)
  7.         DIndex=1
  8.         TotalSize=0
  9.         DriveReport=""
  10.  
  11.         :COUNTSPACE
  12.         NextDrive=StrSub(Drives,Dindex,1)
  13.         a=DiskFree(NextDrive)/1024
  14.         TotalSize=a+TotalSize
  15.         BoxText("Checking %NextDrive%:")
  16.         DriveReport=strcat(DriveReport,NextDrive," = ",@TAB,a,"K",@TAB,strfill("|",(a+2500)/5000),@CRLF)
  17.         DIndex=Dindex+3  ;each entry is 3 bytes long
  18.         if DIndex<=Dmax then goto COUNTSPACE
  19.         BoxShut()
  20.         Message("Total Space Available = %TotalSize%K",DriveReport)
  21.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  22.         Exit
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.