| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== EXISTS (return file or folder existence) ====== | [[event return event number .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[field return control with focus .htm|{{btn_next_n.gif|Next page}}]] | | || **EXISTS(** //file// ) {{blk2blue.jpg|blk2blue.jpg}} | **EXISTS** | Returns TRUE if the //file// is available on disk. | | //file// | An expression containing the DOS filename. | The **EXISTS** procedure returns true (1) if the //file// is available on disk. If the //file //is not available, EXISTS returns false (0). You can also use EXISTS to check for the existence of any folder. | **Return Data Type:** | LONG | **Example:** **SomeFile  CSTRING(FILE:MaxFilePath),STATIC** **Customer  FILE,DRIVER('ASCII','/CLIP = on'),CREATE,NAME(SomeFile)** **Record     RECORD** **_Line       STRING(1024)** **           END** **          END** **  CODE** **SomeFile = 'customer.tps'** ** IF EXISTS(SomeFile) !or EXISTS(NAME(Customer)) is also valid** **   OPEN(Customer)** ** ELSE** **   CREATE(Customer) ** ** END** **  ** **  IF EXISTS('C:\Clarion\BIN\') !Is there a Clarion BIN folder** **   DO InstallCheck** **  END** **See Also:** [[open open a data structure .htm|OPEN]] [[status return file status .htm|STATUS]] [[create create an empty data file .htm|CREATE]] [[name return file name .htm|NAME]]