Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
GeneralRe: search for torrent files Pin
Umesh873811-May-08 21:19
Umesh873811-May-08 21:19 
GeneralRe: search for torrent files Pin
Christian Graus11-May-08 21:24
protectorChristian Graus11-May-08 21:24 
GeneralRe: search for torrent files Pin
Umesh873811-May-08 21:27
Umesh873811-May-08 21:27 
Questiontransfer parameter to thread via .NET 1.0 [modified] Pin
shinboxe11-May-08 20:52
shinboxe11-May-08 20:52 
AnswerRe: transfer parameter to thread via .NET 1.0 Pin
#realJSOP11-May-08 23:47
professional#realJSOP11-May-08 23:47 
GeneralRe: transfer parameter to thread via .NET 1.0 Pin
shinboxe12-May-08 3:02
shinboxe12-May-08 3:02 
GeneralRe: transfer parameter to thread via .NET 1.0 [modified] Pin
#realJSOP12-May-08 5:27
professional#realJSOP12-May-08 5:27 
Questionhow to merge contents of files into single file Pin
uglyeyes11-May-08 20:44
uglyeyes11-May-08 20:44 
hi!

I am trying to create a console application that accepts a directory path. for eg.
c:\folder

it should read all the files with in this folder with extension .sql and merge into single file. there could be more than one files in the folder. I need to create a new file which should merge all the contents of these files and delete all originals. could someone please help me how to do this.
so far i am stucked here..

public void ProcessDir(string sourceDir)
{
string[] fileEntries = Directory.GetFiles(sourceDir, "*.txt", SearchOption.TopDirectoryOnly);


FileStream fout;

// open output file
try
{
FileStream fsw = new FileStream("C:\\work\\7.5.08\\testmsbuild\\Foo\\Foo\\Z.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
}
catch (IOException exc)
{
Console.WriteLine(exc.Message + "\nError Opening Output File");
return;
}

foreach (string fileName in fileEntries)
{
// do something with fileName
Console.WriteLine(fileName);
StreamReader tr = new StreamReader(fileName);

}
AnswerRe: how to merge contents of files into single file Pin
Christian Graus11-May-08 20:48
protectorChristian Graus11-May-08 20:48 
QuestionMDI Pin
benjamin yap11-May-08 20:43
benjamin yap11-May-08 20:43 
AnswerRe: MDI Pin
greekius11-May-08 21:08
greekius11-May-08 21:08 
GeneralRe: MDI Pin
benjamin yap11-May-08 22:53
benjamin yap11-May-08 22:53 
GeneralRe: MDI Pin
natsuyaki11-May-08 23:13
natsuyaki11-May-08 23:13 
QuestionOUTLOOK Connector Pin
mohant$.net11-May-08 20:21
mohant$.net11-May-08 20:21 
QuestionHow to embed Excel spreadsheet in Windows forms application Pin
nilam247711-May-08 19:53
nilam247711-May-08 19:53 
AnswerRe: How to embed Excel spreadsheet in Windows forms application Pin
Spunky Coder11-May-08 20:14
Spunky Coder11-May-08 20:14 
QuestionRe: How to embed Excel spreadsheet in Windows forms application Pin
nilam247711-May-08 20:39
nilam247711-May-08 20:39 
AnswerRe: How to embed Excel spreadsheet in Windows forms application Pin
Christian Graus11-May-08 20:48
protectorChristian Graus11-May-08 20:48 
Questionhow to by pass login page??? Pin
Ron.S11-May-08 19:20
Ron.S11-May-08 19:20 
AnswerRe: how to by pass login page??? Pin
Christian Graus11-May-08 19:37
protectorChristian Graus11-May-08 19:37 
Questioncode signing the assemblies Pin
ananthrahul11-May-08 19:13
ananthrahul11-May-08 19:13 
Questionimport html into label of C# Pin
ilu_f911-May-08 19:06
ilu_f911-May-08 19:06 
AnswerRe: import html into label of C# Pin
Christian Graus11-May-08 19:41
protectorChristian Graus11-May-08 19:41 
Questiona component named mouse recognizer Pin
mehrnoosh11-May-08 18:13
mehrnoosh11-May-08 18:13 
AnswerRe: a component named mouse recognizer Pin
Abhijit Jana11-May-08 18:48
professionalAbhijit Jana11-May-08 18:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.