Troi File Plug-in Changelog

What's new in Troi File Plug-in 15.0

Jun 2, 2023
  • Improved compatibility:
  • Tested and made compatible with Claris FileMaker Pro 2023 (FileMaker Pro 20.1.1)
  • Tested and made compatible with Claris FileMaker Pro 19 up to Claris FileMaker Pro 19.6.3.
  • Tested and made compatible with Claris Pro 40.2.1.
  • Tested and made compatible with macOS 13 (Ventura).
  • Tested and made compatible with Windows 11, including Windows 11 version 22H2 (September 20, 2022).
  • New functionality and improvements:
  • Added switch “-SkipInvisibles” to the TrFile_GetFolderSize function.
  • If you add this switch the plug-in will not add the size of invisible (hidden) files to the returned size. Invisible files are files with hidden attribute or files with a filename that starts with a period. See also the ListFolder.fmp12 example file.
  • Added support for Digital Negative (DNG) files and Apple ProRAW to the TrFile_CreateThumbnail function. You can now create thumbnails from (Apple ProRAW) DNG files.
  • Improved the Set MetaData of Image File script step and the TrFile_SetMetaData function with the switch “-SetIPTC”. The plug-in will now write the IPTC metdata earlier in the JPEG file, improving compatibility with other applications that read or write IPTC. The plug-in will now also correct the position of existing (IPTC) metadata when you set IPTC metadata.
  • (Windows) Enhanced the TrFile_CreateThumbnail function and
  • significantly improved the speed of creating thumbnails for rotated JPEGs (with internal orientation tags other than horizontal in the EXIF).
  • Improved Security:
  • Improved the code in several places and made it more secure.
  • (macOS) Modernized the code and removed dependency on legacy Carbon code in several places.
  • Increased speed:
  • (Windows) Improved the speed of the TrFile_GetFileSize function for files on network drives.
  • (Windows) Added switch “-UseClassicGetFileSize” to the TrFile_GetFileSize function. If you add this switch the plug-in will use the original implementation of getting the file size.
  • Improved Drag and Drop functionality:
  • Drag and drop is now compatible with FileMaker Pro 2023!
  • (macOS only) Improved the drag and drop functionality by allowing File Promise Drops. You can now drag files that don’t exist yet, a.k.a. file promises to the FileMaker window. To enable this extra functionality add the new switch “-AllowFilePromiseDrops” to the switches parameter of the TrFile_DragAndDrop function. When you have enabled this, you can drop files (like zips) or images for example from a web application (in Safari) to the drop zone.
  • Added new function TrFile_StartDragSource, which can be used to start drags of any file type from the FileMaker window to for example a web application or the Finder. You can specify what to drop from a container field (or a variable with container data). After a successful drag you can also trigger a script. You add this function to a tooltip calculation to enable it on the layout.
  • For debugging you can also add this switch: “-HighlightDragSource”, which will show the (current) rectangle of the DragSource (macOS only).
  • NOTE: Files stored as reference that cannot be found will create a text file: fileReference.txt. This will contain the filename and the (broken) path to the file.
  • (macOS) Improved the drag and drop functionality, improved the code and made it more robust if paths cannot be found or converted. Also improved handling of multiple mail drops on macOS 10.15 and later.
  • (macOS) Improved the MailDrop functionality. Temporary files in the TroiTEMPDRAGFOLDER folder are now deleted after the system restarts and no longer show up in a Rescued Items folder in the trash.
  • Updated the DragAndDrop.fmp12 example. Added notes and optional script steps to better find the bounds for drop zones on layouts with a Top Navigation Part.
  • You can find this in the scripts that will add a drag and drop handler by calling the TrFile_DragAndDrop function. See the scripts:
  • _Start Accept. DragAndDrop (in container fieldbounds)
  • Start Accept. DragAndDrop (in fieldbounds of zone2 or zone3 object)
  • Also improved dropping mail into the DragAndDrop.fmp12 example. It now handles slow maildrops better, by waiting up to 5 seconds.
  • Fixed a problem in the Add DragAndDrop Handler script step and the TrFile_DragAndDrop function: drag and drop now correctly works with FileMaker Pro 2023 (FileMaker Pro 20.1.1).
  • Improved (movie) metadata support:
  • Improved the TrFile_GetMetaData function: you can use these switches to easily get a single metadata item of a movie:
  • -GetMovieTitle
  • -GetMovDescriptionStr *
  • -GetMovieKeywords
  • -GetMovieAlbum
  • -GetMovieArtist
  • -GetMovieAuthor
  • -GetMovieComment
  • -GetMovieCopyright
  • -GetMovieInformation
  • -GetMovieProducer
  • -GetMovieDirector
  • -GetMovieEncodedBy
  • * Note that the -GetMovDescriptionStr switch is different from the existing -GetMovieDescription switch, which returns a list of (all) movie properties.
  • Improved the TrFile_GetMetaData function: added support for getting EXIF out of PNG images.
  • NOTE Exif support was added to the PNG format on July 2017, in the “Extensions to the PNG 1.2 Specification, Version 1.5.0”.
  • Startup Registration Log:
  • Improved the EasyInstallTroiPlugins.fmp12 example file (v1.8.6): added a script which adds the Startup Registration Log to the log field. This will get a text log of the startup registration process of the plug-in.
  • Added an example script “Get Startup Registration Log of the plug-in” of Version.fmp12, which gets the text log of the startup registration of the plug-in.
  • Added switch “-GetStartupRegistrationLog” to the TrFile_Version function. This will return a text log of the plug-in’s registration process at startup time of FileMaker Pro. When you have problems registering the plug-in, you can see if the payment certificate was found and if a valid registration code was found.
  • Other bug fixes:
  • Fixed a bug in the TrFile_CreateThumbnail function, where FileMaker could crash with Apple ProRAW DNG files, created with iOS 16.
  • Fixed a small memory leak which occurred when you used a path to a non existing file.
  • (macOS) Fixed a problem with the script steps Insert in File, Set MetaData of Image File and Substitute In File and the functions TrFile_InsertContents, TrFile_SetMetadata and TrFile_Substitute. When running on macOS Ventura and the source and destination file being equal these functions would not work and return the error code $$-43 (fnfErr).

New in Troi File Plug-in 14.0 (Aug 18, 2022)

  • Improved compatibility:
  • Tested and made compatible with Claris FileMaker Pro 19.5 including FileMaker Pro 19.5.2.
  • Tested and added initial compatibility with the upcoming Windows 11 version 22H2.
  • Tested and added initial compatibility with the upcoming macOS 13 Ventura.
  • New functionality and improvements:
  • Added new TrFile_GetFileName function, which returns the name of a file (or folder) in a filePath, including the extension. The file does not need to exist. A returned result can be for example “Readme.txt”.
  • Updated the Attribute example file with an example of the new TrFile_GetFilename function.
  • Added new TrFile_GetPreferredLanguages function, which returns a list of the preferred language and country codes of the current user. The returned result can be for example:
  • En-US
  • Nl-NL
  • En-GB
  • You can also add the switch “-GetFirstLanguage” to only get the first preferred language-country of the list.
  • Added new switch “-GetIccProfileName” to the TrFile_GetMetaData function: this will get the name of the embedded ICC Color Profile in the JPEG, for example it will return “sRGB IEC61966-2.1” or “Generic RGB Profile”.
  • If no ICC Profile is embedded error code $$-2026 (userDataItemNotFound) is returned.
  • Added new switch “-GetLocalizedIccProfileName” to the TrFile_GetMetaData function: this will get the localized name of the embedded ICC Color Profile in the JPEG. Based on the user language settings it will return the ICC name that best matches the user language. For example for an Italian user it can return “Profilo RGB generico”.
  • Added new switch “-GetIccProfileDescription” to the TrFile_GetMetaData function: this will return a text description of the properties of the embedded ICC Color Profile. The result is formatted as a list. You can also add the switch “-Format=XML” to get the result in XML format, with the XML tags colored blue. When you also add the switch “-DontAddStyle” the result is in plain text.
  • (macOS) Improved the ExecuteShell.fmp12 example file: added an example on how to use sudo so you can execute commands as a superuser with the TrFile_ExecuteShell function.
  • (macOS) Improved the help text in the calculation dialog for the TrFile_Search function, it now shows the two essential switches to use: “-files” and/or “-folders”.
  • Improved HEIC/HEIF image format support:
  • (Windows 10 version 20H2 and later, Windows 11) The TrFile_CreateThumbnail function can now create thumbnails from HEIC (High Efficiency Image File Format) image files. You will need to install the HEVC Video Extensions from Microsoft (which costs $0.99). Thumbnail support also includes .heic images created on iOS and other images with the .heif extension. See also How to install HEVC Video Extensions on Windows.
  • (Windows 11 and later) Added support for HEIC (High Efficiency Image File Format) image files: the TrFile_GetMetaData function with the switch “-GetImageDescription” now returns a description like codec name and type.
  • Bug fixes:
  • (Windows) Fixed a bug in the TrFile_GetZipInfo function, where only one filename would be returned even if more files are present in the ZIP archive.
  • (macOS) Fixed a bug in the TrFile_GetContents function, where FileMaker could crash if the filePath specified a folder. Now the function returns $$-1302 (notAFileErr) in this case.
  • (macOS) The plug-in would return error code $$-47 (fBsyErr) in some cases where the user did not have sufficient access permissions, for example when getting the contents of a file. In this case the plug-in now returns the more correct error code $$-54 (permErr = permissions error).
  • (macOS) Fixed a problem with the
  • Move Folder and
  • Copy Folder script steps and the
  • TrFile_MoveFolder and
  • TrFile_CopyFolder functions, where the plug-in would return error code $$-47 (fBsyErr) when the destination folder exists. It will now correctly return $$-48 (dupFNErr) if the destination folder exists.
  • Improved the GetExif.fmp12 and SetExif.fmp12 example files, the EXIF padding tag is now parsed too.
  • (Windows) The plug-in no longer returns error $$-120 (dirNFErr; directory not found) when specifying valid UNC paths that use forward slashes as separators (as opposed to backward slashes). So you can now use paths like this: “//Server/share/file.txt”.
  • Fixed a bug in the TrFile_GetContents function, where
  • The plug-in would not return the expected error code $$-39 (eofErr) when the start parameter was past the end of the file.
  • (macOS) Fixed a problem with the
  • Move Folder and
  • Copy Folder script steps and the
  • TrFile_MoveFolder and
  • TrFile_CopyFolder functions, where the plug-in could sometimes return error code $$-122 (badMovErr) incorrectly indicating that the destination folder is inside the source folder even when source and destination where valid.
  • Other changes and improvements
  • Improved the example file ManageMedia.fmp12, it now properly handles slashes in folder names and file names: slashes are now converted to colons in the FileMaker style path.
  • IMPORTANT The minimum supported macOS version is now macOS 10.14 (Mojave 10.14).

