Geekpedia Tutorials Home

Building a C# Chat Client and Server

Building a C# Chat Client and ServerA step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.

in C# Programming Tutorials

Getting Hard Drive Information

Getting Hard Drive InformationA C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.

in C# Programming Tutorials

UPS Shipping Calculator

UPS Shipping CalculatorThis tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.

in PHP Programming Tutorials

Create Your Own Rich Text Editor

Create Your Own Rich Text EditorCreating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.

in JavaScript Programming Tutorials
Search
Tutorials
Programming Tutorials
IT Jobs
From CareerBuilder

How to get all logical drives on a system?

On Wednesday, July 14th 2004 at 12:00 AM
By Andrew Pociu (View Profile)
*****   (Rated 4.6 with 9 votes)
Advertisement
More C# Resources
By calling a static method from System.Environment called GetLogicalDrives(). This returns a string array that you can easily iterate.
Suppose you have a ListBox and a button:

private void btnPopulate_Click(object sender, System.EventArgs e)
{
   // Store in a string array
   string[] drives = Environment.GetLogicalDrives();
   // Loop into the string array
   foreach(string strDrive in drives)
   {
      // Add items (drives) to the list
      listBox1.Items.Add(strDrive.ToString());
   }
}
Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
by Arvind Kumar on Monday, November 21st 2005 at 05:27 PM

Good and very useful for me, Thank You

by shakeel on Wednesday, September 12th 2007 at 05:06 AM

Great stuff, <a href=\"http://www.simplytheticket.com\">Shakeel</A>

by on Saturday, October 20th 2007 at 05:43 PM

Thanks
saved me some time getting it to work myself.

by Kannan on Friday, December 14th 2007 at 11:38 AM

Very useful. Thanks.

by rabih ayoub on Wednesday, January 9th 2008 at 05:53 AM

how to get logical drive on the client side using asp.net

by venkat on Thursday, March 20th 2008 at 01:51 AM

hi rabih ayoub.
i want same u..
how to get the all drives of the client system.
if u got that send me..

by Srizzler on Wednesday, March 4th 2009 at 08:03 PM

Hi Guys:

Can anyone tell me how to get network folders/mapped drives thru C#. Environment.GetLogicalDrives will only get Machine's Local Drives.

Please help me out.

Thanks in Advance.
Srizzler.

by AyrA on Monday, June 8th 2009 at 01:02 AM

Iterate trough a String "abce....xyz" with .ToCharArray() in a foreach loop. Then simply try with the new System.IO.DriveInfo(letter) if the Drive exists
AyrA
http://ayra.ch

by Wasiqs on Friday, October 2nd 2009 at 10:31 AM

simpliest way: DriveInfo.GetDrives()

by gopal on Saturday, March 13th 2010 at 01:21 AM





it's very useful
Thanks dude

by Yanela Somdaka on Monday, August 30th 2010 at 07:24 AM

DriveInfo[] drives = DriveInfo.GetDrives();

foreach (DriveInfo strDrive in drives)
{}

by Matjeka Chaole on Friday, September 10th 2010 at 09:57 AM

Thanks guys. This helped a lot.

by silverfall on Tuesday, December 28th 2010 at 12:57 AM

Hey,
Thanks a lot. This is exactly what I wanted.
Pretty simple and straight forward!
Thanks again for the short and sweet code!

by MiddletonAudra on Saturday, March 24th 2012 at 03:37 AM

The <a href="http://goodfinance-blog.com/topics/business-loans">business loans</a> are important for people, which would like to start their own career. By the way, it's not really hard to get a bank loan.

by business loans on Saturday, March 24th 2012 at 03:41 AM

The loans seem to be useful for people, which want to organize their organization. By the way, it is not hard to get a college loan.

by here on Sunday, December 15th 2013 at 09:14 AM

Bothered about where to buy resume paper? Visit Prime Resume page (prime-resume.com) to obtain resume writing services. Buy resume from best resume writers or check resume templates to learn what professional CV writing looks like.

by this site on Sunday, December 15th 2013 at 09:21 AM

Most juniors are concerned where to buy resume paper, but they merely have to get in touch with PERFECT RESUME company perfect-resume.com and obtain excellent CV writing. Also whenever pupils don’t have the faintest idea where to run over resume templates or they wish to buy CV composed by certified resume writers they can come for this reliable firm.

by click here on Wednesday, December 18th 2013 at 10:41 AM

Want to find help with resume writing? Cannot imagine where to buy resume paper? Consider Marvelous Resume company marvelousresume.com where you can find samples of resume writing. Our professional resume writers will reassure you that buying resume can bring job seekers real success!

by over here on Wednesday, December 18th 2013 at 11:12 AM

Are you looking where to buy resume paper or where to obtain resume templates and help with resume writing? Or you simply would like to buy resume from professional resume writers? Just get in touch with Resume company.

by home page on Wednesday, December 18th 2013 at 11:17 AM

Go to Exclusive-resume company if you are in need of resume writing tips. After collaborating with this trustable company, you will be aware of how to write a resume and where to glance over samples of resume writing. Catch the moment, buy CV of good quality from best resume writers.

by over here on Saturday, December 21st 2013 at 04:38 AM

If you consider that it will be problematic for you to present yourself in the good light, get in touch with trustworthy online writing centres wthich offer to get resume writing samples resumesleader.com.

by up here on Saturday, December 21st 2013 at 04:39 AM

Acsertain that you will obtain authentic writes up at any time you do business with the agency from where to buy resume paper.

by Look here on Tuesday, March 18th 2014 at 11:57 PM

Go through PrimeEssays rewiew, pick trustful agency and order authentically written essay papers from fully qualified experts.

by essay writing services reviews on Tuesday, March 18th 2014 at 11:58 PM

Have no idea which agency to choose to receive help from? Go over BestEssays testimonials, and take a right decision.


Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs C# Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Ads

From the creators of Geekpedia, a revolutionary new coupon website!

BargainEZ has coupons codes, printable coupons, bargains and it is the leading source of Passbook coupons for iPhone and iPod touch devices.

Coupons
Discover Geekpedia
Other Resources