FileSize

(Engine-Level Function)

Description: Returns the size of a disk file in bytes.
Returns: Numeric
Usage: Script only.
Function Groups: File I/O
Related to: FRead | FWrite | GetStreamLength
Format: FileSize(FileName)
Parameters:  
FileName
Required. Any text expression that gives the path, file name, and extension of the file. A Known Path Aliases for File-Related Functions may be provided in the form, :{KnownPathAlias}.
Comments: This function returns the size of the file in bytes. If the return value is invalid, the file could not be found.

This function is session non-aware, meaning it works on the server's file system even with an active remote connection established. This function is also blocking, all concurrent thread operations will be paused until its execution has concluded.

Example:

  If ! Valid(size);
  [
    Size = FileSize("C:\Log\Samples.DAT") 
  ]

Size is set to the size in bytes of the file indicated.