{{fbdoc item="title" value="FILELEN"}}---- Finds the length of a file given its filename {{fbdoc item="syntax"}}## [[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **""FileLen""** ( //filename// [[KeyPgAs|as]] [[KeyPgString|string]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]] ## {{fbdoc item="usage"}}## #include "file.bi" //result// = **""FileLen""**(//filename//) ##//or//## #include "vbcompat.bi" //result// = **""FileLen""**(//filename//) ## {{fbdoc item="param"}} ##//filename//## A ##[[KeyPgString|string]]## argument specifying the filename of the file whose length to return. {{fbdoc item="desc"}} Returns the size in bytes of the file specified by //filename//. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/filelen.bas"}}%%(freebasic) #include "file.bi" dim length as longint length = FILELEN("file.txt") %% {{fbdoc item="target"}} - 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. {{fbdoc item="diff"}} - New to ""FreeBASIC"". Existed in Visual Basic. {{fbdoc item="see"}} - ##[[KeyPgLof|Lof]]## {{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}}