FileLen Function

āĻĢāĻžāχāϞ⧇āϰ āĻĻ⧈āĻ°ā§āĻ˜ā§āϝ āĻŦāĻžāχāĻŸā§‡ āĻĻ⧇āĻ–āĻžā§Ÿ āĨ¤

Syntax:


FileLen (Text As String) As Long

Return value:

Long

tip

Use ScriptForge.FileSystem service GetFileLen() method when size is expected to be over 2 gigabytes.


Parameters:

āϞ⧇āĻ–: āϝ⧇āϕ⧋āύ⧋ āĻ¸ā§āĻŸā§āϰāĻŋāĻ‚ āĻāĻ•ā§āϏāĻĒā§āϰ⧇āĻļāύ āϝāĻžāϤ⧇ āĻĢāĻžāχāϞ⧇āϰ āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āĻŦ⧈āĻļāĻŋāĻˇā§āĻŸā§āϝ⧇āϰ āωāĻ˛ā§āϞ⧇āĻ– āĻ°ā§Ÿā§‡āϛ⧇āĨ¤ āφāĻĒāύāĻŋ URL āύ⧋āĻŸā§‡āĻļāύāĻ“ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰāϤ⧇ āĻĒāĻžāϰ⧇āύāĨ¤

This function determines the length of a file. If the FileLen function is called for an open file, it returns the file length before it was opened. To determine the current file length of an open file, use the Lof function.

Error codes:

5 Invalid procedure call

Example:


Sub ExampleFileLen
    MsgBox FileLen("C:\autoexec.bat")
End Sub

Please support us!