FileLen


Function FileLen( FileName )


Returns a number representing the length of the file FileName in bytes.


Syntax x = FILELEN("Test.Txt")


Remarks

FileLen will return the length of the named file in bytes.

if FileName is currently open or locked by another process, then FileLen will return 0.


See Also:

FSeek FTell FileExists FindFirst File and Directory functions


Example Script


STRING a


a = CWD()


IF MID(a,LEN(a),1) <> "\" THEN

a = a + "\"

ENDIF

a = a + "CHR.txt"

PRINT a; " is "; FILELEN(a); " bytes long."


Script Output

(your results may be different)


E:\Projects\GRS\SL Tester\Scripts\CHR.txt is 149 bytes long.