From: "Sammy Mitchell"
Happy New Year everyone!
Here's a TSE 2.8 question...
I've been working on a customised File Manager macro and want to Get
and Set a drive's Volume label.
Initially, I thought FindFirstFile()/FindNextFile() using attributes of
_VOLUME_ would give me the Volume label but that didn't work.
Luckily, I found an undocumented function in TSE called GetVolumeInfo()
which does the trick.
It works like this:
integer GetVolumeInfo( STRING drive, VAR STRING volume)
NB: drive must be the rootpath ie. have a trailing slash.
eg.
string volume[20] = ""
GetVolumeInfo( "c:\" , volume)
warn("Volume label of Drive C is", volume)
However, I can find no way to Set or Update the Volume label without
resorting to an lDos("label","C:MYVOL",_DONTCLEAR_|_DONT_PROMPT_).
Does anyone know a DLL call I can use to set the Volume Label?
Thanks in advance,
Ross Boyd
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|