Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Floppy disk label(s/ing)
Message
From
28/07/1999 19:07:58
 
 
To
28/07/1999 18:21:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00240547
Message ID:
00247459
Views:
23
>Thanks for the tips, but I was already aware of those. They're fine for reading the label (as is the ADIR function Fred Taylor suggests) but they do not provide a mechanism for *writing* the label.
>
>Any thoughts?
>

You could play with the Win32 API call SetVolumeLabel(); in VFP it would be used as follows:
DECLARE INTEGER SetVolumeLabel IN KERNEL32.DLL ;
   STRING @ lpRootPathName, ;
   STRING @ lpVolumeName

IF SetVolumeLabel('A:\'+CHR(0),'MyLabel'+CHR(0)) = 1
   *  it worked
ELSE
   *  it didn't
ENDIF
Volume labels are case-insensitive; you need to specify the root path of the drive whose volume you're setting.

>-Arne
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform