Skip to main content

TrFile_ListDisks (function reference)

By June 1, 2025July 8th, 2025Online Help, Troi File Plug-in
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
-ExtendedDiskInfo (Windows only) returns extended information on all disks, in a XML format

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 18 to FileMaker Pro 22 (2025)

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.

v17.0 added the switch -ExtendedDiskInfo, on Windows. The result in XML will list all volumes (with GUIDs, drive letters, 32-bit Volume Serial Number and NTFS Serial Numbers, if available).

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 untill 2024¶
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 18 to 2025 –> TrFile_ListDisks (filep4253) 2025-0708 21:45:26

troi.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping us to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.