473,395 Members | 1,869 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.

How to check if Drive is a network Drive

Hello,

I need to know how I can check if the drives on my machine
are network drives and local drives via the .Net framework.

For example my PC has the following drives
C: Local
D: Local
N: Network
S: Network

I want to get the information regarding 'Local'
and 'Network'.

Thanks,
Nov 16 '05 #1
1 4883
Hi

I have a couple of examples that will explain this on my site here
http://www.publicjoe.f9.co.uk/csharp/snip/snip010.html

The sample app uses the following line

SelectQuery query = new SelectQuery( "select name, FreeSpace from
win32_logicaldisk where drivetype=4"

drivetype is 3 for local drives and 4 for network drives

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html

"BuddyWork" <an*******@discussions.microsoft.com> wrote in message
news:17*****************************@phx.gbl...
Hello,

I need to know how I can check if the drives on my machine
are network drives and local drives via the .Net framework.

For example my PC has the following drives
C: Local
D: Local
N: Network
S: Network

I want to get the information regarding 'Local'
and 'Network'.

Thanks,

Nov 16 '05 #2

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

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
2
by: giloosh99 | last post by:
Hello, Im grabbing tables via VB code using visual foxpro ODBC drives. The tables directory is in a mapped network drive. The code works fine and does the job, however if the computer is idle for...
5
by: Niloday | last post by:
Hi All, I am trying to access a mapped network drive from a service that I have created. The service needs to create/delete folders/files on a network drive. When I tried to connect to a...
1
by: BuddyWork | last post by:
Hello, I need to know how I can check if the drives on my machine are network drives and local drives via the .Net framework. For example my PC has the following drives C: Local D: Local N:...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
14
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the...
2
by: Joris De Groote | last post by:
Hi How can I check if a directory exists in a network drive? I can check it on the local machine, but when I want to check a network drive, that doenst work, how can I do this? Thanks Joris
1
by: shailesh | last post by:
Hi, Few very simple questions. Is there a way to detect whether a drive is a mapped network drive or not in Windows? Also, how can I get a list of drive letters currently in use in the...
4
by: cj | last post by:
How would you suggest I test that my network drive is still up and running. Right now I'm going to write to a file at the root of the drive and then read it back in. If either the write or read...
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?
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
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,...
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...
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.