I am trying to code something that will essentially concat a bunch of files together into 1 output file.
my code is as follows
string[] destination = new string[this.lbFiles.Items.Count];
this.lbFiles.Items.CopyTo(destination, 0);
string result1 = ConvertStringArrayToString(destination);
result1 = result1.Remove(result1.Length - 3);
string outputfile = this.saveFileDialog1.FileName;
string copyarg = "copy /b " + result1 + quote + outputfile + quote;
System.Diagnostics.Process.Start("CMD.exe", copyarg);
So basically result1 = all the files i'm trying to concatenate. with full paths and quotes. and outputfile = the output file name i want to use with full path.
My problem is, when I execute the code, it copys the files, but it doesnt use the output file name I have specified, and it outputs the file to the directory where the program exe is located, not the path I have specified.
Any help?