Jano Svitok
11/21/2006 8:52:00 AM
On 11/20/06, Alfonso <rubyeu@yahoo.es> wrote:
> Does anyone knows how can you get the volume name of a drive in windows?
> I'm writting a program that should get the name of the cd or dvd
> inserted in the drive. The user selects a directory using a gtk dialog
> (filechooser), and then I have the path of the folder; but when you
> select a cd/dvd, you get only the letter of the drive (E:\, D:\,...).
>
> I have tried also File.dirname(name_of_a_file_in_the_dvd). It doesn't
> give you the cd/dvd name...
>
> Thank's in advance
I guess there's some WINAPI (use WIN32API) for that, or WScript (COM
-> use WIN32OLE) or WMI (COM). Just google a bit (and see Programming
Ruby how to use those libs).