FindDrive

Description:

baFindDrive searches all drives looking for a specified file.

Platforms:

Windows

Usage:

Result = baFindDrive( StartDrive, FileName )

Arguments:

String, string.
StartDrive is the letter of the drive to start searching on.
FileName is the name of the file to search for.

Returns:

String.
Returns the letter of the Drive where the file was found. If the file is not found, returns an empty string.

Examples:

Director:
Drive = baFindDrive( "c", "myfile.id" )

Authorware:
Drive := baFindDrive( "c", "myfile.id" )
 

Notes:

The StartDrive option can be used to avoid searching floppy disks.

The FileName can consist of a path name as well as the filename. For example, FindDrive( "c", "data\avi\cn232.avi" ) will search for "c:\data\avi\cn232.avi", "d:\data\avi\cn232.avi", "e:\data\avi\cn232.avi", etc. If a path is not included, then the root directory of the drive will be used in the search. The search is done in alphabetical order.

This function can be used to search for content that is stored separately from the main packaged file eg on a CD or network drive.
 

See also:

baDiskInfo