home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR19
/
SNIP0693.ZIP
/
DISKSPA.PRG
< prev
next >
Wrap
Text File
|
1992-09-05
|
1KB
|
50 lines
Try the following C UDF, it will report both the total bytes on disk, and
the number free depending what you pass to it, BUT you'll need Borland C
to compile it though.
// -------------------------- CUT HERE ------------------------------
#include "Dos.ch"
FUNCTION Main ()
LOCAL ErrorCode := 0
? DiskSpace( 0, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 0, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 1, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 1, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 2, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 2, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 3, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 3, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 4, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 4, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 5, @ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 5, @ErrorCode, DISK_FREE )
? ErrorCode
?
? DiskSpace( 5, ErrorCode, DISK_TOTAL )
? ErrorCode
? DiskSpace( 5, @ErrorCode )
? ErrorCode
?
RETURN( NIL )