FileLen
Finds the length of a file given its filename
#include "file.bi"
result = FileLen(filename)
or
#include "vbcompat.bi"
result = FileLen(filename)
Returns the size in bytes of the file specified by filename.
Syntax
Usage
#include "file.bi"
result = FileLen(filename)
or
#include "vbcompat.bi"
result = FileLen(filename)
Parameters
Description
Returns the size in bytes of the file specified by filename.
Example
#include "file.bi"
Dim length As Integer
length = FileLen("file.txt")
Dim length As Integer
length = FileLen("file.txt")
Platform Differences
- Linux requires the filename case matches the real name of the file. Windows and DOS are case insensitive.
- Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes.
Differences from QB
- New to FreeBASIC. Existed in Visual Basic.
See also