FT_WHEREIS

FT_WHEREIS()
 Locate all occurrences of a filespec on a drive

 Syntax

     FT_WHEREIS( [ <cDrive:> ][ <cFilespec> ] ) -> aFiles

 Arguments

    <cDrive:> is an optional drive to search.  If omitted, FT_WHEREIS()
    defaults to the current drive.

    <cFilespec> is a DOS legal filespec containing the pattern that
    you want found.  The wildcard characters "*" and "?" are supported.
    If no <cFilespec> is specified, FT_WHEREIS() defaults to all files.

 Returns

    An array of filenames that match <cFilespec>.

 Description

    Use FT_WHEREIS() to obtain an array with the full path/filenames of all
    files on the specified or current drive that match a DOS legal filespec.

    You may optionally specify a drive to search, other than the current
    drive.  Please note that FT_WHEREIS() will not cause a runtime error if
    you specify an invalid or inoperable drive; it instead returns an
    empty array.

 Examples

    /* Example 1 */
    aComSpec := FT_WHEREIS( "command.com" ) // aComSpec now contains an
                                            // entry for every "Command.com"
                                            // on the current drive
    /* Example 2 */
    aBat := FT_WHEREIS( "a:*.bat" )

    IF Empty( aBat )
       ?"Please make sure the proper diskette is in drive A:, and that"
       ?"the drive door is closed."
    ELSE
       ? "You have " + Len( aBat ) " batch files on drive A:"
    ENDIF

 Source: WHEREIS.PRG

 Author: Steve Larsen

See Also: FT_TREE() FT_ORIGIN()



One response to “FT_WHEREIS

  1. Pingback: FT Environment | 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.