Volume Function

Returns a FolderItem that represents a mounted volume.

Syntax
result = Volume( VolumeNumber )

Parameters
VolumeNumber | Integer | The number of the volume you require a FolderItem for.

Return Value
Result | FolderItem | The mounted volume whose number was passed.

# 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 VolumeCount function to loop through the mounted volumes.

# Examples

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

Dim i,n as Integer
n= VolumeCount-1
For i=0 to n
ListBox1.AddRow Volume(i).Name
Next

The following example returns a FolderItem for the "Documents" folder on the user's boot volume.

Dim f as FolderItem
f=Volume(0).Child("Documents")

# See Also

VolumeCount function; FolderItem class.