C5_FILE

 FILE()
 Determine if files exist in the Clipper default directory or path
------------------------------------------------------------------------------
 Syntax

     FILE(<cFilespec>) --> lExists

 Arguments

     <cFilespec> is in the current Clipper default directory and path.
     It is a standard file specification that can include the wildcard
     characters * and ? as well as a drive and path reference.  Explicit
     references to a file must also include an extension.

 Returns

     FILE() returns true (.T.) if there is a match for any file matching the
     <cFilespec> pattern; otherwise, it returns false (.F.).

 Description

     FILE() is an environment function that determines whether any file
     matching a file specification pattern is found.  FILE() searches the
     specified directory if a path is explicitly specified.

     If a path is not specified,  FILE() searches the current Clipper
     default directory and then the Clipper path.  In no case is the DOS
     path searched.  Note also that FILE() does not recognize hidden or
     system files in its search.

 Examples

     .  In this example FILE() attempts to find Sales.dbf in other
        than the current Clipper default:

        ? FILE("Sales.dbf")               // Result: .F.
        ? FILE("\APPS\DBF\Sales.dbf")     // Result: .T.
        //
        SET PATH TO \APPS\DBF
        ? FILE("Sales.dbf")               // Result: .T.
        //
        SET PATH TO
        SET DEFAULT TO \APPS\DBF\
        ? FILE("Sales.dbf")               // Result: .T.
        ? FILE("*.dbf")                   // Result: .T.

 Files   Library is CLIPPER.LIB.

See Also: SET DEFAULT SET PATH

 

One response to “C5_FILE

  1. Pingback: C5_RENAME | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.