DirLength
Returns the size of a specific directory.
Function | Group | Execution | Windows | Embedded | Thin Client | Mobile Access |
---|---|---|---|---|---|---|
DirLength | File | Synchronous | Supported | Supported | Executed on Server | Not supported |
Description
Returns the size of a specific directory.
Syntax
- 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. |