New in Troi File Plug-in 13.1 (Nov 24, 2021)

  • Improved compatibility
  • Tested and made compatible with Claris FileMaker Pro 19.3 and FileMaker Pro 19.4.
  • Tested and made compatible with Windows 11.
  • Tested and made compatible with macOS 12 (Monterey) both on Intel and Apple Silicon (arm64).
  • New functionality and improvements:
  • Improved the Add Drag and Drop Handler script step and the TrFile_DragAndDrop function: you can now add up to 6 different drag and drop handlers.
  • Improved drag and drop functionality of the TrFile_DragAndDrop function: you can now selectively stop handlers in the same file and/or with the same script name. You can specify it like this:
  • TrFile_DragAndDrop( "-StopDragAndDrop" ; fileName ; { scriptName } )
  • Improved the TrFile_GetAsPlainText function: you can now get the plain text from a PDF in a container field (or a variable with container data of a PDF).
  • Improved the TrFile_CreateThumbnail function. You can now specify any size of thumbnail up to 32767 x 32767 pixels. You no longer need to add the “-AllowAllThumbnailSizes” switch.
  • Improved the Set MetaData of Image File script step and the TrFile_SetMetaData function with the switch “-SetEXIF”. The EXIF tags and data are now added to the image file in numerical order, even if the tags in the metadatablock parameter are out of sequence.
  • Improved parsing of PDFs in the TrFile_GetMetaData function and using the switch “-GetPDFDescription”: The plug-in now can better parse incrementally updated PDFs.
  • Improved the TrFile_GetMetaData function when using the switch “-GetPDFDescription”: the plug-in properly parses UTF-16 encoded fields in the metadata information.
  • Improved the TrFile_GetMetaData function when using the switch “-GetPDFDescription”: the plug-in now shows if the PDF is encrypted and if the PDF contains a cross-reference stream object (as introduced with PDF 1.5).
  • (Windows) Improved returned error codes in the functions that retrieve dates and time from a file, like the TrFile_GetDateCreated and TrFile_GetTimestampModified functions: when the file does not exist these functions now return the documented error code $$-43 (fnfErr; File not found) instead of $$2.
  • Improved the EasyInstallTroiPlugins.fmp12 example file (v1.8.2): improved the scripts which can test your registration string for a Server/Web license on FileMaker Server.
  • (macOS) The Launch File script step and the TrFile_Launch function now can return a more relevant error code when the launch does not work.
  • Bug fixes:
  • (Windows) Fixed a problem with FileMaker Pro 19.4, which would freeze the application or return a question mark in some functions.
  • (macOS) Fixed a problem on macOS 12 (Monterey) and FileMaker Pro 19.4, where the plug-in would not show the plug-in icon in the flash dialog.
  • (macOS) Fixed a bug that prevented the plug-in from loading in FileMaker Pro 16 (installing it would result in error code 1550).
  • (macOS) Fixed a problem with the Launch File script step and the TrFile_Launch function, where the launch would not work for files on a AFP network disk.
  • (Windows) Fixed a problem where the TrFile_SelectFileDialog function would not always show the places bar; a simpler selection dialog would be shown.
  • Fixed a bug in the TrFile_GetMetaData function, which would make FileMaker Pro crash or become non-responsive.

New in Troi File Plug-in 13.0 (May 27, 2021)

  • Improved compatibility:
  • Tested and made compatible with Claris FileMaker Pro 19, up to and including FileMaker Pro 19.2.2
  • Tested and made compatible with macOS 11.4 (Big Sur).
  • Updated the plug-in to use the latest libraries or modern frameworks where possible.
  • Improved PDF support:
  • Added new function TrFile_GetAsPlainText function, which will return the text contents of a PDF as plain text. Note that the returned results might be slightly different on macOS compared to Windows: long lines might be wrapped differently. Also this function is implemented for 64-bit FileMaker Pro only.
  • (Windows) Improved the Create Thumbnail script step and the TrFile_CreateThumbnail function: added support for creating thumbnails from PDF files. Note this is implemented for 64-bit FileMaker Pro only.
  • improved ZIP functionality and enhanced ZIP64 support:
  • (Windows) Improved the Create Zip script step and the TrFile_CreateZIP function, the plug-in now supports UTF-8 encoding. If the filepath of files to zip contains higher Unicode characters, the filename will be automatically stored in UTF-8 format.
  • (Windows) Added new switch “-ForceUTF8Filenames” to the TrFile_CreateZIP function. When you add this switch all filenames in the ZIP file will be UTF-8 encoded. On macOS this is the default and the switch has no effect.
  • (Windows) Improved the UnZip script step and the TrFile_UnZIP function: ZIP files using the ZIP64 format extension can now be unzipped. The plug-in now has added support for unzipping files compressed with the Deflate64 method.
  • (Windows) Improved the UnZip script step and the TrFile_UnZIP function: the plug-in now automatically detects the encoding of UTF-8 encoded filenames.
  • (Windows) Improved the TrFile_UnZIP function: you can now add a -Encoding=x switch, like -Encoding=ASCII_Windows. The filenames in the ZIP file will be unzipped according to this switch. This is useful if the ZIP file was created using a non-standard filename encoding.
  • (Windows) Improved the TrFile_GetZipInfo function: you can now add a -Encoding=x switch, like -Encoding=ASCII_Windows. The filenames in the ZIP file will be decoded according to this switch. This is useful if the ZIP file was created using a non-standard filename encoding.
  • (Windows) Improved the Create Zip script step and the TrFile_CreateZIP function: error codes are now more accurate.
  • (Windows) Improved the Create Zip script step and the TrFile_CreateZIP function, shortcuts files (with extensions .lnk) are now also zipped into the ZIP file.
  • Improved movie support:
  • Improved the movie handling in several functions: added support for internally compressed movies (which contain the ‘cmov’ movie box).
  • Improved the TrFile_GetFileStructure function: when using the -verbose switch it now returns more detailed movie structure information of a track, like the used video codec of a track or the clean aperture size.
  • Improved the TrFile_GetFileStructure function: it now correctly returns the pixel density metadata.
  • Improved movie metadata support:
  • Improved the TrFile_GetMetaData function: added several switches, which return a single property of a movie:
  • IsValidMovie, which returns 1 (true) if this is a valid movie or 0 (false) otherwise
  • GetMovieWidth
  • GetMovieHeight
  • GetMovieRotation
  • GetMovieFrameCount*
  • GetMovieSoftware
  • GetMovieYear
  • Note that it might take a while to calculate the frame count.
  • Improved the TrFile_GetMetaData function with the switch “-GetMovieDescription”: you can now add an extra switch “-AddFrameCount” if you also want the frame count of the movie. Note that it might take a while to calculate the frame count.
  • Improved the TrFile_GetMetaData function with the switch “-GetMovieDescription”:
  • (Windows) this switch now also works when running on a 64-bit version of Windows.
  • The result now also returns the rotation angle and track size (width and height).
  • The (general) size (width and height) now is the display size. So it reflects the rotation of the movie and also the clean aperture. It can return for example 980×1308 for a vertical rotated movie. This can be different from the internal track size, for example 1440×1080.
  • Also changed the order of the returned size of the movie, the function now returns the width first and then the height.
  • You can use the switch “-GetMovieDescriptionOldFormat” to get the original formatted result, i.e. height returned first and not reflecting the rotation of the movie.
  • Added new GetMovieMetadata.fmp12 example file to the download, which demonstrates which metadata (and properties) can be returned from a movie.
  • Other changes and improvements:
  • When you use this switch in combination with the switch “-DeleteAllSubFoldersAndAllContents” the plug-in will forcefully delete any open files inside the folder and subfolders. This solves a problem where in some cases the function could return error code $$-47 (fBsyErr).
  • Warning Please use this powerful switch with extra care, it might give problems with applications which have open files. Also it cannot be undone.
  • Also note that with the “-forceDelete” switch the plug-in writes a warning to the system.log for each item it still cannot delete, with a description of the reason.
  • Improved the Create Thumbnail script step and the TrFile_CreateThumbnail function. Added support for creating thumbnails from a container field (or a variable with container data), for example a JPEG or PDF in a container.
  • Improved script triggering when using drag and drop: the plug-in now also triggers scripts where the filename parameter contains a period in the name and the (.fmp12) extension was not included (the FileMaker function “Get(Filename)” will not include the extension).For example if the filename parameter given is “Dropper1.0” the plug-in now adds the .fmp12 extension, resulting in “Dropper1.0.fmp12”.
  • IMPORTANT The minimum supported macOS version is now OS X 10.13 (High Sierra).
  • Bug fixes:
  • Fixed a bug in the handling of TIFF files stored in containers.
  • (macOS) Fixed a bug in the TrFile_Search function when using the switch “-useSpotlight”, where in some cases ? would be returned.
  • Fixed a possible memory leak in the in the TrFile_Search function when using the switch “-useSpotlight”.

