Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Files.FileInfo
Queries some file information.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Files | 4.3 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
Path | The native file path to the application. | $Path |
Selector | Which value to query. | "Version" |
Result
Returns value or error.
Description
Queries some file information.This is intended for bundled app/plugin/framework files on Mac and on Windows for EXE/DLL files.
Possible selectors on Mac:
Version | Version |
ShortVersion | Short version |
MinimumSystemVersion | Minimum OS X version required to launch app. |
InfoString | Finder Info string. |
ExecutableName | Name of executable file in bundle. |
Identifier | Bundle Identifier |
Possible selectors on Win:
Description | The file description. |
Version | The file version. |
InternalName | The internal name. |
CompanyName | The company name. |
LegalCopyright | The legal copyright string. |
OriginalFilename | The original filename. |
ProductName | The product name. |
ProductVersion | The product version. |
Copyright | Human readable copyright string. (New in 7.5) |
The file information is cached to queries with same file path will not reload values from file.
Examples
Queries information about FileMaker on Mac:
MBS("Files.FileInfo"; "/Applications/FileMaker Pro 13 Advanced/FileMaker Pro Advanced.app"; "Version")
MBS("Files.FileInfo"; "/Applications/FileMaker Pro 13 Advanced/FileMaker Pro Advanced.app"; "MinimumSystemVersion")
MBS("Files.FileInfo"; "/Applications/FileMaker Pro 13 Advanced/FileMaker Pro Advanced.app"; "ExecutableName")
MBS("Files.FileInfo"; "/Applications/FileMaker Pro 13 Advanced/FileMaker Pro Advanced.app"; "Identifier")
Queries some information about DebugView on Windows:
MBS("Files.FileInfo"; "C:\Users\Christian\Desktop\Dbgview.exe"; "Version")
MBS("Files.FileInfo"; "C:\Users\Christian\Desktop\Dbgview.exe"; "Description")
Query version of MBS plugin stored in container:
# get temp path
Set Variable [ $path ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); "MBS.dll") ]
# write DLL file to disk
Set Variable [ $r ; Value: MBS( "Container.WriteFile"; Install Plugin Update if needed::Plugin File Win 64bit; $path) ]
# Query file information
Set Variable [ $version ; Value: MBS( "Files.FileInfo"; $Path; "version") ]
See also
- Container.WriteFile
- Files.DiskInfo
- Files.FileKind
- Files.FileName
- Files.FileSize
- Folders.UserTemporary
- Path.AddPathComponent
- Version
Release notes
- Version 7.5
- Added selector CopyRight for Files.FileInfo to query copyright string on Mac.
Blog Entries
- MBS Plugin Advent calendar: 12 - Files
- Query MBS Version from plugin in container
- MBS FileMaker Plugin, version 7.5pr2
- MBS Filemaker Plugin, version 4.3pr6
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 19th April 2021