| Home | All functions | Categories |
vuGetVolumeLabel(*CSTRING), CSTRING
Returns the volume label of the specified root directory. Supports both local drives and UNC paths.
| Parameter | Data Type | Description |
|---|---|---|
| tDir | CSTRING(128) | Path to the root directory (for example, C:\ or \\MyServer\C\). |
Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.
A CSTRING containing the volume label of the specified root directory.
sRootPath CSTRING(4)
sLabel CSTRING(64)
sMsg STRING(128)
CODE
sRootPath = 'C:\'
sLabel = vuGetVolumeLabel(sRootPath)
IF (sLabel = '<unreadable>')
sMsg = 'Unable to retrieve volume label for: ' & CLIP(sRootPath)
ELSE
sMsg = 'Volume label for ' & CLIP(sRootPath) & ' is: ' & CLIP(sLabel)
END
MESSAGE(sMsg, 'vuGetVolumeLabel Test')
Notes
Works with both local drives and network shares.
Returns
Ensure tDir points to a valid root directory.
| Home | All functions | Categories |