473,507 Members | 8,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to browse directories of an IP address

4 New Member
Hello,I was wondering how to write code to enable me to browse directories of an IP address that i enter into a textbox. I want to browse the directories and select one to compare it with another directory on my local host. This is done in a Windows Forms application. Please help if possible.
Mar 1 '11 #1
5 13681
tourrider
3 New Member
You can browse UNC resources via Ip address. You'll need access to a share on the host machine.

this example shows access to the administrative share on the localhost(127.0.0.1).

string myIPaddress = "\\\\127.0.0.1\\C$";
string[] folders = Directory.GetDirectories(myIPaddress);
foreach (string file in folders)
Console.WriteLine(Path.GetFileName(file));


Using a resolvable hostname works too..

string myHostName = "\\\\hrPC00161904\\C$";
string[] folders = Directory.GetDirectories(myHostName);
foreach (string file in folders)
Console.WriteLine(Path.GetFileName(file));


Cheers !
Mar 2 '11 #2
Jaswiel
4 New Member
Thanks for the answer, problem is it is a windows GUI application so i want to list the directory contents in a listView control and i want to compare the if the files are the same in both directories and compare file versions of the files that are the same. Thanks for your help. I am really lost on this and would greatly appreciate it if you could help me?
Mar 3 '11 #3
Jaswiel
4 New Member
And how do I connect to the IP of another computer? What connection should I use? I am really inexperienced with this sort of thing.
Mar 3 '11 #4
tourrider
3 New Member
Find the attached project.

It shows how to use the Directory and File classes.

This should give you some ideas.
Attached Files
File Type: zip DirBrowser.zip (32.9 KB, 1027 views)
Mar 3 '11 #5
Jaswiel
4 New Member
Thank you it has given me ideas. Do you know how to list the file versions with the file names in the listView? that would really help me a lot. Major problem is sorted out now, thank you so much, now I just have to figure out how to compare if both directories contain the same files and same file versions of those files. Please help if possible?
Mar 4 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1609
by: Edwin M. Turner | last post by:
I would like the directories of my Website and their contents containing images to be visible just like it is when you navigate on your local machine using Explorer. That way anyone can browse the...
21
66768
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
2
1812
by: Boris | last post by:
Hi, I have recently learned from a kind MVP that VS .NET 2002 won't use .NET framework 1.1 which in turn prevents me from utilizing the FolderBrowserDialog class since it is only available in...
5
1777
by: Eric Twietmeyer | last post by:
Hi, Does anyone know why starting with VS.NET 2002 (and same with 2003) it is no longer possible to browse to a directory that has "ept" as part of the path? It worked fine in Vc 6.x. My...
0
1760
by: Yogesh Pancholi | last post by:
For some unexplained reason, I am suddenly unable to browse to a virtual directory on my laptop. I have a number of sample websites to which I could happliy browse up until last week. As of Monday,...
2
1276
by: Alex Smith | last post by:
Hi, I want to browse Directries and files of my IIS server using C#.Net. Anybody help me? Thnking you, Samir
0
1579
by: AC [MVP MCMS] | last post by:
I have a full blown VS.NET 2003 solution with a handful of library assemblies, two web projects, and a few web service projects. The entire solution is in VSS. Recently our build server went...
0
849
by: Piz | last post by:
Hi all. I would like to place in my asp .net 2.0 website a treeview control that allows the user to browse directories and all of its subdirectories from a certain root. I don't know so much...
0
3795
by: wardley | last post by:
Browse Internal URL through Server from Web Address Not sure how to ask this.. but, I have internal IPs that have web content. That I want to be able to browse from a real world web address. ...
6
16989
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project...
0
7105
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
7308
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,...
1
7023
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
7479
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
5617
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,...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
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
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.