Please allow me to answer my own question. You can set a reference to the old COM FileSystemObject and use as follows.
Function GetUNCPath(ByVal strDrvLetter As String) As String
Dim fso As New Scripting.FileSystemObject()
Dim drv As Scripting.Drive = fso.GetDrive(strDrvLetter ":"
If drv.DriveType = Scripting.DriveTypeConst.Remote Then
Return drv.ShareName
Else
Return drv.Path
End If
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.