<div class="meta" robots="noindex">

</div>

Method

# Volume

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `FolderItem.DriveAt<folderitem.driveat>` as a replacement.

</div>

## Description

Returns a `FolderItem</api/files/folderitem>` that represents a mounted <span class="title-ref">Volume</span>.

## Usage

*result*=**Volume**(*VolumeNumber*)

| Part         | Type                                | Description                                                                                                  |
|--------------|-------------------------------------|--------------------------------------------------------------------------------------------------------------|
| result       | `FolderItem</api/files/folderitem>` | The mounted volume whose number was passed.                                                                  |
| VolumeNumber | `Integer</api/data_types/integer>`  | The number of the volume you require a `FolderItem</api/files/folderitem>` for. The boot volume is volume 0. |

## Notes

The <span class="title-ref">Volume</span> function returns a `FolderItem</api/files/folderitem>` that represents the mounted <span class="title-ref">Volume</span> whose number was passed. <span class="title-ref">Volume</span> zero is the boot <span class="title-ref">Volume</span>. This function can be used in conjunction with the `FolderItem.DriveCount<folderitem.drivecount>` function to loop through the mounted volumes.

## Sample code

This example places the names of all mounted volumes into a `ListBox</api/deprecated/listbox>` control:

``` xojo
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<folderitem.drivecount>` function; `FolderItem</api/files/folderitem>` class.
