Skip to main content

TrFile_GetFileCreator (function reference)

Troi File Plug-in > Functions reference > TrFile_GetFileCreator
Troi File Plug-in for FileMaker Pro

TrFile_GetFileCreator

Returns the Creator for the file specified by the filePath.

SyntaxFunction badge

TrFile_GetFileCreator ( 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 information

Returned Result

Data type returned

Text

Result

Creator: The Creator of a file is a 4 character code used to designate the application that created a file. For example: FileMaker Pro 7 creates database files with a Creator “FMP7”.

Originated in

Troi File Plug-in 1.0

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

This function is not available in Windows.
See also the function “TrFile-GetFileType” to get the FileType.
If the creator is empty the function returns: “0000” (4 zero’s) .

Example

Set Field [ result ; TrFile_GetFileCreator ( "-Unused" ; "KES:readme" ) ]

This will (probably) return “ttxt” which is the Creator for the SimpleText application.

Example 2

We assume that in your FileMaker file the following fields are defined:

  creator  		text
  gFilePath		Global, text

gFilePath should contain the path to the file, for example “Mac HD:Logs:Log 1” (Mac). In a script add the following script step:

Set Field [ creator ; TrFile_GetFileCreator ( "-Unused" ;  gFilePath ) ]

This will store the Creator of the file specified by gFilePath in the field “creator”.

Used in example file

Attribute.fmp12

Related functionsFunction badge

TrFile_GetFileType
TrFile_SelectFileDialog

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 2023 –> TrFile_GetFileCreator (filep4240) 2023-0601 15:29:37