www.icetips.com  Icetips Utilities Documentation 1/23/2017    

Core Class: FileExists

Previous  Top  Next  


Prototype: (String pFileName, Long pAttribute=FF_:Normal),Long

 

pFileNameThe file name to check if exist.  The pFileName parameter can contain wildcards for the filename and extension.
pAttributeAttribute to look for.  By default it is set to FF_:Normal.  Added August 3, 2010

 

ReturnsThe number of files that matches the pFileName parameter. 

 

This method is to replace the EXISTS function in Clarion.  It is not always reliable unless the filename is changed to a ShortPath().  The FileExists method uses the DIRECTORY() function in Clarion to check for the file existence.  This has a second benefit also because you can specify wildcards for the filename and the function will return the number of files that exist and match the wildcards.

 

 

 

Example:

 

ITC ITCoreClass

p   CSTRING(2049)

CODE

p = 'c:\temp\*.txt'

MESSAGE('Files matching "' & p & '" = ' & ITC.FileExists(p))

 

CoreClass_FileExists_Example

 

See also:

GetFileSize



Direct link to this page: http://www.icetips.com/manuals/utilities/fileexists_core.htm