REM */ WINBLOWS 95 ONLY :P /*
rem found this on 6/13/2001 on my hard drive, i wrote it in like mid-1998
rem i used to be able code, what happeneD? :P
rem i like this program for some reason :P
rem why did i have C style comments in a qbasic program?

INPUT "Last Drive?(lowercase)", lastdrive$
PRINT "Filesystem         1024-blocks   Used Available Capacity"

REM */ this is just a loop to run the chkdsk D: > d /*
FOR drive = 1 TO ASC(lastdrive$) - 98
drive$ = CHR$(drive + 98)
shellcommand$ = "command /c chkdsk " + drive$ + ":" + ">" + drive$
SHELL shellcommand$

REM */ open up all the files :P /*
OPEN drive$ FOR INPUT AS #drive
NEXT drive
FOR drive = 1 TO ASC(lastdrive$) - 98
drive$ = CHR$(drive + 98)

1 LINE INPUT #drive, hi$
REM */ fat16 and fat32, have different chkdsk's, dammit /*
IF MID$(hi$, 15, 15) = "kilobytes total" THEN GOTO 5
IF MID$(hi$, 15, 11) = "bytes total" THEN GOTO 4
GOTO 1
2 NEXT drive
REM */ funky.. an end(system) statement, in the middle of my code /*
SYSTEM

4 REM /* BYTES OUTPUT LINE (fat16) */
space = (VAL(MID$(hi$, 1, 1)) * 1000000000) + (VAL(MID$(hi$, 3, 3)) * 1000000) + (VAL(MID$(hi$, 7, 3)) * 1000) + (VAL(MID$(hi$, 11, 3)))
PRINT drive$; "                   "; USING "########"; space / 1024;
LINE INPUT #drive, hi$
IF MID$(hi$, 15, 8) = "bytes in" THEN LINE INPUT #drive, hi$: LINE INPUT #drive, hi$: LINE INPUT #drive, hi$
 free = (VAL(MID$(hi$, 1, 1)) * 1000000000) + (VAL(MID$(hi$, 3, 3)) * 1000000) + (VAL(MID$(hi$, 7, 3)) * 1000) + (VAL(MID$(hi$, 11, 3)))
PRINT "  "; USING "#######"; (space - free) / 1024;
PRINT "  "; USING "#######"; free / 1024;
PRINT "     "; USING "##"; ((space - free) / (space) * 100);
PRINT "%"
CLOSE #drive
SHELL "del " + drive$
GOTO 2

5 REM /* KBYTES OUTPUT LINE (fat32) */
space = (VAL(MID$(hi$, 5, 1)) * 1000000) + (VAL(MID$(hi$, 7, 3)) * 1000) + (VAL(MID$(hi$, 11, 3)))

PRINT drive$; "                   "; USING "########"; space;
LINE INPUT #drive, hi$
free = (VAL(MID$(hi$, 5, 1)) * 1000000) + (VAL(MID$(hi$, 7, 3)) * 1000) + (VAL(MID$(hi$, 11, 3)))
PRINT "  "; USING "#######"; space - free;
PRINT "  "; USING "#######"; free;
PRINT "     "; USING "##"; ((space - free) / space * 100);
PRINT "%"
REM /* end of kbyte block */
CLOSE #drive
SHELL "del " + drive$
GOTO 2
REM */ UNF :P /*