New in Troi File Plug-in 12.1 (Jan 27, 2021)

  • Improved compatibility:
  • Tested and made compatible with Claris FileMaker Pro 19, up to and including FileMaker Pro 19.2.
  • Tested and made compatible with macOS 11.0 (Big Sur).
  • Tested and made compatible with Windows 10 version 20H2 (October 2020 Update) and Windows 10 version 2004 (May 2020 Update).
  • New function and functionality:
  • Added new function TrFile_GetFileKind, which will return a (localized) description of what kind of file this is. For example a .fmp12 file will return “FileMaker Document” and a .zip file will return “ZIP Archive”. NOTE 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.
  • Improved the TrFile_GetFileHash function: you can now use a container (or a variable with container data) as the source parameter, for example a JPEG in a container field.
  • Added switch “-AllowNonLocalCloudItems” to the TrFile_SelectFileDialog function. When used this will allow you to select files that are not downloaded to the local disk.
  • Improved the TrFile_GetMetaData function: added support for FujiFilm Raw image files (.raf) when using the switches “-GetEXIF” and “-GetXMP”.
  • Improved the TrFile_CreateThumbnail function for .CRW (RAW) files, when using the switch “-GetFullSizeRawThumbnail” switch, the function now returns the full size thumbnail embedded in the RAW file.
  • Improved the IPTC_XMP_Metadata.fmp12 example file, it now also demonstrates the use of a image container as a source for the TrFile_GetMetaData function.
  • Improved ZIP/UnZIP features:
  • Added new switch “-DontAddDS_Store” to the TrFile_CreateZIP function. When you add this switch hidden .DS_Store files will not be added to the ZIP file (.DS_Store files can be added to folders by the macOS Finder).
  • Added new switch “-AddMacOSXAttributes” to the TrFile_CreateZIP function. When you add this switch extended attributes and resource forks are added to the ZIP file. If there are extended attributes (or files with resource forks) this will be stored in a “__MACOSX” folder at the top level.
  • (Windows) Improved the UnZip script step and the TrFile_UnZIP function: for corrupted ZIP files (or files that are not ZIPs at all) the plug-in now returns error code $$-4249 (kErrCorruptTag) instead of the (internal) error code $$-77 (initIWMErr).
  • Bug fixes:
  • Fixed a problem while using the encoding switch -Encoding=ASCII_Windows (Windows-1252) : the plug-in no longer crashes when an incorrect or corrupt text with undefined character codes (like for example 0x81) is read. In this case the Unicode replacement character is returned.
  • (macOS) Fixed a problem with the functions TrFile_Substitute, TrFile_SetMetadata and TrFile_InsertContents functions: in some cases (with the source and destination file being equal) these functions would work but incorrectly return an error code $$-47.
  • (Windows) Fixed a problem with creating thumbnails with the Create Thumbnail script step or the TrFile_CreateThumbnail function, the plug-in would not honor the EXIF orientation tag for some JPEG images.
  • (Windows) Fixed a possible memory leak in the Create Thumbnail script step and the TrFile_CreateThumbnail function.
  • Fixed a bug in the TrFile_GetMetaData function: when using the switch “-GetPDFDescription” the plug-in no longer truncates text when it contains a slash.
  • Fixed a problem in the Set MetaData of Image File script step and the TrFile_SetMetaData function. The GPS Altitude Reference can now be set correctly (0 = Above Sea Level and 1 = Below Sea Level).
  • (Windows) Fixed a possible memory leak in the TrFile_GetMetaData function when using the switch “-GetImageDescription”.
  • (Windows) Improved the TrFile_FindFolder function, for the “desktop” switch, in some cases the path to the user folder would be incorrect.
  • Fixed a regressed bug in the TrFile_GetMetaData function with the switch “-GetXMP”. The plug-in now properly returns large XMP metadata (more than 64000 bytes) of JPEG images stored in a container field.
  • (macOS) Fixed a bug in the Set Finder Comment script step, the TrFile_SetFinderComment function and the TrFile_SetFileAttribute function with the switch “-FinderComment”. The plug-in no longer returns a $$-1700 error code for some filepaths.
  • Fixed a bug in the TrFile_ExchangeFiles function, which could return error code $$-50.
  • Other changes and improvements:
  • IMPORTANT The minimum supported FileMaker version is now FileMaker Pro 16. Also the minimum supported macOS version is now OS X 10.12 (Sierra), and Windows 8. You can keep using v12.0 for older versions of FileMaker Pro, Windows or Mac OS X.
  • Renamed the Delete File script step to Delete file (note the lower case f), making its name different from the FileMaker native Delete File step. This ensures that when you copy and paste script steps the correct step is pasted.
  • (macOS) Modernized the TrFile_GetFileAttribute function with the switch “-FinderCommentAttr”. It now uses a more modern framework.
  • (macOS) Modernized the Set Finder Comment script step, the TrFile_SetFinderComment function and the TrFile_SetFileAttribute function with the switch “-FinderComment”. They now use a more modern framework.
  • (macOS) Improved compatibility when running FileMaker Pro 19 in dark mode, the flash dialog is now more visible.
  • (macOS) If the plug-in can’t load a bundle at start-up, the plug-in will now write a detailed error to the system.log. See the Console.app in this case (search for FileMaker in the system.log).
  • Improved the GetExif.fmp12 and SetExif.fmp12 example files, they handle the GPS Altitude Reference better (above or below sea level).
  • Improved the EasyInstallTroiPlugins.fmp12 example file: updated the plug-in install scripts. These scripts also give more detailed instructions.
  • In EasyInstallTroiPlugins.fmp12 improved the scripts (and layout) where you can test your registration string for a Server/Web license on FileMaker Server.

New in Troi File Plug-in 11.0.2 (Sep 10, 2019)

  • (Windows) Fixed a bug in the TrFile_GetContents function, where an error code $$-4212 (kErrReadBytesDiff) could be returned when getting the contents of an empty file.
  • Made small improvements to the DataIn.fmp12 example file.
  • Updated the text on the layout of the DragAndDrop.fmp12 example, to better show the “-ScrollDropZone” switch.

New in Troi File Plug-in 11.0.1 (Jun 13, 2019)

  • (Windows) Fixed a bug in the Create Folder script step or TrFile_CreateFolder function: the plug-in no longer returns error $$-43 (fnfErr) when creating nested subfolders on a mounted shared disk.
  • (macOS) Fixed a problem with creating thumbnails from PDFs with the Create Thumbnail script step or the TrFile_CreateThumbnail function: the plug-in no longer returns error code $$-2003 instead of the thumbnail.
  • (macOS) Fixed a possible memory leak when using the drag and drop functionality.
  • (macOS) Fixed a bug in the Add DragAndDrop Handler script step and the TrFile_DragAndDrop function where it could return error $$-5600 when running FileMaker Pro 18.
  • (Windows) Fixed a bug in the Add DragAndDrop Handler script step and the TrFile_DragAndDrop function when running FileMaker Pro 14, which would cause the script not to be triggered.
  • Updated the DragAndDrop.fmp12 example to check for the minimum plug-in version 11.0.1

