<<

Contents

Search

>>

 

FILE_EXISTS

 

 

Function

 

 

Syntax:

FILE_EXISTS(<Filename>)

 

<Filename> = <STRING-EXPRESSION>

 

Meaning:

Tests whether a file or a directory exists.

 

FILE_EXISTS returns the result 1 if <Filename> exists, otherwise 0. 

 

Parameter:

Filename

Name of file or directory

 

Sample:

IF FILE_EXISTS("C:\TESTDATA") = 0

THEN MAKE_DIRECTORY "C:\TESTDATA"

          ON ERROR ERRORMES = "Error" + STR$(OK) END

ENDIF

 

See also:

FILE_EXISTS_CLIENT

IS_DIRECTORY