exists_return_file_existence_.htm
| Navigation: Language Reference > 13 - Built-in Functions >====== EXISTS (return file or folder existence) ====== | ![]() ![]() |
EXISTS( file )
| 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:
exists_return_file_existence_.htm.txt · Last modified: by 127.0.0.1




