Troi File Plug-in Changelog

What's new in Troi File Plug-in 10.0

Sep 4, 2018
  • 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.
  • (macOS) Added initial support for HEIC (High Efficiency Image File Format) image files: the TrFile_GetMetaData function with the switch “-GetImageDescription” now returns a description.
  • 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.
  • (macOS 10.13.4) Fixed a problem with the TrFile_DragAndDrop function when using the switch “-AllowMailDrops”, where an incorrect path to the temporary email file would be returned. The plug-in now returns the correct path. In some cases the Mail app does not create the temporary email file, the plug-in then returns the complete drag information, which can be parsed to get the correct location of the email.
  • Added example script to the SelectFile.fmp12 example file which demonstrates how to use the switch “-HideInvisibles”.
  • (macOS) The minimum supported Mac OS X version is now 10.8.

New in Troi File Plug-in 8.6.1 (Jan 21, 2017)

  • 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.
  • (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.6 (Sep 30, 2016)

  • Tested and improved compatibility with macOS Sierra (Mac OS X 10.12).
  • Added new TrFile_GetIcon function, which gets the icon of a file. It can create icons in sizes varying from 16x16 to 1024x1024 pixels and with double resolution for retina screens.
  • Added new switch "-CreatePNG" to the TrFile_CreateThumbnail function: this will give as result a thumbnail in the PNG format, with an alpha channel. This means that the thumbnail will have the same transparent areas as the original image.
  • Improved support for PDF/X files: you can now see whether a file confirms to the PDF/X standard. Use this function call: TrFile_MetaData( "-GetPDFDescription" ; filePath ). This will return the version of the standard, for example: GTS_PDFXVersion: PDFX-1:2001.
  • (Mac OS X) Fixed a problem in the TrFile_MetaData function with the switches "-GetImageDescription": this function now returns a resolution of 72 (instead of 0) for the horizontal and vertical resolution for JPEG images that don't have an explicit resolution set.
  • (Mac OS X) Fixed a problem with the TrFile_DragAndDrop function when dragging mail: email messages with a pound sign ("#") in the subject of the email are now handled properly.
  • (Mac OS X) Fixed a bug in the TrFile_CreateZIP function: file paths with accents in the name now no longer return error code $$15.
  • (Mac OS X) fixed a bug in the TrFile_MountDisk function: paths to secure WebDAV servers (with protocol https) are now properly handled.
  • Made small improvements to the DiskMount.fmp12 example file.
  • Updated the Overview.fmp12 file regarding obsolete FSSpecs.

New in Troi File Plug-in 8.5 (Sep 24, 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.
  • Added -SkipDS_Store switch to the TrFile_ZIPInfo function, which will remove .DS_Store files from the result. Mac OS X stores extra info in these hidden files.
  • Added -SkipHiddenMacOSXItems switch to the TrFile_ZIPInfo function, which will remove from the result all items which are in a __MACOSX folder in the ZIP. Mac OS X stores extra info and resource forks of files in this __MACOSX folder.
  • Created the ZIPAndUnZIP.fmp12 example file. Removed the older CreateZip.fmp12 example file.
  • Added new TrFile_CreateAlias function, which creates an alias file (on OS X) or shortcut (on Windows) from the source file or source folder.
  • 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.4 (Sep 25, 2015)

  • 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.
  • (Mac OS X, 64-bit) Fixed a bug in the TrFile_DiskInfo function: in some cases the wrong free space and used space could be returned.
  • (Mac OS X) Improved the TrFile_FindFolder function for the "startup" switch: it will now return the correct path.
  • (Mac OS X) Improved the TrFile_FindFolder function for folders that are no longer available (like the folder Control Panels). It will now return $$-1.
  • (Mac OS X, 64-bit) Improved TrFile_Metadata("-GetImageDescription", ... ) functionality: the result will now also show the Tiff Compression, for TIFF formatted images.
  • (Mac OS X, 64-bit) Improved TrFile_Metadata("-GetImageDescription", ... ) functionality: for Photoshop files the codec will now be set again to "8BPS".
  • 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 (Jul 21, 2015)

  • (Mac OS X) TrFile_DragAndDrop is now also implemented for the 64-bit version of FileMaker Pro 14.
  • Updated the DragAndDrop example file.
  • Made a small improvement to the DataIn example file.

New in Troi File Plug-in 8.0.2 (Jun 25, 2015)

  • Fixed typo in user guide.
  • Updated some example files.

New in Troi File Plug-in 8.0.1 (Jun 25, 2015)

  • (Mac OS X) Improved the function TrFile_Search: on OS X 10.10 and with FileMaker Pro 14 the default search is now the Exhaustive search. This is the same as when using the switch "-exhaustive" on FileMaker Pro 13. You can no longer use the original (Carbon based) search on OS X 10.10 and FileMaker Pro 14, as this proved unreliable.
  • 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 13, 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.
  • (Mac OS X) Added a new implementation for the function TrFile_Search: you can now search for files and folders using Spotlight. Add the switch "-useSpotlight" for this.
  • 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.
  • (Mac OS X) You can now filter on extensions (like .txt) when using the TrFile_SelectFileDialog. For this the function TrFile_SetDefaultType now accepts multiple lines, to specify the extensions to enable. The formatting of this is now the same format as on Windows.
  • 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.5.3 (Jan 21, 2015)

  • (Mac OS X) Added a new implementation for the function TrFile_Search: you can now search for files and folders using an exhaustive enumeration. This implementation is no longer dependent on carbon. To enable this add the switch "-exhaustive".
  • (Mac OS X) Improved code to load the correct Cocoa code bundle when updating a plug-in with the "Install Plug-in File" script step.
  • 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)

  • (Mac OS X) Fixed a problem with the TrFile_DragAndDrop function, where scripts in FileMaker files with a period in the file name would not be triggered.
  • (Mac OS X) Fixed a bug in TrFile_CreateFolder function: creation of nested new folders now also works with FileMaker style paths.
  • 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.
  • (Mac OS X) Fixed a bug in TrFile_ExecuteShell function, where some UTF-8 results could potentially crash FileMaker.
  • (Mac OS X) Fixed a problem with the TrFile_CreateThumbnail() function: images with a high resolution (for example 8200 dpi) no longer result in too small thumbnails.
  • (Mac OS X) Improved the flash dialog: it is now implemented as a Cocoa dialog and 64-bit compatible.
  • 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.
  • (Mac OS X) Fixed a bug with registration on FileMaker Server 13: the plug-in now looks in the correct folder for the Troi Payment Certificate.
  • 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)

  • (Mac OS X) 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 27, 2014)

  • Final non-beta version of the plug-in.
  • 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. On OS X the 32-bit and 64-bit version is a single universal plug-in.
  • 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). On Mac OS X the minimum system is now OS X 10.6.8 (the plug-in will not load on 10.5 and earlier).
  • Getting Metadata:
  • (Mac OS X) Added new implementation for TrFile_Metadata("-GetMovieDescription", ... ) and TrFile_Metadata("-GetImageDescription", ... ) when running in 64-bit mode. NOTE These 2 functions are not implemented on Windows and on Mac OS X versions prior to OS X 10.7. In this case the plug-in returns with error code $$-4243 (kErrNotImplemented).
  • 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.
  • (Mac OS X) Made an improvement to the TrFile_DeleteFolder function: it now handles removal of the hidden file ".DS_Store".
  • 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.
  • (Mac OS X) Improved the DragAndDrop example file by adding support for decoding quoted-printable formatted emails, and improving handling for the Mail folder structure of Mac OS X 10.7 and 10.8.
  • 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:
  • (Mac OS X) The plug-in no longer supports the deprecated FileSpec format. Only full paths and FileMaker style paths are now supported for specifying a file or folder. The functions TrFile_FullPathToFileSpec and TrFile_FileSpecToFullPath are obsolete and now return error code $$-4266 (kErrNoLongerSupported).
  • 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 (Jul 27, 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.
  • (Mac OS X) Improved the drag and drop functionality by adding Mail Drop. You can now drag one or more emails from the Mail.app to the FileMaker window. Add the switch "-AllowMailDrops" to the switches parameter of TrFile_DragAndDrop function to enable this extra functionality.
  • 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.
  • (Mac OS X) Fixed a bug in the TrFile_MountDisk function on Mountain Lion which could lead to a crash, when an url-style server name would be used with certain disk names, for example a disk with a space in the name.
  • Updated the IPTC_XMP_Metadata example file to check for the correct version.
  • (Mac OS X) TrFile_MountDisk: paths to SMB servers are now handled by improved and modern code.

New in Troi File Plug-in 6.2 (Jun 1, 2013)

  • Fixed a problem with the TrFile_ExecuteShell function: short commands of only 2 characters like "ls" could return an empty string.
  • 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.
  • 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 1, 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.
  • Tested with Mountain Lion (OS X 10.8) and fixed a small compatibility issue.
  • Fixed a typo in the Version.fp7 example file.

New in Troi File Plug-in 6.1 (Jun 27, 2012)

  • Improved for FileMaker Pro 12:
  • 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 12. Note: 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 file. Improved the vertical correction for the Status Toolbar when starting drag an drop with field bounds in the scripts. The script to start Drag and Drop was also rewritten for clarity.
  • (Mac OS X) Changed the DragAndDrop.fmp12 example file: the container field no longer allows field entry in browse mode to resolve a conflict with the Drag and Drop of the FileMaker Pro 12 application.
  • Other improvements and fixes:
  • Improved the TrFile_CreateThumbnail function: added a "-TryNativeJPEGDecoding" switch, which will decode the JPEG natively, instead of using QuickTime. Note that for the subsequent scaling QuickTime still is used. This 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 file. Fixed a mistake in the "Simple write IPTC data" script, in the formatting of the IPTC tags. Also 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 file. Also 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 (Mar 7, 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 file. You 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 files. Use 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 file. It 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 metadata. This 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 (Jan 4, 2012)

  • Made small change to the bundle (on Mac OS X) and FileVersion resource (on Windows) so it now reflects the correct version number.

New in Troi File Plug-in 5.5.1 (Jul 23, 2011)

  • (Mac OS X) Fixed a bug with TrFile_ListDisks function when running on OS X Lion (10.7): the plug-in no longer returns two incorrect disknames (home and net).
  • 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 separator. Also 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 (Jul 15, 2011)

  • 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 Lion. Note: This is only an initial finding. We 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 listing. To 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".
  • (Mac OS X) Improved the TrFile_ListFolder function: also added the switch "-ShowPackageContents". When used in combination with the "-Recursive" switch this also lists the contents of a package folder (like for example a Mac OS X app).
  • (Mac OS X) Improved the TrFile_ListFolder function: changed the default to returning long file names (up to 255 characters). You no longer need to add the switch "-LongNames" to do this. If you want the truncated names (up to 31 chars), please add the switch "-ShortNames".
  • (Windows) Improved TrFile_ListFolder function, it now better returns files with higher Unicode characters in the name.
  • (Mac OS X) Improved the TrFile_Search function: changed the default to returning long file names (up to 255 characters). You no longer need to add the switch "-LongNames" to do this. If you want the truncated names, please add the switch "-ShortNames".
  • (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 thumbnails. In 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 size. This 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 files. This will work for all RAW formats which are internally based on the TIFF format. Many (but not all) RAW file formats are based on the TIFF file format. Examples 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 (Jun 27, 2011)

  • 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 (Feb 14, 2011)

  • 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.fp7. It 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.fp7. This 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.

New in Troi File Plug-in 5.0.1 (Sep 29, 2010)

  • Improved the TrFile_CreateThumbnail function, so that it now returns a native binary type. This makes it possible to use the Set Variable script step.
  • Fixed a rotation bug in the TrFile_CreateThumbnail function: RAW files with orientation tags other than horizontal now get a properly rotated thumbnail.
  • Improved the Thumbnail.fp7 example file to better demonstrate the use of the "-AntiAliasThumbnail" switch.
  • (Windows) Fixed a bug with TrFile_ExecuteShell always returning a timeout error $$-4230 even if the executed process terminated on time.
  • (Windows) Improved handling of the switch "-Encoding=ISO_8859_15" in several functions.
  • Rewritten code in several places.
  • Improved the example file ManageMedia.fp7: added scripts to get, set and update container field with FMP styled paths.
  • (Mac OS X) Fixed a problem with FileMaker Pro 11.0v2 making drag and drop not working properly.

New in Troi File Plug-in 5.0 (Jun 21, 2010)

  • New functionality:
  • Made compatible and tested with FileMaker Pro 11.
  • Added compatibility with Windows 7.
  • Troi File Plug-in is now compatible with FileMaker styled paths, like for example "filemac:/MacHD/folder/file.txt". Each function with a FileSpec parameter can now also be given a FileMaker styled path. You can still use all the FileSpec formats of previous versions of the Troi File Plug-in, like for example "MacHD:folder:file.txt" on Mac OS X and "C:\folder\letter.txt" on Windows.
  • Updated CreateFile.fp7 example to show the use of FileMaker style paths, like "filewin:/C:/dir/test.txt".
  • Improved Drag and Drop functionality: you can now specify up to two drag destination rectangles (even on the same window), each drag can trigger a different script. See the example in DragAndDrop.fp7
  • Added new function: TrFile_GetTypeOfItem, which provides an easy way to see if a paths points to a folder or file.
  • Updated the example file DragAndDrop.fp7 to make use of the new function: TrFile_GetTypeOfItem.
  • Added support for RAW files in TrFile_CreateThumbnail: it can now create a thumbnail from the (large) thumbnail embedded in the RAW file. This should work for several RAW formats, but currently only has been tested with Canons CR2 format.
  • Added switch "-GetFullSizeRawThumbnail" to the TrFile_CreateThumbnail function: This switch will return the full size thumbnail embedded in the RAW file. This should work for several RAW formats, but currently only has been tested with Canons CR2 format.
  • You can now get the creation date and modification date of a folder using the TrFile_GetDateCreated and TrFile_GetDateModified functions. This also works with the variant functions, like for example TrFile_GetTimestampModified.
  • You can now set the creation date and modification date of a folder using the TrFile_SetTimestampCreated and TrFile_SetTimestampModified functions.
  • Fixes:
  • (Windows) Fixed a problem with TrFile_ExecuteShell always returning a timeout error $$-4230 even if the executed process terminated on time.
  • (Windows) Improved TrFile_ExecuteShell, including improved error handling.
  • (Mac OS X) Fixed a problem when creating a temporary file on a remote disk, which could result in a $$-5000 (afpAccessDenied) error. This error could occur in several functions: TrFile_CreateThumbnail, TrFile_SetMetaData and TrFile_Substitute.
  • (Mac OS X) Fixed a bug in TrFile_MoveFile function that could lead to a crash of FileMaker and removed calls to an older ResolveAlias function. This change will also fix potential problems in other functions that have a full path as parameter.
  • Other changes and enhancements:
  • (Mac OS X only) Added support for ColorSync in TrFile_CreateThumbnail: this function can now create a thumbnail in the sRGB color space. The thumbnail will have the "sRGB IEC61966-2.1" profile embedded.
NOTE this feature is not enabled by default, it needs to be enabled by adding a 
"-AddColorSyncSupport" to the switches parameter of TrFile_CreateThumbnail().
  • Improved the TrFile_MetaData function: When retrieving GPS metadata the Altitude reference now returns 0, indicating Sea Level.
  • Added new switch to TrFile_Version: -UnregisterPlugin. This will remove the registration data. The plug-in will be in a unregistered state after this. See the "Temporary Register Dialog Plug-in" script in the file RegiFunc.fp7 for an example use.
  • Improved example files and documentation:
  • Updated CreateFile.fp7 and MoveFolder.fp7 example to use variables and to make use of the TrFile_Exists function.
  • Fixed a script in the FolderManipulation.fp7 example file.
  • Improved the GetExif.fp7 and SetExif.fp7 example files: they now also parse the GPS data types: Image direction and Image direction reference (True or Magnetic direction) and Degree of precision.
  • Updated the User Guide, and also fixed an incorrect example in the User Guide and Overview.fp7

New in Troi File Plug-in 4.6.2 (Jul 6, 2009)

  • Fixed a small error in the display of the GPS data in GetExif.fp7 example file: the symbols for minutes (') and seconds (") were switched in the latitude and longitude text.
  • Improved the GetExif.fp7 example file: it now uses variables for parsing the data.

New in Troi File Plug-in 4.6.1 (Jul 6, 2009)

  • Improved the TrFile_MetaData function for the switch "-GetMovieDescription": added Current Time (in seconds) to movie description. This is also available when there is no Timecode track.
  • Improved the TrFile_MetaData function: the returned pixel depth (with switch "-GetImageDescription") is now more accurate for certain images.
  • Added missing documentation for switch "-GetImageDescription" of function TrFile_Metadata to User Guide and Overview.fp7 .
  • (Mac OS X) Added new switch "-PackageFolderAttr" to the function TrFile_GetFileAttribute: this can be used to determine if a file is a package folder. For example all Mac OS X applications are really package folders. This can be used to determine if a result of a drag and drop action is a package or a real folder.
  • Adapted example file DragAndDrop.fp7, to make use of the new "-PackageFolderAttr" switch of the function TrFile_GetFileAttribute.
  • (Windows) Improved Drag and Drop functionality: when starting drag and drop it will now only use the name of the current front window (and no longer tests if this is the same as the fileName parameter). This means that drag and drop with a renamed window now also works. Note, however, if there are two windows with the same name the plug-in might pick the wrong one. You can prevent this from happening by using different names for each window.
  • Improved the example files DragAndDrop.fp7 and ManageMedia.fp7 to better handle audio files, like .mp3, .m4a and .mid files.
  • (Mac OS X) Improved handling of volumes with higher Unicode characters in TrFile_SelectFileDialog and TrFile_SaveFileDialog.
  • Fixed a problem with the TrFile_CreateThumbnail function and the switch "-AntiAliasThumbnail": 16-bit images will now be properly antialiased resulting in better thumbnails.
  • (Mac OS X) Fixed a bug in the example file RecursiveFolder.fp7. It would stop too soon.
  • Corrected incorrect example in User Guide for TrFile_MountDisk.
  • (Mac OS X) Disabled a default workaround for a bug in the Alias manager. This workaround would lead to a $$-1407 error (errFSNotAFolder) for some functions when users are also using network based home directories. If you still need this workaround add this step:
  • Added code for easier debugging.

New in Troi File Plug-in 4.6 (Jan 30, 2009)

  • New features:
  • Made compatible with FileMaker Pro 10.
  • Added new TrFile_VersionAutoUpdate function. The TrFile_VersionAutoUpdate function is part of an emerging standard for FileMaker plug-ins of third party vendors of plug-ins. The version number is returned in the format aabbccdd where every letter represents a digit of the level, so versions can be easily compared.
  • Added the plug-in's version number to the description in FileMaker's preference pane.
  • Troi File plug-in is now compatible to run under FileMaker Server! The plug-in now creates log files when running under FileMaker Server to make troubleshooting installing easier and and provides feedback regarding errors and registration status.
  • Note that some functions which can't run under FileMaker Server or under the Web Engine: they will now return an error code: $$-4251 = kErrNotAvailableOnServer. This entails the functions which use GUI, like for example show a dialog. Also Note that you need a special Server/WebEngine license to use this plug-in on FileMaker Server. See our web site for details.
  • Bug fixes:
  • Fixed a bug in the TrFile_MountDisk function: when using "afp://" style addresses it will no longer show a superfluous user and password dialog.
  • Fixed a bug in the TrFile_MetaData function and the switch "-GetEXIF": if the Exif data block was too big it would not be retrieved.
  • Fixed a bug in the TrFile_DiskInfo function when using switches "-GetFreeMegs" or "-GetTotalMegs".
  • Fixed a bug in the TrFile_CreateThumbnail function using the switch "-AntiAliasThumbnail": no longer will some thumbnail sizes result in a white band at the right.
  • Improved the handling of Unicode paths in the TrFile_GetFileAttribute and TrFile_SetFileAttribute functions.
  • Fixed a bug in the handling of re-registration: No longer is an incorrect Expired dialog shown.
  • Fixed a bug in TrFile_Substitute (and TrFile_ConvertFromFMText): when using text which contains lots of Unicode characters that require more than two UTF-8 characters, this is now handled better.
  • Fixed a bug in TrFile_SetContents and TrFile_AppendContents: when writing text which contains lots of Unicode characters that require more than two UTF-8 characters, the text is now written out completely.
  • (Windows) Fixed a bug with Drag and Drop functionality using a FileMaker file that is hosted on a FileMaker server: drag and drop now works more reliable.
  • Improved Drag and Drop functionality: triggering is now only occurring during IdleSafe, eliminating possible crashes.
  • Graphic improvements:
  • Tested with FileMaker Pro 10 and tweaked several little (graphic) issues.
  • Changed the Open File script in all example files to resize better for FileMaker Pro 10.
  • Adapted example file DragAndDrop.fp7, to take into account that the status area in FileMaker Pro 10 is no longer at the left. This caused the custom drag and drop rectangle to be drawn at the wrong location.
  • Improved example files and documentation:
  • Improved the example files DragAndDrop.fp7 and ManageMedia.fp7 to better handle network paths.
  • Improved Drag and Drop example for PDFs on Windows, PDFs are now inserted as media type file.
  • Removed unnecessary file references in ManageMedia.fp7 and Import1Image.fp7
  • Improved the MoveFolder.fp7 example.
  • Added the switch "-GetXMP" to the documentation of the TrFile_Metadata function.

New in Troi File Plug-in 4.5.1 (Jul 8, 2008)

  • (Mac OS X) Improved robustness when the startup disk is renamed while the plug-in is running.
  • Fixed a bug in "TrFile_DragAndDrop" function, when using the custom field bounds (drop box). This now also works when the toolbars of FileMaker are visible.
  • Improved the user guide and the Overview.fp7 file: fixed some reference to old function names.
  • Added missing DataIn.fp7 example file in the download.

New in Troi File Plug-in 4.5 (Jun 12, 2008)

  • Added new "TrFile_Reveal" function. With this you can reveal files and folders in the Finder or Windows Explorer.
  • Added powerful new "TrFile_DragAndDrop" function. With this you can drag files and folders on the FileMaker window. The paths of the dropped items can then be handled in a triggered script, for example to put them in a container field.
  • Added "-GetGPS" switch to the "TrFile_MetaData" function. This will return the Global Positioning System data embedded in the Exif data in images. With this you can find the coordinates (latitude and longitude) where the image was taken.
  • Added support for reading XMP metadata (as used for example by Photoshop) in the "TrFile_MetaData" function.
  • Improved the TrFile_MetaData function for the switch "-GetMovieDescription". It will now return more movie information. New items are: track count, frame count, frames per second, preferred playback rate, codec name, codec type. Also when the movie contains a Timecode track, the Timecode at the begining and end of the movie and the Timecode of the current frame is returned.
  • Added extra switches to the TrFile_MetaData function which return individual movie attributes: "-GetMovieDuration", which returns the duration in seconds of a movie. When a movie contains a Timecode track the switches "-GetTimecodeBegin", "-GetTimecodeEnd", "-GetTimecodeCurrent" return the begin, end and current Timecode respectively. If there is no Timecode track an empty string is returned.
  • Added support for writing Exif data. This is still somewhat limited as the Exif Maker Note and the Exif Thumbnail will not be added when setting the Exif data.
  • Added "-GetRawExif" switch to the "TrFile_MetaData" function: This returns the data in the more original form, for example aperture will be returned as 95/32, instead of 2.96875.
  • Improved the "TrFile_MetaData" function for getting Exif: implemented better handling of corrupt Exif data and incomplete date/times in Exif data.
  • Added "-DontWaitOnResult" switch to the TrFile_ExecuteShell function. With this switch the plug-in will not wait on the termination of the process, but return immediately.
  • Added a default timeout of 20 seconds to the TrFile_ExecuteShell function. If the process started does not terminate in 20 seconds the plug-in returns with a timeout error $$-4230.
  • Added "-TimeoutSecs=x" switch to the TrFile_ExecuteShell function. With this switch you can change the timeout until the function returns if the process started does not terminate.
  • (Windows only) Added "-ShowCommandWindow" switch to the TrFile_ExecuteShell function, which will show the command window and then wait 5 seconds. This can be used for debugging.
  • (Windows only) Added "-WaitAfterExitTicks=x" switch to the TrFile_ExecuteShell function. With this switch you can change the timeout the function waits after the command window has ended.
  • Improved the TrFile_CreateThumbnail function: added a switch "-AntiAliasThumbnail", which results in better bicubic antialiased thumbnails.
  • Improved the TrFile_CreateThumbnail function: added a switch "-BitDepth=32", which will make the thumbnail a 32 bits image.
  • Several bug fixes and further improvements.

New in Troi File Plug-in 4.0.2 (Mar 18, 2008)

  • Removed a limitation of 2000 characters in the command of the TrFile_ExecuteShell function. The limit for the command string is now limited by the FileMaker application, currently up to 1 Gb characters. Realisticly about 300.000 characters can be handled by the operating system.
  • Improved the switch "-GetExif" in the "TrFile_MetaData" function: it now returns more and better data.
  • Several other smaller (internal) refinements and improvements.