TrFile_GetFileKind |
Returns a (localized) description of what kind of file this is
Syntax
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 functions
TrFile_GetExtension |
TrFile_GetPreferredLanguages |
TrFile_GetTypeOfItem |
Related topics
Troi File Plug-in online help (overview)