Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property VolumeName

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

This article introduces the relevant knowledge of "the use of VBS attribute VolumeName". 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!

Sets or returns the volume label of the specified drive. Can read and write.

Object.VolumeName [= newname]

Parameter object

Required. Expected the name of the Drive object.

Newname

Optional. If this parameter is provided, newname is the new name of the specified object.

Description

The following code illustrates how to use the VolumeName property:

Function ShowVolumeInfo (drvpath) Dim fso, d, s Set fso = CreateObject ("Scripting.FileSystemObject") Set d = fso.GetDrive (fs.GetDriveName (fso.GetAbsolutePathName (drvpath) s = "drive" & d.DriveLetter & ":" & d.VolumeNameShowVolumeInfo = sEnd Function

Undefined

This is the end of the introduction to "the use of VBS attribute VolumeName". 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 parameters name more knowledge driver driver practical learned next code dilemma actual object situation article case editor website Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Microsoft Shulou Technology Docker