TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: `SAMMY MITCHELL`
date: 1998-01-03 02:26:00
subject: How to Set the Volume Label?

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.