DiskInfo

Description:

baDiskInfo returns the information about a disk.

Platforms:

Windows and Macintosh

Usage:

Result = baDiskInfo( Drive, InfoType )

Arguments:

String, string.
Drive is the letter of the drive to get the information of.
InfoType is the type of information to get. Can be:

"type" 

returns the type of drive Windows Macintosh

"name" 

returns the volume name Windows

"size" 

returns the size of the disk in Kb Windows Macintosh

"free" 

returns the amount of free space in Kb Windows Macintosh

"number" 

returns the serial number of the disk Windows 

Returns:

Depends on InfoType.

"type" 

string.
The type of drive. Can be:

"Hard" 

Fixed hard drive.

"Floppy" 

Floppy disk drive.

"CD-ROM" 

CD/DVD drive.

"Network" 

Network drive.

"Removable" 

Removable drive eg Zip, Syquest.

"RAM" 

RAM drive.

"Invalid" 

Drive doesn't exist, or is of unknown type.

"name" 

string.
The name of the disk or an empty string if the disk doesn't exist.

"size" 

integer.
The size of the disk in Kb, or 0 if the disk doesn't exist.

"free" 

integer.
The amount of free space on the disk in Kb, or 0 if the disk doesn't exist.

"number" 

integer.
The serial number of the disk, or 0 if the disk doesn't exist.

Examples:

Director:
Size = baDiskInfo( "a" , "size" )
Label = baDiskInfo( "k" , "name" )

Authorware:
Size := baDiskInfo( "c" , "size" )
Label := baDiskInfo( "k" , "name" )
 

Notes:

On Windows, the drive argument is the letter of the drive; on Macintosh it is the name of the disk.

On Windows, Floppy drives as reported as Removable.
 

See also:

baFindDrive
baDiskList