| **Navigation:**  [[advanced topics 1.htm|Advanced Topics]] > Clarion Language Utilities >====== FileExists (Confirm file existence) ====== | [[endunique close an application s event handle .htm|{{btn_prev_n.gif|Previous page}}]][[advanced topics 1.htm|{{btn_home_n.gif|Return to chapter overview}}]][[filetoblob copy data from a file to a blob field .htm|{{btn_next_n.gif|Next page}}]] | | || **FILEEXISTS( **//filename //**//)//** {{blk2blue.jpg|blk2blue.jpg}} | **FILEEXISTS** | Confirm the existence of a file | | //filename// | A string constant or variable containing the name of the file (and path, if applicable) | **FILEEXISTS** confirms the existence of a file. If FILEEXISTS returns TRUE (1), the file exists. If FILEEXISTS returns FALSE (0), the file specified in the //filename// parameter does not exist. To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program: **INCLUDE('CWUTIL.INC'),ONCE** **Return Data Type:** BYTE **Example:** **IF NOT FILEEXISTS(GLO:NewFile)              !If the file does not exist** ** DO CreateFile                              !Call the ROUTINE to create it** **END** **IF NOT FILEEXISTS('C:\INVOICE\Config.dat')  !Does the config file exists** ** InitConfig                                 !Call init procedure** **END**