* Harbour Example lists the volume serial numbers
* and volum labels of all drives in the system ( PC )
*
* Build :
*
* c:\harbour\bin\hbmk2 VolInfo -lhbct -lxhb -run
*
PROCEDURE Main()
LOCAL nDrive, cDrive, nSerial, cSerial
SetMode( 25, 80 )
CLS
SETPOS( 5, 0 )
FOR nDrive := 1 TO 26
cDrive := CHR( 64 + nDrive ) + ":\"
nSerial := VolSerial( cDrive )
IF nSerial # -1
cSerial := NTOC( nSerial, 16 )
? cDrive, STUFF( cSerial, 5, 0, ":" ) + " " + GetVolInfo( cDrive )
ENDIF
NEXT
@ MAXROW(), 0
WAIT "EOF VolInfo.prg"
RETURN
Like this:
Like Loading...
Related