Skip to main content

TrFile_GetFileKind (function reference)

By June 1, 2024June 4th, 2024Online Help, Troi File Plug-in
Troi File Plug-in > Functions reference > TrFile_GetFileKind
Troi File Plug-in for FileMaker Pro

TrFile_GetFileKind

Returns a (localized) description of what kind of file this is

SyntaxFunction badge

TrFile_GetFileKind ( switches ; filePath )

Parameters

switches not used, reserved for future use. Leave blank or put "-Unused"
filePath the path to the file for which you want the description

Returned Result

Data type returned

Text

Result

Returns a (localized) description of what kind of file this is.

If an error occurs it will start with 2 dollars, followed by the error code. Returned error codes can be:

$$-43 fnfErr source file not found
$$-50 paramErr parameter error

Other errors may be returned.

Originated in

Troi File Plug-in 12.1

Compatibility

FileMaker Pro 17 to FileMaker Pro 21 (2024)

Considerations

The description will be returned in the current system language. Also note that the resulting description can be slightly different depending on platform, installed applications and OS version.

You can also use FileMaker styled paths, like “filewin:/C:/MyFiles/test.txt”.

Example

Set Variable [ $Kind ; TrFile_GetFileKind ( "-Unused" ; "filemac:/KES/test.zip" ) ]

This will return “ZIP Archive” or similar.

Set Variable [ $resultTxt ; TrFile_GetFileKind ( "-Unused" ; "C:\myDatabase.fmp12" ) ]

This will return “FileMaker Pro Database” on Windows and “FileMaker Document” on macOS (with an English OS).

Used in example file

Attribute.fmp12

Related functionsFunction badge

TrFile_GetExtension
TrFile_GetPreferredLanguages
TrFile_GetTypeOfItem

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 17 to 2024 –> TrFile_GetFileKind (filep4326) 2024-0604 19:09:58