New in Troi File Plug-in 11.0 (Jun 13, 2019)

  • New functionality:
  • Tested and made compatible with FileMaker Pro 18 and FileMaker Pro 17.0.6.
  • Added new TrFile_ExportToFile function, which can save container data to disk. This function can also be used on FileMaker Server.
  • Added new TrFile_IsFree function, which can be used to determine if a file is in use by a different application (or locked).
  • (macOS) Added new Set MetaData of Movie script step, which can set or replace metadata of movie files (like .mov and .mp4). It can add and change metadata like title, GPS and creation date. Note: this works only on macOS.
  • (macOS) Added new TrFile_SetMovieMetaData function, which can add (or replace) metadata to movie files (like .mov and .mp4). It can add and change metadata like title, GPS and creation data. Note: this is implemented only on macOS.
  • (macOS) Improved the TrFile_CreateThumbnail function and the Create Thumbnail script step: you can now create thumbnails of movie files (like mov, mp4 etc). The plug-in creates a thumbnail of the first frame of the movie.
  • (macOS) Prepared the plug-in for notarization: the plug-in can now be added to a runtime, to create a hardened FileMaker runtime app which can be notarized by Apple. Notarization gives users more confidence, as the runtime has been checked by Apple for malicious components.
  • (Windows) Improved the TrFile_ExecuteShell function and the Execute Shell script step. If you use the switch "-Encoding=UTF8" the plug-in now indicates invalid UTF-8 characters with the string <INVALID UTF8>.
  • Improved the ExecuteShell.fmp12 example file, you can now specify the encoding of the result of the command.
  • Other changes and improvements:
  • IMPORTANT (macOS only) The minimum supported FileMaker version is now FileMaker Pro 14. Also the minimum supported Mac OS version is now OS X 10.10 (Yosemite). You can keep using v10.2 for older versions of FileMaker Pro or Mac OS X.
  • (macOS) The plug-in no longer has the 32-bit code included.
  • Improved the initialization when installing the plug-in with the FileMaker Pro "Install Plug-In File" script step.
  • Updated the EasyInstallTroiPlugins.fmp12 file, it can show additional error information from Get(LastExternalErrorDetail) when running on FileMaker Pro 18. The EasyInstallTroiPlugins.fmp12 file can also run a test registration script for a plug-in after you have installed it on FileMaker Server.
  • Added ExportContainer.fmp12 example file, which demonstrates the new TrFile_ExportToFile function.
  • Updated the example files for FileMaker Pro Advanced 18.
  • Made small corrections to the user guide.
  • Fixed a bug in the TrFile_CreateThumbnail function where creating a thumbnail from a RAW file could result in a crash when stopping FileMaker Pro if other plug-ins were also installed.
  • Fixed a bug in the TrFile_CreateThumbnail function where creating a thumbnail from a RAW file could result in a hang when stopping FileMaker Pro.
  • Fixed a bug in the TrFile_GetMetaData function with the switch "-GetEXIF" where in some cases getting EXIF of a RAW file could result in error code $$-4259.
  • (Windows) Fixed a bug in the TrFile_ExecuteShell function and the "Execute Shell" script step, where sections of the result text would not be included.
  • (Windows) Fixed a bug in the Launch Application and the TrFile_Launch function which could fail and return an error code $$-1 in some cases when running FileMaker Pro in Windows Server 2012. This bug could also manifest itself with the Reveal functionality of the plug-in.
  • (macOS) Fixed a bug in the TrFile_ListFolder function and the "-Recursive" switch, where in some cases the function could randomly fail and return error code $$-120.
  • Modernized the Regifunc.fmp12 file, it now demonstrates the cross-platform plug-in registration process.

New in Troi File Plug-in 10.2 (Mar 4, 2019)

  • Tested and made compatible with FileMaker Pro 17.0.4.
  • (Windows) Fixed a problem where the plug-in would not be loaded on Windows 7.
  • (Windows; 32-bit) Modernized the code when using the TrFile_GetMetaData function with the switches "-GetImageDescription" and "-GetMovieDescription". This functionality now works for most image and movie formats without QuickTime installed.
  • Fixed a problem in the TrFile_CreateThumbnail function and the "Create Thumbnail" script step: the plug-in no longer returns error code $$-8994 (noThumbnailFoundErr) instead of the expected error code $$-2003 (cantFindHandler) when no thumbnail could be created.
  • Updated the code base, the plug-in now uses more modern C++ libraries.
  • Updated the EasyInstallTroiPlugins.fmp12 file, it can now run a test registration script for a plug-in after you have installed it on FileMaker Server.
  • Made small corrections to the user guide.

New in Troi File Plug-in 10.1 (Mar 4, 2019)

  • Tested and made compatible with FileMaker Pro 17.0.3.
  • Added support for the Windows XP EXIF tags. These are the tags XPTitle, XPComment, XPAuthor, XPKeywords and XPSubject (tags 40091 to 40095):
  • Improved the TrFile_GetMetaData function with the switch "-GetEXIF". The plug-in now returns the WindowsXP EXIF tags correctly.
  • Improved the TrFile_SetMetaData function with the switch "-SetEXIF". You can now write EXIF data with WindowsXP EXIF tags.
  • Improved support for EXIF with UTF-8 text:
  • Improved the TrFile_GetMetaData function with the switch "-GetEXIF". You can now get EXIF with UTF-8 encoded strings using the switch "-SourceUTF8Charset".
  • Improved the TrFile_SetMetaData function with the switch "-SetEXIF". You can now write EXIF with encoded UTF-8 strings by adding the switch "-UTF8Charset".
  • Improved the TrFile_SetMetaData function: it no longer creates an empty destination file when specifying invalid switches.
  • Improved the GetStructure.fmp12 file: it now shows a dialog when trying the TrFile_GetFileStructure function with a (old!) QuickTime movie that has its MOOV atom in a resource fork. Note that the TrFile_GetFileStructure currently does not support MOOV atom in a resource fork.
  • Improved the DragAndDrop.fmp12 file.
  • Improved the All File Examples.fmp12 file.

New in Troi File Plug-in 10.0.1 (Mar 4, 2019)

  • Fixed a bug with registering the plug-in on FileMaker Server.

New in Troi File Plug-in 10.0 (Mar 4, 2019)

  • New functionality:
  • Tested and made compatible with FileMaker Pro 17.
  • Rewrote and modernized the low level file handling code of the plug-in.
  • Added new Exchange Files script step, which can (quickly) exchange two files on disk. With the checkbox "Allow different volumes" you can even exchange files on different disks. Note that this may take more time.
  • Added new TrFile_ExchangeFiles function, which can (quickly) exchange two files on disk. When you add the switch "-AllowDifferentVolumes" the plug-in also can exchange files on different disks. Note that this may take more time.
  • Added new TrFile_GetCodeSignInfo function, which returns code sign info of signed files (like applications and plug-ins).
  • Added new TrFile_GetFileStructure function, which returns the structure of a movie file. It can analyze a movie file (.mov) and return a list of all movie boxes (formerly known as atoms) in the movie. The movie boxes are indented to visualize the tree structure of the boxes. The result can be formatted as XML or as a more readable list of movie boxes. It can also return the structure of a ISOBMFF (ISO base media file format), for example MP4 or HEIC.
  • Added new switch "-AllowDifferentVolumes" to the TrFile_MoveFile function, which allows the move of the file between different volumes (disks). Note that moving a big file across disks may take more time.
  • The plug-in now indicates if an external script step is compatible with a product. The step is shown in grey if it is incompatible for that product (for example for iOS) in the script editing pane (center) and the script steps pane (right).
  • Added new switch "-AddFolderSuffix" to the TrFile_ListFolder function: this will add a trailing slash to folders in the result, making them recognizable as folders.
  • Added a new switch to the TrFile_DragAndDrop function: "-ScrollDropZone" to help with the scrolling behavior when you use a drop zone for the drag destination. When you add the switch the position of the dropzone will scroll too when scrolling the FileMaker window. This is also implemented in the script step "Add DragAndDrop Handler" with the checkbox "Scroll the drop zone".
  • Improved metadata support:
  • Improved the TrFile_SetMetaData function with the switch "-SetEXIF". The plug-in is now compliant with EXIF v2.3.1. It writes tags introduced in EXIF version 2.3.1, like LensMake, LensModel and LensSerialNumber and timezone tags. The plug-in also handles these tags: ambient temperature, humidity, pressure, waterdepth, acceleration, sensitivity type, standard output sensitivity, recommended exposure index. Finally the plug-in handles the GPS tag GPSHPositioningError, which indicates horizontal positioning errors in meters.
  • Improved the TrFile_SetMetaData function with the switch "-SetEXIF". The code has been rewritten and the plug-in now writes EXIF data that is better readable by PHP.
  • Added more tags to be written when using the TrFile_SetMetaData function and the switch "-SetEXIF": the plug-in now correctly writes the tags: WhitePoint and PrimaryChromaticities. It now also writes tags which are not part of the EXIF specification, but may exist in the EXIF data in some images. This can be tags like ProcessingSoftware or DocumentName.
  • Other improvements and changes:
  • Improved handling of files located on remote volumes like WebDAV.
  • Fixed a problem with the TrFile_Exists function, where certain incorrect paths with double colons would result into a 1 as result.
  • Improved the TrFile_DragAndDrop function so that it works with FileMaker Pro 17.
  • Added example script to the SelectFile.fmp12 example file which demonstrates how to use the switch "-HideInvisibles".

