FileLen Function

Returns the size of a file.

Syntax
FileLen ( filename )

Parameters

fileName
Specify the name of the file to be checked as a string. The drive and path can also be included. If only file name is specified, the file in the current directory is displayed. See ChDisk for the details.

Note


A network path is available.


Return Values
Returns the number of bytes in the file.

See Also
FileDateTime$, FileExists

FileLen Function Example

String myPath$
myPath$ = "c:\TEST\TEST.DAT"

If FileExists(myPath$) Then
    Print "Last access date and time: ", FileDateTime$(myPath$)
    Print "Size: ", FileLen(myPath$)
EndIf