Skip to main content

TrFile_GetFullPathFromFileID (function reference)

By July 1, 2025July 8th, 2025Online Help, Troi File Plug-in
Troi File Plug-in > Functions reference > TrFile_GetFullPathFromFileID
Troi File Plug-in for FileMaker Pro

TrFile_GetFullPathFromFileID

Returns the current full path of a file using the deviceID and fileID of a file.

SyntaxFunction badge

TrFile_GetFullPathFromFileID( switches ; fileID ; deviceID )

Parameters

switches not used, reserved for future use. Leave blank or put "-Unused"
fileID the fileID of the file (or folder)
deviceID the ID of the disk (volume) on which the file is stored

Returned Result

Data type returned

Text

Result

The returned result is the (current) path to the file or folder. If the file cannot be found an error code is returned. An error always starts with 2 dollars, followed by the error code. You should always check for errors. Returned error codes can be:

$$-43 fnfErr the file or folder was not found

Other errors may be returned.

Originated in

Troi File Plug-in 17.0

Compatibility

FileMaker Pro 18 to FileMaker Pro 22 (2025)

Considerations

Note that the operating system assigns each file and folder on a disk a serial number, which is unique to that disk.
The fileID is also called inode (on POSIX systems, which macOS is based on).
Also each disk (volume) gets a unique number. Together this will uniquely identify a file or folder on a computer.

You can move or rename a file within the same volume, but the fileID (inode) will stay the same. This means that if you store the fileID and the deviceID, you can locate this file even if it is moved or renamed by a user. This function will get you the current file path.

On macOS the fileID and deviceID are numbers, for example: 16777225.
On Windows the fileID and deviceID should be formatted hexadecimal. The fileID is 16 bytes long, and can be for example:
0x000000000000000000550010c010a710
The deviceID is four bytes, and can be for example
0x1020c7f0

Example

On macOS:

Set Variable [ $ResolvedFilePath ; TrFile_GetFullPathFromFileID ( "-Unused" ; 252901432 ; 16747220 ) ]

The returned result is the (current) path to the file, for example “MacHD:Users:John:Documents:myFile.txt”.

On Windows the FileID is 128 bit (16 bytes) and should be given like this:

Set Variable [ $ResolvedFilePath ; TrFile_GetFullPathFromFileID ( "" ;
                         "0x000000000000000000550010c010a710" ; 
                         "0x40f7fa24"  ]

If found, the returned result is the (current) path to the file, for example “C:\Users\John\Desktop\myFile.txt”.

Used in example file

GetPathTo.fmp12

Related functionsFunction badge

TrFile_GetFileAttribute
TrFile_ResolveAlias

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 18 to 2025 –> TrFile_GetFullPathFromFileID (filep4322) 2025-0708 21:30:46

troi.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping us to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.