473,327 Members | 1,920 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,327 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 4860
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.