0

Hi,

I need some information regarding the APIs to use, to get the drive letter, if I know the label of that drive.

For eg, my hard disk has been partitioned into 3 drives, C:, D:, E:. The labels (label1, label2, label3 )for these drives have been assigned dynamically. I want to locate a file ABC.txt which would be in the drive, of which voulme label is "Label2".

can anyone suggest the API to use, or can this be achieved thru batch script, if so, pl provide the required batch commands.

Thanks,
sv

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by ssharish2005
0

Thank you for ur reply. But, I don't need the label. I want to extract the drive letter, to which the particular label is assigned. I guess, GetVolumeInformation can do this, if we do for all the drives, but is there any btr solution?

0

Probably this would give u what u want. Try use that function and see what u get on each return value.

LPCTSTR lpRootPathName,


ssharish

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.