Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

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
MBS( "Files.FileInfo"; Path; Selector )   More

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:
VersionVersion
ShortVersionShort version
MinimumSystemVersionMinimum OS X version required to launch app.
InfoStringFinder Info string.
ExecutableNameName of executable file in bundle.
IdentifierBundle Identifier

Possible selectors on Win:
DescriptionThe file description.
VersionThe file version.
InternalNameThe internal name.
CompanyNameThe company name.
LegalCopyrightThe legal copyright string.
OriginalFilenameThe original filename.
ProductNameThe product name.
ProductVersionThe product version.
CopyrightHuman 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

Release notes

  • Version 7.5
    • Added selector CopyRight for Files.FileInfo to query copyright string on Mac.

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 19th April 2021


Files.FileExtension - Files.FileKind

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins

Start Chat