FolderItem.DriveAt

From Xojo Documentation

Shared Method

FolderItem.DriveAt()

New in 2019r2

Supported for all project types and targets.

Returns a FolderItem that represents a mounted/connected drive.

Syntax

result=Drive(DriveNumber)

Part Type Description
result FolderItem The mounted drive whose number was passed.
VolumeNumber Integer The number of the drive you require a FolderItem for. The boot drive is volume 0.

Notes

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

Examples

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

For i As Integer = 0 To FolderItem.LastDriveIndex
ListBox1.AddRow(FolderItem.DriveAt(i).Name)
Next

See Also

DriveCount function; FolderItem class.