Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_whereis()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson