DirLength

Returns the size of a specific directory.

Function Group Execution Windows Embedded Thin Client
DirLength File Synchronous Supported Supported Executed on Server

Description

Returns the size of a specific directory.

Syntax

DirLength(strPath)
strPath
The path of the directory that will be checked.

Returned value

−2 Directory does not exist.
−1 Invalid parameters
n Size (in bytes) of the files and sub-folders in the directory

Notes

CAUTION:
This function executes synchronously, which means that the project pauses while it waits for the function to return. As such, if the specified directory is unusually large, then the project could be paused for several seconds while size of the directory is calculated.

Examples

Tag Name Expression
Tag DirLength("C:\Studio") // Returns the size (in bytes) of all files and sub-folders from C:\Studio.