HI Guys.

I have a problem.

I want to list all shared network folders in my program. Thats working fine,
code below.

BUT I would like to show also the UNC name of the share (like
\\server\folder\ <file://server/folder/>)
This is not working.

Does somebody can help me, and show to get this information.
Volume Label is showing me the label of the drive volume, but not the share
name.



current code (short version)


*public* *void* listNetworkFolders(*ref* DataTable dt)

{

dt.Rows.Clear();

System.IO.DriveInfo[] allDrives = System.IO.DriveInfo.GetDrives();

*foreach* (System.IO.DriveInfo d *in* allDrives)

{

*if* (d.DriveType.ToString().Contains("Network"))

{

DataRow row = dt.NewRow();

row[0] = d.Name + " " + d.VolumeLabel.ToString();

dt.Rows.Add(row);

}

}

}



Thanks in advance.



Michael

Reply via email to