I'm not sure if .NET provides that functionality natively. If not, you can
use WMI:
http://vbnet.mvps.org/index.html?cod..._diskdrive.htm
Or:
Imports System
Imports System.Management
' Disktypes - NoRoot = 1; Removable = 2; LocalDisk = 3; Network = 4; CD
= 5; RAMDrive = 6;
Public Class Wmis
Public Shared Sub Main()
Dim disks As New ManagementClass("Win32_LogicalDisk")
Dim moc As ManagementObjectCollection = disks.GetInstances()
Dim mo As ManagementObject
For Each mo In moc
Console.WriteLine("Disk type : {0}", mo("DriveType").ToString())
Next mo
disks.Dispose()
End Sub 'Main
End Class
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
"LostAtC" <an****@anywhere.com> escribió en el mensaje
news:q5********************************@4ax.com...
Is there a way to tell which one is the USB drive?
On Wed, 14 Sep 2005 13:13:34 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
<So**********@gmail.com> schrieb: In our application we have to copy some files onto USB flash memory.
You can access the USB drive like any other drive. 'FileCopy' can be used
to copy a file to the drive, for example.