The usage of the VBS property VolumeName
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!