New in Troi File Plug-in 9.1 (Feb 20, 2018)

  • New functionality:
  • Added new TrFile_ResolveAlias function, which will resolve an alias file (on macOS) or shortcut (on Windows). It returns the path to the destination of the alias file. If the alias is broken you can use the switch “-ReturnLastKnownPath” to get the last path the alias pointed to.
  • Added extra switch “-AddAliasInfo” to the TrFile_GetTypeOfItem function. If an item is an alias file (or shortcut on Windows) the result will be “file (alias)”.
  • You can now add the “-DontResolveAlias” switch to the TrFile_SelectFileDialog function. When you select an alias/shortcut the result is the path to the alias itself (and not the destination path where the alias points to).
  • (Windows) Added code signing to the plug-in for Windows (On macOS code signing was already added in version 8.0).
  • New functionality for movie metadata:
  • Added new functionality to the TrFile_GetMetaData function: when using the switch “-GetMovieMetadata” the plug-in now returns all metadata embedded in QuickTime movies (with extension .mov) and all variants of MP4 movies. This returns a list of metadata in the movie, returning for example Artist, Creation date and Description.
  • Added new functionality to the TrFile_GetMetaData function: when using the switch “-GetMovieGPS” the plug-in now returns the GPS location data of the movie. With an extra -Format switch you can specify how the location is returned.
  • Added new switch “-GetMovieCreationDate” to the TrFile_GetMetaData function: when using this switch the plug-in returns the creation date (including time + timezone) of the movie (if present as metadata). This might return for example: “2018-01-31T16:29:07+0200”
  • Added new functionality to the TrFile_GetMetaData function: when using the switch “-GetXMP” the plug-in now can read embedded XMP metadata in movies. The plug-in supports reading XMP metadata for QuickTime movies (with extension .mov) and all variants of MP4 movies.
  • Improved the example file ManageMedia.fmp12, it now demonstrates how to retrieve metadata from movies (including XMP).
  • Other improvements:
  • Improved the TrFile_GetMetadata function. Added new switch “-SourceUTF8CharSet”, to be used with the switch “-GetIPTC”. The IPTC metadata of the source image file will forced to be read as UTF-8 encoded.
  • Updated the FileManipulation.fmp12 example file to show the TrFile_ResolveAlias function.
  • (Mac OS) Fixed a possible bug in the TrFile_Substitute function, when substituting in place: there are no longer spurious extra characters at the end of the new file when the replace string is shorter than the search string.
  • In the TrFile_Substitute function, when the search string is at the end of the source file the destination now has the correct end character.
  • (Mac OS) Fixed a bug in the TrFile_Substitute function on macOS 10.13 (High Sierra): when you substitute in place this no longer gives an $$-50 error code as result.
  • (Mac OS) Improved the reliability of the TrFile_SetMetadata and TrFile_InsertContents functions on macOS 10.13 (High Sierra).
  • (Mac OS) Fixed a possible memory leak in the TrFile_GetFolderSize function.
  • (Mac OS) Fixed a compilation problem with code signing and extended attributes in macOS 10.12 (Sierra).

New in Troi File Plug-in 9.0.1 (Jul 20, 2017)

  • Fixed a bug with the TrFile_DragAndDrop function which prevented drag and drop when running FileMaker Pro 16.
  • Improved the DragAndDrop.fmp12 example file: the calculation for the bounds of the three drag zones are improved when running FileMaker Pro 16.

New in Troi File Plug-in 9.0 (May 9, 2017)

  • New functionality:
  • Tested and made compatible with FileMaker Pro 16.
  • Added new TrFile_GetFolderSize function, which can get the total size (in bytes) of a folder.
  • Added new TrFile_AppendContentsToFile function, which can append text to the end of a specified (text) file.
  • Added new TrFile_SetContentsOfFile function, which can set the contents of a specified (text) file.
  • (Mac OS) Added new TrFile_SetFinderComment function, which can set the text of a Finder comment (also called Spotlight comment) of a specified file or folder. You can see the comment with the Get Info command in the Finder.
  • Renamed the TrFile_MetaData function to TrFile_GetMetaData, as to better reflect its functionality.
  • Added possibility to use a container as the source parameter for the TrFile_GetMetadata function.
  • Improved the TrFile_DragAndDrop function: you can now specify three different drop zones with the TrFile_DragAndDrop function.
  • Extra features when running FileMaker Pro 16
  • The File Plug-in adds multiple script steps when running FileMaker Pro 16.
  • You can select these script steps in the script steps pane in Script Workspace, or you can begin typing the script step name, then choose the script step from the list that appears.
  • The script steps significantly expand the possible actions you can perform with FileMaker Pro. The following 36 script steps are added:
  • Append to File
  • Get File Contents with Dialog
  • Enable/Disable Troi File Plug-in
  • Copy File
  • Copy Folder
  • Create Alias
  • Create File
  • Create Folder
  • Create Thumbnail
  • Create Zip
  • Delete File
  • Delete Folder
  • Add DragAndDrop Handler
  • Execute Shell
  • Insert in File
  • Launch File
  • Launch Application
  • Mount Disk
  • Move File
  • Move Folder
  • Open Folder
  • Reveal File
  • Reveal Folder
  • Show Save File Dialog
  • Show Select File Dialog
  • Show Select Folder Dialog
  • Set Contents of File
  • Set File Attribute
  • Set Finder Comment
  • Set MetaData of Image File
  • Set Timestamp Created
  • Set Timestamp Modified
  • Stop DragAndDrop Handlers
  • Substitute In File
  • Unmount Disk
  • UnZip
  • NOTE:
  • Only steps that perform an action have been added as a script step. Functions that just return information (like for example TrFile_GetFileSize) are only available as an external function.
  • Added new example file CreateFile-for-FMP16.fmp12, which demonstrates how to use the new external script steps of FileMaker Pro 16.
  • Added support for online help for the functions and script steps of the plug-in. You can now easily get online help from the Troi website, by clicking the Help button (the small question mark button) next to the function description in the functions pane or the script step description in the script steps pane.
  • Miscellaneous:
  • (Mac OS X) Fixed a problem with the TrFile_DragAndDrop function when dragging mail: email messages with a semicolon (“;”) in the subject of the email are now handled properly.
  • Several bug fixes and further improvements.
  • Updated the Attribute.fmp12 example file.
  • Made various minor changes to the example files to better work with FileMaker Pro 16.
  • Updated the code by adding improved namespace handling to make the plug-in more robust.

New in Troi File Plug-in 8.6.1 (Apr 19, 2017)

  • (Windows) Improved the handling of certain ZIP files with the TrFile_UnZIP function: the plug-in will now implicitly create a folder when items in the ZIP file are in a subfolder, but that subfolder itself is not present.
  • Improved TrFile_MetaData( “-GetPDFDescription”): the plug-in can now better parse newer PDF versions, like PDF 1.7. And if there is a parsing error the plug-in returns the partial data.
  • (Mac OS X) Improved TrFile_MetaData( “-GetMovieDescription”): when a movie contains a Timecode track, the Timecode at the beginning and end of the movie and the Timecode of the current frame is returned again as part of the description.
  • Improved the multi-threading behavior of the TrFile_Metadata function. Multiple running scripts on FileMaker Server at the same time will now work better.
  • Improved the multi-threading behavior of the TrFile_Substitute function. Multiple running scripts on FileMaker Server at the same time will now work better.
  • Fixed a memory leak in the TrFile_Substitute function.
  • Fixed a bug in the TrFile_SetContents and TrFile_AppendContents functions where extra spurious characters could be written. This could happen when a text which contained combining unicode characters (for example a combining diaeresis, combining to ä) was written to a file using encoding: -Encoding=ASCII_Windows.
  • (Mac OS X) Improved stopping of the drag and drop handling and removed a potential memory leak.
  • (Mac OS X) Fixed a potential crash in the TrFile_DragAndDrop function, when restarting drag and drop multiple times.
  • (Windows) Added an exception handler, which handles (fatal) exceptions in the plug-in. It will save information on the exception to a dump file in the Temp directory. The dump file will be named similar to this:
  • “Crashdump Troi File Plug-In v8.6.1-20161231-212603-5488-3164.dmp”.
  • When running FileMaker Server the plug-in also writes the exception in the “Troi Plugin FMServer.log”:
  • 2017-01-01 21:26:03 [Troi File Plug-In] Exception raised. code = -1073741819
  • 2017-01-01 21:26:03 [Troi File Plug-In] Created crash dumpfile:
  • C:UsersuserAppDataLocalTempCrashdump Troi File Plug-In v8.6.1-20170101-212603.dmp
  • 2017-01-01 21:26:03 [Troi File Plug-In] **** FATAL ERROR: EXIT PROCESS ****
  • (Mac OS X) Improved export of symbols: now only the symbols that are required are exported by the plug-in.
  • Improved the internal registration of function calls of the plug-ins, making it more robust on more platforms.

