Skip to main content

TrFile_ListDisks (function reference)

Troi File Plug-in for FileMaker Pro

TrFile_ListDisks

Lists the names of all currently available disks.

SyntaxFunction badge

TrFile_ListDisks ( switches )

Parameters

switches (optional) determine way the result is returned

Switches

Switches can be empty or:

-ReturnAtEnd add an extra return character after the last found item in the list

Returned Result

Data type returned

Text

Result

A list of names of all the disks that are currently mounted (available).

Originated in

Troi File Plug-in 2.0

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

On macOS it is possible to have multiple disks with the same name. In this case you will see the same disk name multiple times in the list.

NOTE To find the startup disk you can use the TrFile_FindFolder function.

Example

Set Field [ result ; TrFile_ListDisks ( "" ) ]

On macOS this will return a list of names of all the disks that are currently mounted, for example:

KES¶
SPOCK¶
Photos till 2020¶
Music Archive Disk 5

On Windows the drive letters of the available disks are returned, for example:

A:¶
C:¶
D:¶
K:

Used in example file

DiskInfo.fmp12

Related functionsFunction badge

TrFile_DiskInfo
TrFile_FindFolder
TrFile_MountDisk

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 2023 –> TrFile_ListDisks (filep4253) 2023-0601 15:45:17