Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return full network address of mapped drive 2

Status
Not open for further replies.

rockfish12

Technical User
Feb 12, 2002
31
US
How can I return the full network address of a mapped drive, rather than just the local path and locally issued drive letter (e.g. "//computer1/folder1" instead of, say, "m:/folder1")?

I've tried the GetAbsolutePathName method of the FileSystemObject, but I believe that it can only return the fully qualified local path and locally issued drive letter, (according to O'Reilly).
 
Try this

Dim fldr As Folder
Dim fso As New FileSystemObject
Dim drv As Drive
Set drv = fso.GetDrive(fso.GetDriveName("L:"))
MsgBox drv.ShareName
 
Make sure you set reference to the Microsoft Scripting Runtime object.
 
Thanks, DrJavaJoe and paulbent. I give both of these suggestions a go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top