There may be a better way, but some of our macros use logic like this to test for the existence of a file.
Code:
LET Test_file_name 'C:\my_file.txt'
TRAP_ERROR
OPEN_INFILE 1 Test_file_name END
IF (CHECK_ERROR) {file does not exist}
OPEN_OUTFILE 1 Test_file_name
Commands...
ELSE {file exists}
CLOSE_FILE 1
Commands...
END_IF