TrFile_GetFileStructure (function reference)

By May 15, 2018 May 22nd, 2019 Online Help, Troi File Plug-in
Troi File Plug-in > Functions reference > TrFile_GetFileStructure
Troi File Plug-in for FileMaker Pro


Returns the file structure of a (movie) file.

SyntaxFunction badge

TrFile_GetFileStructure ( switches ; filePath )


switchesthese determine the metadata that is returned
filePaththe path to the file


You need to add the following switch:

-GetMovieBoxesgets the moviebox structure of the movie

With an extra -Format switch you can specify how the movie structure is returned:

-Format=List(default) format the result as a readable list
-Format=XMLformat the result as XML

You can also add this switch:

-Verboseadd extra information to the result

Returned Result

Data type returned



the requested structure as list or XML.

Returned error codes can be:

$$-4290kErrFormatNotSupportedcannot get the file structure (not supported)
$$-43fnfErrfile not found

Originated in

Troi File Plug-in 10.0


FileMaker Pro 14 to 18


This function 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.
From the movie structure you can for example determine how many tracks a movie has.


Set Variable [ $Result ; TrFile_GetFileStructure ( "-GetMovieBoxes" ; "MacHD:IMG_4200,MOV" ) ]

This will get the movie structure in a readable list format. The result will look like this:

Moviebox ftyp of size: 32
Moviebox moov of size: 83491
	Moviebox mvhd of size: 108
	Moviebox trak of size: 34983
	Moviebox udta of size: 42
		Moviebox WLOC of size: 12
		Moviebox SelO of size: 9
Moviebox mdat of size: 22649590

Example 2

Set Field [ result ; TrFile_GetFileStructure ( 
                          "-GetMovieBoxes -Format=XML -Verbose" ;  $FilePath ) ]

This will return the structure as XML. The result will look like this:

         <name>mayor brand</name>
         <value>qt  </value>
         <name>minor version</name>

Related functionFunction badge


Related topics

Troi File Plug-in online help (overview)

Online Help Page for Troi File Plug-in for 14 to 18 –> TrFile_GetFileStructure (filep4319) 2019-0522 16:45:05