TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Steven Moore
NA
8
2.5k
List Both Local And Network Drives With Full Details
May 20 2014 11:33 AM
I've been scouring the internet trying to find the answer to this and can't seem to find anything.
I'm making myself a new Folder Browser UserControl using a TreeView as an excercise to try and learn more about C#, and to add into a File Renaming program I've been developing.
I've found that the TreeView is a little small for my touchscreen laptop, so I've taken it on myself to recreate it with bigger icons and + symbols.
Now, first thing's first, I'm obtaining a list of drives (both local and network) to add into my TreeView, but I can't seem to get all the information I require.
In My Computer (I'm using Windows XP but I'm going to test on other versions where it says This Computer as well) there are 11 objects showing
*EDITED DUE TO WORK*
Using System.IO I can obtain some of what is showing but not all of it.
The options I have available are:
AvailableFreeSpace
DriveFormat
DriveType
IsReady
Name
RootDirectory
TotalFreeSpace
TotalSize
VolumeLabel
Using P:\ as an example I get the following:
AvailableFreeSpace = 30102499328
DriveFormat = NTFS
DriveType = Network
IsReady = True
Name = P:\
RootDirectory = P:\
TotalFreeSpace = 30102499328
TotalSize = 4397611224320
VolumeLabel = FileSystem6 (3Par)
So, none of the options gives me the *EDITED DUE TO WORK* detail that shows in My Computer.
Can anyone tell me how I can get this information?
Any help would be much appreciated.
Reply
Answers (
6
)
I have 2 methods with the same name, Tover(string a, int b)
Generic Class