Method

Volume


Warning

This item was deprecated in version 2019r2. Please use FolderItem.DriveAt as a replacement.

Description

Returns a FolderItem that represents a mounted Volume.

Usage

result=Volume(VolumeNumber)

Part

Type

Description

result

FolderItem

The mounted volume whose number was passed.

VolumeNumber

Integer

The number of the volume you require a FolderItem for. The boot volume is volume 0.

Notes

The Volume function returns a FolderItem that represents the mounted Volume whose number was passed. Volume zero is the boot Volume. This function can be used in conjunction with the FolderItem.DriveCount function to loop through the mounted volumes.

Sample code

This example places the names of all mounted volumes into a ListBox control:

Dim vols As Integer
vols = VolumeCount - 1
For i As Integer = 0 To vols
  ListBox1.AddRow(Volume(i).Name)
Next

Compatibility

All project types on all supported operating systems.

See also

FolderItem.DriveCount function; FolderItem class.