image\cslogo3d1.gif

VBScript Drive Object VolumeName Property

Sets or returns the volume name of the specified drive. This property is not currently supported on UNIX. Read/write.

Syntax: VBScript Drive Object VolumeName Property

object.VolumeName [= newname]

Arguments: VBScript Drive Object VolumeName Property

object

The name of a Drive object. Required.

newname

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

Remarks: VBScript Drive Object VolumeName Property

The following code illustrates the use of the VolumeName property:

Sub ShowVolumeInfo(drvpath)

Dim fs, d, s

Set fs = CreateObject("Scripting.FileSystemObject")

Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutepathname(drvpath)))

s = "Drive " & d.DriveLetter & ": - " & d.VolumeName

Response.Write s

End Sub

Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.