hi..
i want to append a text to a existing file..
that file is in another system..through LAN i want to append text to that file..
how to do that..
its urgent..
regards
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bechir BejaouiPosted Dec 20, 2008, 7:35 AM
string AddedText = new StreamReader(@"C:\file1.txt").ReadToEnd();
System.IO.StreamWriter oWriter = File.AppendText(@"C:\file2.txt");
oWriter.WriteLine(AddedText);
Actually I haven't a LAN installation otherwise I will leverage a compelete code that does that, I can get you a code that I never test it by myself but never the less I invite you to take a look on this article
http://www.codeproject.com/KB/cs/SocketApplication.aspx