Verify the size of a file called     input.txt     for a file in the current working directory, and another one in the file system root.




' file size
' Return the entire message, FILELEN returns a NUMBER
FUNCTION printlen$(STRING name$)
    IF FILEEXISTS(name$) THEN
        RETURN name$ & ": " & STR$(FILELEN(name$))
    ELSE
        RETURN "file " & name$ & " not found"
    END IF
END FUNCTION
 
PRINT printlen$("input.txt")
PRINT printlen$("/input.txt")