Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.5.30 SetVolumeLabel or SetVolLabel (set a disk volume label)

Purpose

Sets the volume label of a disk.

Syntax
SetVolumeLabel (DiskName [, LabelName])
SetVolLabel (DiskName [, LabelName])
Arguments
DiskName

Specify the disk volume as a character string or as a variable that stores this value. You can omit the colon (:).

LabelName

Specify the volume label to set, using a character string or a variable that stores this value.

This value is optional. If you omit this value, a zero-length string ("") is assumed.

Description

The SetVolumeLabel or SetVolLabel command sets the volume label of a disk. The command returns True on successful execution, or False if an error occurs.

Note

Execute the script file as a user who has administrator permissions. For details, see 1.8.2 Command behavior.

Example
Dim drvName, volName
drvName = "E:"
volName = GetVolumeLabel (drvName)
If volName = Empty Then
  SetVolumeLabel (drvName, "Script shared drive")
End
JP1/Script version

Supported from JP1/Script 05-10.