Volum Info

* 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.