473,387 Members | 1,391 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,387 software developers and data experts.

Detecting number of drives

Some pcs have only the c drive whilst others like mine have c,d,e,f
and z! How do I detect this automatically if I want to search all
drives in a pc? I also want to ignore the DVD and floppy of course.

regards

Hardy
Dec 2 '07 #1
2 1558

"HardySpicer" <gy********@gmail.comwrote in message
news:12**********************************@i12g2000 prf.googlegroups.com...
Some pcs have only the c drive whilst others like mine have c,d,e,f
and z! How do I detect this automatically if I want to search all
drives in a pc? I also want to ignore the DVD and floppy of course.

regards

Hardy
Public Shared Function GetDrives() As System.IO.DriveInfo()
Member of: System.IO.DriveInfo
Summary:
Retrieves the drive names of all logical drives on a computer.

Return Values:
An array of type System.IO.DriveInfo that represents the logical drives on a
computer.

Remember that the object browser is your friend.

Hope this helps
Lloyd Sheen

Dec 2 '07 #2
"Lloyd Sheen" <a@b.cschrieb:
>Some pcs have only the c drive whilst others like mine have c,d,e,f
and z! How do I detect this automatically if I want to search all
drives in a pc? I also want to ignore the DVD and floppy of course.

Public Shared Function GetDrives() As System.IO.DriveInfo()
Member of: System.IO.DriveInfo
Summary:
Retrieves the drive names of all logical drives on a computer.
In addition, you can determine the drive type via the 'DriveInfo' object's
'DriveType' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Dec 2 '07 #3

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

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
7
by: Jean-David Beyer | last post by:
I have six hard drives (4 SCSI and 2 EIDE) on my main machine with parts of a database on each drive. The main index is on one SCSI drive all to itself. The main data are on the other three SCSI...
3
by: Max | last post by:
Not sure exactly how to describe this or if it's even possible, so I'll do my best and would appreciate some suggestions. I'm currently working on a service that will allow me to automate some...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
7
by: BWill | last post by:
Hi, I'm writing a file browser, but I'm not sure how I could go about detecting the drives available on windows and linux systems (preferably using the standard modules if possible). I guess I...
0
by: =?Utf-8?B?TGVl?= | last post by:
Is there a way to detect and show client Terminal services client computer drives? the DriveInfo object does not seem to handle this.
2
by: rick11 | last post by:
I need know when a drive is a USB drive, what USB port is it in? For the system I am doing this on, I do not have to worry about hubs plugged into hubs (into hubs...). It's just the motherboard...
6
by: Matthew Connor | last post by:
Hi all! I'm sure many of you rolled your eyes at the subject trying to recall how many times youv'e heard this question. :) But bear with because I THINK my question is at least slightly different...
4
by: yellowblueyellow | last post by:
Hey All, I am using the following line of code to pick all logical drives on the local machine: string drives = Directory.GetLogicalDrives(); using the above code I can get output in the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.