QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _FILEEXISTS function determines if a designated file name exists and returns true (-1) or false (0).

Syntax

theFileExists% = _FILEEXISTS(filename$)

Description

Example(s)

Checks if a file exists before opening it.


IF _FILEEXISTS("mysettings.ini") THEN
    PRINT "Settings file found."
END IF

See Also