473,395 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Detect drives that could contain removeable media

Bob
Is there a simple approach in vb.net to search logical drives to determine
which are removeable media types (e.g., a zip drive or the A drive)?
I've used FSO with VB6 for this and am now searching for a vb.net replacement.
--
Thanks, Bob
Dec 18 '05 #1
3 1380
For Each di As DriveInfo In DriveInfo.GetDrives()
If (di.DriveType = DriveType.Removable) Then
Console.WriteLine (di.Name & " is removable")
End If
Next

"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
Is there a simple approach in vb.net to search logical drives to determine
which are removeable media types (e.g., a zip drive or the A drive)?
I've used FSO with VB6 for this and am now searching for a vb.net
replacement.
--
Thanks, Bob
Dec 19 '05 #2
Bob
Thanks. How do I define DriveInfo? What reference do I use?
--
Thanks, Bob
"Siva M" wrote:
For Each di As DriveInfo In DriveInfo.GetDrives()
If (di.DriveType = DriveType.Removable) Then
Console.WriteLine (di.Name & " is removable")
End If
Next

"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
Is there a simple approach in vb.net to search logical drives to determine
which are removeable media types (e.g., a zip drive or the A drive)?
I've used FSO with VB6 for this and am now searching for a vb.net
replacement.
--
Thanks, Bob

Dec 21 '05 #3
It is in System.IO namespace. Remember it is only from .NET 2.0

"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Thanks. How do I define DriveInfo? What reference do I use?
--
Thanks, Bob
"Siva M" wrote:
For Each di As DriveInfo In DriveInfo.GetDrives()
If (di.DriveType = DriveType.Removable) Then
Console.WriteLine (di.Name & " is removable")
End If
Next

"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
Is there a simple approach in vb.net to search logical drives to determine
which are removeable media types (e.g., a zip drive or the A drive)?
I've used FSO with VB6 for this and am now searching for a vb.net
replacement.
--
Thanks, Bob

Dec 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: RunLevelZero | last post by:
I need a way to detect hard drives and their partitions... labels would be nice too... I did some googling but did not find anything all too useful. This will strictly be on Linux / Unix so any...
1
by: Travis L. Alltop | last post by:
All, To make a long story short, we are swapping out the "knock-off" drives that the NA purchased on E-Bay in one of our production SQL Servers (SQL Server 2000 Enterprise) this weekend for...
1
by: Jon1996 | last post by:
How do you access the volume label for a hard drive through C#? I am very much a beginner with C# at the moment and am developing a windows explorer program to help me learn. I have tried the...
5
by: Vijay | last post by:
Hi all, i have TCP client server application written in C# using async socket methods, eg BeginReceive(), BeginEnd() etc server is continuesly running in the background, client connect to...
3
by: Flix | last post by:
I need to detect the root directories of the installed hard disks (es: C:, D:, E:, etc.). I'm not interested in cd drives. I know that there is a way (a bit slow, if I remeber) to retrive all the...
9
by: Paul Steele | last post by:
I am writing a C# app that needs to periodically poll for cdroms and usb storage device insertions. I've looked at the WMI functions but haven't found anything all that useful. The closest is...
4
by: sanjana | last post by:
hi can anyone help me with this i want to write a code in c#.net which detects usb storage and media card insertion can anyone help me with this?? thanx
1
by: Steve Marshall | last post by:
Hi All, Apologies if this has come up before, but how can I set up something that will notify me when a removeable drive (like a USB drive or CompactFlash card) is inserted into its slot? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.