| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Retrieves the volume label of a disk.
GetVolInfo( <cDrive> ) --> lSuccess
The function returns the volume label of a disk as a character string, or a null string ("") in case of an error.
| See also: | FileSeek(), VolSerial(), Volume() |
| Category: | CT:DiskUtil , Disks and Drives , xHarbour extensions |
| Source: | ct\disk.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example lists the volume labels of all drives and displays them.
PROCEDURE Main
LOCAL cDrive, i, cLabel
FOR i:=1 TO 26
cDrive := Chr(64+i) + ":\"
cLabel := GetVolInfo( cDrive )
IF .NOT. Empty( cLabel )
? cDrive, cLabel
ENDIF
NEXT
RETURN
http://www.xHarbour.com