Skip to main content

TrFile_GetFolderSize (function reference)

By January 1, 2021January 26th, 2021Online Help, Troi File Plug-in
Troi File Plug-in > Functions reference > TrFile_GetFolderSize
Troi File Plug-in for FileMaker Pro

TrFile_GetFolderSize

Returns the size for the folder specified by the folderPath. The size is the total size of all the files in the folder and subfolders.

SyntaxFunction badge

TrFile_GetFolderSize ( switches ; folderPath )

Parameters

switches not used, reserved for future use. Leave blank or put "-Unused"
folderPath the path to the folder for which you want the information

Returned Result

Data type returned

Number

Result

The size (in number of bytes) of the folder.

Originated in

Troi File Plug-in 9.0

Compatibility

FileMaker Pro 16 to 19

Considerations

You can use FileMaker styled paths, like “filewin:/C:/MyFiles/MyFolder”.

Example

Assume there is a folder “MyData” with several files in it. Then:

Set Variable [ $FolderSize; TrFile_GetFolderSize ("-Unused" ; "Mydisk:MyData" ) ] 

might return 1048576 (= 1 Mb) which is the size used of the files in the folder.

Used in example file

ListFolder.fmp12

Related functionsFunction badge

TrFile_GetDataSize
TrFile_GetFileSize
TrFile_ListFolder

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 19 –> TrFile_GetFolderSize (filep4315) 2021-0126 10:54:26