Win: GetDriveTypeMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

GetDriveTypeMBS(path as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Files MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
Example
if GetDriveTypeMBS("E:") = 4 then
msgbox "network drive"
end if

Path: The root directory for the drive.

Possible values:

0UnknownThe drive type cannot be determined.
1ErrorThe root path is invalid; for example, there is no volume mounted at the specified path.
2RemovableThe drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.
3FixedThe drive has fixed media; for example, a hard disk drive or flash drive.
4RemoteThe drive is a remote (network) drive.
5CD-ROMThe drive is a CD-ROM drive.
6RAM DiskThe drive is a RAM disk.

See also IsOnRemoteVolumeMBS, IsEjectableVolume or DarwinMediaClassMBS for macOS.

Blog Entries

The items on this page are in the following plugins: MBS Win Plugin.


💬 Ask a question or report a problem