.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

File append operation in C# windows application

Posted By: Madhu Gowda     Posted Date: September 27, 2011    Points:5   Category :Windows Application
Hi All,
i have written code to read the data from multiple txt files (Folder).
how to append data from multiple files into single txt file.
In my application its read data for all files but it will write only last file data into output file...i want to write all files data into a output file
i have used following code to write in output file

private void File_write(string SFile_name, string Serror_msg)
{FileStream File_Stream = new
FileStream(strDir,FileMode.Append,FileAccess.Write); // strDir is output file path
sw = new StreamWriter(File_Stream);
sw.Close();File_Stream.Close(); }

please help me to come out from this issue..

Thanks in advance,

Madhu Gowda


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend