Getting a volume name.

  • Thread starter Thread starter Eddie
  • Start date Start date
E

Eddie

Hi,

Anyone know how to get a Drive's Volume Label using vb.net?

Thanks in advance.

Eddie
 
Hello,

Eddie said:
Anyone know how to get a Drive's Volume Label using
vb.net?

\\\
MessageBox.Show(Dir("C:\", FileAttribute.Volume))
///

HTH,
Herfried K. Wagner
 
Set a reference to Microsoft Scripting Runtime (COM)

Add

Imports Script

Then:

Dim fso as New FileSystemObject
Dim drv as Drive

drv=fso.GetDrive("C")

MessageBox.Show ("Volume: " & drv.VolumeName)


HTH,

Larry Woods
 
Back
Top