Skip to main content

TrFile_GetFileStructure (function reference)

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 )


switches these determine the metadata that is returned
filePath the path to the file


You need to add the following switch:

-GetMovieBoxes gets 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=XML format the result as XML

You can also add this switch:

-Verbose add extra information to the result

Returned Result

Data type returned



the requested structure as list or XML.

Returned error codes can be:

$$-4290 kErrFormatNotSupported cannot get the file structure (not supported)
$$-43 fnfErr file not found

Originated in

Troi File Plug-in 10.0


FileMaker Pro 16 to FileMaker Pro 2023


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>

Used in example file


Related functionFunction badge


Related topics

Troi File Plug-in online help (overview)

Online Help Page for Troi File Plug-in for 16 to 2023 –> TrFile_GetFileStructure (filep4319) 2023-0601 15:33:26