New in Troi File Plug-in 8.5 (Jun 21, 2016)

  • Tested and made compatible with FileMaker Pro 15.
  • Added new TrFile_ZIPInfo function, which lists the items (files and folders) inside a ZIP file.
  • Added new TrFile_UnZIP function, which expands a ZIP file into a specified folder.
  • Created the ZIPAndUnZIP.fmp12 example file. Removed the older CreateZip.fmp12 example file.
  • Further improved the multi-threading behavior of the plug-in when running in FileMaker Pro 15.
  • Improved the example file EasyInstallTroiPlugins.fmp12, to provide more help when an installation error occurs.
  • Added description and type-ahead information for all functions of the plug-in. This extra function description will be shown in FileMaker Pro 15 in the Specify Calculation dialog box when you type a function name and also as a text popup in the functions pane on the right.
  • The type-ahead information is used by the auto complete functionality of FileMaker Pro 15. In the calculation pane of the Specify Calculation dialog box you can type a letter or two of the function name and instantly see a list of matching function names. For example when you type "ap", the auto complete functionality will suggest the TrFile_AppendContents function. You can also type a function name in the functions pane on the right: for example if you type "fold" you will see all the functions relevant to folders, like TrFile_CopyFolder.
  • Fixed several bugs, rewrote and modernized the code in several places and made further improvements.
  • Updated the User Guide and the Overview.fmp12 file.

New in Troi File Plug-in 8.0.6 (Jun 21, 2016)

  • Added new implementation for TrFile_Metadata("-GetImageDescription", ... ) when running in 64-bit mode.
  • Added new "-TimeoutSecs=x" switch to the TrFile_CreateZIP function. With this switch you can change the timeout time, which can be useful for creating very big ZIP files.
  • Fixed a problem with the TrFile_CreateZIP function: when it timeouts now the correct error $$-4230 kErrTimeOut is returned.
  • Fixed a bug in the TrFile_Reveal function: the plug-in now properly reveals files, where the path is formatted as a FileMaker style path (i.e. starting with: "filewin:").
  • Improved the log text when running FileMaker Server: more information is added to the log.
  • Improved the log text when running FileMaker Server: after an unsuccessful attempt to register the log now adds the (incorrect) register text used.

New in Troi File Plug-in 8.0.5 (Jun 21, 2016)

  • Improved the TrFile_Substitute function: when using substitute in place the function is more robust.
  • Fixed a bug with the TrFile_GetDateCreated and TrFile_GetDateModified functions: when used for getting dates of folders in some cases the plug-in would return an error code. This bug is also fixed for the variant functions, like for example TrFile_GetTimestampModified.

New in Troi File Plug-in 8.0.4 (Jun 21, 2016)

  • Tested and improved compatibility with Windows 10.
  • Fixed a problem in the TrFile_LaunchFile function when opening an application: the opened application now stays in front.
  • Updated several example files: DeleteFile.fmp12, DiskInfo.fmp12, DiskMount.fmp12, ExecuteShell.fmp12, FileManipulation.fmp12, FindFolder.fmp12, FolderManipulation.fmp12, GetPathTo.fmp12, LaunchAndReveal.fmp12, ListFolder.fmp12, MakeASCIIs.fmp12, MoveFolder.fmp12, RecursiveFolder.fmp12 and Thumbnail.fmp12.

New in Troi File Plug-in 8.0.3 (Jun 21, 2016)

  • Updated the DragAndDrop example file.
  • Made a small improvement to the DataIn example file.

New in Troi File Plug-in 8.0.2 (Jun 21, 2016)

  • Fixed a bug in the TrFile_Reveal function: the plug-in now properly reveals files with a comma in the filename.
  • TrFile_DragAndDrop now works on 64-bit (Windows only).
  • Fixed a problem with the TrFile_DragAndDrop function, where ZIP files would be treated as a folder.
  • Fixed typo in user guide.
  • Updated some example files.

New in Troi File Plug-in 8.0.1 (Jun 21, 2016)

  • Fixed a bug with the TrFile_GetDateCreated and TrFile_GetDateModified functions: when a file is a ZIP file it no longer returns a $$-43 error (file not found). This bug is also fixed for the variant functions, like for example TrFile_GetTimestampModified.
  • Fixed a bug with the TrFile_GetDateCreated and TrFile_GetDateModified functions where in some cases getting the date of a folder would not always return the correct result.
  • Improved the function TrFile_Metadata when using the switch "-GetIPTC": fixed a possible crash when reading corrupt IPTC data (with malformed UTF8 text).

New in Troi File Plug-in 8.0 (May 14, 2015)

  • Tested and made compatible with FileMaker Pro 12, 13 and 14.
  • Added support for 64-bit architecture with FileMaker Pro 14: On OS X the 32-bit and 64-bit version is a single universal plug-in and on Windows there are 2 plug-ins: Troi_File_Plugin.fmx (for 32-bit) and Troi_File_Plugin.fmx64 (for 64-bit).
  • Improved the example file EasyInstallTroiPlugins.fmp12, to support the 64-bit version of FileMaker Pro 14.
  • Added new function TrFile_CreateZIP, which can create ZIP files (a compressed archive). You can zip a single file or a complete folder.
  • Added new CreateZIP example file which demonstrates the TrFile_CreateZIP functionality.
  • Functions which require user interface now support the 64-bit version of FileMaker Pro 14: The functions TrFile_SelectFileDialog, TrFile_SelectFolderDialog and TrFile_SaveFileDialog now can show their dialogs.
  • Added switch "-AllowMultipleFiles" to the TrFile_SelectFileDialog function, which allows the user to select multiple files in the dialog. Use the Command key on OS X or the Control + Alt key on Windows to select or deselect extra items. To select a contiguous group of files at once, click on the first file, then hold Shift and click the last one and all files are selected. Each selected file is returned on a new line.
  • NOTE Spotlight does not return all files, for example it omits hidden (invisible) files. Also Spotlight search will not work if a disk is not indexed yet. It is however quite fast.
  • Added a switch "-SHA1" to the TrFile_GetFileHash function, which can return the SHA-1 hash value (checksum) of a file.
  • Several bug fixes and further improvements.
  • Made various minor changes to several example files.

New in Troi File Plug-in 7.6 (Jan 21, 2015)

  • Improved the TrFile_MetaData function when using the switch "-GetIPTC": The function now returns "$$-2026" instead of "$$-50" for images which have a IPTC data block, but the length is zero.
  • Updated example files DataIn.fmp12, SelectFile.fmp12, SelectFolder.fmp12 and ListFolder.fmp12 to show an error when an architecture (like 64-bit) is not supported.

New in Troi File Plug-in 7.5.2 (Nov 26, 2014)

  • Fixed a problem with the TrFile_MoveFolder and TrFile_CopyFolder functions: the plug-in no longer returns an error when the name of the destination folder is a substring of the source folder name.
  • Improved the CreateFolder example file: it no longer tries to store a path into a calculation field.
  • Improved the TrFile_ExecuteShell function: it is now possible to have a timeout up to 24 hours. Also improved the speed for commands with large results.
  • Added new switch -GetRegistrationState to the TrFile_Version function: this switch allows you to check if the plug-in is currently registered.
  • Updated Version example file to show the use of -GetRegistrationState.
  • Improved the FileManipulation.fmp12 example file, so it no longer uses the obsolete function TrFile_FileSpecToFullPath().
  • Improved the code and the registration text shown in the log when running FileMaker Server.
  • Improved the example file EasyInstallTroiPlugins.fmp12 (in the FileMaker Pro 12 formatted download only), so it is possible to reinstall the same plug-in version.

New in Troi File Plug-in 7.5.1 (May 29, 2014)

  • Fixed a bug that could crash FileMaker Pro with certain registration strings when using the "Troi Payment Certificate.txt".

