Through the method of the class DriveInfo getdrivers and can get the kind of drive.

This example identifies a removable disk drive in VB.NET.

Private Sub BtnFind_Click(sender As System.Object, e As System.EventArgs) Handles BtnFind.Click
 For Each driveType As System.IO.DriveInfo In System.IO.DriveInfo.GetDrives
          If driveType.DriveType = IO.DriveType.Removable Then
             MessageBox.Show(driveType.Name.ToString & "is removable drive")
          End If
End Sub

More information can be found here: .

Other Languages

This article is also available in the following languages:

Italian (it-IT)