FileSize

Finds the total size of a group of files.

Syntax:

FileSize (file-list [, format])

Parameters:

(s) file-list zero or more filenames, separated by a delimiter and may contain wildcards. (example: "*.jpg|*.bmp")

(i) format (optional) controls the format in which the size is returned. See below.

Returns:

(i) total bytes taken up by the specified file(s).

 

This function returns the total size of the specified files. File-list may contain * and ? wildcards.

FileSizeEx can be used to get the size of files that are open in 'read deny' by other applications.

Format

This is an optional parameter that controls the format in which the size is returned. If the result is too large to be returned as an integer (larger than 2 gigabytes).

Format

Meaning

0

(Default) Floating Point
 

1

Huge number. This is a long decimal number string, which may represent a number too large to be converted to an integer.'Huge number' is a special data type. It is a long decimal number string, which may represent a number too large to be converted to an integer. This value can be modified with standard arithmetic operations
 

2

64-bit Integer. This number representation is fully compatible with arithmetic and relational operators but some functions may error when the number is used as a function parameter if the number is greater than  the maximum 32-bit integer .
 

This function supports extended-length path names.

Example:


size = FileSize("*.*")
Message("Size of All Files in Directory", size)
See Also:

DiskFree, FileInfoToArray, FileSizeEx