Drive.GetType

number Drive.GetType (

string Drive )

Description

Gets the type of a specific drive.

Parameters

Drive

(string) The drive whose type you want. The first character of the string will be the drive letter used. Therefore "C", "C:"," C:\" and "C:\Myfile.txt" are all valid Drive values.

Returns

(number) The type of drive detected:

CONSTANT

VALUE

DESCRIPTION

DRIVE_UNKNOWN

0

The type cannot be determined.

DRIVE_NO_ROOT_DIR

1

The drive is either invalid or the drive does not exist.

DRIVE_REMOVABLE

2

The drive is a removable drive.

DRIVE_FIXED

3

The drive is a non-removable (fixed) drive.

DRIVE_REMOTE

4

The drive is a remote network drive.

DRIVE_CDROM

5

The drive is a CD-ROM or DVD-ROM drive.

DRIVE_RAMDISK

6

The drive is a RAM disk.

If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions