The usage of the VBS property ShareName
This article introduces the relevant knowledge of "the use of VBS attribute ShareName". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Returns the network share name of the specified drive.
Object.ShareName
Object should be the name of the Drive object.
Description
If object is not a network drive, the ShareName property returns a zero-length string (").
The following code illustrates how to use the ShareName property:
Function ShowDriveInfo (drvpath) Dim fso, d Set fso = CreateObject ("Scripting.FileSystemObject") Set d = fso.GetDrive (fso.GetDriveName (fso.GetAbsolutePathName (drvpath) ShowDriveInfo = "Drive" & d.DriveLetter & ":" & d.ShareNameEnd Function "usage of VBS attribute ShareName" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!