Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property ShareName

Shulou Source: shulou.com Published: 2022-06-03 19:53:46 11月12日 Update

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!

Tags: Attributes content more knowledge network driver driver practical learned next code name dilemma character string actual object situation article case Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Xiaomi Docker Shulou Tech Info vpn