New in Troi File Plug-in 7.5 (May 29, 2014)

  • Final non-beta version of the plug-in.
  • (Windows) Fixed a 'file in use' bug in the TrFile_CreateThumbnail() function: the plug-in now properly releases the image file.
  • Improved the example file EasyInstallTroiPlugins.fmp12 (in the FileMaker Pro 12 formatted download only), it is now possible to add more information from FileMaker Server to the log field.

New in Troi File Plug-in 7.4.9.1 Beta (Apr 26, 2014)

  • Compatible with FileMaker Pro 13 and 64-bit:
  • First Public Beta Version.
  • Tested and made compatible with FileMaker Pro 13, including 13.0v3.
  • Added support for 64-bit architecture: On Windows there are now 2 plug-ins: Troi_File_Plugin.fmx (for 32-bit) and Troi_File_Plugin.fmx64 (for 64-bit).
  • NOTE Only Filemaker Server and FileMaker WebDirect are 64-bit processes and require the Troi_File_Plugin.fmx64 version to be installed.
  • Rewrote most parts of the plug-in.
  • IMPORTANT This plug-in drops support for Windows XP (the plug-in will no longer load on XP).
  • Getting Metadata:
  • In the TrFile_Metadata( ) function you can now add the switch "-PreferQuickTime" in combination with the switches "-GetMovieDescription" and "-GetImageDescription". If possible the plug-in will use the old code which depends on QuickTime. QuickTime is not available on 64-bit, in this case the
  • switch "-PreferQuickTime" will be ignored and the new code will be used.
  • Improved the TrFile_MetaData function: When using it with the switch "-GetMovieDescription" this function now also returns the data rate (in bits/s) of movies.
  • Improved the TrFile_MetaData function: When using it with the switch "-GetMovieDescription" the value of frames per second (fps) is now based on the video track and is more accurate.
  • (Mac OS X) Improved the TrFile_MetaData function: When using it with the switch "-GetMovieDescription" this function now also returns the audio codec (like AAC) of movies.
  • Improved the TrFile_MetaData function (but only with the switch "-PreferQuickTime"): when using it with the switch "-GetMovieDescription" more types of codecs are returned (as media handler). These types include: 'flsh' (Flash Media Handler) and 'sprt' (Sprite Animation Media Handler). Other types can also be returned. NOTE this is dependent on QuickTime, and may be removed in a future version!
  • Other improvements and fixes:
  • Added new implementation for TrFile_CreateThumbnail(), for both OS X and Windows. This implementation is no longer dependent on QuickTime.
  • Improved the functions TrFile_ListFolder and TrFile_GetTypeOfItem, the error codes are now more cross-platform.
  • Improved the example file EasyInstallTroiPlugins.fmp12 (in the FileMaker Pro 12 formatted download only), to be able to install plug-ins for 64-bit and running under WebDirect.
  • Fixed a small problem with de Mail Drop example in the DragAndDrop file that would not include the last character of the email body into the field.
  • Improved the example file ManageMedia.fmp12 with test scripts for creating thumbnails.
  • Improved the CreateFolder example file: it now no longer uses the obsolete function TrFile_FileSpecToFullPath().
  • Improved the Disable example file: it now gives more information on what is happening. Also the function used to test the disable is now working better.
  • Improved the ManageMedia example file: it now properly handles movie files with these extensions: .f4v, .flv and .m4v.
  • Clarified proper keyword formatting in the IPTC_XMP_Metadata example file.
  • Made small improvements in several other example files.
  • Miscellaneous:
  • Made most functions of the plug-in available for auto-enter calculations (they now appear also in the list of available external functions). Please note that using the plug-in's functions in auto-enter calculations may cause performance penalties and other side effects. In some cases it might be useful to be able to add a function of the plug-in in an auto-enter calculation.
  • Moved to the registration system for version 7.5. You need a new license, otherwise the plug-in will run in demo mode, showing a flash dialog.
  • Created a new test file FileManipulationTest.fmp12, which can be used to test the file manipulation functionality of the plug-in when running on FileMaker Server 13. This is a separate download.

New in Troi File Plug-in 7.0 (Aug 7, 2013)

  • New functionality:
  • Tested and improved compatibility with Windows 8 and Windows 8.1 (preview version).
  • Added new function TrFile_InsertContents, which can insert text into a file, at a specified position. Also added a new Insert example file demonstrating this functionality.
  • Added a grid view to the Thumbnail example file, which demonstrates (in a simplified way) how to implement square thumbnails in a grid.
  • Updated the DragAndDrop example file to reflect the Mail Drop functionality with an extensive example demonstrating the handling of single and multiple Mail Drops.
  • Added an optional thumbnailName parameter to the TrFile_CreateThumbnail function. This name is added to the created (thumbnail) image data and is also added when the thumbnail is stored in a container field. The name is normally not visible, but will be used for example when you perform an Export Field Contents action later.
  • Metadata enhancements:
  • Added new switch to TrFile_SetMetaData function: "-SetImageURL", this can set the Photoshop Image URL metadata. Note that the Image URL is not part of the official IPTC specification.
  • Added new functionality to the TrFile_SetMetaData function when using the switch "-SetIPTC". You can now also write the IPTC encoded as UTF-8 text, by using the new -UTF8CharSet switch. In the written image file the CodedCharacterSet tag (which indicates the encoding) will be set to UTF-8.
  • Other fixes and improvements:
  • Rewrote the source code to make the plug-in more efficient and prevent possible errors.
  • Fixed a bug in the TrFile_ListFolder function which could lead to a crash when one of the files inside the folder listed had a name longer than 128 characters.
  • Updated the IPTC_XMP_Metadata example file to check for the correct version.

New in Troi File Plug-in 6.2 (May 31, 2013)

  • (Windows) Fixed a bug in the TrFile_ListFolder function and the "-Recursive" switch: folders with a period as 2nd character in the name are now also listed recursively.
  • (Windows) Fixed a problem with the "-GetGPS" switch of the "TrFile_MetaData" function: The minutes and seconds part of the GPS coordinates are now correctly returned in all cases. Also trailing zeros are no longer present in the raw GPS data.
  • Improved the GetExif example file: the latitude and longitude is better displayed, the minutes are now shown for all GPS formats.
  • Fixed a small problem in the layout text of the ListFolder example file.
  • Fixed a bug in TrFile_Substitute function where under certain conditions performing a substitute with a big file could give a wrong result.
  • (Windows) Fixed a problem in TrFile_MetaData function with the switches "-GetImageDescription", "-GetMovieDescription" and "-GetPDFDescription". It no longer returns the error code $$-43 (file not found) for existing files.
  • (Windows) Fixed a problem where calling the TrFile_MetaData function with the switch "-GetXMP" and PNG image files could potentially hang the FileMaker Pro application.
  • Fixed a problem where the plug-in would not correctly load when running as a server-side plug-in or as a web-side plug-in under FileMaker Server 12.

New in Troi File Plug-in 6.1.1 (Aug 3, 2012)

  • Fixed a script problem in "All File Examples.fp7" and "All File Examples.fmp12". The script "Check if the correct FILE plug-in is installed" checked against the version of the Troi Activator Plug-in, causing it to ask to update the File Plug-in even if the Troi File Plug-in was current.
  • Fixed a typo in the Version.fp7 example file.

