473,508 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Directory.GetLogicalDrives drive name?

Once you've gotten a list of logical drives with
Directory.GetLogicalDrives, how would you get the name associated with that
drive?

Thanks,
Dean Slindee

Nov 21 '05 #1
3 4688
* "Dean Slindee" <sl*****@charter.net> scripsit:
Once you've gotten a list of logical drives with
Directory.GetLogicalDrives, how would you get the name associated with that
drive?


\\\
MessageBox.Show(Dir("C:\", FileAttribute.Volume))
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Thanks Herfried, that works for me.

Any idea how Windows Explorer determines the type of physical drive type
(like "DVD Drive" vs "CD Drive") to assign the node text when there is no
media in the drive?

Dean Slindee
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* "Dean Slindee" <sl*****@charter.net> scripsit:
Once you've gotten a list of logical drives with
Directory.GetLogicalDrives, how would you get the name associated with that drive?


\\\
MessageBox.Show(Dir("C:\", FileAttribute.Volume))
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
* "Dean Slindee" <sl*****@charter.net> scripsit:
Any idea how Windows Explorer determines the type of physical drive type
(like "DVD Drive" vs "CD Drive") to assign the node text when there is no
media in the drive?


<URL:http://dotnet.mvps.org/dotnet/faqs/downloads/setcddoorstatus.txt>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4

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

Similar topics

6
8870
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? ...
5
2476
by: Michael C | last post by:
....on a remote machine? Thanks, Michael C.
3
2278
by: James Coleman | last post by:
Hello, The following error is appearing when attempting to create a directory using the availale system.io methods: System.IO.DirectoryNotFoundException: Could not find a part of the path...
2
5474
by: yxq | last post by:
Hello I want to create and delete the folder share, i found that it is ok for generic folder, but it does not work for Root directory(i.e c:\, d:\) The code...
3
6798
by: KSC | last post by:
Hello, Is there a way to programmatically determine if a directory is shared and if so, what the sharename is? It seems a simple question, but I have been searching and not found the...
22
4933
by: rtilley | last post by:
# Spaces are present before and after the XXX filename = ' XXX ' new_filename = filename.strip() if new_filename != filename: print filename Macs allow these spaces in file and folder...
2
2653
by: =?Utf-8?B?ZGdjb29wZXI=?= | last post by:
When I get a list of drives using the Directory.GetLogicalDrives(), it gives me all drives including disconnected network drives. When I attempt to use Directory.GetDirectories() on a disconnected...
9
8533
by: =?Utf-8?B?THVpcyBBbnRvbmlvIFJvc2VsbG8gR2FyY2lh?= | last post by:
Hi, I have a big problem with a Visual C++ 6.0 function that retrives the logical drives and types in the local system. This function works perfectly on Windows 98, NT, 2000, XP and 2003, but I...
1
1902
by: CL4life | last post by:
I have the following problem: a program, located on drive a known drive (for example lets say drive C:) needs to execute a program on an unknown different drive (a USB device which doesn't have the...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
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...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.