home *** CD-ROM | disk | FTP | other *** search
- TOADFREE.ZIP Report drive free space as ERRORLEVEL
-
- TOADFREE disk free space utility
- Usage: TOADFREE D n
- Where D is a target drive
- and n is a figure from 1 to 4,294,967,295
- Returns ERRORLEVEL 0 if that much free space
- or ERRORLEVEL 1 if less.
-
- This was requested by SEMPER BBS SYSOP who wanted to insure there
- was sufficient free space on a drive before he copied some files
- from the upload drive to his storage drive.
-
- At first I assumed a byte-sized parameter (e.g. 0..255) as requested
- free space in KB would be adequate ... but Nooooooooo .... he wanted
- more. Well, I hope 4 Gigabytes will do him. (I threw in the comma-
- gobbling for free.)
-
- He *says* it works just fine ... which is nice, I guess. I couldn't
- really test it very well on my old 80286 XT clone. The program reports
- FALSE (ERRORLEVEL 0) when I request 4 Gigabytes from my ancient Seagate
- 20MB hard disk .. so theoretically it works.
-
- (Oh, yeah, if you don't like gigabytes and prefer talking in hex, just
- call it 0FFFFFFFH, the max value an unsigned long integer will hold.
- Or DX:AX .. or whatever ...)
-
- As usual, bits and pieces of code, logic, etc. cribbed from all over.
- PC Magazine's FREE, an assembly language library's AtoL conversion,
- etc. And all hacked to within an inch of its life.
-
- Credits? What credits?
-
- Given to the public domain
- David Kirschbaum
- Toad Hall
- kirsch%maxemail@wsmr-simtel20.army.mil