FileSize Function

Applies to TestComplete 15.64, last modified on June 12, 2024

The FileSize function returns the file size in records.


FileSize(FileVar) Parameters
FileVar [in] Required Variant
Result     Integer  


Use this routine to determine the number of records in the file opened with the Reset or Rewrite procedure. The size of the record is specified by the RecSize parameter of these procedures. If this parameter is 1, FileSize will return the file size in bytes.


The function has the following parameter:


Specifies the file variable which is associated with the desired file by calling the AssignFile procedure.

Return Value

Returns an integer value that holds the number of records in the specified file. If the RecSize parameter of the Reset or Rewrite procedure is not specified, FileSize returns -1.

See Also

DelphiScript - List of Supported Routines and Variables

Highlight search results