FileLen Function

Syntax

FileLen(Name$)

Group

File

Description

Returns the length of file Name$ in characters. If the file does not exist, a runtime error occurs.

Sandbox

Sandbox mode blocks this function.

Parameters

Parameters Description
Name$ The path and name of the file. A path relative to the current directory can be used.

Example


Sub Main
    F$ = Dir$("*.*")
    While F$ <> ""
        Debug.Print F$; " "; FileLen(F$)
        F$ = Dir$()
    Wend
End Sub