New in Troi File Plug-in 6.1 (Aug 3, 2012)

  • Improved:
  • Made compatible and tested with FileMaker Pro 12.
  • The example files are now available in the new .fmp12 format.
  • Added new example file EasyInstallTroiPlugins.fmp12 (in the FileMaker Pro 12 formatted download only), which contains the plug-ins (a Mac and Windows version) and can install the plug-in from within FileMaker Pro 12.
  • Added new switch "-GetPluginInstallPath" to the TrFile_Version function: this switch will return the path where a plug-in is installed, for example "/Mac HD/Users/User Name/Library/Application Support/FileMaker/Extensions/Troi_File.fmplugin".
  • Removed the obsolete MultiExport.fp7 and MultiPDF.fp7 example files as this can now be done natively with FileMaker Pro.
  • Improved Drag and Drop;
  • (Windows) Fixed a problem with the drag and drop functionality not starting with FileMaker Pro 12Note: starting drag and drop (on Windows only) will remove the default drag and drop of the FileMaker Pro application until you restart the FileMaker Pro application.
  • Updated the DragAndDrop.fp7 (and DragAndDrop.fmp12) example fileImproved the vertical correction for the Status Toolbar when starting drag an drop with field bounds in the scriptsThe script to start Drag and Drop was also rewritten for clarity.
  • Other improvements and fixes:
  • Improved the TrFile_CreateThumbnail function: added a "-TryNativeJPEGDecoding" switch, which will decode the JPEG natively, instead of using QuickTimeNote that for the subsequent scaling QuickTime still is usedThis switch makes TrFile_CreateThumbnail work better for some JPEG images, specifically if those JPEGS have a color profile "sRGB IEC61966-2-1 black scaled"See the script "Simple Create Thumbnail 256x256 -TryNativeJPEGDecoding" in the Thumbnail.fp7 file.
  • NOTE the created thumbnails may look slightly different from the ones generated by QuickTime, also color profiles and antialiasing are handled differently.
  • Improved the TrFile_CreateThumbnail function: the plug-in now returns fnfErr ($$-48) when the image file could not be found, instead of the noThumbnailFoundErr ($$-8994) which implied that the file exists.
  • Made small improvement to the Thumbnail.fp7 example file.
  • Updated the IPTC_XMP_Metadata.fp7 (and IPTC_XMP_Metadata.fmp12) example fileFixed a mistake in the "Simple write IPTC data" script, in the formatting of the IPTC tagsAlso made several small improvements to the IPTC_XMP_Metadata.fp7 example file.
  • (Windows) fixed a bug with the TrFile_MetaData function: now images with higher Unicode characters in the file name no longer give $$123 as error code.
  • Updated the HTML export example fileAlso renamed it to HTMLExport.fp7 (and HTMLExport.fmp12).
  • (Mac OS X) Fixed a problem with TrFile_SelectFileDialog, and TrFile_SelectFolderDialog and TrFile_SaveFileDialog: the initialFolder parameter now also works if the folder name contains higher Unicode characters.
  • Fixed a programming error which could possibly cause a memory problem with the TrFile_CreateFile or TrFile_Substitute functions.

New in Troi File Plug-in 6.0 (Aug 3, 2012)

  • New functionality:
  • Improved the TrFile_CreateFolder function: you can now specify a path and the plug-in will create the folder, including all folders in the path that do not exist.
  • Improved the TrFile_Search function: you can now also specify a folder in which the search must be done, instead of searching the whole disk.
  • Added new function TrFile_GetFileHash, which can return the MD5 hash value (checksum) of a fileYou can use this hash to check if a file has not changed (by comparing it to a stored MD5 hash)Also added an example of this function to Attribute.fp7
  • Improved the TrFile_SetFileAttribute function: you can now also set the (color) Finder Label for folders (Mac OS X only).
  • Metadata enhancements:
  • New: you can now read the metadata of PDF filesUse this function call: TrFile_MetaData( "-GetPDFDescription" ; filePath )This can extract the following metadata information from PDF files: title, subject, keywords, number of pages, author and more.
  • Improved the ManageMedia.fp7 example fileIt can now also add the metadata of PDFs to the description.
  • New functionality in the TrFile_MetaData function, and the switch "-GetXMP": the plug-in now can read the (XMP) metadata in PNG image files.
  • Improved the IPTC_XMP_Metadata.fp7 example file, including an example that shows how to parse XMP metadata into easy readable text.
  • New functionality in the TrFile_MetaData function when using the switch "-GetIPTC": the plug-in now automatically detects if the text is UTF-8 encoded (and also returns with the metadata text correctly formatted).
  • Added a switch "-DontUseAutoUTF8Detection" to the TrFile_MetaData function, to be used with the switch "-GetIPTC"It allows you to bypass the automatic detection of UTF-8 encoded text in the IPTC metadataThis can potentially be used for images that have improperly formatted IPTC metadata.
  • Improved the GetExif.fp7 example file: now the orientation tag is also parsed out, so you can see if the image is in portrait or landscape format.
  • Other fixes and improvements:
  • Fixed a few small issues and made several smaller improvements.
  • Updated several example files and documentation for the new functionality.

New in Troi File Plug-in 5.5.2 (Aug 3, 2012)

  • FileVersion resource (on Windows) so it now reflects the correct version number.

New in Troi File Plug-in 5.5.1 (Aug 3, 2012)

  • Fixed a bug with TrFile_ListFolder function and the "-Recursive" switch: the plug-in now correctly handles folders containing an extreme large number of items (directly at that folder level), for example 100.000 individual files in that folder.
  • Improved the speed of the TrFile_ListFolder function (up to 5 times faster).
  • Improved the TrFile_ListFolder function and the "-Recursive" switch: the plug-in now by default encodes filenames which contain a forward slash "/": slashes are substituted with "/"This is the same as how native FileMaker style paths are handled and also makes it possible to differentiate from the folder separatorAlso added a switch "-DontEncodeSlash" which disables this encoding of slashes.
  • Corrected an inaccuracy in a function name in the example file DataIn.fp7.
  • Fixed a bug in the handling of registration strings.

New in Troi File Plug-in 5.5 (Aug 3, 2012)

  • Compatibility enhancements;
  • Tested and made compatible with Mac OS X Lion 10.7 (GM): in our preliminary testing we have found no major issues with Mac OS X LionNote: This is only an initial findingWe will continue our testing when newer releases of Lion come out.
  • New functionality for listing folders and searching for files:
  • Improved the TrFile_ListFolder function: you can now recursively get the list of files and folders and all the subfolders of the folder you are listingTo enable this add the switch "-Recursive"Note that files and folders in sub-folders are listed with their relative folder path, with a slash as separator, for example "Subfolder/Filename.txt".
  • (Windows) Improved TrFile_ListFolder function, it now better returns files with higher Unicode characters in the name.
  • (Windows) Improved TrFile_Search function, it now better returns files with higher Unicode characters in the name.
  • New functionality for images:
  • Improved the TrFile_CreateThumbnail function, added a "-Square" switch, which will result in square thumbnailsIn this case the thumbnails will have the extending parts of the wider side of the image cropped (thus showing the middle square of the image)Also note that the image will be scaled proportionally up to a square, if one of the sides of the image is smaller than the requested sizeThis makes sure the result is always a square with the exact dimensions requested.
  • Improved the TrFile_CreateThumbnail function, added support for creating thumbnails from CRW files (a RAW file type from Canon).
  • Improved the TrFile_MetaData function, and the switch "-GetEXIF": Added support for getting EXIF data from RAW filesThis will work for all RAW formats which are internally based on the TIFF formatMany (but not all) RAW file formats are based on the TIFF file formatExamples include 3FR (Hasselblad), DCR, K25, KDC (Kodak), CR2 (Canon), ERF (Epson), MEF (Mamiya), MOS (Leaf), NEF (Nikon), ORF (Olympus), PEF (Pentax), RW2 (Panasonic) and ARW, SRF, SR2 (Sony).
  • Improved the TrFile_MetaData function, and the switch "-GetEXIF": also added limited support for returning EXIF data in CRW files (a RAW file type from Canon)Note that normally CRW files dont have an EXIF data block, but the plug-in will try to create one from the available data.
  • Other fixes and improvements:
  • Updated the example files and documentation for the new functionality.
  • Fixed a few small issues and made several smaller improvements.

New in Troi File Plug-in 5.0.3 (Aug 3, 2012)

  • Improved the TrFile_CreateThumbnail function: in case of a corrupt JPEG the plug-in now returns error code codecDataVersErr ($$-8970) instead of the more general noThumbnailFoundErr ($$-8994).
  • Improved the TrFile_CreateThumbnail function: when the plug-in returns a thumbnail the size is now determined more accurately, and is no longer dependent on internal PICT data.
  • Fixed a bug in handling of registration strings.
  • Fixed several smaller issues and bugs and made several smaller improvements.

New in Troi File Plug-in 5.0.2 (Aug 3, 2012)

  • Improved the TrFile_SetContents and TrFile_AppendContents functions: when writing text which contains one or more Unicode NULL characters (U+0000) the complete text will now be written to the file.
  • Note that normally Unicode character NULL in a FileMaker text field indicates corrupt text data.
  • Improved the TrFile_Substitute function: improved handling when either the search string or replace string contains one or more Unicode NULL characters (U+0000).
  • Further improved support for unusual encodings in the TrFile_SetContents, TrFile_AppendContents and TrFile_Substitute functions: When used with unusual encodings and when writing text which contains one or more Unicode NULL characters (U+0000) the complete text will now be written to the file.
  • Added new example for creating UTF-8 Encoded files to CreateFile.fp7It also demonstrates how to add a Byte Order Mark (BOM) to the UTF-8 file.
  • Added new example script for creating a ISO 8859-1 Encoded file to CreateFile.fp7This script can easily be modified for different encodings.
  • Improved the DataIn.fp7 example file to better demonstrate the use of the TrFile_Exists() function.
  • (Windows) Improved the TrFile_FindFolder function, for the "desktop" and "mydocuments" switch: it will now also work when the username in the path contains higher Unicode characters.
  • Fixed a problem in registering with the built-in function.
  • Corrected the path of logs files in the document filemaker-server-side-plug-ins.htm.
  • Tested and compatible with FileMaker Pro 11v3.