473,395 Members | 1,677 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 can i get the path of the folder from different pc

1
how can i get the path of the folder from (network) diffrent pc (ex.\\123.102.23.23\\MyFolder) i got some error in streamReader, "Could not found part of the file"
plesse help..

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.IO;      
  10.  
  11. namespace Read_Text
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void Form1_Load(object sender, EventArgs e)
  21.         {
  22.  
  23.         }
  24.  
  25.         private void btnGetText_Click(object sender, EventArgs e)
  26.         {
  27.  
  28.             StreamReader objstream = new StreamReader("\\123.123.123.12\\MyFolder\\Mytext.txt"); 
  29.  
  30.             txtData.Text = objstream.ReadToEnd();
  31.  
  32.  
  33.         }
  34.  
  35.         private void btnExit_Click(object sender, EventArgs e)
  36.         {
  37.             Application.Exit();
  38.         }
  39.     }
  40. }
Jul 8 '11 #1
0 998

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

Similar topics

3
by: Scott Carlson | last post by:
New to Python. Very new. I need to pass a parameter to the program I create that points to a folder. (How are params passed in?) Then, I need to be able to scroll through each file in the...
1
by: Blink | last post by:
I have a web application already built (by someone else), and I'm moving the source to my machine to start work on it. However, whenever I try to open it, I get either one of two errors - "Unable...
5
by: Rosa | last post by:
Hi, I'm trying to clear the TIF on Windows XP programmatically with the below code. This code works fine on any folder but the TIF. For some reason the atEnd() statements always defaults to true...
3
by: B Garrett | last post by:
Hi, I have a .ASPX page using C# and I need to read in a text file from a selected path. so in need the file dialog box to allow the user to choose the path and file that they want to read in....
7
by: Brian Henry | last post by:
I am trying to deploy my VB.NET project with a setup project, and I need to make a reg key entry.. but it also needs to have the path to where the program was installed in they string i placed in...
1
by: al jones | last post by:
As a learning exercise in VS 2005 - BASIC, I'm working on a program which may be run on any of the (hopefully) later versions of Windows - assume 98 - XP. Is there a quick / dirty way to...
2
by: APA | last post by:
The problem is that there is no reference to the DLL anywhere in the solution. I have other developers running this identical solution with no problems but on my machine it won't compile if I don't...
1
by: mineplanner | last post by:
I have a javascript that looks for the path location in which the script is running. When I use an alert path most computers report in a format that use backslashes as the path separators. On one...
1
by: Luke Storer | last post by:
I have been making an .exe to empty the OLK folder created by outlook at the minute the folder location is hard written into the code e.g C:\Documents And Settings\Luke\Local Settings Is it...
1
by: humanerror | last post by:
I am currently running a macro to design my documents but my code is written to overwrite the existing file and save it in the same folder without any confirmation. I have 30 such unformatted files...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.